@7365admin1/layer-common 1.9.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/components/AcceptDialog.vue +44 -0
  3. package/components/AccessCardAddForm.vue +101 -13
  4. package/components/AccessManagement.vue +130 -47
  5. package/components/AddSupplyForm.vue +165 -0
  6. package/components/AreaChecklistHistoryLogs.vue +235 -0
  7. package/components/AreaChecklistHistoryMain.vue +176 -0
  8. package/components/AreaFormDialog.vue +266 -0
  9. package/components/AreaMain.vue +841 -0
  10. package/components/AttendanceCheckInOutDialog.vue +416 -0
  11. package/components/AttendanceDetailsDialog.vue +184 -0
  12. package/components/AttendanceMain.vue +155 -0
  13. package/components/AttendanceMapSearchDialog.vue +393 -0
  14. package/components/AttendanceSettingsDialog.vue +398 -0
  15. package/components/BuildingManagement/buildings.vue +5 -5
  16. package/components/BuildingManagement/units.vue +5 -5
  17. package/components/ChecklistItemRow.vue +54 -0
  18. package/components/CheckoutItemMain.vue +705 -0
  19. package/components/CleaningScheduleMain.vue +271 -0
  20. package/components/DocumentManagement.vue +8 -9
  21. package/components/EntryPass/QrTemplatePreview.vue +104 -0
  22. package/components/EntryPassMain.vue +252 -200
  23. package/components/HygieneUpdateMoreAction.vue +238 -0
  24. package/components/IncidentReport/Authorities.vue +226 -0
  25. package/components/IncidentReport/IncidentInformation.vue +258 -0
  26. package/components/IncidentReport/affectedEntities.vue +167 -0
  27. package/components/InvitationMain.vue +19 -17
  28. package/components/ManageChecklistMain.vue +384 -0
  29. package/components/MemberMain.vue +48 -20
  30. package/components/MyAttendanceMain.vue +224 -0
  31. package/components/OnlineFormsConfiguration.vue +9 -2
  32. package/components/PasswordConfirmation.vue +95 -0
  33. package/components/PhotoUpload.vue +410 -0
  34. package/components/RolePermissionMain.vue +17 -15
  35. package/components/ScheduleAreaMain.vue +313 -0
  36. package/components/ScheduleTaskAreaFormDialog.vue +144 -0
  37. package/components/ScheduleTaskAreaUpdateMoreAction.vue +109 -0
  38. package/components/ScheduleTaskForm.vue +471 -0
  39. package/components/ScheduleTaskMain.vue +345 -0
  40. package/components/ScheduleTastTicketMain.vue +182 -0
  41. package/components/ServiceProviderMain.vue +27 -7
  42. package/components/StockCard.vue +191 -0
  43. package/components/SupplyManagementMain.vue +557 -0
  44. package/components/TableHygiene.vue +617 -0
  45. package/components/UnitMain.vue +451 -0
  46. package/components/VisitorManagement.vue +28 -15
  47. package/composables/useAccessManagement.ts +90 -0
  48. package/composables/useAreaPermission.ts +51 -0
  49. package/composables/useAreas.ts +99 -0
  50. package/composables/useAttendance.ts +89 -0
  51. package/composables/useAttendancePermission.ts +68 -0
  52. package/composables/useBuilding.ts +2 -2
  53. package/composables/useBuildingUnit.ts +2 -2
  54. package/composables/useCard.ts +2 -0
  55. package/composables/useCheckout.ts +61 -0
  56. package/composables/useCheckoutPermission.ts +80 -0
  57. package/composables/useCleaningPermission.ts +229 -0
  58. package/composables/useCleaningSchedulePermission.ts +58 -0
  59. package/composables/useCleaningSchedules.ts +233 -0
  60. package/composables/useCountry.ts +8 -0
  61. package/composables/useDOBEntries.ts +13 -0
  62. package/composables/useDashboardData.ts +2 -2
  63. package/composables/useDocument.ts +3 -2
  64. package/composables/useFeedback.ts +1 -1
  65. package/composables/useFile.ts +4 -6
  66. package/composables/useLocation.ts +78 -0
  67. package/composables/useOnlineForm.ts +16 -9
  68. package/composables/usePeople.ts +87 -72
  69. package/composables/useQR.ts +29 -0
  70. package/composables/useRole.ts +3 -2
  71. package/composables/useScheduleTask.ts +89 -0
  72. package/composables/useScheduleTaskArea.ts +85 -0
  73. package/composables/useScheduleTaskPermission.ts +68 -0
  74. package/composables/useSiteEntryPassSettings.ts +4 -15
  75. package/composables/useStock.ts +45 -0
  76. package/composables/useSupply.ts +63 -0
  77. package/composables/useSupplyPermission.ts +92 -0
  78. package/composables/useUnitPermission.ts +51 -0
  79. package/composables/useUnits.ts +82 -0
  80. package/composables/useWebUsb.ts +389 -0
  81. package/composables/useWorkOrder.ts +1 -1
  82. package/nuxt.config.ts +3 -0
  83. package/package.json +4 -1
  84. package/types/area.d.ts +22 -0
  85. package/types/attendance.d.ts +38 -0
  86. package/types/checkout-item.d.ts +27 -0
  87. package/types/cleaner-schedule.d.ts +54 -0
  88. package/types/location.d.ts +42 -0
  89. package/types/schedule-task.d.ts +18 -0
  90. package/types/stock.d.ts +16 -0
  91. package/types/supply.d.ts +11 -0
  92. package/types/verification.d.ts +1 -1
  93. package/utils/acm-crypto.ts +30 -0
