@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,191 @@
1
+ <template>
2
+ <v-row
3
+ justify="center"
4
+ align="start"
5
+ color="page-background-color fill-height header-row"
6
+ >
7
+ <v-col cols="12" sm="12" md="11" lg="12" xl="12">
8
+ <v-row no-gutters class="mb-4">
9
+ <v-col cols="auto">
10
+ <v-btn variant="text" color="primary" class="text-none" @click="back">
11
+ <v-icon left>mdi-arrow-left</v-icon>
12
+ Back
13
+ </v-btn>
14
+ </v-col>
15
+ </v-row>
16
+ <v-card class="pa-5 position-relative rounded-lg">
17
+ <!-- Stock Information -->
18
+ <v-row class="pt-2">
19
+ <v-col cols="12">
20
+ <v-row>
21
+ <v-col cols="6">
22
+ <span class="text-fontgray font-weight-regular text-body-2"
23
+ >Name</span
24
+ >
25
+ <div
26
+ class="text-subtitle-1 text-primary-text font-weight-regular mt-1"
27
+ >
28
+ {{ supply.name || "N/A" }}
29
+ </div>
30
+ </v-col>
31
+ <v-col cols="6">
32
+ <span class="text-fontgray font-weight-regular text-body-2"
33
+ >Unit of Measurement</span
34
+ >
35
+ <div
36
+ class="text-subtitle-1 text-primary-text font-weight-regular mt-1"
37
+ >
38
+ {{ supply.unitOfMeasurement || "N/A" }}
39
+ </div>
40
+ </v-col>
41
+ </v-row>
42
+
43
+ <v-row class="mt-2">
44
+ <v-col cols="6">
45
+ <span class="text-fontgray font-weight-regular text-body-2"
46
+ >Quantity</span
47
+ >
48
+ <div
49
+ class="text-subtitle-1 text-primary-text font-weight-regular mt-1"
50
+ >
51
+ {{ supply.qty || "N/A" }}
52
+ </div>
53
+ </v-col>
54
+ <v-col cols="6">
55
+ <span class="text-fontgray font-weight-regular text-body-2"
56
+ >Remarks</span
57
+ >
58
+ <div
59
+ class="text-subtitle-1 text-primary-text font-weight-regular mt-1"
60
+ >
61
+ {{ supply.remarks || "N/A" }}
62
+ </div>
63
+ </v-col>
64
+ </v-row>
65
+ </v-col>
66
+ </v-row>
67
+
68
+ <v-row>
69
+ <v-col cols="12">
70
+ <v-divider></v-divider>
71
+ </v-col>
72
+ </v-row>
73
+
74
+ <!-- Stock Movement Table -->
75
+ <v-row no-gutters class="mt-4">
76
+ <v-col cols="12">
77
+ <TableMain
78
+ title="Stock History"
79
+ :items="stocks"
80
+ :headers="headers"
81
+ :loading="loading"
82
+ :show-header="true"
83
+ v-model:page="page"
84
+ :pages="pages"
85
+ :pageRange="pageRange"
86
+ no-data-text="No stock records found."
87
+ @refresh="getStockBySupplyIdRefresh"
88
+ >
89
+ <template #item.createdAt="{ item }">
90
+ {{ formatDate(item.createdAt) }}
91
+ </template>
92
+
93
+ <template #item.in="{ item }">
94
+ {{ item.in || 0 }}
95
+ </template>
96
+
97
+ <template #item.out="{ item }">
98
+ {{ item.out || 0 }}
99
+ </template>
100
+
101
+ <template #item.balance="{ item }">
102
+ {{ item.balance || 0 }}
103
+ </template>
104
+ </TableMain>
105
+ </v-col>
106
+ </v-row>
107
+ </v-card>
108
+ </v-col>
109
+ </v-row>
110
+ </template>
111
+
112
+ <script setup lang="ts">
113
+ const props = defineProps({
114
+ orgId: { type: String, default: "" },
115
+ site: { type: String, default: "" },
116
+ });
117
+
118
+ const { formatDate, back } = useUtils();
119
+
120
+ const title = ref("Stock");
121
+
122
+ const supply = ref({
123
+ name: "",
124
+ unitOfMeasurement: "",
125
+ qty: 0,
126
+ remarks: "",
127
+ });
128
+
129
+ const { getSupplyById } = useSupply();
130
+
131
+ const supplyId = useRoute().params.id as string;
132
+
133
+ const { data: getSupplyByIdReq } = await useLazyAsyncData(
134
+ `get-supply-by-id-${supplyId}`,
135
+ () => getSupplyById(supplyId),
136
+ );
137
+
138
+ watchEffect(() => {
139
+ if (getSupplyByIdReq?.value) {
140
+ supply.value = getSupplyByIdReq.value as any;
141
+ }
142
+ });
143
+
144
+ const stocks = ref([]);
145
+ const page = ref(1);
146
+ const pages = ref(0);
147
+ const pageRange = ref("-- - -- of --");
148
+ const headers = [
149
+ { title: "Created At", value: "createdAt" },
150
+ { title: "In", value: "in" },
151
+ { title: "Out", value: "out" },
152
+ { title: "Balance", value: "balance" },
153
+ ];
154
+
155
+ const { getStockBySupply } = useStock();
156
+
157
+ const {
158
+ data: getStockBySupplyIdReq,
159
+ refresh: getStockBySupplyIdRefresh,
160
+ pending: loading,
161
+ } = await useLazyAsyncData(
162
+ `get-stock-by-supply-id-${supplyId}-page-${page}`,
163
+ () => getStockBySupply(props.site, supplyId),
164
+ {
165
+ watch: [page, () => props.site, () => supplyId],
166
+ },
167
+ );
168
+
169
+ watchEffect(() => {
170
+ if (getStockBySupplyIdReq.value) {
171
+ stocks.value = getStockBySupplyIdReq.value.items;
172
+ pages.value = getStockBySupplyIdReq.value.pages;
173
+ pageRange.value = getStockBySupplyIdReq.value.pageRange;
174
+ }
175
+ });
176
+ </script>
177
+
178
+ <style scoped>
179
+ .text-fontgray {
180
+ color: #7e7e7e;
181
+ }
182
+
183
+ :deep() .v-table .v-table__wrapper > table > thead > tr > th:not(:last-child) {
184
+ border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
185
+ }
186
+
187
+ :deep() .v-table .v-table__wrapper > table > tbody > tr > td:not(:last-child),
188
+ .v-table .v-table__wrapper > table > tbody > tr > th:not(:last-child) {
189
+ border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
190
+ }
191
+ </style>