-
- Generate Route Reports
-
-
+ {canExportRouteReport && (
+ <>
+
+ Generate Route Reports
+
+
+ >
+ )}
diff --git a/client/src/components/trans-routes/RoutesDashboard.js b/client/src/components/trans-routes/RoutesDashboard.js
index da21b10..5c69a27 100644
--- a/client/src/components/trans-routes/RoutesDashboard.js
+++ b/client/src/components/trans-routes/RoutesDashboard.js
@@ -2003,9 +2003,11 @@ const RoutesDashboard = () => {
{
currentTab === 'allRoutesOverview' && <> {
!showCopyDateTargetLoading && <>
-
+ {AuthService.canExportTransportationScheduleReport() && (
+
+ )}
{
+const SnackSection = ({transRoutes, snackRecords, sectionName, confirmHasSnack, removeSnackRecord, selectedDate, refreshRecords, canEdit = false}) => {
const [customers, setCustomers] = useState([]);
const createSnackForAll = async () => {
@@ -40,7 +40,7 @@ const SnackSection = ({transRoutes, snackRecords, sectionName, confirmHasSnack,
return (
<>
{sectionName} {` (${customers?.length})`}
- {customers?.some(c => !c.has_snack) && ()}
+ {canEdit && customers?.some(c => !c.has_snack) && ()}
@@ -48,7 +48,7 @@ const SnackSection = ({transRoutes, snackRecords, sectionName, confirmHasSnack,
| Name |
Has Snack Today |
- Change Snack Status |
+ {canEdit && Change Snack Status | }
@@ -57,10 +57,10 @@ const SnackSection = ({transRoutes, snackRecords, sectionName, confirmHasSnack,
| {customer?.customer_name} |
{customer?.has_snack ? 'Yes': 'No'} |
-
+ {canEdit && |
{!customer?.has_snack && }
{customer?.has_snack && }
- |
+ }
))
}
diff --git a/client/src/components/vehicles/VehicleList.js b/client/src/components/vehicles/VehicleList.js
index c5148f7..98b633b 100644
--- a/client/src/components/vehicles/VehicleList.js
+++ b/client/src/components/vehicles/VehicleList.js
@@ -384,11 +384,13 @@ const VehicleList = () => {
{AuthService.canAddVehicle() && }
-
+ {AuthService.canExportVehicleReport() && (
+
+ )}
diff --git a/client/src/services/AuthService.js b/client/src/services/AuthService.js
index 1ac8038..a542018 100644
--- a/client/src/services/AuthService.js
+++ b/client/src/services/AuthService.js
@@ -221,6 +221,8 @@ const canViewMealStatus = () => {
]);
}
+const canEditMealStatus = () => hasPermission('Edit_Meal Status');
+
const canViewSeatingChart = () => {
return hasAnyPermission([
'View_Seating Chart',
@@ -228,6 +230,10 @@ const canViewSeatingChart = () => {
]);
}
+const canEditSeatingChart = () => {
+ return hasPermission('Edit_Seating Chart');
+}
+
const canViewLobby = () => {
return canViewMealStatus() || canViewSeatingChart();
}
@@ -373,7 +379,9 @@ export const AuthService = {
canViewMedicalEvents,
canEditMedicalEvents,
canViewMealStatus,
+ canEditMealStatus,
canViewSeatingChart,
+ canEditSeatingChart,
canViewLobby,
isAdmin,
canCreateOrEditDrivers,