@7365admin1/layer-common 4.32.1-staging.366 → 4.33.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.
- package/CHANGELOG.md +16 -4
- package/components/AccessCardAddForm.vue +4 -5
- package/components/AccessCardAssignToUnitForm.vue +2 -3
- package/components/AccessCardPreviewDialog.vue +3 -4
- package/components/Dialog/DeleteConfirmation.vue +2 -17
- package/components/Dialog/ReusablePrompt.vue +3 -26
- package/components/Dialog/UpdateMoreAction.vue +1 -11
- package/components/DocumentForm.vue +112 -407
- package/components/DocumentManagement.vue +12 -213
- package/components/EntryPass/QrTemplatePreview.vue +25 -21
- package/components/EntryPassInformation.vue +24 -119
- package/components/Facility/BookingSetup.vue +0 -63
- package/components/HidAccessLogDashboard.vue +8 -41
- package/components/HidIntercomManagement.vue +14 -148
- package/components/HidReaderManagement.vue +0 -26
- package/components/HidReaderUserRoster.vue +3 -44
- package/components/HidUserEnrollment.vue +155 -845
- package/components/InvitationClientForm.vue +1 -19
- package/components/NotificationBell.vue +3 -39
- package/components/VehicleForm.vue +2 -45
- package/components/VehicleManagement.vue +10 -95
- package/components/VisitorManagement.vue +5 -267
- package/composables/useAccessManagement.ts +0 -5
- package/composables/useCleaningPermission.ts +4 -4
- package/composables/useCommonPermission.ts +0 -16
- package/composables/useDocument.ts +0 -7
- package/composables/useFacility.ts +0 -11
- package/composables/useHidAmico.ts +0 -117
- package/composables/useHidNavigation.ts +1 -25
- package/composables/useLandscapingPermission.ts +4 -4
- package/composables/useMechanicalElectricalPermission.ts +4 -4
- package/composables/usePeople.ts +0 -19
- package/composables/usePestControlPermission.ts +4 -4
- package/composables/usePoolMaintenancePermission.ts +4 -4
- package/composables/useSecurityPermission.ts +10 -4
- package/composables/useSiteEntryPassSettings.ts +0 -26
- package/composables/useWebUsb.ts +11 -14
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
- package/types/document.d.ts +0 -14
- package/types/facility.d.ts +0 -4
- package/types/people.d.ts +1 -28
- package/utils/vehicle-actions.ts +4 -12
- package/components/HidAccessPermissions.vue +0 -424
- package/components/HidProfileQrCode.vue +0 -332
- package/composables/useHidReaderSelection.ts +0 -50
- package/composables/useSiteCategory.ts +0 -45
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
- package/utils/hid-permission-assignments.ts +0 -190
- package/utils/hid-reader-selection.ts +0 -52
- package/utils/notification-target.ts +0 -75
- package/utils/occupancy-role.ts +0 -109
|
@@ -742,35 +742,11 @@
|
|
|
742
742
|
class="visitor-preview__row"
|
|
743
743
|
>
|
|
744
744
|
<div class="visitor-preview__label">{{ label }}</div>
|
|
745
|
-
<div
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
draw it, is a 14px target - the floor is 24px. So the
|
|
751
|
-
NUMBER is the control and the eye is its affordance:
|
|
752
|
-
the whole masked value is pressable, which makes the
|
|
753
|
-
target the width of the digits rather than of a glyph,
|
|
754
|
-
and being a real `button` it also takes a tab stop,
|
|
755
|
-
which a `v-icon` with a click handler never did. -->
|
|
756
|
-
<button
|
|
757
|
-
type="button"
|
|
758
|
-
class="visitor-preview__reveal"
|
|
759
|
-
:aria-label="showVisitorNric ? 'Hide NRIC' : 'Show NRIC'"
|
|
760
|
-
:aria-pressed="showVisitorNric"
|
|
761
|
-
@click="showVisitorNric = !showVisitorNric"
|
|
762
|
-
>
|
|
763
|
-
<span class="visitor-preview__value">
|
|
764
|
-
{{
|
|
765
|
-
showVisitorNric
|
|
766
|
-
? selectedVisitorObject[key]
|
|
767
|
-
: maskNRIC(selectedVisitorObject[key])
|
|
768
|
-
}}
|
|
769
|
-
</span>
|
|
770
|
-
<v-icon size="16" class="visitor-preview__eye">
|
|
771
|
-
{{ showVisitorNric ? "mdi-eye-off-outline" : "mdi-eye-outline" }}
|
|
772
|
-
</v-icon>
|
|
773
|
-
</button>
|
|
745
|
+
<div
|
|
746
|
+
v-tooltip:top="selectedVisitorObject[key]"
|
|
747
|
+
class="visitor-preview__value"
|
|
748
|
+
>
|
|
749
|
+
{{ maskNRIC(selectedVisitorObject[key]) }}
|
|
774
750
|
</div>
|
|
775
751
|
</div>
|
|
776
752
|
|
|
@@ -820,84 +796,6 @@
|
|
|
820
796
|
</div>
|
|
821
797
|
</div>
|
|
822
798
|
|
|
823
|
-
<!--
|
|
824
|
-
THE CONTRACTOR'S PARTY.
|
|
825
|
-
|
|
826
|
-
The list row has always said `( +2 members)` beside the name
|
|
827
|
-
and then had nowhere to send you for the names themselves. The
|
|
828
|
-
block spans both columns rather than sitting in the 116px
|
|
829
|
-
value track: a member is a record, not a value, and several of
|
|
830
|
-
them in a 250px column is unreadable.
|
|
831
|
-
|
|
832
|
-
Read off `selectedVisitorDataObject` (the raw row) and not
|
|
833
|
-
`selectedVisitorObject`, which filters itself down to
|
|
834
|
-
`typeFieldMap` plus five fixed keys - `members` is on neither
|
|
835
|
-
list, and widening that computed would change what four other
|
|
836
|
-
dialogs on this screen see.
|
|
837
|
-
-->
|
|
838
|
-
<div
|
|
839
|
-
v-else-if="key === 'members' && selectedVisitorMembers.length"
|
|
840
|
-
class="visitor-preview__row visitor-preview__row--block"
|
|
841
|
-
>
|
|
842
|
-
<div class="visitor-preview__label">
|
|
843
|
-
{{ label }} ({{ selectedVisitorMembers.length }})
|
|
844
|
-
</div>
|
|
845
|
-
<div class="visitor-preview__members">
|
|
846
|
-
<div
|
|
847
|
-
v-for="(member, index) in selectedVisitorMembers"
|
|
848
|
-
:key="member?.nric || member?.name || index"
|
|
849
|
-
class="visitor-preview__member"
|
|
850
|
-
>
|
|
851
|
-
<div class="visitor-preview__value">
|
|
852
|
-
{{ member?.name || "N/A" }}
|
|
853
|
-
</div>
|
|
854
|
-
<template v-for="field in memberDetailFields" :key="field.key">
|
|
855
|
-
<div
|
|
856
|
-
v-if="member?.[field.key]"
|
|
857
|
-
class="visitor-preview__member-line"
|
|
858
|
-
>
|
|
859
|
-
<span class="visitor-preview__member-key">
|
|
860
|
-
{{ field.label }}
|
|
861
|
-
</span>
|
|
862
|
-
<!-- A member's NRIC is the same class of data as the
|
|
863
|
-
visitor's, so it gets the same control. Each
|
|
864
|
-
member reveals separately - one toggle for the
|
|
865
|
-
whole card would show three people's NRICs to
|
|
866
|
-
read one. -->
|
|
867
|
-
<button
|
|
868
|
-
v-if="field.key === 'nric'"
|
|
869
|
-
type="button"
|
|
870
|
-
class="visitor-preview__reveal"
|
|
871
|
-
:aria-label="
|
|
872
|
-
isMemberNricShown(index)
|
|
873
|
-
? `Hide NRIC for ${member?.name || 'this member'}`
|
|
874
|
-
: `Show NRIC for ${member?.name || 'this member'}`
|
|
875
|
-
"
|
|
876
|
-
:aria-pressed="isMemberNricShown(index)"
|
|
877
|
-
@click="toggleMemberNric(index)"
|
|
878
|
-
>
|
|
879
|
-
<span>
|
|
880
|
-
{{
|
|
881
|
-
isMemberNricShown(index)
|
|
882
|
-
? member.nric
|
|
883
|
-
: maskNRIC(member.nric)
|
|
884
|
-
}}
|
|
885
|
-
</span>
|
|
886
|
-
<v-icon size="16" class="visitor-preview__eye">
|
|
887
|
-
{{
|
|
888
|
-
isMemberNricShown(index)
|
|
889
|
-
? "mdi-eye-off-outline"
|
|
890
|
-
: "mdi-eye-outline"
|
|
891
|
-
}}
|
|
892
|
-
</v-icon>
|
|
893
|
-
</button>
|
|
894
|
-
<span v-else>{{ member[field.key] }}</span>
|
|
895
|
-
</div>
|
|
896
|
-
</template>
|
|
897
|
-
</div>
|
|
898
|
-
</div>
|
|
899
|
-
</div>
|
|
900
|
-
|
|
901
799
|
<!-- The vehicle number, with Block on its right: the Registered
|
|
902
800
|
tab only, for someone who may add vehicles. It opens the
|
|
903
801
|
Vehicle Mgmt Block Listed form with the category taken from
|
|
@@ -2190,71 +2088,6 @@ const isSelectedVisitorPendingApproval = computed(
|
|
|
2190
2088
|
() => selectedVisitorStatus.value === "pending"
|
|
2191
2089
|
);
|
|
2192
2090
|
|
|
2193
|
-
/**
|
|
2194
|
-
* The members a contractor brought with them. Not gated on the Guests tab: the
|
|
2195
|
-
* list row's own `( +N members)` count is not either, and a contractor with a
|
|
2196
|
-
* party has one wherever the screen shows it.
|
|
2197
|
-
*
|
|
2198
|
-
* Blank entries are dropped rather than drawn as an empty card - the payload
|
|
2199
|
-
* carries `""` for every detail nobody filled in, so a member with no name and
|
|
2200
|
-
* no details would otherwise render as a bare inset box.
|
|
2201
|
-
*/
|
|
2202
|
-
const selectedVisitorMembers = computed<Record<string, any>[]>(() => {
|
|
2203
|
-
const members = selectedVisitorDataObject.value?.members;
|
|
2204
|
-
if (!Array.isArray(members)) return [];
|
|
2205
|
-
|
|
2206
|
-
return members.filter(
|
|
2207
|
-
(member: Record<string, any>) =>
|
|
2208
|
-
member?.name || member?.nric || member?.contact || member?.plateNumber
|
|
2209
|
-
);
|
|
2210
|
-
});
|
|
2211
|
-
|
|
2212
|
-
/**
|
|
2213
|
-
* WHICH NRICs ARE UNCOVERED RIGHT NOW.
|
|
2214
|
-
*
|
|
2215
|
-
* Per member and not per card, so revealing one person's number does not
|
|
2216
|
-
* uncover the rest of the party's. Both are cleared when the dialog closes -
|
|
2217
|
-
* a preview must not open on the next visitor with the last one's NRIC
|
|
2218
|
-
* already showing, and it is the same `selectedVisitorId` that would carry it
|
|
2219
|
-
* across if the same row were reopened.
|
|
2220
|
-
*/
|
|
2221
|
-
const showVisitorNric = ref(false);
|
|
2222
|
-
const shownMemberNrics = ref<number[]>([]);
|
|
2223
|
-
|
|
2224
|
-
function isMemberNricShown(index: number) {
|
|
2225
|
-
return shownMemberNrics.value.includes(index);
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
function toggleMemberNric(index: number) {
|
|
2229
|
-
shownMemberNrics.value = isMemberNricShown(index)
|
|
2230
|
-
? shownMemberNrics.value.filter((x) => x !== index)
|
|
2231
|
-
: [...shownMemberNrics.value, index];
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
watch(
|
|
2235
|
-
() => dialog.viewVisitor,
|
|
2236
|
-
(open) => {
|
|
2237
|
-
if (open) return;
|
|
2238
|
-
showVisitorNric.value = false;
|
|
2239
|
-
shownMemberNrics.value = [];
|
|
2240
|
-
}
|
|
2241
|
-
);
|
|
2242
|
-
|
|
2243
|
-
/**
|
|
2244
|
-
* What a member row prints under the name, in order. `plateNumber` is in here
|
|
2245
|
-
* because the API returns it on `members[]` even though neither
|
|
2246
|
-
* `TMemberInfo` (this package) nor `TContractorMembers` (API-core's visitor
|
|
2247
|
-
* model, name and nric only) declares it - the two types have drifted from the
|
|
2248
|
-
* document and from each other. Reading the key defensively costs nothing and
|
|
2249
|
-
* shows the vehicle a member actually arrived in; the types are somebody's to
|
|
2250
|
-
* reconcile separately.
|
|
2251
|
-
*/
|
|
2252
|
-
const memberDetailFields = [
|
|
2253
|
-
{ key: "nric", label: "NRIC" },
|
|
2254
|
-
{ key: "contact", label: "Contact" },
|
|
2255
|
-
{ key: "plateNumber", label: "Vehicle" },
|
|
2256
|
-
] as const;
|
|
2257
|
-
|
|
2258
2091
|
const formatType = (item: any) =>
|
|
2259
2092
|
(item.deliveryType ? item.deliveryType + "-" : "") + item.type;
|
|
2260
2093
|
|
|
@@ -2268,7 +2101,6 @@ const formattedFields = {
|
|
|
2268
2101
|
level: "Level",
|
|
2269
2102
|
unit: "Unit",
|
|
2270
2103
|
purpose: "Purpose",
|
|
2271
|
-
members: "Members",
|
|
2272
2104
|
checkIn: "Check In",
|
|
2273
2105
|
snapshotEntryImage: "Entry Image",
|
|
2274
2106
|
checkOut: "Check Out",
|
|
@@ -3260,100 +3092,6 @@ watchEffect(async () => {
|
|
|
3260
3092
|
word-break: break-word;
|
|
3261
3093
|
}
|
|
3262
3094
|
|
|
3263
|
-
/* A row whose value is a set of records rather than a value - it drops the
|
|
3264
|
-
two-column grid and runs the full width of the card body. */
|
|
3265
|
-
.visitor-preview__row--block {
|
|
3266
|
-
display: block;
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
.visitor-preview__members {
|
|
3270
|
-
display: flex;
|
|
3271
|
-
flex-direction: column;
|
|
3272
|
-
gap: 8px;
|
|
3273
|
-
margin-top: 8px;
|
|
3274
|
-
}
|
|
3275
|
-
|
|
3276
|
-
/*
|
|
3277
|
-
* An added member reads as an inset on the card it sits in - `--hover` on
|
|
3278
|
-
* `--border` at the inner radius. Those are `Card/MemberInfoSummary`'s three
|
|
3279
|
-
* decisions, unchanged, so a member looks the same in the preview as it does
|
|
3280
|
-
* in the form that created it. Only the TYPE differs: that card still prints
|
|
3281
|
-
* `<strong>Label:</strong> value`, which is the pattern this dialog just moved
|
|
3282
|
-
* off, so the lines below are set on the scale rather than inherited.
|
|
3283
|
-
*/
|
|
3284
|
-
.visitor-preview__member {
|
|
3285
|
-
padding: 9px 12px;
|
|
3286
|
-
border: 1px solid var(--border);
|
|
3287
|
-
border-radius: var(--r-inner);
|
|
3288
|
-
background: var(--hover);
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
.visitor-preview__member-line {
|
|
3292
|
-
display: flex;
|
|
3293
|
-
gap: 8px;
|
|
3294
|
-
margin-top: 3px;
|
|
3295
|
-
font-size: var(--fs-breadcrumb);
|
|
3296
|
-
color: var(--text2);
|
|
3297
|
-
word-break: break-word;
|
|
3298
|
-
}
|
|
3299
|
-
|
|
3300
|
-
.visitor-preview__member-key {
|
|
3301
|
-
flex: 0 0 52px;
|
|
3302
|
-
color: var(--muted);
|
|
3303
|
-
}
|
|
3304
|
-
|
|
3305
|
-
/*
|
|
3306
|
-
* THE NRIC REVEAL.
|
|
3307
|
-
*
|
|
3308
|
-
* The pressable thing is the masked number, not the glyph beside it: an eye on
|
|
3309
|
-
* its own is a 14-16px target where 24px is the floor, and on a 12.5px member
|
|
3310
|
-
* line an `AppButton variant="icon"` - the layer's 32px icon square - would
|
|
3311
|
-
* make the NRIC line half again the height of the Contact line under it.
|
|
3312
|
-
* Pressing the digits gives a target the width of the value at no cost to the
|
|
3313
|
-
* rhythm, and reads the right way round: the number is what changes.
|
|
3314
|
-
*
|
|
3315
|
-
* It inherits its type rather than setting any, so the visitor's NRIC stays on
|
|
3316
|
-
* `--fs-cell` and a member's on the `--fs-breadcrumb` of the line it sits in.
|
|
3317
|
-
* The negative margin pays back the padding, so a revealed value starts on the
|
|
3318
|
-
* same left edge as every other value in the card.
|
|
3319
|
-
*/
|
|
3320
|
-
.visitor-preview__reveal {
|
|
3321
|
-
display: inline-flex;
|
|
3322
|
-
align-items: center;
|
|
3323
|
-
gap: 6px;
|
|
3324
|
-
margin: -3px -7px;
|
|
3325
|
-
padding: 3px 7px;
|
|
3326
|
-
border: none;
|
|
3327
|
-
border-radius: var(--r-inner-sm);
|
|
3328
|
-
background: transparent;
|
|
3329
|
-
font: inherit;
|
|
3330
|
-
color: inherit;
|
|
3331
|
-
text-align: left;
|
|
3332
|
-
cursor: pointer;
|
|
3333
|
-
transition: background var(--motion) ease;
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
.visitor-preview__reveal:hover {
|
|
3337
|
-
background: var(--hover);
|
|
3338
|
-
}
|
|
3339
|
-
|
|
3340
|
-
.visitor-preview__reveal:focus-visible {
|
|
3341
|
-
outline: 2px solid var(--accent);
|
|
3342
|
-
outline-offset: 1px;
|
|
3343
|
-
}
|
|
3344
|
-
|
|
3345
|
-
/* The design's interactive ink - not Vuetify's fixed blue, which is one colour
|
|
3346
|
-
on both themes. `affectedEntities` gives its NRIC eye the same value. */
|
|
3347
|
-
.visitor-preview__eye {
|
|
3348
|
-
color: var(--accent-text);
|
|
3349
|
-
}
|
|
3350
|
-
|
|
3351
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3352
|
-
.visitor-preview__reveal {
|
|
3353
|
-
transition: none;
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
3095
|
/* The width the type filter carried as `max-width="200"` on the v-select. */
|
|
3358
3096
|
.visitor-type-filter {
|
|
3359
3097
|
max-width: 200px;
|
|
@@ -228,11 +228,7 @@ export default function useAccessManagement() {
|
|
|
228
228
|
unitId: string;
|
|
229
229
|
page?: number;
|
|
230
230
|
limit?: number;
|
|
231
|
-
/** Card-number search. Sent only when non-empty; API-core does not read
|
|
232
|
-
* it yet, so until it does the list comes back unfiltered. */
|
|
233
|
-
search?: string;
|
|
234
231
|
}) {
|
|
235
|
-
const search = params.search?.trim();
|
|
236
232
|
return useNuxtApp().$api<Record<string, any>>(
|
|
237
233
|
`/api/access-management/available-card-contractor/${params.type}`,
|
|
238
234
|
{
|
|
@@ -242,7 +238,6 @@ export default function useAccessManagement() {
|
|
|
242
238
|
unitId: params.unitId,
|
|
243
239
|
page: params.page ?? 1,
|
|
244
240
|
limit: params.limit ?? 100,
|
|
245
|
-
...(search ? { search } : {}),
|
|
246
241
|
},
|
|
247
242
|
}
|
|
248
243
|
);
|
|
@@ -7,8 +7,8 @@ export default function useCleaningPermission() {
|
|
|
7
7
|
const {
|
|
8
8
|
rolePermissions,
|
|
9
9
|
memberPermissions,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
feedbackPermissions,
|
|
11
|
+
workOrderPermissions,
|
|
12
12
|
invitationPermissions,
|
|
13
13
|
bulletinBoardPermissions,
|
|
14
14
|
|
|
@@ -17,8 +17,8 @@ export default function useCleaningPermission() {
|
|
|
17
17
|
const permissions: TPermissions = {
|
|
18
18
|
inventory: inventoryPermissions,
|
|
19
19
|
members: memberPermissions,
|
|
20
|
-
feedbacks:
|
|
21
|
-
work_order:
|
|
20
|
+
feedbacks: feedbackPermissions,
|
|
21
|
+
work_order: workOrderPermissions,
|
|
22
22
|
roles: rolePermissions,
|
|
23
23
|
invitations: invitationPermissions,
|
|
24
24
|
"bulletin-board": bulletinBoardPermissions,
|
|
@@ -120,20 +120,6 @@ export function useCommonPermissions() {
|
|
|
120
120
|
},
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
/*
|
|
124
|
-
* The same rights WITHOUT "delete-work-order", for every trade other than
|
|
125
|
-
* Property Management. Deleting a work order is for Property Management and
|
|
126
|
-
* the work order's creator only (Harris, 2026-09-23), so the service
|
|
127
|
-
* providers' role editors no longer offer the box. Property keeps
|
|
128
|
-
* `workOrderPermissions` as it is.
|
|
129
|
-
*/
|
|
130
|
-
const { "delete-work-order": _propertyOnly, ...tradeWorkOrderPermissions } =
|
|
131
|
-
workOrderPermissions;
|
|
132
|
-
|
|
133
|
-
/** Feedback the same way: "delete-feedback" is Property Management's only. */
|
|
134
|
-
const { "delete-feedback": _propertyOnlyFeedback, ...tradeFeedbackPermissions } =
|
|
135
|
-
feedbackPermissions;
|
|
136
|
-
|
|
137
123
|
const visitorManagementPermissions: Record<string, TPermission> = {
|
|
138
124
|
"add-visitor": {
|
|
139
125
|
check: true,
|
|
@@ -337,9 +323,7 @@ export function useCommonPermissions() {
|
|
|
337
323
|
memberPermissions,
|
|
338
324
|
rolePermissions,
|
|
339
325
|
feedbackPermissions,
|
|
340
|
-
tradeFeedbackPermissions,
|
|
341
326
|
workOrderPermissions,
|
|
342
|
-
tradeWorkOrderPermissions,
|
|
343
327
|
visitorManagementPermissions,
|
|
344
328
|
buildingManagementPermissions,
|
|
345
329
|
buildingUnitManagementPermissions,
|
|
@@ -6,7 +6,6 @@ export default function useDocument() {
|
|
|
6
6
|
type = "all",
|
|
7
7
|
site = "",
|
|
8
8
|
parentId = "",
|
|
9
|
-
expiry = "all",
|
|
10
9
|
}: {
|
|
11
10
|
page?: number;
|
|
12
11
|
search?: string;
|
|
@@ -14,11 +13,6 @@ export default function useDocument() {
|
|
|
14
13
|
type?: string;
|
|
15
14
|
site?: string;
|
|
16
15
|
parentId?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Which tab is asking: "active" for Documents, "expired" for
|
|
19
|
-
* Document (Expired). Defaults to "all" so existing callers are unaffected.
|
|
20
|
-
*/
|
|
21
|
-
expiry?: string;
|
|
22
16
|
} = {}) {
|
|
23
17
|
const query: Record<string, any> = {
|
|
24
18
|
page,
|
|
@@ -27,7 +21,6 @@ export default function useDocument() {
|
|
|
27
21
|
type,
|
|
28
22
|
site,
|
|
29
23
|
parentId,
|
|
30
|
-
expiry,
|
|
31
24
|
};
|
|
32
25
|
|
|
33
26
|
return useNuxtApp().$api<Record<string, any>>(`/api/documents`, {
|
|
@@ -76,8 +76,6 @@ export default function usetFacility() {
|
|
|
76
76
|
hourInterval?: number;
|
|
77
77
|
isBookingFeeEnabled: boolean;
|
|
78
78
|
isGuestEnabled: boolean;
|
|
79
|
-
isResidentChecklistEnabled: boolean;
|
|
80
|
-
isSecurityChecklistEnabled: boolean;
|
|
81
79
|
bookingAmount: number | null;
|
|
82
80
|
peakBookingFeeAmount?: number | null;
|
|
83
81
|
bookingFeeGuestAmount?: number | null;
|
|
@@ -175,8 +173,6 @@ export default function usetFacility() {
|
|
|
175
173
|
hourInterval = 1,
|
|
176
174
|
isBookingFeeEnabled = false,
|
|
177
175
|
isGuestEnabled = false,
|
|
178
|
-
isResidentChecklistEnabled = false,
|
|
179
|
-
isSecurityChecklistEnabled = false,
|
|
180
176
|
bookingAmount = 0,
|
|
181
177
|
peakBookingFeeAmount = 0,
|
|
182
178
|
bookingFeeGuestAmount = 0,
|
|
@@ -240,13 +236,6 @@ export default function usetFacility() {
|
|
|
240
236
|
this.hourInterval = hourInterval;
|
|
241
237
|
this.isBookingFeeEnabled = isBookingFeeEnabled;
|
|
242
238
|
this.isGuestEnabled = isGuestEnabled;
|
|
243
|
-
// Exactly one owner, always. `isResidentChecklistEnabled` is the flag
|
|
244
|
-
// the apps gate on, so it decides, and security is its complement —
|
|
245
|
-
// stored rather than computed so each app can read its own flag without
|
|
246
|
-
// knowing the rule. A facility predating both fields lands on security,
|
|
247
|
-
// which is how every one of them already behaved.
|
|
248
|
-
this.isResidentChecklistEnabled = isResidentChecklistEnabled === true;
|
|
249
|
-
this.isSecurityChecklistEnabled = !this.isResidentChecklistEnabled;
|
|
250
239
|
this.bookingAmount = bookingAmount;
|
|
251
240
|
this.peakBookingFeeAmount = peakBookingFeeAmount;
|
|
252
241
|
this.bookingFeeGuestAmount = bookingFeeGuestAmount;
|
|
@@ -28,22 +28,6 @@ export type HidReaderPayload = {
|
|
|
28
28
|
lastCallbackType?: string;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export type HidProfileQr = {
|
|
32
|
-
readerId: string;
|
|
33
|
-
userId: string;
|
|
34
|
-
memberId: string;
|
|
35
|
-
hidUserId: string;
|
|
36
|
-
registration: string;
|
|
37
|
-
readerName: string;
|
|
38
|
-
portalName: string;
|
|
39
|
-
qrEnabled: boolean;
|
|
40
|
-
issued: boolean;
|
|
41
|
-
qrValue: string;
|
|
42
|
-
issuedAt: string;
|
|
43
|
-
/** null when the permission lookup itself failed, so "unknown" stays distinct from "no". */
|
|
44
|
-
assigned: boolean | null;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
31
|
type HidIdentityPayload = {
|
|
48
32
|
site?: string;
|
|
49
33
|
hidUserId?: string | number;
|
|
@@ -155,18 +139,6 @@ export type HidSipAccountData = {
|
|
|
155
139
|
provisionedAt: string;
|
|
156
140
|
};
|
|
157
141
|
|
|
158
|
-
/** One row of the site's SIP account list - who owns the extension, never its password. */
|
|
159
|
-
export type HidSipAccountListItem = {
|
|
160
|
-
_id: string;
|
|
161
|
-
userId: string;
|
|
162
|
-
name: string;
|
|
163
|
-
email: string;
|
|
164
|
-
extension: string;
|
|
165
|
-
username: string;
|
|
166
|
-
status: string;
|
|
167
|
-
provisionedAt: string;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
142
|
/**
|
|
171
143
|
* True only for the specific validation error an API that predates core #1878
|
|
172
144
|
* returns when the discover body carries `site`. Deliberately narrow: after
|
|
@@ -194,36 +166,6 @@ export default function useHidAmico() {
|
|
|
194
166
|
});
|
|
195
167
|
}
|
|
196
168
|
|
|
197
|
-
/**
|
|
198
|
-
* The signed-in member's own QR code on one reader.
|
|
199
|
-
*
|
|
200
|
-
* No user id in the path: the server takes the caller from the session, so
|
|
201
|
-
* these cannot be pointed at somebody else. `assigned` in the response says
|
|
202
|
-
* whether the HID permissions screen actually admits this member to the
|
|
203
|
-
* reader - issuing a code does not grant access, and the screen has to be
|
|
204
|
-
* able to say so.
|
|
205
|
-
*/
|
|
206
|
-
function getProfileQr(readerId: string) {
|
|
207
|
-
return useNuxtApp().$api<{ data: HidProfileQr }>(
|
|
208
|
-
`${basePath}/readers/${readerId}/profile-qr`,
|
|
209
|
-
{ method: "GET" },
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function issueProfileQr(readerId: string) {
|
|
214
|
-
return useNuxtApp().$api<{ data: HidProfileQr }>(
|
|
215
|
-
`${basePath}/readers/${readerId}/profile-qr`,
|
|
216
|
-
{ method: "POST" },
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function deleteProfileQr(readerId: string) {
|
|
221
|
-
return useNuxtApp().$api<{ data: HidProfileQr }>(
|
|
222
|
-
`${basePath}/readers/${readerId}/profile-qr`,
|
|
223
|
-
{ method: "DELETE" },
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
169
|
function createReader(payload: HidReaderPayload) {
|
|
228
170
|
return useNuxtApp().$api<HidApiRecord>(`${basePath}/readers`, {
|
|
229
171
|
method: "POST",
|
|
@@ -472,27 +414,6 @@ export default function useHidAmico() {
|
|
|
472
414
|
);
|
|
473
415
|
}
|
|
474
416
|
|
|
475
|
-
function getUserPasswordStatus(readerId: string, hidUserId: string | number) {
|
|
476
|
-
return useNuxtApp().$api<HidApiRecord>(
|
|
477
|
-
`${basePath}/readers/${readerId}/users/${hidUserId}/password`,
|
|
478
|
-
{ method: "GET" },
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
function setUserPassword(readerId: string, hidUserId: string | number, password: string) {
|
|
483
|
-
return useNuxtApp().$api<HidApiRecord>(
|
|
484
|
-
`${basePath}/readers/${readerId}/users/${hidUserId}/password`,
|
|
485
|
-
{ method: "PUT", body: { password } },
|
|
486
|
-
);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
function deleteUserPassword(readerId: string, hidUserId: string | number) {
|
|
490
|
-
return useNuxtApp().$api<HidApiRecord>(
|
|
491
|
-
`${basePath}/readers/${readerId}/users/${hidUserId}/password`,
|
|
492
|
-
{ method: "DELETE" },
|
|
493
|
-
);
|
|
494
|
-
}
|
|
495
|
-
|
|
496
417
|
function deleteUserPin(readerId: string, hidUserId: string | number) {
|
|
497
418
|
return useNuxtApp().$api<{ data: { pinEnrolled: boolean } }>(
|
|
498
419
|
`${basePath}/readers/${readerId}/users/${hidUserId}/pin`,
|
|
@@ -553,36 +474,6 @@ export default function useHidAmico() {
|
|
|
553
474
|
);
|
|
554
475
|
}
|
|
555
476
|
|
|
556
|
-
function getSipAccounts(siteId: string, orgId: string) {
|
|
557
|
-
return useNuxtApp().$api<{ data: HidSipAccountListItem[] }>(
|
|
558
|
-
`${basePath}/sites/${siteId}/intercom/sip-accounts`,
|
|
559
|
-
{ method: "GET", query: { orgId } },
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Wake the resident's phone for a call the web phone has just placed.
|
|
565
|
-
*
|
|
566
|
-
* The SIP INVITE is the call and travels over the WebSocket, not through the
|
|
567
|
-
* API; this only rings the resident's mobile so somebody is there to answer
|
|
568
|
-
* it. It is therefore fired after the INVITE and never awaited in a way that
|
|
569
|
-
* could fail the call — see `startWebCall` in `HidIntercomManagement.vue`.
|
|
570
|
-
*
|
|
571
|
-
* `notified: false` with a reason is a normal response, not an error: staff
|
|
572
|
-
* extensions and external SIP addresses have no resident behind them.
|
|
573
|
-
*/
|
|
574
|
-
function notifyIntercomCall(
|
|
575
|
-
siteId: string,
|
|
576
|
-
payload: { orgId: string; destination: string; callId: string; readerId?: string },
|
|
577
|
-
) {
|
|
578
|
-
return useNuxtApp().$api<{
|
|
579
|
-
data: { notified: boolean; delivered?: number; reason?: string };
|
|
580
|
-
}>(
|
|
581
|
-
`${basePath}/sites/${siteId}/intercom/notify-call`,
|
|
582
|
-
{ method: "POST", body: payload },
|
|
583
|
-
);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
477
|
function getPermissionCandidates(
|
|
587
478
|
siteId: string,
|
|
588
479
|
query: {
|
|
@@ -614,9 +505,6 @@ export default function useHidAmico() {
|
|
|
614
505
|
|
|
615
506
|
return {
|
|
616
507
|
getReaders,
|
|
617
|
-
getProfileQr,
|
|
618
|
-
issueProfileQr,
|
|
619
|
-
deleteProfileQr,
|
|
620
508
|
discoverReader,
|
|
621
509
|
createReader,
|
|
622
510
|
updateReader,
|
|
@@ -642,9 +530,6 @@ export default function useHidAmico() {
|
|
|
642
530
|
getUserPinStatus,
|
|
643
531
|
setUserPin,
|
|
644
532
|
deleteUserPin,
|
|
645
|
-
getUserPasswordStatus,
|
|
646
|
-
setUserPassword,
|
|
647
|
-
deleteUserPassword,
|
|
648
533
|
getIdentities,
|
|
649
534
|
getReaderUsers,
|
|
650
535
|
getReaderAccessLogs,
|
|
@@ -655,8 +540,6 @@ export default function useHidAmico() {
|
|
|
655
540
|
makeIntercomCall,
|
|
656
541
|
finalizeIntercomCall,
|
|
657
542
|
ensureSipAccount,
|
|
658
|
-
getSipAccounts,
|
|
659
|
-
notifyIntercomCall,
|
|
660
543
|
getSitePermissions,
|
|
661
544
|
getPermissionCandidates,
|
|
662
545
|
updateSitePermissions,
|
|
@@ -46,33 +46,9 @@ export default function useHidNavigation() {
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
// "HID Reader Users" now points at `access-mgmt/administrator`, not at
|
|
50
|
-
// `access-mgmt/hid-users`.
|
|
51
|
-
//
|
|
52
|
-
// Both routes mount a roster of the reader's users, but only this one
|
|
53
|
-
// can act on them. `administrator` renders HidUserEnrollment WITHOUT
|
|
54
|
-
// `card-management`, and that prop is what gates the Enroll action:
|
|
55
|
-
// <template v-if="!props.cardManagement" #actions>
|
|
56
|
-
// `hid-users` renders HidReaderUserRoster, which is read-only apart
|
|
57
|
-
// from PIN management. So the menu entry with this name used to lead
|
|
58
|
-
// to the screen that cannot enrol, while the screen that can was
|
|
59
|
-
// reachable only by typing the URL.
|
|
60
|
-
//
|
|
61
|
-
// `hid-users` is left in place and simply unlisted - the same state
|
|
62
|
-
// `administrator` was in - so any existing link to it still resolves.
|
|
63
49
|
title: "HID Reader Users",
|
|
64
50
|
route: {
|
|
65
|
-
name: "org-site-access-mgmt-
|
|
66
|
-
params: { org, site },
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
// The signed-in member's own pass, not somebody else's. Every other
|
|
71
|
-
// entry in this group acts on a resident or a visitor; this one has
|
|
72
|
-
// no subject but the caller.
|
|
73
|
-
title: "HID QR Code",
|
|
74
|
-
route: {
|
|
75
|
-
name: "org-site-access-mgmt-hid-qr-code",
|
|
51
|
+
name: "org-site-access-mgmt-hid-users",
|
|
76
52
|
params: { org, site },
|
|
77
53
|
},
|
|
78
54
|
},
|
|
@@ -25,8 +25,8 @@ export default function useLandscapingPermission() {
|
|
|
25
25
|
invitationPermissions,
|
|
26
26
|
memberPermissions,
|
|
27
27
|
rolePermissions,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
feedbackPermissions,
|
|
29
|
+
workOrderPermissions,
|
|
30
30
|
bulletinBoardPermissions,
|
|
31
31
|
serviceProviderPermissions,
|
|
32
32
|
|
|
@@ -37,8 +37,8 @@ export default function useLandscapingPermission() {
|
|
|
37
37
|
members: memberPermissions,
|
|
38
38
|
roles: rolePermissions,
|
|
39
39
|
invitations: invitationPermissions,
|
|
40
|
-
feedbacks:
|
|
41
|
-
work_orders:
|
|
40
|
+
feedbacks: feedbackPermissions,
|
|
41
|
+
work_orders: workOrderPermissions,
|
|
42
42
|
"bulletin-board": bulletinBoardPermissions,
|
|
43
43
|
"service-provider-mgmt": serviceProviderPermissions,
|
|
44
44
|
// Owner decision 3A, 2026-09-11: Emergency Contacts is offered in the
|
|
@@ -26,8 +26,8 @@ export default function useMechanicalElectricalPermission() {
|
|
|
26
26
|
invitationPermissions,
|
|
27
27
|
memberPermissions,
|
|
28
28
|
rolePermissions,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
feedbackPermissions,
|
|
30
|
+
workOrderPermissions,
|
|
31
31
|
bulletinBoardPermissions,
|
|
32
32
|
|
|
33
33
|
inventoryPermissions,
|
|
@@ -39,8 +39,8 @@ export default function useMechanicalElectricalPermission() {
|
|
|
39
39
|
members: memberPermissions,
|
|
40
40
|
roles: rolePermissions,
|
|
41
41
|
invitations: invitationPermissions,
|
|
42
|
-
feedbacks:
|
|
43
|
-
work_orders:
|
|
42
|
+
feedbacks: feedbackPermissions,
|
|
43
|
+
work_orders: workOrderPermissions,
|
|
44
44
|
"bulletin-board": bulletinBoardPermissions,
|
|
45
45
|
// This app's sidebar gates Area, Unit and Settings on `area-mgmt`,
|
|
46
46
|
// `unit-mgmt` and `site-settings`, and its pages exist -- but the catalogue
|