feat(api): add M5 coverage controls and frontend spec

This commit is contained in:
zouantchaw
2026-03-18 08:18:50 +01:00
parent 008dd7efb1
commit 32f6cd55c8
14 changed files with 894 additions and 8 deletions

View File

@@ -256,6 +256,36 @@ async function main() {
[fixture.benefits.commuter.id, fixture.tenant.id, fixture.staff.ana.id, fixture.benefits.commuter.title]
);
await client.query(
`
INSERT INTO staff_benefit_history (
id, tenant_id, staff_id, benefit_id, benefit_type, title, status,
effective_at, ended_at, tracked_hours, target_hours, notes, metadata
)
VALUES
(
$1, $3, $4, $5, 'COMMUTER', $6, 'PENDING',
NOW() - INTERVAL '45 days', NOW() - INTERVAL '10 days', 18, 40,
'Hours were below threshold for payout window.',
'{"source":"seed-v2-demo","period":"previous"}'::jsonb
),
(
$2, $3, $4, $5, 'COMMUTER', $6, 'ACTIVE',
NOW() - INTERVAL '9 days', NULL, 32, 40,
'Current active commuter stipend tracking.',
'{"source":"seed-v2-demo","period":"current"}'::jsonb
)
`,
[
fixture.benefitHistory.commuterPending.id,
fixture.benefitHistory.commuterActive.id,
fixture.tenant.id,
fixture.staff.ana.id,
fixture.benefits.commuter.id,
fixture.benefits.commuter.title,
]
);
await client.query(
`
INSERT INTO emergency_contacts (

View File

@@ -99,6 +99,14 @@ export const V2DemoFixture = {
title: 'Commuter Support',
},
},
benefitHistory: {
commuterActive: {
id: '9e46729a-ff53-4d1b-9110-7ee5c38a9001',
},
commuterPending: {
id: '9e46729a-ff53-4d1b-9110-7ee5c38a9002',
},
},
orders: {
open: {
id: 'b6132d7a-45c3-4879-b349-46b2fd518001',