@@ -0,0 +1,99 @@
1
+ export default function useAreas() {
2
+ async function getAreas({
3
+ site = "",
4
+ search = "",
5
+ page = 1,
6
+ limit = 10,
7
+ type = "",
8
+ } = {}) {
9
+ return useNuxtApp().$api<Record<string, any>>(
10
+ `/api/hygiene-areas/site/${site}`,
11
+ {
12
+ method: "GET",
13
+ query: {
14
+ search,
15
+ page,
16
+ limit,
17
+ type,
18
+ },
19
+ },
20
+ );
21
+ }
22
+
23
+ function createArea(payload: TAreaCreate, site: string) {
24
+ return useNuxtApp().$api<Record<string, any>>(
25
+ `/api/hygiene-areas/site/${site}`,
26
+ {
27
+ method: "POST",
28
+ body: {
29
+ name: payload.name,
30
+ set: payload.set,
31
+ type: payload.type,
32
+ units: payload.units,
33
+ },
34
+ },
35
+ );
36
+ }
37
+
38
+ function updateArea(id: string, payload: TAreaCreate) {
39
+ return useNuxtApp().$api<Record<string, any>>(
40
+ `/api/hygiene-areas/id/${id}`,
41
+ {
42
+ method: "PATCH",
43
+ body: {
44
+ name: payload.name,
45
+ set: payload.set,
46
+ type: payload.type,
47
+ units: payload.units,
48
+ },
49
+ },
50
+ );
51
+ }
52
+
53
+ function deleteArea(id: string) {
54
+ return useNuxtApp().$api<Record<string, any>>(
55
+ `/api/hygiene-areas/id/${id}`,
56
+ {
57
+ method: "DELETE",
58
+ },
59
+ );
60
+ }
61
+
62
+ function getAreaById(id: string) {
63
+ return useNuxtApp().$api<Record<string, any>>(
64
+ `/api/hygiene-areas/id/${id}`,
65
+ {
66
+ method: "GET",
67
+ },
68
+ );
69
+ }
70
+
71
+ function uploadAreas(file: File, site: string) {
72
+ const formData = new FormData();
73
+ formData.append("file", file);
74
+ return useNuxtApp().$api<Record<string, any>>(
75
+ `/api/hygiene-areas/site/${site}/upload`,
76
+ {
77
+ method: "POST",
78
+ body: formData,
79
+ },
80
+ );
81
+ }
82
+
83
+ async function exportAreas(site: string) {
84
+ return useNuxtApp().$api<Blob>(`/api/hygiene-areas/site/${site}/download`, {
85
+ method: "GET",
86
+ responseType: "blob",
87
+ });
88
+ }
89
+
90
+ return {
91
+ getAreas,
92
+ createArea,
93
+ updateArea,
94
+ deleteArea,
95
+ getAreaById,
96
+ uploadAreas,
97
+ exportAreas,
98
+ };
99
+ }
@@ -0,0 +1,89 @@
1
+ export default function useAttendance() {
2
+ function getAttendances({
3
+ site = "",
4
+ page = 1,
5
+ limit = 10,
6
+ search = "",
7
+ } = {}) {
8
+ return useNuxtApp().$api<Record<string, any>>(
9
+ `/api/attendances/site/${site}`,
10
+ {
11
+ method: "GET",
12
+ query: { page, limit, search },
13
+ }
14
+ );
15
+ }
16
+
17
+ function getMyAttendances({
18
+ site = "",
19
+ page = 1,
20
+ limit = 10,
21
+ search = "",
22
+ } = {}) {
23
+ return useNuxtApp().$api<Record<string, any>>(
24
+ `/api/attendances/site/${site}/user`,
25
+ {
26
+ method: "GET",
27
+ query: { page, limit, search },
28
+ }
29
+ );
30
+ }
31
+
32
+ function getMyAttendanceById(id: string) {
33
+ return useNuxtApp().$api<Record<string, any>>(`/api/attendances/id/${id}`, {
34
+ method: "GET",
35
+ });
36
+ }
37
+
38
+ function checkIn(site: string, payload: TAttendanceCheckIn) {
39
+ return useNuxtApp().$api<Record<string, any>>(
40
+ `/api/attendances/site/${site}/check-in`,
41
+ {
42
+ method: "POST",
43
+ body: payload,
44
+ }
45
+ );
46
+ }
47
+
48
+ function checkOut(id: string, payload: TAttendanceCheckOut) {
49
+ return useNuxtApp().$api<Record<string, any>>(
50
+ `/api/attendances/id/${id}/check-out`,
51
+ {
52
+ method: "PUT",
53
+ body: payload,
54
+ }
55
+ );
56
+ }
57
+
58
+ function getAttendanceSettings(site: string) {
59
+ return useNuxtApp().$api<TAttendanceSettings>(
60
+ `/api/attendance-settings/site/${site}`,
61
+ {
62
+ method: "GET",
63
+ }
64
+ );
65
+ }
66
+
67
+ function updateAttendanceSettings(
68
+ site: string,
69
+ payload: TAttendanceSettings
70
+ ) {
71
+ return useNuxtApp().$api<Record<string, any>>(
72
+ `/api/attendance-settings/site/${site}`,
73
+ {
74
+ method: "PUT",
75
+ body: payload,
76
+ }
77
+ );
78
+ }
79
+
80
+ return {
81
+ getAttendances,
82
+ getMyAttendances,
83
+ getMyAttendanceById,
84
+ checkIn,
85
+ checkOut,
86
+ getAttendanceSettings,
87
+ updateAttendanceSettings,
88
+ };
89
+ }
@@ -0,0 +1,68 @@
1
+ export function useAttendancePermission() {
2
+ const { hasPermission } = usePermission();
3
+ const { permissions } = useCleaningPermission();
4
+ const { userAppRole } = useLocalSetup();
5
+
6
+ const canViewAllAttendance = computed(() => {
7
+ if (!userAppRole.value) return true;
8
+ if (userAppRole.value.permissions.includes("*")) return true;
9
+ return hasPermission(
10
+ userAppRole.value,
11
+ permissions,
12
+ "attendance-mgmt",
13
+ "see-all-attendance"
14
+ );
15
+ });
16
+
17
+ const canViewAttendanceDetails = computed(() => {
18
+ if (!userAppRole.value) return true;
19
+ if (userAppRole.value.permissions.includes("*")) return true;
20
+ return hasPermission(
21
+ userAppRole.value,
22
+ permissions,
23
+ "attendance-mgmt",
24
+ "see-attendance-details"
25
+ );
26
+ });
27
+
28
+ const canManageAttendanceSettings = computed(() => {
29
+ if (!userAppRole.value) return true;
30
+ if (userAppRole.value.permissions.includes("*")) return true;
31
+ return hasPermission(
32
+ userAppRole.value,
33
+ permissions,
34
+ "attendance-mgmt",
35
+ "manage-attendance-settings"
36
+ );
37
+ });
38
+
39
+ const canViewOwnAttendance = computed(() => {
40
+ if (!userAppRole.value) return true;
41
+ if (userAppRole.value.permissions.includes("*")) return true;
42
+ return hasPermission(
43
+ userAppRole.value,
44
+ permissions,
45
+ "my-attendance",
46
+ "see-own-attendance"
47
+ );
48
+ });
49
+
50
+ const canCheckInOut = computed(() => {
51
+ if (!userAppRole.value) return true;
52
+ if (userAppRole.value.permissions.includes("*")) return true;
53
+ return hasPermission(
54
+ userAppRole.value,
55
+ permissions,
56
+ "my-attendance",
57
+ "check-in-out"
58
+ );
59
+ });
60
+
61
+ return {
62
+ canViewAllAttendance,
63
+ canViewAttendanceDetails,
64
+ canManageAttendanceSettings,
65
+ canViewOwnAttendance,
66
+ canCheckInOut,
67
+ };
68
+ }
@@ -231,8 +231,8 @@ export default function useBuilding() {
231
231
  }
