@7365admin1/layer-common 1.11.2 → 1.11.6
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.
- package/CHANGELOG.md +25 -0
- package/components/AccessCardAddForm.vue +2 -2
- package/components/AreaMain.vue +4 -0
- package/components/DashboardMain.vue +2 -2
- package/components/{SupplyManagementMain.vue → EquipmentManagementMain.vue} +107 -115
- package/components/ManageChecklistMain.vue +68 -13
- package/components/OvernightParkingAvailability.vue +272 -0
- package/components/OvernightParkingManagement.vue +240 -0
- package/components/Signature.vue +36 -28
- package/components/UnitMain.vue +4 -1
- package/components/VisitorForm.vue +44 -14
- package/composables/useAccessManagement.ts +11 -0
- package/composables/useAreas.ts +3 -0
- package/composables/useComment.ts +1 -1
- package/composables/useFacilityUtils.ts +140 -0
- package/composables/useFeedback.ts +1 -1
- package/composables/useLocalAuth.ts +1 -0
- package/composables/useOvernightParking.ts +78 -0
- package/composables/useSiteSettings.ts +21 -0
- package/composables/useUnits.ts +9 -6
- package/composables/useWorkOrder.ts +50 -18
- package/nuxt.config.ts +2 -1
- package/package.json +1 -1
- package/pages/require-organization-membership.vue +3 -3
- package/types/area.d.ts +1 -0
- package/types/customer.d.ts +13 -2
- package/types/dashboard.d.ts +4 -3
- package/types/overnight-parking.d.ts +43 -0
- package/types/user.d.ts +1 -1
- package/types/work-order.d.ts +1 -0
- package/utils/data.ts +17 -0
- package/components/EquipmentManagement.vue +0 -292
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare type TOvernightParkingDay = {
|
|
2
|
+
isEnabled: boolean;
|
|
3
|
+
startTime: string | null;
|
|
4
|
+
endTime: string | null;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
declare type TOvernightParkingAvailability = {
|
|
8
|
+
monday: TOvernightParkingDay;
|
|
9
|
+
tuesday: TOvernightParkingDay;
|
|
10
|
+
wednesday: TOvernightParkingDay;
|
|
11
|
+
thursday: TOvernightParkingDay;
|
|
12
|
+
friday: TOvernightParkingDay;
|
|
13
|
+
saturday: TOvernightParkingDay;
|
|
14
|
+
sunday: TOvernightParkingDay;
|
|
15
|
+
autoApproveOvernightParking?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type TOvernightParkingRequestStatus =
|
|
19
|
+
| "approved"
|
|
20
|
+
| "expired"
|
|
21
|
+
| "rejected"
|
|
22
|
+
| "pending"
|
|
23
|
+
| (string & {});
|
|
24
|
+
|
|
25
|
+
declare type TOvernightParkingRequest = {
|
|
26
|
+
_id?: ObjectId;
|
|
27
|
+
site: string | ObjectId;
|
|
28
|
+
name: string;
|
|
29
|
+
contact: string;
|
|
30
|
+
email: string;
|
|
31
|
+
isOvernightParking?: boolean;
|
|
32
|
+
numberOfPassengers?: number;
|
|
33
|
+
purposeOfVisit?: string;
|
|
34
|
+
status?: OvernightParkingRequestStatus;
|
|
35
|
+
invitedBy: {
|
|
36
|
+
_id: string | ObjectId;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
createdAt?: string | Date;
|
|
40
|
+
updatedAt?: string | Date;
|
|
41
|
+
deletedAt?: string | Date;
|
|
42
|
+
remarks?: string;
|
|
43
|
+
};
|
package/types/user.d.ts
CHANGED
package/types/work-order.d.ts
CHANGED
package/utils/data.ts
CHANGED
|
@@ -29,3 +29,20 @@ export const errorConverter = (data: any): string => {
|
|
|
29
29
|
}
|
|
30
30
|
return error;
|
|
31
31
|
};
|
|
32
|
+
|
|
33
|
+
export const findServiceProviderIdBySite = (
|
|
34
|
+
type: string,
|
|
35
|
+
serviceProviders: any,
|
|
36
|
+
siteId: string
|
|
37
|
+
) => {
|
|
38
|
+
if (type === "service-provider") {
|
|
39
|
+
const result = serviceProviders.find(
|
|
40
|
+
(item: Record<string, any>) => item.siteId === siteId
|
|
41
|
+
);
|
|
42
|
+
if (!result?._id) {
|
|
43
|
+
throw new Error(`Service provider with siteId ${siteId} not found`);
|
|
44
|
+
}
|
|
45
|
+
return result?._id;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-row no-gutters>
|
|
3
|
-
<v-col cols="12" lg="12">
|
|
4
|
-
<TableMain
|
|
5
|
-
:title="`Units`"
|
|
6
|
-
:items="items"
|
|
7
|
-
:headers="headers"
|
|
8
|
-
:loading="loading"
|
|
9
|
-
:show-header="true"
|
|
10
|
-
v-model:page="page"
|
|
11
|
-
:pages="pages"
|
|
12
|
-
:pageRange="pageRange"
|
|
13
|
-
:no-data-text="`No equipments found.`"
|
|
14
|
-
@refresh="updatePage"
|
|
15
|
-
:canCreate="true"
|
|
16
|
-
createLabel="Add Equipment"
|
|
17
|
-
@row-click="tableRowClickHandler"
|
|
18
|
-
>
|
|
19
|
-
<template #actions>
|
|
20
|
-
<v-row no-gutters align="center" class="w-100">
|
|
21
|
-
<v-col cols="auto">
|
|
22
|
-
<v-btn
|
|
23
|
-
class="text-none"
|
|
24
|
-
rounded="pill"
|
|
25
|
-
variant="tonal"
|
|
26
|
-
size="large"
|
|
27
|
-
>
|
|
28
|
-
Add Equipment
|
|
29
|
-
</v-btn>
|
|
30
|
-
</v-col>
|
|
31
|
-
|
|
32
|
-
<v-spacer />
|
|
33
|
-
|
|
34
|
-
<v-col cols="auto">
|
|
35
|
-
<v-text-field
|
|
36
|
-
v-model="searchText"
|
|
37
|
-
density="compact"
|
|
38
|
-
placeholder="Search"
|
|
39
|
-
clearable
|
|
40
|
-
width="300"
|
|
41
|
-
append-inner-icon="mdi-magnify"
|
|
42
|
-
hide-details
|
|
43
|
-
/>
|
|
44
|
-
</v-col>
|
|
45
|
-
</v-row>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<template #item.block="{ value }">
|
|
49
|
-
{{ value ? `blk ${value}` : "" }}
|
|
50
|
-
</template>
|
|
51
|
-
</TableMain>
|
|
52
|
-
</v-col>
|
|
53
|
-
</v-row>
|
|
54
|
-
</template>
|
|
55
|
-
<script setup lang="ts">
|
|
56
|
-
const searchText = ref("");
|
|
57
|
-
const loading = ref(false);
|
|
58
|
-
|
|
59
|
-
const page = ref(1);
|
|
60
|
-
const pages = ref(0);
|
|
61
|
-
const pageRange = ref("1-10 of 10");
|
|
62
|
-
const items = ref<Array<Record<string, any>>>([]);
|
|
63
|
-
|
|
64
|
-
const headers: Array<Record<string, any>> = [
|
|
65
|
-
{ title: "Item", value: "item", align: "start" },
|
|
66
|
-
// { title: "Type", value: "type", align: "start" },
|
|
67
|
-
// { title: "Created By", value: "createdByName", align: "start" },
|
|
68
|
-
// { title: "Last Updated", value: "lastUpdated", align: "start" },
|
|
69
|
-
// { title: "Available Qty", value: "availableQty", align: "start" },
|
|
70
|
-
{ title: "Stock Qty", value: "stockQty", align: "start" },
|
|
71
|
-
{ title: "", value: "action-table", align: "end" },
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
watchEffect(() => {
|
|
75
|
-
items.value = [
|
|
76
|
-
{
|
|
77
|
-
item: "Multi-Surface Cleaner",
|
|
78
|
-
type: "Consumable",
|
|
79
|
-
createdByName: "John Reyes",
|
|
80
|
-
lastUpdated: "2025-11-20",
|
|
81
|
-
availableQty: 45,
|
|
82
|
-
stockQty: 100,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
item: "Disinfectant Spray",
|
|
86
|
-
type: "Consumable",
|
|
87
|
-
createdByName: "Marianne Santos",
|
|
88
|
-
lastUpdated: "2025-11-18",
|
|
89
|
-
availableQty: 30,
|
|
90
|
-
stockQty: 80,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
item: "Glass Cleaner",
|
|
94
|
-
type: "Consumable",
|
|
95
|
-
createdByName: "Evan Lim",
|
|
96
|
-
lastUpdated: "2025-11-22",
|
|
97
|
-
availableQty: 60,
|
|
98
|
-
stockQty: 120,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
item: "Floor Degreaser",
|
|
102
|
-
type: "Consumable",
|
|
103
|
-
createdByName: "Kristine Tan",
|
|
104
|
-
lastUpdated: "2025-11-21",
|
|
105
|
-
availableQty: 20,
|
|
106
|
-
stockQty: 50,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
item: "Microfiber Cloth",
|
|
110
|
-
type: "Equipment",
|
|
111
|
-
createdByName: "Angela Chua",
|
|
112
|
-
lastUpdated: "2025-11-22",
|
|
113
|
-
availableQty: 120,
|
|
114
|
-
stockQty: 200,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
item: "Toilet Brush",
|
|
118
|
-
type: "Equipment",
|
|
119
|
-
createdByName: "Miguel Perez",
|
|
120
|
-
lastUpdated: "2025-11-19",
|
|
121
|
-
availableQty: 15,
|
|
122
|
-
stockQty: 40,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
item: "Mop Head Refill",
|
|
126
|
-
type: "Consumable",
|
|
127
|
-
createdByName: "Sarah Ong",
|
|
128
|
-
lastUpdated: "2025-11-23",
|
|
129
|
-
availableQty: 50,
|
|
130
|
-
stockQty: 100,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
item: "Cleaning Mop Set",
|
|
134
|
-
type: "Equipment",
|
|
135
|
-
createdByName: "Jenny Ramos",
|
|
136
|
-
lastUpdated: "2025-11-21",
|
|
137
|
-
availableQty: 10,
|
|
138
|
-
stockQty: 25,
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
item: "Trash Bags (Large)",
|
|
142
|
-
type: "Consumable",
|
|
143
|
-
createdByName: "Philip Cruz",
|
|
144
|
-
lastUpdated: "2025-11-18",
|
|
145
|
-
availableQty: 90,
|
|
146
|
-
stockQty: 150,
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
item: "Air Freshener Spray",
|
|
150
|
-
type: "Consumable",
|
|
151
|
-
createdByName: "Leo Dizon",
|
|
152
|
-
lastUpdated: "2025-11-20",
|
|
153
|
-
availableQty: 75,
|
|
154
|
-
stockQty: 150,
|
|
155
|
-
},
|
|
156
|
-
];
|
|
157
|
-
pages.value = 2;
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
async function updatePage(pageVal: any) {
|
|
161
|
-
if (pageVal == 2) {
|
|
162
|
-
items.value = [
|
|
163
|
-
{
|
|
164
|
-
item: "Vacuum Cleaner",
|
|
165
|
-
type: "Equipment",
|
|
166
|
-
createdByName: "Robert Sy",
|
|
167
|
-
lastUpdated: "2025-11-22",
|
|
168
|
-
availableQty: 4,
|
|
169
|
-
stockQty: 10,
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
item: "Dishwashing Liquid",
|
|
173
|
-
type: "Consumable",
|
|
174
|
-
createdByName: "Kristine Tan",
|
|
175
|
-
lastUpdated: "2025-11-19",
|
|
176
|
-
availableQty: 55,
|
|
177
|
-
stockQty: 110,
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
item: "Pressure Washer",
|
|
181
|
-
type: "Equipment",
|
|
182
|
-
createdByName: "Marcel Tan",
|
|
183
|
-
lastUpdated: "2025-11-24",
|
|
184
|
-
availableQty: 2,
|
|
185
|
-
stockQty: 5,
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
item: "Scrubbing Pads",
|
|
189
|
-
type: "Consumable",
|
|
190
|
-
createdByName: "Hannah Cruz",
|
|
191
|
-
lastUpdated: "2025-11-23",
|
|
192
|
-
availableQty: 80,
|
|
193
|
-
stockQty: 150,
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
item: "Squeegee Set",
|
|
197
|
-
type: "Equipment",
|
|
198
|
-
createdByName: "Darryl Go",
|
|
199
|
-
lastUpdated: "2025-11-22",
|
|
200
|
-
availableQty: 12,
|
|
201
|
-
stockQty: 30,
|
|
202
|
-
},
|
|
203
|
-
];
|
|
204
|
-
} else {
|
|
205
|
-
items.value = [
|
|
206
|
-
{
|
|
207
|
-
item: "Multi-Surface Cleaner",
|
|
208
|
-
type: "Consumable",
|
|
209
|
-
createdByName: "John Reyes",
|
|
210
|
-
lastUpdated: "2025-11-20",
|
|
211
|
-
availableQty: 45,
|
|
212
|
-
stockQty: 100,
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
item: "Disinfectant Spray",
|
|
216
|
-
type: "Consumable",
|
|
217
|
-
createdByName: "Marianne Santos",
|
|
218
|
-
lastUpdated: "2025-11-18",
|
|
219
|
-
availableQty: 30,
|
|
220
|
-
stockQty: 80,
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
item: "Glass Cleaner",
|
|
224
|
-
type: "Consumable",
|
|
225
|
-
createdByName: "Evan Lim",
|
|
226
|
-
lastUpdated: "2025-11-22",
|
|
227
|
-
availableQty: 60,
|
|
228
|
-
stockQty: 120,
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
item: "Floor Degreaser",
|
|
232
|
-
type: "Consumable",
|
|
233
|
-
createdByName: "Kristine Tan",
|
|
234
|
-
lastUpdated: "2025-11-21",
|
|
235
|
-
availableQty: 20,
|
|
236
|
-
stockQty: 50,
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
item: "Microfiber Cloth",
|
|
240
|
-
type: "Equipment",
|
|
241
|
-
createdByName: "Angela Chua",
|
|
242
|
-
lastUpdated: "2025-11-22",
|
|
243
|
-
availableQty: 120,
|
|
244
|
-
stockQty: 200,
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
item: "Toilet Brush",
|
|
248
|
-
type: "Equipment",
|
|
249
|
-
createdByName: "Miguel Perez",
|
|
250
|
-
lastUpdated: "2025-11-19",
|
|
251
|
-
availableQty: 15,
|
|
252
|
-
stockQty: 40,
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
item: "Mop Head Refill",
|
|
256
|
-
type: "Consumable",
|
|
257
|
-
createdByName: "Sarah Ong",
|
|
258
|
-
lastUpdated: "2025-11-23",
|
|
259
|
-
availableQty: 50,
|
|
260
|
-
stockQty: 100,
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
item: "Cleaning Mop Set",
|
|
264
|
-
type: "Equipment",
|
|
265
|
-
createdByName: "Jenny Ramos",
|
|
266
|
-
lastUpdated: "2025-11-21",
|
|
267
|
-
availableQty: 10,
|
|
268
|
-
stockQty: 25,
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
item: "Trash Bags (Large)",
|
|
272
|
-
type: "Consumable",
|
|
273
|
-
createdByName: "Philip Cruz",
|
|
274
|
-
lastUpdated: "2025-11-18",
|
|
275
|
-
availableQty: 90,
|
|
276
|
-
stockQty: 150,
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
item: "Air Freshener Spray",
|
|
280
|
-
type: "Consumable",
|
|
281
|
-
createdByName: "Leo Dizon",
|
|
282
|
-
lastUpdated: "2025-11-20",
|
|
283
|
-
availableQty: 75,
|
|
284
|
-
stockQty: 150,
|
|
285
|
-
},
|
|
286
|
-
];
|
|
287
|
-
}
|
|
288
|
-
page.value = pageVal;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function tableRowClickHandler(_: any, data: any) {}
|
|
292
|
-
</script>
|