@7365admin1/layer-common 1.10.6 → 1.10.7
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 +6 -0
- package/components/AccessCardQrTagging.vue +314 -34
- package/components/AccessCardQrTaggingPrintQr.vue +75 -0
- package/components/AreaChecklistHistoryLogs.vue +9 -0
- package/components/BuildingForm.vue +36 -5
- package/components/BuildingManagement/buildings.vue +18 -9
- package/components/BuildingManagement/units.vue +12 -114
- package/components/BuildingUnitFormAdd.vue +39 -30
- package/components/BuildingUnitFormEdit.vue +265 -116
- package/components/CleaningScheduleMain.vue +60 -13
- package/components/Dialog/DeleteConfirmation.vue +2 -2
- package/components/Dialog/UpdateMoreAction.vue +2 -2
- package/components/EntryPassInformation.vue +215 -0
- package/components/Input/InputPhoneNumberV2.vue +8 -0
- package/components/ManageChecklistMain.vue +29 -3
- package/components/ScheduleAreaMain.vue +56 -0
- package/components/TableHygiene.vue +27 -0
- package/components/UnitPersonCard.vue +63 -0
- package/components/VehicleAddSelection.vue +2 -2
- package/components/VehicleForm.vue +78 -19
- package/components/VehicleManagement.vue +164 -40
- package/components/VisitorForm.vue +19 -0
- package/composables/useAccessManagement.ts +52 -0
- package/composables/usePeople.ts +4 -3
- package/composables/useVehicle.ts +15 -1
- package/package.json +3 -2
- package/types/cleaner-schedule.d.ts +1 -0
- package/types/html2pdf.d.ts +19 -0
- package/types/people.d.ts +2 -1
- package/types/site.d.ts +8 -0
- package/types/vehicle.d.ts +2 -3
- package/.playground/app.vue +0 -41
- package/.playground/eslint.config.mjs +0 -6
- package/.playground/nuxt.config.ts +0 -22
- package/.playground/pages/feedback.vue +0 -30
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<v-row no-gutters>
|
|
5
5
|
<v-btn class="text-none" rounded="pill" variant="tonal" @click="setBuilding()" size="large"
|
|
6
6
|
v-if="canCreate && canCreateBuilding">
|
|
7
|
-
Add
|
|
7
|
+
Add Block
|
|
8
8
|
</v-btn>
|
|
9
9
|
</v-row>
|
|
10
10
|
</v-col>
|
|
@@ -33,19 +33,22 @@
|
|
|
33
33
|
<template #item.createdAt="{ value }">
|
|
34
34
|
{{ new Date(value).toLocaleDateString() }}
|
|
35
35
|
</template>
|
|
36
|
+
<template #item.levels="{ item }">
|
|
37
|
+
{{ item.levels.length }}
|
|
38
|
+
</template>
|
|
36
39
|
</v-data-table>
|
|
37
40
|
</v-card>
|
|
38
41
|
</v-col>
|
|
39
42
|
|
|
40
43
|
<!-- Create Dialog -->
|
|
41
44
|
<v-dialog v-model="createDialog" width="450" persistent>
|
|
42
|
-
<BuildingForm :site="site" @cancel="createDialog = false" @success="successCreate()"
|
|
45
|
+
<BuildingForm :site="site" :blocks="items" @cancel="createDialog = false" @success="successCreate()"
|
|
43
46
|
@success:create-more="getBuildings()" />
|
|
44
47
|
</v-dialog>
|
|
45
48
|
|
|
46
49
|
<!-- Edit Dialog -->
|
|
47
50
|
<v-dialog v-model="editDialog" width="450" persistent>
|
|
48
|
-
<BuildingForm :site="site" mode="edit" @cancel="editDialog = false" @success="successUpdate()"
|
|
51
|
+
<BuildingForm :site="site" :blocks="items" mode="edit" @cancel="editDialog = false" @success="successUpdate()"
|
|
49
52
|
:building="selectedBuilding" />
|
|
50
53
|
</v-dialog>
|
|
51
54
|
|
|
@@ -67,14 +70,14 @@
|
|
|
67
70
|
<strong>Levels:</strong>
|
|
68
71
|
{{ selectedBuilding?.levels.length ?? "N/A" }}
|
|
69
72
|
</v-col>
|
|
70
|
-
<template v-if="selectedBuilding?.buildingFloorPlan.length > 0">
|
|
73
|
+
<!-- <template v-if="selectedBuilding?.buildingFloorPlan.length > 0">
|
|
71
74
|
<v-col cols="12">
|
|
72
75
|
<strong>Building Floor Plan:</strong>
|
|
73
76
|
</v-col>
|
|
74
77
|
<v-col cols="12">
|
|
75
78
|
<InputFileV2 :model-value="selectedBuilding?.buildingFloorPlan" view-mode />
|
|
76
79
|
</v-col>
|
|
77
|
-
</template>
|
|
80
|
+
</template> -->
|
|
78
81
|
</v-row>
|
|
79
82
|
</v-card-text>
|
|
80
83
|
|
|
@@ -171,10 +174,16 @@ const props = defineProps({
|
|
|
171
174
|
title: "Name",
|
|
172
175
|
value: "name",
|
|
173
176
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
{
|
|
178
|
+
title: "Block",
|
|
179
|
+
value: "block",
|
|
180
|
+
align: "center",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
title: "Levels",
|
|
184
|
+
value: "levels",
|
|
185
|
+
align: "center",
|
|
186
|
+
},
|
|
178
187
|
// { title: "Action", value: "action-table" },
|
|
179
188
|
],
|
|
180
189
|
},
|
|
@@ -30,121 +30,22 @@
|
|
|
30
30
|
<v-data-table :headers="props.headers" :items="items" item-value="_id" items-per-page="20" fixed-header
|
|
31
31
|
hide-default-footer @click:row="tableRowClickHandler"
|
|
32
32
|
style="max-height: calc(100vh - (200px))">
|
|
33
|
-
<template #item.block="{ value }">
|
|
34
|
-
{{ value ? `
|
|
33
|
+
<template #item.block="{ value, item }">
|
|
34
|
+
{{ value ? `Block ${value}` : "" }}
|
|
35
35
|
</template>
|
|
36
36
|
</v-data-table>
|
|
37
37
|
</v-card>
|
|
38
38
|
</v-col>
|
|
39
39
|
|
|
40
40
|
<!-- Create Dialog -->
|
|
41
|
-
<v-dialog v-model="createDialog" :width="smAndUp ? '
|
|
41
|
+
<v-dialog v-model="createDialog" :width="smAndUp ? '50svw' : '100%'" persistent>
|
|
42
42
|
<BuildingUnitFormAdd :site="site" @cancel="createDialog = false" @success="successCreate()"
|
|
43
43
|
@success:create-more="getBuildingUnit()" />
|
|
44
44
|
</v-dialog>
|
|
45
|
-
|
|
46
|
-
<!-- Edit Dialog -->
|
|
47
|
-
<v-dialog v-model="dialogEdit" :width="smAndUp ? '70svw' : '100%'" persistent>
|
|
48
|
-
<BuildingUnitFormEdit v-if="selectedBuildingUnit" @cancel="dialogEdit = false" @success="successUpdate()"
|
|
49
|
-
:roomFacility="selectedBuildingUnit" />
|
|
50
|
-
</v-dialog>
|
|
51
|
-
|
|
52
|
-
<!-- Preview Dialog -->
|
|
53
|
-
|
|
54
45
|
|
|
55
|
-
<v-dialog v-if="canViewUnitDetails"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<v-row no-gutters v-if="selectedBuildingUnit" class="mb-4">
|
|
59
|
-
<v-col cols="12">
|
|
60
|
-
<strong>Name:</strong> {{ selectedBuildingUnit.name }}
|
|
61
|
-
</v-col>
|
|
62
|
-
|
|
63
|
-
<v-col cols="12">
|
|
64
|
-
<strong>Block:</strong>
|
|
65
|
-
{{ selectedBuildingUnit.block }}
|
|
66
|
-
</v-col>
|
|
67
|
-
|
|
68
|
-
<v-col cols="12">
|
|
69
|
-
<strong>Floors:</strong>
|
|
70
|
-
{{ selectedBuildingUnit.level }}
|
|
71
|
-
</v-col>
|
|
72
|
-
|
|
73
|
-
<v-col cols="12">
|
|
74
|
-
<strong>Category:</strong>
|
|
75
|
-
{{ selectedBuildingUnit.category }}
|
|
76
|
-
</v-col>
|
|
77
|
-
|
|
78
|
-
<v-col cols="12">
|
|
79
|
-
<strong>Company Name:</strong>
|
|
80
|
-
{{ selectedBuildingUnit.companyName || "" }}
|
|
81
|
-
</v-col>
|
|
82
|
-
|
|
83
|
-
<v-col cols="12">
|
|
84
|
-
<strong>Company Registration Number:</strong>
|
|
85
|
-
{{ selectedBuildingUnit.companyRegistrationNumber || "" }}
|
|
86
|
-
</v-col>
|
|
87
|
-
|
|
88
|
-
<v-col cols="12">
|
|
89
|
-
<strong>Lease Start:</strong>
|
|
90
|
-
{{ formatDateDDMMYYYYLocal(selectedBuildingUnit.leaseStart) || "" }}
|
|
91
|
-
</v-col>
|
|
92
|
-
<v-col cols="12">
|
|
93
|
-
<strong>Lease End:</strong>
|
|
94
|
-
{{ formatDateDDMMYYYYLocal(selectedBuildingUnit.leaseEnd) || "" }}
|
|
95
|
-
</v-col>
|
|
96
|
-
|
|
97
|
-
<v-col cols="12">
|
|
98
|
-
<strong>Owner Name:</strong>
|
|
99
|
-
{{ selectedBuildingUnit.ownerName || "" }}
|
|
100
|
-
</v-col>
|
|
101
|
-
|
|
102
|
-
<template v-if="selectedBuildingUnit?.buildingUnitFiles.length > 0">
|
|
103
|
-
<v-col cols="12">
|
|
104
|
-
<strong>Uploaded Files:</strong>
|
|
105
|
-
</v-col>
|
|
106
|
-
<v-col cols="12">
|
|
107
|
-
<InputFileV2 :model-value="selectedBuildingUnit?.buildingUnitFiles" view-mode />
|
|
108
|
-
</v-col>
|
|
109
|
-
</template>
|
|
110
|
-
</v-row>
|
|
111
|
-
</v-card-text>
|
|
112
|
-
|
|
113
|
-
<v-toolbar class="pa-0" density="compact">
|
|
114
|
-
<v-row no-gutters>
|
|
115
|
-
<v-col cols="6" class="pa-0">
|
|
116
|
-
<v-btn block variant="text" class="text-none" size="large" @click="dialogPreview = false" height="48">
|
|
117
|
-
Close
|
|
118
|
-
</v-btn>
|
|
119
|
-
</v-col>
|
|
120
|
-
|
|
121
|
-
<v-col cols="6" class="pa-0" v-if="canUpdate">
|
|
122
|
-
<v-menu>
|
|
123
|
-
<template #activator="{ props }">
|
|
124
|
-
<v-btn block variant="flat" color="black" class="text-none" height="48" v-bind="props" tile
|
|
125
|
-
:disabled="!canUpdateUnit && !canDeleteUnit">
|
|
126
|
-
More actions
|
|
127
|
-
</v-btn>
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<v-list class="pa-0">
|
|
131
|
-
<v-list-item v-if="canUpdateUnit" @click="openEditDialog()">
|
|
132
|
-
<v-list-item-title class="text-subtitle-2">
|
|
133
|
-
Edit Unit
|
|
134
|
-
</v-list-item-title>
|
|
135
|
-
</v-list-item>
|
|
136
|
-
|
|
137
|
-
<v-list-item v-if="canDeleteUnit" @click="openDeleteDialog()" class="text-red">
|
|
138
|
-
<v-list-item-title class="text-subtitle-2">
|
|
139
|
-
Delete Unit
|
|
140
|
-
</v-list-item-title>
|
|
141
|
-
</v-list-item>
|
|
142
|
-
</v-list>
|
|
143
|
-
</v-menu>
|
|
144
|
-
</v-col>
|
|
145
|
-
</v-row>
|
|
146
|
-
</v-toolbar>
|
|
147
|
-
</v-card>
|
|
46
|
+
<v-dialog v-if="canViewUnitDetails" v-model="dialogPreview":width="smAndUp ? '70svw' : '100%'" persistent>
|
|
47
|
+
<BuildingUnitFormEdit v-if="selectedBuildingUnit" @cancel="dialogPreview = false" @success="successUpdate()" @delete-unit="openDeleteDialog()"
|
|
48
|
+
:roomFacility="selectedBuildingUnit" />
|
|
148
49
|
</v-dialog>
|
|
149
50
|
|
|
150
51
|
<v-dialog v-model="dialogDelete" :loading="deleteLoading" width="450" persistent>
|
|
@@ -200,22 +101,19 @@ const props = defineProps({
|
|
|
200
101
|
title: "Name",
|
|
201
102
|
value: "name",
|
|
202
103
|
},
|
|
203
|
-
|
|
204
|
-
title: "
|
|
205
|
-
value: "
|
|
104
|
+
{
|
|
105
|
+
title: "Floor",
|
|
106
|
+
value: "level",
|
|
206
107
|
},
|
|
207
108
|
{
|
|
208
109
|
title: "Block",
|
|
209
110
|
value: "block",
|
|
210
111
|
},
|
|
211
112
|
{
|
|
212
|
-
title: "
|
|
213
|
-
value: "
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
title: "Category",
|
|
217
|
-
value: "category",
|
|
113
|
+
title: "Block Name",
|
|
114
|
+
value: "buildingName",
|
|
218
115
|
},
|
|
116
|
+
|
|
219
117
|
// {
|
|
220
118
|
// title: "Type",
|
|
221
119
|
// value: "type",
|
|
@@ -25,11 +25,40 @@
|
|
|
25
25
|
<v-row>
|
|
26
26
|
<v-col cols="12" md="6" class="mt-2">
|
|
27
27
|
<v-row no-gutters>
|
|
28
|
-
<InputLabel class="text-capitalize" title="
|
|
28
|
+
<InputLabel class="text-capitalize" title="Block" required />
|
|
29
29
|
<v-col cols="12">
|
|
30
30
|
<v-autocomplete v-model="buildingUnit.building" :items="buildings" item-title="name"
|
|
31
31
|
item-value="_id" v-model:search="searchBuilding" :hide-no-data="false" density="comfortable"
|
|
32
|
-
:rules="[requiredRule]" variant="outlined"
|
|
32
|
+
:rules="[requiredRule]" variant="outlined">
|
|
33
|
+
<template v-slot:item="{ props: itemProps, item }">
|
|
34
|
+
<v-list-item v-bind="itemProps" :title="`Block ${item?.raw?.block} (${item?.raw?.name})`">
|
|
35
|
+
|
|
36
|
+
</v-list-item>
|
|
37
|
+
</template>
|
|
38
|
+
<template v-slot:selection="{ item }">
|
|
39
|
+
{{ buildingUnit.building && `Block ${item?.raw?.block} (${item?.raw?.name})` }}
|
|
40
|
+
</template>
|
|
41
|
+
</v-autocomplete>
|
|
42
|
+
</v-col>
|
|
43
|
+
</v-row>
|
|
44
|
+
</v-col>
|
|
45
|
+
|
|
46
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
47
|
+
<v-row no-gutters>
|
|
48
|
+
<InputLabel class="text-capitalize" title="Level" required />
|
|
49
|
+
<v-col cols="12">
|
|
50
|
+
<v-select v-model="buildingUnit.level" :items="buildingLevels" density="comfortable"
|
|
51
|
+
:rules="[requiredRule]"></v-select>
|
|
52
|
+
</v-col>
|
|
53
|
+
</v-row>
|
|
54
|
+
</v-col>
|
|
55
|
+
|
|
56
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
57
|
+
<v-row no-gutters>
|
|
58
|
+
<InputLabel class="text-capitalize" title="No. of Units to be added" required />
|
|
59
|
+
<v-col cols="12">
|
|
60
|
+
<v-text-field v-model.number="buildingUnitQty" density="comfortable" :rules="[requiredRule]"
|
|
61
|
+
type="number" @update:model-value="setBuildingLevels()"></v-text-field>
|
|
33
62
|
</v-col>
|
|
34
63
|
</v-row>
|
|
35
64
|
</v-col>
|
|
@@ -128,33 +157,6 @@
|
|
|
128
157
|
</v-col>
|
|
129
158
|
</v-row>
|
|
130
159
|
</v-col> -->
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<v-col cols="12">
|
|
135
|
-
<v-row>
|
|
136
|
-
<v-col cols="6" class="mt-2">
|
|
137
|
-
<v-row no-gutters>
|
|
138
|
-
<InputLabel class="text-capitalize" title="Level" required />
|
|
139
|
-
<v-col cols="12">
|
|
140
|
-
<v-select v-model="buildingUnit.level" :items="buildingLevels" density="comfortable"
|
|
141
|
-
:rules="[requiredRule]"></v-select>
|
|
142
|
-
</v-col>
|
|
143
|
-
</v-row>
|
|
144
|
-
</v-col>
|
|
145
|
-
|
|
146
|
-
<v-col cols="6" class="mt-2">
|
|
147
|
-
<v-row no-gutters>
|
|
148
|
-
<InputLabel class="text-capitalize" title="No. of Units" required />
|
|
149
|
-
<v-col cols="12">
|
|
150
|
-
<v-text-field v-model.number="buildingUnitQty" density="comfortable" :rules="[requiredRule]"
|
|
151
|
-
type="number" @update:model-value="setBuildingLevels()"></v-text-field>
|
|
152
|
-
</v-col>
|
|
153
|
-
</v-row>
|
|
154
|
-
</v-col>
|
|
155
|
-
</v-row>
|
|
156
|
-
</v-col>
|
|
157
|
-
|
|
158
160
|
<v-col v-if="buildingLevels" cols="12">
|
|
159
161
|
<v-row justify="center">
|
|
160
162
|
<v-col cols="6">
|
|
@@ -167,7 +169,7 @@
|
|
|
167
169
|
<v-expand-transition>
|
|
168
170
|
<v-row v-show="show" no-gutters>
|
|
169
171
|
<v-row>
|
|
170
|
-
<template v-for="(unitLabel, unitLabelIndex) in unitLabels" :key="
|
|
172
|
+
<template v-for="(unitLabel, unitLabelIndex) in unitLabels" :key="unitLabelIndex">
|
|
171
173
|
<v-col cols="12" md="4">
|
|
172
174
|
<v-row>
|
|
173
175
|
<v-col cols="12">
|
|
@@ -379,6 +381,13 @@ async function submit() {
|
|
|
379
381
|
}
|
|
380
382
|
}
|
|
381
383
|
|
|
384
|
+
watch(buildingUnitQty, (newVal) => {
|
|
385
|
+
setTimeout(() => {
|
|
386
|
+
show.value = newVal > 0 && !!newVal;
|
|
387
|
+
}, 500);
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
|
|
382
391
|
function cancel() {
|
|
383
392
|
name.value = "";
|
|
384
393
|
directorName.value = "";
|