232
232
 
233
233
  function deleteById(id: string) {
234
- return useNuxtApp().$api(`/api/buildings/id/${id}`, {
235
- method: "DELETE",
234
+ return useNuxtApp().$api(`/api/buildings/${id}`, {
235
+ method: "PUT",
236
236
  });
237
237
  }
238
238
 
@@ -90,8 +90,8 @@ export default function useBuildingUnit() {
90
90
  }
91
91
 
92
92
  function deleteById(id: string) {
93
- return useNuxtApp().$api(`/api/building-units/id/${id}`, {
94
- method: "DELETE",
93
+ return useNuxtApp().$api(`/api/building-units/${id}`, {
94
+ method: "PUT",
95
95
  });
96
96
  }
97
97
 
@@ -5,6 +5,7 @@ export default function useCard() {
5
5
  limit = 10,
6
6
  status = "active",
7
7
  site = "",
8
+ assignFilter = "available",
8
9
  } = {}) {
9
10
  return useNuxtApp().$api<Record<string, any>>(`/api/cards`, {
10
11
  method: "GET",
@@ -14,6 +15,7 @@ export default function useCard() {
14
15
  limit,
15
16
  status,
16
17
  site,
18
+ assignFilter,
17
19
  },
18
20
  });
19
21
  }
@@ -0,0 +1,61 @@
1
+ export default function useCheckout() {
2
+ function getCheckoutItems({
3
+ page = 1,
4
+ search = "",
5
+ limit = 10,
6
+ site = "",
7
+ } = {}) {
8
+ return useNuxtApp().$api<Record<string, any>>(
9
+ `/api/hygiene-checkout-items/site/${site}`,
10
+ {
11
+ method: "GET",
12
+ query: { page, search, limit, site },
13
+ },
14
+ );
15
+ }
16
+
17
+ function getCheckoutItemById(id: string) {
18
+ return useNuxtApp().$api<Record<string, any>>(
19
+ `/api/hygiene-checkout-items/id/${id}`,
20
+ {
21
+ method: "GET",
22
+ },
23
+ );
24
+ }
25
+
26
+ function checkoutItems(site: string, payload: TCheckoutItemCreate) {
27
+ return useNuxtApp().$api<Record<string, any>>(
28
+ `/api/hygiene-checkout-items/site/${site}/batch`,
29
+ {
30
+ method: "POST",
31
+ body: payload,
32
+ },
33
+ );
34
+ }
35
+
36
+ function approveItem(id: string) {
37
+ return useNuxtApp().$api<Record<string, any>>(
38
+ `/api/hygiene-checkout-items/id/${id}/approve`,
39
+ {
40
+ method: "PATCH",
41
+ },
42
+ );
43
+ }
44
+
45
+ function disapproveItem(id: string, remarks: string) {
46
+ return useNuxtApp().$api<Record<string, any>>(
47
+ `/api/hygiene-checkout-items/id/${id}/disapprove`,
48
+ {
49
+ method: "PATCH",
50
+ body: { remarks },
51
+ },
52
+ );
53
+ }
54
+ return {
55
+ getCheckoutItems,
56
+ getCheckoutItemById,
57
+ checkoutItems,
58
+ approveItem,
59
+ disapproveItem,
60
+ };
61
+ }
@@ -0,0 +1,80 @@
1
+ export function useCheckoutPermission() {
2
+ const { hasPermission } = usePermission();
3
+ const { permissions } = useCleaningPermission();
4
+ const { userAppRole } = useLocalSetup();
5
+
6
+ const canViewAllCheckouts = computed(() => {
7
+ if (!userAppRole.value) return true;
8
+ if (userAppRole.value.permissions.includes("*")) return true;
9
+ return hasPermission(
10
+ userAppRole.value,
11
+ permissions,
12
+ "checkout-item-mgmt",
13
+ "see-all-checkouts"
14
+ );
15
+ });
16
+
17
+ const canCreateCheckout = computed(() => {
18
+ if (!userAppRole.value) return true;
19
+ if (userAppRole.value.permissions.includes("*")) return true;
20
+ return hasPermission(
21
+ userAppRole.value,
22
+ permissions,
23
+ "checkout-item-mgmt",
24
+ "create-checkout"
25
+ );
26
+ });
27
+
28
+ const canUpdateCheckout = computed(() => {
29
+ if (!userAppRole.value) return true;
30
+ if (userAppRole.value.permissions.includes("*")) return true;
31
+ return hasPermission(
32
+ userAppRole.value,
33
+ permissions,
34
+ "checkout-item-mgmt",
35
+ "update-checkout"
36
+ );
37
+ });
38
+
39
+ const canApproveCheckout = computed(() => {
40
+ if (!userAppRole.value) return true;
41
+ if (userAppRole.value.permissions.includes("*")) return true;
42
+ return hasPermission(
43
+ userAppRole.value,
44
+ permissions,
45
+ "checkout-item-mgmt",
46
+ "approve-checkout"
47
+ );
48
+ });
49
+
50
+ const canDisapproveCheckout = computed(() => {
51
+ if (!userAppRole.value) return true;
52
+ if (userAppRole.value.permissions.includes("*")) return true;
53
+ return hasPermission(
54
+ userAppRole.value,
55
+ permissions,
56
+ "checkout-item-mgmt",
57
+ "disapprove-checkout"
58
+ );
59
+ });
60
+
61
+ const canViewCheckoutDetails = computed(() => {
62
+ if (!userAppRole.value) return true;
63
+ if (userAppRole.value.permissions.includes("*")) return true;
64
+ return hasPermission(
65
+ userAppRole.value,
66
+ permissions,
67
+ "checkout-item-mgmt",
68
+ "view-checkout-details"
69
+ );
70
+ });
71
+
72
+ return {
73
+ canViewAllCheckouts,
74
+ canCreateCheckout,
75
+ canUpdateCheckout,
76
+ canApproveCheckout,
77
+ canDisapproveCheckout,
78
+ canViewCheckoutDetails,
79
+ };
80
+ }
@@ -0,0 +1,229 @@
1
+ export default function useCleaningPermission() {
2
+ const {
3
+ rolePermissions,
4
+ memberPermissions,
5
+ feedbackPermissions,
6
+ workOrderPermissions,
7
+ invitationPermissions,
8
+ } = useCommonPermissions();
9
+ const permissions: TPermissions = {
10
+ members: memberPermissions,
11
+ feedbacks: feedbackPermissions,
12
+ work_order: workOrderPermissions,
13
+ roles: rolePermissions,
14
+ invitations: invitationPermissions,
15
+ inventory: {
16
+ "view-inventory": {
17
+ check: true,
18
+ description: "Allows the user to view the inventory list.",
19
+ },
20
+ },
21
+ // area management permissions
22
+ "area-mgmt": {
23
+ "see-all-areas": {
24
+ check: true,
25
+ description:
26
+ "Allows the user to view the list of all areas for a site.",
27
+ },
28
+ "add-area": {
29
+ check: true,
30
+ description: "Allows the user to create/add an area to a site.",
31
+ },
32
+ "update-area": {
33
+ check: true,
34
+ description: "Allows the user to update/edit area details.",
35
+ },
36
+ "import-areas": {
37
+ check: true,
38
+ description: "Allows the user to import/upload areas via CSV/XLSX.",
39
+ },
40
+ "see-area-details": {
41
+ check: true,
42
+ description:
43
+ "Allows the user to view detailed information for an area.",
44
+ },
45
+ "delete-area": {
46
+ check: true,
47
+ description: "Allows the user to delete/remove an area.",
48
+ },
49
+ },
50
+ // unit management permissions
51
+ "unit-mgmt": {
52
+ "see-all-units": {
53
+ check: true,
54
+ description:
55
+ "Allows the user to view the list of all units for a site.",
56
+ },
57
+ "add-unit": {
58
+ check: true,
59
+ description: "Allows the user to create/add a unit to a site.",
60
+ },
61
+ "update-unit": {
62
+ check: true,
63
+ description: "Allows the user to update/edit unit details.",
64
+ },
65
+ "import-units": {
66
+ check: true,
67
+ description: "Allows the user to import/upload units via CSV/XLSX.",
68
+ },
69
+ "see-unit-details": {
70
+ check: true,
71
+ description: "Allows the user to view detailed information for a unit.",
72
+ },
73
+ "delete-unit": {
74
+ check: true,
75
+ description: "Allows the user to delete/remove a unit.",
76
+ },
77
+ },
78
+ // cleaning schedule management permissions
79
+ "cleaning-schedule-mgmt": {
80
+ "see-all-schedules": {
81
+ check: true,
82
+ description:
83
+ "Allows the user to view the list of all cleaning schedules.",
84
+ },
85
+ "see-schedule-details": {
86
+ check: true,
87
+ description:
88
+ "Allows the user to view detailed information for a cleaning schedule.",
89
+ },
90
+ "download-schedule": {
91
+ check: true,
92
+ description: "Allows the user to download cleaning schedule data.",
93
+ },
94
+ "manage-schedule-tasks": {
95
+ check: true,
96
+ description:
97
+ "Allows the user to manage and update cleaning schedule tasks.",
98
+ },
99
+ "generate-checklist": {
100
+ check: true,
101
+ description: "Allows the user to generate new cleaning checklists.",
102
+ },
103
+ "view-history": {
104
+ check: true,
105
+ description: "Allows the user to view cleaning schedule history.",
106
+ },
107
+ "add-remarks": {
108
+ check: true,
109
+ description: "Allows the user to add remarks to cleaning tasks.",
110
+ },
111
+ },
112
+ // schedule task management permissions
113
+ "schedule-task-mgmt": {
114
+ "see-all-schedule-tasks": {
115
+ check: true,
116
+ description: "Allows the user to view the list of all schedule tasks.",
117
+ },
118
+ "add-schedule-task": {
119
+ check: true,
120
+ description: "Allows the user to create/add a new schedule task.",
121
+ },
122
+ "update-schedule-task": {
123
+ check: true,
124
+ description: "Allows the user to update/edit schedule task details.",
125
+ },
126
+ "delete-schedule-task": {
127
+ check: true,
128
+ description: "Allows the user to delete/remove a schedule task.",
129
+ },
130
+ "see-schedule-task-details": {
131
+ check: true,
132
+ description:
133
+ "Allows the user to view detailed information for a schedule task.",
134
+ },
135
+ },
136
+ // attendance management permissions
137
+ "attendance-mgmt": {
138
+ "see-all-attendance": {
139
+ check: true,
140
+ description:
141
+ "Allows the user to view all team members' attendance records.",
142
+ },
143
+ "see-attendance-details": {
144
+ check: true,
145
+ description:
146
+ "Allows the user to view detailed information for an attendance record.",
147
+ },
148
+ "manage-attendance-settings": {
149
+ check: true,
150
+ description:
151
+ "Allows the user to configure and manage attendance settings.",
152
+ },
153
+ },
154
+ // my attendance permissions
155
+ "my-attendance": {
156
+ "see-own-attendance": {
157
+ check: true,
158
+ description: "Allows the user to view their own attendance records.",
159
+ },
160
+ "check-in-out": {
161
+ check: true,
162
+ description: "Allows the user to check in and check out.",
163
+ },
164
+ },
165
+ // supply management permissions
166
+ "supply-mgmt": {
167
+ "see-all-supplies": {
168
+ check: true,
169
+ description: "Allows the user to view the list of all supplies.",
170
+ },
171
+ "add-supply": {
172
+ check: true,
173
+ description: "Allows the user to create/add a new supply item.",
174
+ },
175
+ "update-supply": {
176
+ check: true,
177
+ description: "Allows the user to update/edit supply details.",
178
+ },
179
+ "delete-supply": {
180
+ check: true,
181
+ description: "Allows the user to delete/remove a supply item.",
182
+ },
183
+ "add-stock": {
184
+ check: true,
185
+ description: "Allows the user to add stock to supply items.",
186
+ },
187
+ "view-stock": {
188
+ check: true,
189
+ description: "Allows the user to view stock history and details.",
190
+ },
191
+ "checkout-item": {
192
+ check: true,
193
+ description: "Allows the user to checkout supply items.",
194
+ },
195
+ },
196
+ // checkout item management permissions
197
+ "checkout-item-mgmt": {
198
+ "see-all-checkouts": {
199
+ check: true,
200
+ description: "Allows the user to view all item checkouts.",
201
+ },
202
+ "create-checkout": {
203
+ check: true,
204
+ description: "Allows the user to create new item checkouts.",
205
+ },
206
+ "update-checkout": {
207
+ check: true,
208
+ description: "Allows the user to update/edit item checkouts.",
209
+ },
210
+ "approve-checkout": {
211
+ check: true,
212
+ description: "Allows the user to approve item checkouts.",
213
+ },
214
+ "disapprove-checkout": {
215
+ check: true,
216
+ description: "Allows the user to disapprove item checkouts.",
217
+ },
218
+ "view-checkout-details": {
219
+ check: true,
220
+ description:
221
+ "Allows the user to view detailed information for item checkouts.",
222
+ },
223
+ },
224
+ };
225
+
226
+ return {
227
+ permissions,
228
+ };
229
+ }