fix(api): close M5 frontend contract gaps
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
getReportSummary,
|
||||
getSavings,
|
||||
getStaffDashboard,
|
||||
getStaffReliabilityStats,
|
||||
getStaffProfileCompletion,
|
||||
getStaffSession,
|
||||
getStaffShiftDetail,
|
||||
@@ -89,6 +90,7 @@ const defaultQueryService = {
|
||||
getSpendBreakdown,
|
||||
getSpendReport,
|
||||
getStaffDashboard,
|
||||
getStaffReliabilityStats,
|
||||
getStaffProfileCompletion,
|
||||
getStaffSession,
|
||||
getStaffShiftDetail,
|
||||
@@ -443,6 +445,15 @@ export function createMobileQueryRouter(queryService = defaultQueryService) {
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/staff/profile/stats', requireAuth, requirePolicy('staff.profile.read', 'staff'), async (req, res, next) => {
|
||||
try {
|
||||
const data = await queryService.getStaffReliabilityStats(req.actor.uid);
|
||||
return res.status(200).json({ ...data, requestId: req.requestId });
|
||||
} catch (error) {
|
||||
return next(error);
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/staff/dashboard', requireAuth, requirePolicy('staff.dashboard.read', 'dashboard'), async (req, res, next) => {
|
||||
try {
|
||||
const data = await queryService.getStaffDashboard(req.actor.uid);
|
||||
|
||||
Reference in New Issue
Block a user