@7365admin1/layer-common 1.10.2 → 1.10.4
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 +12 -0
- package/components/AccessCardPreviewDialog.vue +297 -0
- package/components/AccessCardReplaceForm.vue +179 -0
- package/components/AccessManagement.vue +44 -195
- package/components/AreaChecklistHistoryLogs.vue +1 -1
- package/components/BuildingManagement/units.vue +33 -2
- package/components/BuildingUnitFormAdd.vue +45 -99
- package/components/BuildingUnitFormEdit.vue +59 -148
- package/components/BulletinBoardForm.vue +396 -0
- package/components/BulletinBoardView.vue +195 -0
- package/components/BulletinExpirationChip.vue +13 -0
- package/components/Button/Close.vue +3 -1
- package/components/CleaningScheduleMain.vue +2 -2
- package/components/IncidentReport/IncidentInformation.vue +45 -6
- package/components/PeopleForm.vue +1 -1
- package/components/ScheduleAreaMain.vue +2 -2
- package/components/ScheduleTaskForm.vue +59 -114
- package/components/ScheduleTaskMain.vue +19 -15
- package/components/VisitorForm.vue +1 -1
- package/composables/useAccessManagement.ts +8 -0
- package/composables/useBulletin.ts +5 -5
- package/composables/useCard.ts +14 -0
- package/composables/useScheduleTask.ts +4 -8
- package/package.json +1 -1
- package/types/bulletin-board.d.ts +29 -0
- package/types/checkout-item.d.ts +1 -0
- package/types/cleaner-schedule.d.ts +1 -1
- package/types/people.d.ts +1 -1
|
@@ -12,10 +12,7 @@
|
|
|
12
12
|
<v-row>
|
|
13
13
|
<v-col cols="12" class="mt-2">
|
|
14
14
|
<v-row no-gutters>
|
|
15
|
-
<InputLabel
|
|
16
|
-
class="text-capitalize font-weight-bold"
|
|
17
|
-
title="Building"
|
|
18
|
-
/>
|
|
15
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Building" />
|
|
19
16
|
<v-col cols="12">
|
|
20
17
|
{{ buildingUnit.buildingName }}
|
|
21
18
|
</v-col>
|
|
@@ -28,10 +25,7 @@
|
|
|
28
25
|
<v-row>
|
|
29
26
|
<v-col cols="12" class="mt-2">
|
|
30
27
|
<v-row no-gutters>
|
|
31
|
-
<InputLabel
|
|
32
|
-
class="text-capitalize font-weight-bold"
|
|
33
|
-
title="Block"
|
|
34
|
-
/>
|
|
28
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Block" />
|
|
35
29
|
<v-col cols="12">
|
|
36
30
|
{{ buildingUnit.block }}
|
|
37
31
|
</v-col>
|
|
@@ -42,162 +36,96 @@
|
|
|
42
36
|
|
|
43
37
|
<v-col cols="12">
|
|
44
38
|
<v-row>
|
|
45
|
-
<v-col cols="12" class="mt-2">
|
|
39
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
46
40
|
<v-row no-gutters>
|
|
47
|
-
<InputLabel
|
|
48
|
-
class="text-capitalize font-weight-bold"
|
|
49
|
-
title="Unit Name"
|
|
50
|
-
/>
|
|
41
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Unit Name" />
|
|
51
42
|
<v-col cols="12">
|
|
52
|
-
<v-text-field
|
|
53
|
-
|
|
54
|
-
density="comfortable"
|
|
55
|
-
:rules="[requiredRule]"
|
|
56
|
-
></v-text-field>
|
|
43
|
+
<v-text-field v-model="buildingUnit.name" density="comfortable"
|
|
44
|
+
:rules="[requiredRule]"></v-text-field>
|
|
57
45
|
</v-col>
|
|
58
46
|
</v-row>
|
|
59
47
|
</v-col>
|
|
60
|
-
</v-row>
|
|
61
|
-
</v-col>
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
<v-row>
|
|
65
|
-
<v-col cols="12" class="mt-2">
|
|
49
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
66
50
|
<v-row no-gutters>
|
|
67
|
-
<InputLabel
|
|
68
|
-
class="text-capitalize font-weight-bold"
|
|
69
|
-
title="Owner"
|
|
70
|
-
/>
|
|
51
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Owner" />
|
|
71
52
|
<v-col cols="12">
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
item-title="name"
|
|
76
|
-
return-object
|
|
77
|
-
density="comfortable">
|
|
78
|
-
</v-autocomplete>
|
|
53
|
+
<v-autocomplete v-model="buildingUnit.ownerName" v-model:search="ownerNameInput"
|
|
54
|
+
:items="peopleItems" item-title="name" return-object density="comfortable">
|
|
55
|
+
</v-autocomplete>
|
|
79
56
|
</v-col>
|
|
80
57
|
</v-row>
|
|
81
58
|
</v-col>
|
|
82
59
|
</v-row>
|
|
83
60
|
</v-col>
|
|
84
61
|
|
|
62
|
+
|
|
85
63
|
<v-col cols="12">
|
|
86
64
|
<v-row>
|
|
87
|
-
<v-col cols="12" class="mt-2">
|
|
65
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
88
66
|
<v-row no-gutters>
|
|
89
|
-
<InputLabel
|
|
90
|
-
class="text-capitalize"
|
|
91
|
-
title="Company Name"
|
|
92
|
-
required
|
|
93
|
-
/>
|
|
67
|
+
<InputLabel class="text-capitalize" title="Company Name" required />
|
|
94
68
|
<v-col cols="12">
|
|
95
|
-
<v-text-field
|
|
96
|
-
|
|
97
|
-
density="comfortable"
|
|
98
|
-
:rules="[requiredRule]"
|
|
99
|
-
></v-text-field>
|
|
69
|
+
<v-text-field v-model="buildingUnit.companyName" density="comfortable"
|
|
70
|
+
:rules="[requiredRule]"></v-text-field>
|
|
100
71
|
</v-col>
|
|
101
72
|
</v-row>
|
|
102
73
|
</v-col>
|
|
103
|
-
</v-row>
|
|
104
|
-
</v-col>
|
|
105
74
|
|
|
106
|
-
|
|
107
|
-
<v-row>
|
|
108
|
-
<v-col cols="12" class="mt-2">
|
|
75
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
109
76
|
<v-row no-gutters>
|
|
110
|
-
<InputLabel
|
|
111
|
-
class="text-capitalize"
|
|
112
|
-
title="Company Registration Number"
|
|
113
|
-
/>
|
|
77
|
+
<InputLabel class="text-capitalize" title="Company Registration Number" />
|
|
114
78
|
<v-col cols="12">
|
|
115
|
-
<v-text-field
|
|
116
|
-
v-model="buildingUnit.companyRegistrationNumber"
|
|
117
|
-
density="comfortable"
|
|
118
|
-
></v-text-field>
|
|
79
|
+
<v-text-field v-model="buildingUnit.companyRegistrationNumber" density="comfortable"></v-text-field>
|
|
119
80
|
</v-col>
|
|
120
81
|
</v-row>
|
|
121
82
|
</v-col>
|
|
122
83
|
</v-row>
|
|
123
84
|
</v-col>
|
|
124
85
|
|
|
86
|
+
|
|
125
87
|
<v-col cols="12">
|
|
126
88
|
<v-row>
|
|
127
|
-
<v-col cols="12" class="mt-2">
|
|
89
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
128
90
|
<v-row no-gutters>
|
|
129
|
-
<InputLabel
|
|
130
|
-
class="text-capitalize"
|
|
131
|
-
title="Lease Start"
|
|
132
|
-
required
|
|
133
|
-
/>
|
|
91
|
+
<InputLabel class="text-capitalize" title="Lease Start" required />
|
|
134
92
|
<v-col cols="12">
|
|
135
|
-
<InputDateTimePicker
|
|
136
|
-
ref="startDateRef"
|
|
137
|
-
v-model="buildingUnit.leaseStart"
|
|
138
|
-
:rules="[requiredRule]"
|
|
139
|
-
/>
|
|
93
|
+
<InputDateTimePicker ref="startDateRef" v-model="buildingUnit.leaseStart" :rules="[requiredRule]" />
|
|
140
94
|
</v-col>
|
|
141
95
|
</v-row>
|
|
142
96
|
</v-col>
|
|
143
|
-
</v-row>
|
|
144
|
-
</v-col>
|
|
145
97
|
|
|
146
|
-
|
|
147
|
-
<v-row>
|
|
148
|
-
<v-col cols="12" class="mt-2">
|
|
98
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
149
99
|
<v-row no-gutters>
|
|
150
|
-
<InputLabel
|
|
151
|
-
class="text-capitalize"
|
|
152
|
-
title="Lease End"
|
|
153
|
-
required
|
|
154
|
-
/>
|
|
100
|
+
<InputLabel class="text-capitalize" title="Lease End" required />
|
|
155
101
|
<v-col cols="12">
|
|
156
|
-
<InputDateTimePicker
|
|
157
|
-
ref="endDateRef"
|
|
158
|
-
v-model="buildingUnit.leaseEnd"
|
|
159
|
-
:rules="[requiredRule]"
|
|
160
|
-
/>
|
|
102
|
+
<InputDateTimePicker ref="endDateRef" v-model="buildingUnit.leaseEnd" :rules="[requiredRule]" />
|
|
161
103
|
</v-col>
|
|
162
104
|
</v-row>
|
|
163
105
|
</v-col>
|
|
106
|
+
|
|
164
107
|
</v-row>
|
|
165
108
|
</v-col>
|
|
166
109
|
|
|
167
|
-
|
|
110
|
+
|
|
111
|
+
<v-col cols="12" md="6" class="mt-2">
|
|
168
112
|
<v-row no-gutters>
|
|
169
|
-
<InputLabel
|
|
170
|
-
class="text-capitalize font-weight-bold"
|
|
171
|
-
title="Category"
|
|
172
|
-
required
|
|
173
|
-
/>
|
|
113
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Category" required />
|
|
174
114
|
<v-col cols="12">
|
|
175
|
-
<v-autocomplete
|
|
176
|
-
|
|
177
|
-
:items="unitCategories"
|
|
178
|
-
density="comfortable"
|
|
179
|
-
:rules="[requiredRule]"
|
|
180
|
-
></v-autocomplete>
|
|
115
|
+
<v-autocomplete v-model="buildingUnit.category" :items="unitCategories" density="comfortable"
|
|
116
|
+
:rules="[requiredRule]"></v-autocomplete>
|
|
181
117
|
</v-col>
|
|
182
118
|
</v-row>
|
|
183
119
|
</v-col>
|
|
184
120
|
|
|
185
121
|
<v-col cols="12">
|
|
186
122
|
<v-row>
|
|
187
|
-
<v-col cols="6" class="mt-2">
|
|
123
|
+
<v-col cols="6" md="6" class="mt-2">
|
|
188
124
|
<v-row no-gutters>
|
|
189
|
-
<InputLabel
|
|
190
|
-
class="text-capitalize font-weight-bold"
|
|
191
|
-
title="Level"
|
|
192
|
-
required
|
|
193
|
-
/>
|
|
125
|
+
<InputLabel class="text-capitalize font-weight-bold" title="Level" required />
|
|
194
126
|
<v-col cols="12">
|
|
195
|
-
<v-select
|
|
196
|
-
|
|
197
|
-
:items="buildingLevels"
|
|
198
|
-
density="comfortable"
|
|
199
|
-
:rules="[requiredRule]"
|
|
200
|
-
></v-select>
|
|
127
|
+
<v-select v-model="buildingUnit.level" :items="buildingLevels" density="comfortable"
|
|
128
|
+
:rules="[requiredRule]"></v-select>
|
|
201
129
|
</v-col>
|
|
202
130
|
</v-row>
|
|
203
131
|
</v-col>
|
|
@@ -205,25 +133,15 @@
|
|
|
205
133
|
</v-col>
|
|
206
134
|
|
|
207
135
|
<v-col cols="12" class="mt-5">
|
|
208
|
-
<InputLabel
|
|
209
|
-
|
|
210
|
-
title="Upload Files
|
|
211
|
-
/>
|
|
212
|
-
<InputFileV2
|
|
213
|
-
v-model="buildingUnit.buildingUnitFiles"
|
|
214
|
-
:multiple="false"
|
|
215
|
-
:max-length="10"
|
|
216
|
-
title="Upload PDF Files"
|
|
217
|
-
accept="application/pdf"
|
|
218
|
-
/>
|
|
136
|
+
<InputLabel class="text-capitalize" title="Upload Files (Lease of Contract, Cert. of Occupancy)" />
|
|
137
|
+
<InputFileV2 v-model="buildingUnit.buildingUnitFiles" :multiple="false" :max-length="10"
|
|
138
|
+
title="Upload PDF Files" accept="application/pdf" />
|
|
219
139
|
</v-col>
|
|
220
140
|
|
|
221
141
|
<v-col cols="12" class="my-2">
|
|
222
142
|
<v-row no-gutters>
|
|
223
143
|
<v-col cols="12" class="text-center">
|
|
224
|
-
<span
|
|
225
|
-
class="text-none text-subtitle-2 font-weight-medium text-error"
|
|
226
|
-
>
|
|
144
|
+
<span class="text-none text-subtitle-2 font-weight-medium text-error">
|
|
227
145
|
{{ message }}
|
|
228
146
|
</span>
|
|
229
147
|
</v-col>
|
|
@@ -236,30 +154,14 @@
|
|
|
236
154
|
<v-toolbar density="compact">
|
|
237
155
|
<v-row no-gutters>
|
|
238
156
|
<v-col cols="6">
|
|
239
|
-
<v-btn
|
|
240
|
-
tile
|
|
241
|
-
block
|
|
242
|
-
variant="text"
|
|
243
|
-
class="text-none"
|
|
244
|
-
size="48"
|
|
245
|
-
@click="cancel"
|
|
246
|
-
>
|
|
157
|
+
<v-btn tile block variant="text" class="text-none" size="48" @click="cancel">
|
|
247
158
|
Cancel
|
|
248
159
|
</v-btn>
|
|
249
160
|
</v-col>
|
|
250
161
|
|
|
251
162
|
<v-col cols="6">
|
|
252
|
-
<v-btn
|
|
253
|
-
|
|
254
|
-
block
|
|
255
|
-
variant="flat"
|
|
256
|
-
color="black"
|
|
257
|
-
class="text-none"
|
|
258
|
-
size="48"
|
|
259
|
-
:disabled="!validForm || disable"
|
|
260
|
-
@click="submit"
|
|
261
|
-
:loading="disable"
|
|
262
|
-
>
|
|
163
|
+
<v-btn tile block variant="flat" color="black" class="text-none" size="48" :disabled="!validForm || disable"
|
|
164
|
+
@click="submit" :loading="disable">
|
|
263
165
|
Submit
|
|
264
166
|
</v-btn>
|
|
265
167
|
</v-col>
|
|
@@ -320,10 +222,13 @@ buildingUnit.value = JSON.parse(JSON.stringify(prop.roomFacility));
|
|
|
320
222
|
|
|
321
223
|
const emit = defineEmits(["cancel", "success", "success:create-more"]);
|
|
322
224
|
|
|
225
|
+
const ownerNameInput = ref("");
|
|
226
|
+
|
|
323
227
|
const validForm = ref(false);
|
|
324
228
|
|
|
325
229
|
const { getAll } = useBuilding();
|
|
326
|
-
const {
|
|
230
|
+
const { getAll: getAllPeople } = usePeople();
|
|
231
|
+
const { debounce } = useUtils();
|
|
327
232
|
|
|
328
233
|
const buildings = ref<Record<string, any>[]>([]);
|
|
329
234
|
const peopleItems = ref<Array<Record<string, any>>>([]);
|
|
@@ -343,15 +248,13 @@ watchEffect(() => {
|
|
|
343
248
|
}
|
|
344
249
|
});
|
|
345
250
|
|
|
346
|
-
const { data: getUnitPeople } = useLazyAsyncData(
|
|
251
|
+
const { data: getUnitPeople, refresh: getUnitPeopleRefresh } = useLazyAsyncData(
|
|
347
252
|
"get-unit-people",
|
|
348
|
-
async () =>
|
|
253
|
+
async () => getAllPeople({ limit: 10, site: prop.site, type: "tenant", search: ownerNameInput.value })
|
|
349
254
|
);
|
|
350
255
|
|
|
351
256
|
watch(getUnitPeople, (newData: any) => {
|
|
352
|
-
|
|
353
|
-
peopleItems.value = newData ?? [];
|
|
354
|
-
}
|
|
257
|
+
peopleItems.value = newData ?? [];
|
|
355
258
|
});
|
|
356
259
|
|
|
357
260
|
buildingUnit.value.site = prop.site;
|
|
@@ -394,7 +297,7 @@ const hasChanges = computed(() => {
|
|
|
394
297
|
async function submit() {
|
|
395
298
|
disable.value = true;
|
|
396
299
|
try {
|
|
397
|
-
|
|
300
|
+
|
|
398
301
|
if (buildingUnit.value.ownerName) {
|
|
399
302
|
buildingUnit.value.owner = (buildingUnit.value.ownerName as any)._id
|
|
400
303
|
buildingUnit.value.ownerName = (buildingUnit.value.ownerName as any).name
|
|
@@ -426,4 +329,12 @@ function cancel() {
|
|
|
426
329
|
message.value = "";
|
|
427
330
|
emit("cancel");
|
|
428
331
|
}
|
|
332
|
+
|
|
333
|
+
const debounceSearchOwner = debounce(() => {
|
|
334
|
+
getUnitPeopleRefresh();
|
|
335
|
+
}, 500);
|
|
336
|
+
|
|
337
|
+
watch(ownerNameInput, (newVal) => {
|
|
338
|
+
debounceSearchOwner();
|
|
339
|
+
}, { immediate: false });
|
|
429
340
|
</script>
|