Hartmut
92a982b151
feat: Nearshore-Ratio indicator per project
...
Engine (packages/engine):
- calculateShoringRatio() pure function: onshore/offshore hours,
country breakdown, threshold check, weighted by hours not headcount
- 12 unit tests: empty, 100% onshore/offshore, mixed ratios,
custom threshold, case-insensitive, unknown country, FTE weighting
Schema:
- Project.shoringThreshold (default 55%) — per-project configurable
- Project.onshoreCountryCode (default "DE") — configurable onshore country
API (project router):
- getShoringRatio query: loads assignments with resource.country,
computes ratio, returns full breakdown
- update mutation: accepts shoringThreshold + onshoreCountryCode
UI:
- ShoringIndicator: stacked horizontal bar with country segments,
severity badge (green/yellow/red), hover tooltip, dark theme
- ShoringBadge: mini colored dot + % for project list column
- ProjectModal: "Max Offshore %" number input
- Project detail: indicator after budget status card
- Project list: "Shoring" column (default hidden, toggleable)
AI Assistant:
- get_shoring_ratio tool: human-readable breakdown with threshold alert
Colors: green (<threshold-10), yellow (threshold-10 to threshold), red (>=threshold)
Default: 55% offshore threshold, "DE" as onshore country
Co-Authored-By: claude-flow <ruv@ruv.net >
2026-03-26 11:45:50 +01:00
Hartmut
47b2aeec72
feat: prevent duplicate resource-project assignments
...
Engine (packages/engine):
- New checkDuplicateAssignment() pure function: detects same resource
assigned to same project with overlapping dates
- 15 unit tests covering: overlap, no-overlap, cancelled, self-exclude,
string dates, PROPOSED status
Application layer (packages/application):
- createAssignment: throws CONFLICT before DB write if duplicate found
- fillDemandRequirement: same check before entering transaction
AI Assistant (packages/api/router/assistant-tools.ts):
- create_allocation: checks before creating, returns helpful error message
- fill_demand: same check using demand's projectId
UI (apps/web):
- AllocationModal: amber warning when resource already assigned to
selected project with overlapping dates (non-blocking)
Database cleanup:
- Found and merged 1 duplicate: Wong Wong on Porsche Taycan Sport Film
(2 overlapping PROPOSED assignments merged into 1)
Regression: 298 engine tests pass (283 + 15 new). TypeScript clean.
Co-Authored-By: claude-flow <ruv@ruv.net >
2026-03-23 08:51:49 +01:00
Hartmut
368fd6d7ad
feat: calculation rules engine for decoupled cost attribution and chargeability
...
Introduces an admin-configurable rules engine that determines per-day cost
attribution (CHARGE/ZERO/REDUCE) and chargeability reporting (COUNT/SKIP)
for absence types (sick, vacation, public holiday). Includes shared types,
Zod schemas, Prisma model, rule matching with specificity scoring, default
rules, calculator integration, CRUD API router, seed data, chargeability
report integration, and admin UI.
283/283 engine tests, 209/209 API tests, 0 TS errors.
Co-Authored-By: claude-flow <ruv@ruv.net >
2026-03-15 09:29:12 +01:00
Hartmut
625a842d89
feat: dashboard overhaul, chargeability reports, dispo import enhancements, UI polish
...
Dashboard: expanded chargeability widget, resource/project table widgets
with sorting and filters, stat cards with formatMoney integration.
Chargeability: new report client with filtering, chargeability-bookings
use case, updated dashboard overview logic.
Dispo import: TBD project handling, parse-dispo-matrix improvements,
stage-dispo-projects resource value scores, new tests.
Estimates: CommercialTermsEditor component, commercial-terms engine
module, expanded estimate schemas and types.
UI: AppShell navigation updates, timeline filter/toolbar enhancements,
role management improvements, signin page redesign, Tailwind/globals
polish, SystemSettings SMTP section, anonymization support.
Tests: new router tests (anonymization, chargeability, effort-rule,
entitlement, estimate, experience-multiplier, notification, resource,
staffing, vacation).
Co-Authored-By: claude-flow <ruv@ruv.net >
2026-03-14 23:29:07 +01:00
Hartmut
dd55d0e78b
chore(repo): initialize planarchy workspace
2026-03-14 14:31:09 +01:00