@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,238 @@
1
+ <template>
2
+ <v-card width="100%">
3
+ <v-toolbar>
4
+ <template v-if="$slots.header">
5
+ <slot name="header" :title="title" :onClose="onClose" />
6
+ </template>
7
+ <template v-else>
8
+ <v-row no-gutters class="fill-height px-6" align="center">
9
+ <span class="font-weight-bold text-h5 text-capitalize">{{
10
+ title
11
+ }}</span>
12
+ </v-row>
13
+ </template>
14
+ </v-toolbar>
15
+
16
+ <v-card-text style="max-height: 100vh; overflow-y: auto" class="pb-0">
17
+ <slot name="content" />
18
+ </v-card-text>
19
+
20
+ <v-toolbar class="pa-0" density="compact">
21
+ <v-row no-gutters>
22
+ <v-col cols="6" class="pa-0">
23
+ <v-btn
24
+ block
25
+ variant="text"
26
+ class="text-none"
27
+ size="large"
28
+ @click="emit('close')"
29
+ height="48"
30
+ >
31
+ Close
32
+ </v-btn>
33
+ </v-col>
34
+
35
+ <v-col cols="6" class="pa-0">
36
+ <v-menu>
37
+ <template #activator="{ props }">
38
+ <v-btn
39
+ block
40
+ variant="flat"
41
+ color="black"
42
+ class="text-none"
43
+ height="48"
44
+ :disabled="disabled"
45
+ v-bind="props"
46
+ tile
47
+ >
48
+ More actions
49
+ </v-btn>
50
+ </template>
51
+
52
+ <v-list class="pa-0 rounded-0">
53
+ <v-list-item
54
+ v-if="showQrButton && qrButtonLabel"
55
+ @click="emit('showqr')"
56
+ >
57
+ <v-list-item-title class="text-subtitle-2">
58
+ {{ qrButtonLabel }}
59
+ </v-list-item-title>
60
+ </v-list-item>
61
+
62
+ <v-list-item
63
+ v-if="showViewStock && viewButtonLabel"
64
+ @click="emit('viewStock')"
65
+ >
66
+ <v-list-item-title class="text-subtitle-2">
67
+ {{ viewButtonLabel }}
68
+ </v-list-item-title>
69
+ </v-list-item>
70
+
71
+ <v-list-item
72
+ v-if="showAddStock && addStockButtonLabel"
73
+ @click="emit('addstock')"
74
+ >
75
+ <v-list-item-title class="text-subtitle-2">
76
+ {{ addStockButtonLabel }}
77
+ </v-list-item-title>
78
+ </v-list-item>
79
+
80
+ <v-list-item
81
+ v-if="showApproveRequest && appproveRequestItemButtonLabel"
82
+ @click="emit('approveRequest')"
83
+ >
84
+ <v-list-item-title class="text-subtitle-2">
85
+ {{ appproveRequestItemButtonLabel }}
86
+ </v-list-item-title>
87
+ </v-list-item>
88
+
89
+ <v-list-item
90
+ v-if="showDisapproveRequest && disapproveRequestItemButtonLabel"
91
+ @click="emit('disapproveRequest')"
92
+ >
93
+ <v-list-item-title class="text-subtitle-2">
94
+ {{ disapproveRequestItemButtonLabel }}
95
+ </v-list-item-title>
96
+ </v-list-item>
97
+
98
+ <v-list-item
99
+ v-if="showRequestItem && requestItemButtonLabel"
100
+ @click="emit('requestItem')"
101
+ >
102
+ <v-list-item-title class="text-subtitle-2">
103
+ {{ requestItemButtonLabel }}
104
+ </v-list-item-title>
105
+ </v-list-item>
106
+
107
+ <v-list-item v-if="canUpdate" @click="emit('edit')">
108
+ <v-list-item-title class="text-subtitle-2">
109
+ {{ editButtonLabel }}
110
+ </v-list-item-title>
111
+ </v-list-item>
112
+
113
+ <v-list-item
114
+ v-if="canDelete"
115
+ @click="emit('delete')"
116
+ class="text-red"
117
+ >
118
+ <v-list-item-title class="text-subtitle-2">
119
+ {{ deleteButtonLabel }}
120
+ </v-list-item-title>
121
+ </v-list-item>
122
+ </v-list>
123
+ </v-menu>
124
+ </v-col>
125
+ </v-row>
126
+ </v-toolbar>
127
+ </v-card>
128
+ </template>
129
+
130
+ <script setup lang="ts">
131
+ const prop = defineProps({
132
+ canUpdate: {
133
+ type: Boolean,
134
+ default: true,
135
+ },
136
+ canDelete: {
137
+ type: Boolean,
138
+ default: true,
139
+ },
140
+ editButtonLabel: {
141
+ type: String,
142
+ default: "Edit Area",
143
+ },
144
+ deleteButtonLabel: {
145
+ type: String,
146
+ default: "Delete Area",
147
+ },
148
+
149
+ qrButtonLabel: {
150
+ type: String,
151
+ default: "Show QR",
152
+ },
153
+ showQrButton: {
154
+ type: Boolean,
155
+ default: false,
156
+ },
157
+ addStockButtonLabel: {
158
+ type: String,
159
+ default: "Add Stock",
160
+ },
161
+ viewButtonLabel: {
162
+ type: String,
163
+ default: "View Stock",
164
+ },
165
+ showAddStock: {
166
+ type: Boolean,
167
+ default: false,
168
+ },
169
+ showViewStock: {
170
+ type: Boolean,
171
+ default: false,
172
+ },
173
+ requestItemButtonLabel: {
174
+ type: String,
175
+ default: "Request Item",
176
+ },
177
+
178
+ appproveRequestItemButtonLabel: {
179
+ type: String,
180
+ default: "Approve Request",
181
+ },
182
+
183
+ showApproveRequest: {
184
+ type: Boolean,
185
+ default: false,
186
+ },
187
+ showDisapproveRequest: {
188
+ type: Boolean,
189
+ default: false,
190
+ },
191
+ disapproveRequestItemButtonLabel: {
192
+ type: String,
193
+ default: "Disapprove Request",
194
+ },
195
+ showRequestItem: {
196
+ type: Boolean,
197
+ default: false,
198
+ },
199
+ disabled: {
200
+ type: Boolean,
201
+ default: false,
202
+ },
203
+ title: {
204
+ type: String,
205
+ default: "Actions",
206
+ },
207
+ });
208
+
209
+ const emit = defineEmits([
210
+ "close",
211
+ "edit",
212
+ "delete",
213
+ "showqr",
214
+ "addstock",
215
+ "viewStock",
216
+ "requestItem",
217
+ "approveRequest",
218
+ "disapproveRequest",
219
+ ]);
220
+ const {
221
+ canUpdate,
222
+ editButtonLabel,
223
+ deleteButtonLabel,
224
+
225
+ qrButtonLabel,
226
+ showQrButton,
227
+ addStockButtonLabel,
228
+ viewButtonLabel,
229
+ showAddStock,
230
+ showViewStock,
231
+ title,
232
+ requestItemButtonLabel,
233
+ showRequestItem,
234
+ disabled,
235
+ } = prop;
236
+ </script>
237
+
238
+ <style scoped></style>
@@ -0,0 +1,226 @@
1
+ <template>
2
+ <v-row no-gutters class="px-5 pt-4">
3
+ <!-- Authorities (Police/SCDF/Ambulance called in at the scene) -->
4
+ <v-col cols="12" class="border-b pb-5 mb-5 mt-1">
5
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
6
+ Authorities (Police/SCDF/Ambulance called in at the scene)?
7
+ </p>
8
+ <p
9
+ v-if="authorities?.authoritiesValue == 'no'"
10
+ class="mt-2 text-h6 text-capitalize"
11
+ >
12
+ {{ authorities?.authoritiesValue }}
13
+ </p>
14
+
15
+ <v-data-table
16
+ v-else
17
+ :headers="authoritiesTableHeader"
18
+ :items="authorities?.authoritiesCalled"
19
+ fixed-header
20
+ hide-default-footer
21
+ :hide-default-header="false"
22
+ items-per-page="100"
23
+ style="max-height: calc(100vh - (200px))"
24
+ class="border mt-5"
25
+ >
26
+ </v-data-table>
27
+ </v-col>
28
+
29
+ <!-- Input lists -->
30
+ <v-col cols="12" class="pb-3 mb-5 mt-1">
31
+ <v-row no-gutters>
32
+ <v-col cols="12" class="px-1 mb-7">
33
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
34
+ What was done to address the incident thereafter?
35
+ </p>
36
+ <p class="mt-2 text-h6 text-capitalize">
37
+ {{ authorities?.incidentThereAfter }}
38
+ </p>
39
+ </v-col>
40
+
41
+ <v-col cols="12" class="px-1 mb-7">
42
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
43
+ Were the management notified and who was notified?
44
+ </p>
45
+ <v-row no-gutters>
46
+ <v-col cols="12" sm="6" class="px-1">
47
+ <InputLabel class="text-capitalize" title="Action Taken" />
48
+ <p class="mt-2 text-h6 text-capitalize">
49
+ {{ authorities?.managementNotified?.actionTaken }}
50
+ </p>
51
+ </v-col>
52
+ <v-col cols="12" sm="6" class="px-1">
53
+ <InputLabel
54
+ class="text-capitalize"
55
+ title="Management Notified Time"
56
+ />
57
+ <p class="mt-2 text-h6 text-capitalize">
58
+ {{ authorities?.managementNotified?.time }}
59
+ </p>
60
+ </v-col>
61
+ </v-row>
62
+ </v-col>
63
+
64
+ <v-col cols="12" class="px-1 mb-7">
65
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
66
+ How the incident resolved?
67
+ </p>
68
+ <p class="mt-2 text-h6 text-capitalize">
69
+ {{ authorities?.incidentResolved }}
70
+ </p>
71
+ </v-col>
72
+
73
+ <v-col cols="12" class="px-1 mb-7">
74
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
75
+ What was the cause of the incident?
76
+ </p>
77
+ <p class="mt-2 text-h6 text-capitalize">
78
+ {{ authorities?.causeOfIncident }}
79
+ </p>
80
+ </v-col>
81
+
82
+ <v-col cols="12" class="px-1 mb-6">
83
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
84
+ Any system used to verify incident?
85
+ </p>
86
+ <p class="mt-2 text-h6 text-capitalize">
87
+ {{ authorities?.systemUsed }}
88
+ </p>
89
+ </v-col>
90
+
91
+ <v-col cols="12" class="px-1 mb-6">
92
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
93
+ Any cctv records or picture taken?
94
+ </p>
95
+ <p class="mt-2 text-h6 text-capitalize">
96
+ {{ authorities?.cctvRecord }}
97
+ </p>
98
+ </v-col>
99
+
100
+ <v-col cols="12" class="px-1 mb-6">
101
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
102
+ Particulars of tenant/Owner (if any)
103
+ </p>
104
+ <p class="mt-2 text-h6 text-capitalize">
105
+ {{ authorities?.particularsOwner }}
106
+ </p>
107
+ </v-col>
108
+
109
+ <v-col cols="12" class="px-1 mb-6">
110
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
111
+ When was the incident resolved?
112
+ </p>
113
+ <v-row no-gutters>
114
+ <v-col cols="12" sm="6" class="px-1">
115
+ <InputLabel class="text-capitalize" title="Action Taken" />
116
+ <p class="mt-2 text-h6 text-capitalize">
117
+ {{ authorities?.whenIncidentResolve?.actionTaken }}
118
+ </p>
119
+ </v-col>
120
+ <v-col cols="12" sm="6" class="px-1">
121
+ <InputLabel
122
+ class="text-capitalize"
123
+ title="Incident Resolve Time"
124
+ />
125
+ <p class="mt-2 text-h6 text-capitalize">
126
+ {{ authorities?.whenIncidentResolve?.time }}
127
+ </p>
128
+ </v-col>
129
+ </v-row>
130
+ </v-col>
131
+
132
+ <v-col cols="12" class="px-1 mb-6">
133
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
134
+ Name of shift in charge?
135
+ </p>
136
+ <v-row no-gutters>
137
+ <v-col cols="12" sm="6" class="px-1">
138
+ <InputLabel class="text-capitalize" title="Person in Charge" />
139
+ <p class="mt-2 text-h6 text-capitalize">
140
+ {{ authorities?.nameOfShiftIncharge?.personInCharge }}
141
+ </p>
142
+ </v-col>
143
+ <v-col cols="12" sm="6" class="px-1">
144
+ <InputLabel class="text-capitalize" title="Action Taken" />
145
+ <p class="mt-2 text-h6 text-capitalize">
146
+ {{ authorities?.nameOfShiftIncharge?.actionTaken }}
147
+ </p>
148
+ </v-col>
149
+ </v-row>
150
+ </v-col>
151
+
152
+ <v-col cols="12" class="px-1 mb-6">
153
+ <p class="mb-2" style="font-size: 17px; font-weight: 600"></p>
154
+ <v-row no-gutters>
155
+ <v-col cols="12" sm="6" class="px-1">
156
+ <InputLabel class="text-capitalize" title="Shift Start" />
157
+ <p class="mt-2 text-h6 text-capitalize">
158
+ {{ authorities?.nameOfShiftIncharge?.shiftStart }}
159
+ </p>
160
+ </v-col>
161
+ <v-col cols="12" sm="6" class="px-1">
162
+ <InputLabel class="text-capitalize" title="Shift End" />
163
+ <p class="mt-2 text-h6 text-capitalize">
164
+ {{ authorities?.nameOfShiftIncharge?.shiftEnd }}
165
+ </p>
166
+ </v-col>
167
+ </v-row>
168
+ </v-col>
169
+
170
+ <v-col cols="12" class="px-1">
171
+ <p class="mb-2" style="font-size: 17px; font-weight: 600">
172
+ Any security implication due to the incident?
173
+ </p>
174
+ <p class="mt-2 text-h6 text-capitalize">
175
+ {{ authorities?.securityImplication }}
176
+ </p>
177
+ </v-col>
178
+ </v-row>
179
+ </v-col>
180
+ </v-row>
181
+ </template>
182
+
183
+ <script lang="ts" setup>
184
+ definePageMeta({
185
+ middleware: ["01-auth", "02-org"],
186
+ memberOnly: true,
187
+ });
188
+
189
+ // imports
190
+
191
+ // utilities
192
+
193
+ // props
194
+ const props = defineProps({
195
+ authorities: {
196
+ type: Object as PropType<Record<string, any> | null>,
197
+ required: true,
198
+ },
199
+ });
200
+
201
+ // emits
202
+
203
+ // state
204
+ const authoritiesTableHeader = [
205
+ {
206
+ title: "Type of Authorities",
207
+ value: "type",
208
+ },
209
+ {
210
+ title: "Vehicle Number",
211
+ value: "vehicleNumber",
212
+ },
213
+ {
214
+ title: "Person in Charge",
215
+ value: "personInCharge",
216
+ },
217
+ {
218
+ title: "Case Report Reference",
219
+ value: "caseReportReference",
220
+ },
221
+ {
222
+ title: "Description",
223
+ value: "description",
224
+ },
225
+ ];
226
+ </script>