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

@@ -17,6 +17,7 @@ import {
createClientRecurringOrder,
createEditedOrderCopy,
createHub,
createShiftManager,
declinePendingShift,
disputeInvoice,
quickSetStaffAvailability,
@@ -69,6 +70,7 @@ import {
profileExperienceSchema,
pushTokenDeleteSchema,
pushTokenRegisterSchema,
shiftManagerCreateSchema,
shiftApplySchema,
shiftDecisionSchema,
shiftSubmitApprovalSchema,
@@ -95,6 +97,7 @@ const defaultHandlers = {
createClientRecurringOrder,
createEditedOrderCopy,
createHub,
createShiftManager,
declinePendingShift,
disputeInvoice,
quickSetStaffAvailability,
@@ -260,6 +263,13 @@ export function createMobileCommandsRouter(handlers = defaultHandlers) {
paramShape: (req) => ({ ...req.body, hubId: req.params.hubId }),
}));
router.post(...mobileCommand('/client/shift-managers', {
schema: shiftManagerCreateSchema,
policyAction: 'client.hubs.update',
resource: 'hub_manager',
handler: handlers.createShiftManager,
}));
router.post(...mobileCommand('/client/billing/invoices/:invoiceId/approve', {
schema: invoiceApproveSchema,
policyAction: 'client.billing.write',