@7365admin1/layer-common 4.81.1 → 4.82.1-staging.469
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 +10 -4
- package/assets/css/primitives.css +57 -0
- package/assets/css/robot-hero.css +3 -0
- package/assets/css/screens.css +8 -4
- package/components/AccessCardDetailsDialog.vue +57 -4
- package/components/AccessCardPreviewDialog.vue +291 -50
- package/components/AppSelect.vue +143 -4
- package/components/BuildingUnitFormEdit.vue +6 -0
- package/components/BuildingUnitManagement.vue +298 -0
- package/components/Dialog/UpdateMoreAction.vue +11 -1
- package/components/DocumentForm.vue +407 -112
- package/components/DocumentManagement.vue +213 -12
- package/components/Facility/BookingSetup.vue +63 -0
- package/components/HidAccessLogDashboard.vue +74 -17
- package/components/HidAccessPermissions.vue +424 -0
- package/components/HidIntercomManagement.vue +183 -14
- package/components/HidProfileQrCode.vue +332 -0
- package/components/HidQrCodeConfiguration.vue +17 -195
- package/components/HidReaderManagement.vue +398 -0
- package/components/HidReaderUserRoster.vue +44 -3
- package/components/HidUserEnrollment.vue +1521 -248
- package/components/InvitationClientForm.vue +19 -1
- package/components/Robot/Detail.vue +6 -1
- package/components/Robot/FaultClearSteps.vue +11 -0
- package/components/TableMain.vue +22 -7
- package/components/VisitorForm.vue +12 -0
- package/components/VisitorManagement.vue +267 -5
- package/composables/useDocument.ts +7 -0
- package/composables/useFacility.ts +11 -0
- package/composables/useHidAmico.ts +165 -0
- package/composables/useHidNavigation.ts +25 -1
- package/composables/useHidReaderSelection.ts +50 -0
- package/composables/useMember.ts +12 -0
- package/composables/usePeople.ts +19 -0
- package/composables/useServiceProvider.ts +40 -2
- package/composables/useSiteCategory.ts +45 -0
- 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-qr-code/index.vue +23 -0
- package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
- package/types/document.d.ts +14 -0
- package/types/facility.d.ts +4 -0
- package/types/member.d.ts +4 -0
- package/types/people.d.ts +28 -1
- package/types/service-provider.d.ts +5 -0
- package/utils/hid-enrolment-subject.ts +144 -0
- package/utils/hid-permission-assignments.ts +190 -0
- package/utils/hid-reader-selection.ts +52 -0
- package/utils/occupancy-role.ts +109 -0
- package/utils/robot-display.ts +25 -2
- package/utils/service-type.ts +30 -0
|
@@ -388,9 +388,27 @@ watch(
|
|
|
388
388
|
const roles = ref<any[]>([])
|
|
389
389
|
const { getRoles } = useRole()
|
|
390
390
|
|
|
391
|
+
/*
|
|
392
|
+
* `type` is the ROLE type, not the service the client subscribes to, and the
|
|
393
|
+
* only caller (`ClientMain.vue` "Invite Client") passes no `app` prop -- so
|
|
394
|
+
* this sent `type: ""` and the endpoint applied no type filter at all. The
|
|
395
|
+
* dropdown therefore listed every org-less role of every type, which includes
|
|
396
|
+
* the platform's OWN staff roles (`type: "admin"` -- the two rows the console's
|
|
397
|
+
* `/super-admin/role-permissions` screen edits). Offering a Seven365 console
|
|
398
|
+
* staff role on a CLIENT invitation is the defect.
|
|
399
|
+
*
|
|
400
|
+
* A client admin's role is `type: "organization"`, which is what the client
|
|
401
|
+
* roles screen (`org/[organization]/roles-permissions.vue`) already lists. This
|
|
402
|
+
* narrows to exactly that. It is a narrowing of this one picker only: no role
|
|
403
|
+
* changes, no permission changes, and the org-less `organization` roles that
|
|
404
|
+
* were already being picked are all still offered.
|
|
405
|
+
*
|
|
406
|
+
* Keying off the selected service instead would empty the dropdown -- no
|
|
407
|
+
* org-less role carries a service type -- so `props.app` is not the filter.
|
|
408
|
+
*/
|
|
391
409
|
const { data: roleData, refresh: refreshRoles } = await useLazyAsyncData(
|
|
392
410
|
"roles",
|
|
393
|
-
() => getRoles({ org: org.value?._id, type:
|
|
411
|
+
() => getRoles({ org: org.value?._id, type: "organization", limit: 50 }),
|
|
394
412
|
{ watch: [() => props.app] }
|
|
395
413
|
)
|
|
396
414
|
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
<div v-if="fault" class="hero-faultbar" role="alert">
|
|
37
37
|
<span class="hero-faultbar__code">{{ fault.code }}</span>
|
|
38
38
|
<div>
|
|
39
|
-
<div class="hero-faultbar__msg">{{ fault
|
|
39
|
+
<div class="hero-faultbar__msg">{{ faultWordsWithoutCode(fault) }}</div>
|
|
40
40
|
<div class="hero-faultbar__since">
|
|
41
41
|
Since {{ faultSince }} · notified once
|
|
42
42
|
<template v-for="ph in faultPhotos(fault)" :key="ph.label"> · <a :href="ph.url" target="_blank" rel="noopener noreferrer">{{ ph.label }}</a></template>
|
|
43
43
|
</div>
|
|
44
|
+
<RobotFaultClearSteps :steps="clearSteps" />
|
|
44
45
|
</div>
|
|
45
46
|
<v-btn v-if="canResolve" variant="outlined" size="small" :loading="resolving" @click="resolveFault">Mark resolved</v-btn>
|
|
46
47
|
<span class="hero-faultbar__badge">{{ faultBadge(fault) }}</span>
|
|
@@ -339,6 +340,8 @@ import {
|
|
|
339
340
|
positionGapText,
|
|
340
341
|
positionText,
|
|
341
342
|
robotAbilities,
|
|
343
|
+
robotClearFaultSteps,
|
|
344
|
+
faultWordsWithoutCode,
|
|
342
345
|
robotErrorMessage,
|
|
343
346
|
robotFacts,
|
|
344
347
|
cleaningReadings,
|
|
@@ -447,6 +450,8 @@ const statusLabel = computed(() => robotStatus(statusMode.value, robotType.value
|
|
|
447
450
|
|
|
448
451
|
const fault = computed(() => (live.value?.ok ? live.value.fault ?? null : record.value?.fault ?? null));
|
|
449
452
|
const faultSince = computed(() => sinceText(fault.value?.since, now.value));
|
|
453
|
+
// The maker's manual steps (Ounitech today), only while a fault shows.
|
|
454
|
+
const clearSteps = computed(() => robotClearFaultSteps({ fault: fault.value, profile: live.value?.ok ? live.value.profile : null }));
|
|
450
455
|
|
|
451
456
|
// Only what THIS robot reports (hide, never grey); what its maker keeps back is said once, in the card.
|
|
452
457
|
const facts = computed(() => robotFacts({ record: record.value, live: live.value as any, now: now.value, hideUnreported: true }));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="steps.length" class="hero-faultbar__clear">
|
|
3
|
+
<div class="hero-faultbar__clear-title">How to clear this fault</div>
|
|
4
|
+
<ol><li v-for="s in steps" :key="s">{{ s }}</li></ol>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
/** The maker's manual steps to clear a fault on the robot (`robotClearFaultSteps`). */
|
|
10
|
+
defineProps<{ steps: string[] }>();
|
|
11
|
+
</script>
|
package/components/TableMain.vue
CHANGED
|
@@ -59,17 +59,32 @@
|
|
|
59
59
|
>
|
|
60
60
|
{{ createLabel }}
|
|
61
61
|
</v-btn>
|
|
62
|
-
|
|
62
|
+
<!--
|
|
63
|
+
The design's search field. This was a `v-text-field` with only a
|
|
64
|
+
`max-width`, so inside the actions row it shrank to its minimum
|
|
65
|
+
and showed "Se" and a magnifier, at a different height and
|
|
66
|
+
border from the button beside it. Same `search` model; clearing
|
|
67
|
+
now sets "" instead of Vuetify's null.
|
|
68
|
+
-->
|
|
69
|
+
<AppField
|
|
63
70
|
v-if="canSearch"
|
|
64
71
|
v-model="searchInput"
|
|
65
|
-
|
|
72
|
+
search
|
|
66
73
|
placeholder="Search"
|
|
67
|
-
|
|
68
|
-
max-width="300"
|
|
69
|
-
append-inner-icon="mdi-magnify"
|
|
70
|
-
hide-details
|
|
74
|
+
aria-label="Search"
|
|
71
75
|
class="table-card__search"
|
|
72
|
-
|
|
76
|
+
>
|
|
77
|
+
<template v-if="searchInput" #trailing>
|
|
78
|
+
<button
|
|
79
|
+
type="button"
|
|
80
|
+
class="app-field__trailing"
|
|
81
|
+
aria-label="Clear search"
|
|
82
|
+
@click="searchInput = ''"
|
|
83
|
+
>
|
|
84
|
+
<v-icon icon="mdi-close" size="16" />
|
|
85
|
+
</button>
|
|
86
|
+
</template>
|
|
87
|
+
</AppField>
|
|
73
88
|
<!-- Ghost/secondary, as the design specifies for Scan QR Code. -->
|
|
74
89
|
<v-btn
|
|
75
90
|
v-if="canScanVisitorQRCode"
|
|
@@ -910,8 +910,20 @@ const hidQrReaderId = computed(() => (
|
|
|
910
910
|
hidQrConfiguredReaderId.value || String(hidQrReader.value?._id || "")
|
|
911
911
|
));
|
|
912
912
|
|
|
913
|
+
/*
|
|
914
|
+
* Visitor QR passes are hidden at the manager's request (2026-09-23).
|
|
915
|
+
*
|
|
916
|
+
* A flag rather than a deletion: issuing, the preview dialog, printing and the
|
|
917
|
+
* regenerate handler below are all intact and untouched, so bringing the
|
|
918
|
+
* feature back is this one line. Every surface that offers a Visitor QR reads
|
|
919
|
+
* `hidQrCodePassAllowed`, which is why the switch belongs here and not in each
|
|
920
|
+
* of them.
|
|
921
|
+
*/
|
|
922
|
+
const HID_VISITOR_QR_ENABLED = false;
|
|
923
|
+
|
|
913
924
|
const hidQrCodePassAllowed = computed(() => {
|
|
914
925
|
return (
|
|
926
|
+
HID_VISITOR_QR_ENABLED &&
|
|
915
927
|
hidQrCodePassEnabled.value &&
|
|
916
928
|
["guest", "contractor", "walk-in"].includes(prop.type)
|
|
917
929
|
);
|
|
@@ -749,11 +749,35 @@
|
|
|
749
749
|
class="visitor-preview__row"
|
|
750
750
|
>
|
|
751
751
|
<div class="visitor-preview__label">{{ label }}</div>
|
|
752
|
-
<div
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
752
|
+
<div>
|
|
753
|
+
<!-- Was a hover tooltip on the value: the full NRIC only
|
|
754
|
+
reachable by hovering, which says nothing is there to
|
|
755
|
+
reach and cannot be reached at all on a touch screen.
|
|
756
|
+
The eye alone, at the 14px the Incident Report screens
|
|
757
|
+
draw it, is a 14px target - the floor is 24px. So the
|
|
758
|
+
NUMBER is the control and the eye is its affordance:
|
|
759
|
+
the whole masked value is pressable, which makes the
|
|
760
|
+
target the width of the digits rather than of a glyph,
|
|
761
|
+
and being a real `button` it also takes a tab stop,
|
|
762
|
+
which a `v-icon` with a click handler never did. -->
|
|
763
|
+
<button
|
|
764
|
+
type="button"
|
|
765
|
+
class="visitor-preview__reveal"
|
|
766
|
+
:aria-label="showVisitorNric ? 'Hide NRIC' : 'Show NRIC'"
|
|
767
|
+
:aria-pressed="showVisitorNric"
|
|
768
|
+
@click="showVisitorNric = !showVisitorNric"
|
|
769
|
+
>
|
|
770
|
+
<span class="visitor-preview__value">
|
|
771
|
+
{{
|
|
772
|
+
showVisitorNric
|
|
773
|
+
? selectedVisitorObject[key]
|
|
774
|
+
: maskNRIC(selectedVisitorObject[key])
|
|
775
|
+
}}
|
|
776
|
+
</span>
|
|
777
|
+
<v-icon size="16" class="visitor-preview__eye">
|
|
778
|
+
{{ showVisitorNric ? "mdi-eye-off-outline" : "mdi-eye-outline" }}
|
|
779
|
+
</v-icon>
|
|
780
|
+
</button>
|
|
757
781
|
</div>
|
|
758
782
|
</div>
|
|
759
783
|
|
|
@@ -803,6 +827,84 @@
|
|
|
803
827
|
</div>
|
|
804
828
|
</div>
|
|
805
829
|
|
|
830
|
+
<!--
|
|
831
|
+
THE CONTRACTOR'S PARTY.
|
|
832
|
+
|
|
833
|
+
The list row has always said `( +2 members)` beside the name
|
|
834
|
+
and then had nowhere to send you for the names themselves. The
|
|
835
|
+
block spans both columns rather than sitting in the 116px
|
|
836
|
+
value track: a member is a record, not a value, and several of
|
|
837
|
+
them in a 250px column is unreadable.
|
|
838
|
+
|
|
839
|
+
Read off `selectedVisitorDataObject` (the raw row) and not
|
|
840
|
+
`selectedVisitorObject`, which filters itself down to
|
|
841
|
+
`typeFieldMap` plus five fixed keys - `members` is on neither
|
|
842
|
+
list, and widening that computed would change what four other
|
|
843
|
+
dialogs on this screen see.
|
|
844
|
+
-->
|
|
845
|
+
<div
|
|
846
|
+
v-else-if="key === 'members' && selectedVisitorMembers.length"
|
|
847
|
+
class="visitor-preview__row visitor-preview__row--block"
|
|
848
|
+
>
|
|
849
|
+
<div class="visitor-preview__label">
|
|
850
|
+
{{ label }} ({{ selectedVisitorMembers.length }})
|
|
851
|
+
</div>
|
|
852
|
+
<div class="visitor-preview__members">
|
|
853
|
+
<div
|
|
854
|
+
v-for="(member, index) in selectedVisitorMembers"
|
|
855
|
+
:key="member?.nric || member?.name || index"
|
|
856
|
+
class="visitor-preview__member"
|
|
857
|
+
>
|
|
858
|
+
<div class="visitor-preview__value">
|
|
859
|
+
{{ member?.name || "N/A" }}
|
|
860
|
+
</div>
|
|
861
|
+
<template v-for="field in memberDetailFields" :key="field.key">
|
|
862
|
+
<div
|
|
863
|
+
v-if="member?.[field.key]"
|
|
864
|
+
class="visitor-preview__member-line"
|
|
865
|
+
>
|
|
866
|
+
<span class="visitor-preview__member-key">
|
|
867
|
+
{{ field.label }}
|
|
868
|
+
</span>
|
|
869
|
+
<!-- A member's NRIC is the same class of data as the
|
|
870
|
+
visitor's, so it gets the same control. Each
|
|
871
|
+
member reveals separately - one toggle for the
|
|
872
|
+
whole card would show three people's NRICs to
|
|
873
|
+
read one. -->
|
|
874
|
+
<button
|
|
875
|
+
v-if="field.key === 'nric'"
|
|
876
|
+
type="button"
|
|
877
|
+
class="visitor-preview__reveal"
|
|
878
|
+
:aria-label="
|
|
879
|
+
isMemberNricShown(index)
|
|
880
|
+
? `Hide NRIC for ${member?.name || 'this member'}`
|
|
881
|
+
: `Show NRIC for ${member?.name || 'this member'}`
|
|
882
|
+
"
|
|
883
|
+
:aria-pressed="isMemberNricShown(index)"
|
|
884
|
+
@click="toggleMemberNric(index)"
|
|
885
|
+
>
|
|
886
|
+
<span>
|
|
887
|
+
{{
|
|
888
|
+
isMemberNricShown(index)
|
|
889
|
+
? member.nric
|
|
890
|
+
: maskNRIC(member.nric)
|
|
891
|
+
}}
|
|
892
|
+
</span>
|
|
893
|
+
<v-icon size="16" class="visitor-preview__eye">
|
|
894
|
+
{{
|
|
895
|
+
isMemberNricShown(index)
|
|
896
|
+
? "mdi-eye-off-outline"
|
|
897
|
+
: "mdi-eye-outline"
|
|
898
|
+
}}
|
|
899
|
+
</v-icon>
|
|
900
|
+
</button>
|
|
901
|
+
<span v-else>{{ member[field.key] }}</span>
|
|
902
|
+
</div>
|
|
903
|
+
</template>
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
</div>
|
|
907
|
+
|
|
806
908
|
<!-- The vehicle number, with Block on its right: the Registered
|
|
807
909
|
tab only, for someone who may add vehicles. It opens the
|
|
808
910
|
Vehicle Mgmt Block Listed form with the category taken from
|
|
@@ -2123,6 +2225,71 @@ const isSelectedVisitorPendingApproval = computed(
|
|
|
2123
2225
|
() => selectedVisitorStatus.value === "pending"
|
|
2124
2226
|
);
|
|
2125
2227
|
|
|
2228
|
+
/**
|
|
2229
|
+
* The members a contractor brought with them. Not gated on the Guests tab: the
|
|
2230
|
+
* list row's own `( +N members)` count is not either, and a contractor with a
|
|
2231
|
+
* party has one wherever the screen shows it.
|
|
2232
|
+
*
|
|
2233
|
+
* Blank entries are dropped rather than drawn as an empty card - the payload
|
|
2234
|
+
* carries `""` for every detail nobody filled in, so a member with no name and
|
|
2235
|
+
* no details would otherwise render as a bare inset box.
|
|
2236
|
+
*/
|
|
2237
|
+
const selectedVisitorMembers = computed<Record<string, any>[]>(() => {
|
|
2238
|
+
const members = selectedVisitorDataObject.value?.members;
|
|
2239
|
+
if (!Array.isArray(members)) return [];
|
|
2240
|
+
|
|
2241
|
+
return members.filter(
|
|
2242
|
+
(member: Record<string, any>) =>
|
|
2243
|
+
member?.name || member?.nric || member?.contact || member?.plateNumber
|
|
2244
|
+
);
|
|
2245
|
+
});
|
|
2246
|
+
|
|
2247
|
+
/**
|
|
2248
|
+
* WHICH NRICs ARE UNCOVERED RIGHT NOW.
|
|
2249
|
+
*
|
|
2250
|
+
* Per member and not per card, so revealing one person's number does not
|
|
2251
|
+
* uncover the rest of the party's. Both are cleared when the dialog closes -
|
|
2252
|
+
* a preview must not open on the next visitor with the last one's NRIC
|
|
2253
|
+
* already showing, and it is the same `selectedVisitorId` that would carry it
|
|
2254
|
+
* across if the same row were reopened.
|
|
2255
|
+
*/
|
|
2256
|
+
const showVisitorNric = ref(false);
|
|
2257
|
+
const shownMemberNrics = ref<number[]>([]);
|
|
2258
|
+
|
|
2259
|
+
function isMemberNricShown(index: number) {
|
|
2260
|
+
return shownMemberNrics.value.includes(index);
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
function toggleMemberNric(index: number) {
|
|
2264
|
+
shownMemberNrics.value = isMemberNricShown(index)
|
|
2265
|
+
? shownMemberNrics.value.filter((x) => x !== index)
|
|
2266
|
+
: [...shownMemberNrics.value, index];
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
watch(
|
|
2270
|
+
() => dialog.viewVisitor,
|
|
2271
|
+
(open) => {
|
|
2272
|
+
if (open) return;
|
|
2273
|
+
showVisitorNric.value = false;
|
|
2274
|
+
shownMemberNrics.value = [];
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* What a member row prints under the name, in order. `plateNumber` is in here
|
|
2280
|
+
* because the API returns it on `members[]` even though neither
|
|
2281
|
+
* `TMemberInfo` (this package) nor `TContractorMembers` (API-core's visitor
|
|
2282
|
+
* model, name and nric only) declares it - the two types have drifted from the
|
|
2283
|
+
* document and from each other. Reading the key defensively costs nothing and
|
|
2284
|
+
* shows the vehicle a member actually arrived in; the types are somebody's to
|
|
2285
|
+
* reconcile separately.
|
|
2286
|
+
*/
|
|
2287
|
+
const memberDetailFields = [
|
|
2288
|
+
{ key: "nric", label: "NRIC" },
|
|
2289
|
+
{ key: "contact", label: "Contact" },
|
|
2290
|
+
{ key: "plateNumber", label: "Vehicle" },
|
|
2291
|
+
] as const;
|
|
2292
|
+
|
|
2126
2293
|
const formatType = (item: any) =>
|
|
2127
2294
|
(item.deliveryType ? item.deliveryType + "-" : "") + item.type;
|
|
2128
2295
|
|
|
@@ -2136,6 +2303,7 @@ const formattedFields = {
|
|
|
2136
2303
|
level: "Level",
|
|
2137
2304
|
unit: "Unit",
|
|
2138
2305
|
purpose: "Purpose",
|
|
2306
|
+
members: "Members",
|
|
2139
2307
|
checkIn: "Check In",
|
|
2140
2308
|
snapshotEntryImage: "Entry Image",
|
|
2141
2309
|
checkOut: "Check Out",
|
|
@@ -3142,6 +3310,100 @@ watchEffect(async () => {
|
|
|
3142
3310
|
word-break: break-word;
|
|
3143
3311
|
}
|
|
3144
3312
|
|
|
3313
|
+
/* A row whose value is a set of records rather than a value - it drops the
|
|
3314
|
+
two-column grid and runs the full width of the card body. */
|
|
3315
|
+
.visitor-preview__row--block {
|
|
3316
|
+
display: block;
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
.visitor-preview__members {
|
|
3320
|
+
display: flex;
|
|
3321
|
+
flex-direction: column;
|
|
3322
|
+
gap: 8px;
|
|
3323
|
+
margin-top: 8px;
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
/*
|
|
3327
|
+
* An added member reads as an inset on the card it sits in - `--hover` on
|
|
3328
|
+
* `--border` at the inner radius. Those are `Card/MemberInfoSummary`'s three
|
|
3329
|
+
* decisions, unchanged, so a member looks the same in the preview as it does
|
|
3330
|
+
* in the form that created it. Only the TYPE differs: that card still prints
|
|
3331
|
+
* `<strong>Label:</strong> value`, which is the pattern this dialog just moved
|
|
3332
|
+
* off, so the lines below are set on the scale rather than inherited.
|
|
3333
|
+
*/
|
|
3334
|
+
.visitor-preview__member {
|
|
3335
|
+
padding: 9px 12px;
|
|
3336
|
+
border: 1px solid var(--border);
|
|
3337
|
+
border-radius: var(--r-inner);
|
|
3338
|
+
background: var(--hover);
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
.visitor-preview__member-line {
|
|
3342
|
+
display: flex;
|
|
3343
|
+
gap: 8px;
|
|
3344
|
+
margin-top: 3px;
|
|
3345
|
+
font-size: var(--fs-breadcrumb);
|
|
3346
|
+
color: var(--text2);
|
|
3347
|
+
word-break: break-word;
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
.visitor-preview__member-key {
|
|
3351
|
+
flex: 0 0 52px;
|
|
3352
|
+
color: var(--muted);
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
/*
|
|
3356
|
+
* THE NRIC REVEAL.
|
|
3357
|
+
*
|
|
3358
|
+
* The pressable thing is the masked number, not the glyph beside it: an eye on
|
|
3359
|
+
* its own is a 14-16px target where 24px is the floor, and on a 12.5px member
|
|
3360
|
+
* line an `AppButton variant="icon"` - the layer's 32px icon square - would
|
|
3361
|
+
* make the NRIC line half again the height of the Contact line under it.
|
|
3362
|
+
* Pressing the digits gives a target the width of the value at no cost to the
|
|
3363
|
+
* rhythm, and reads the right way round: the number is what changes.
|
|
3364
|
+
*
|
|
3365
|
+
* It inherits its type rather than setting any, so the visitor's NRIC stays on
|
|
3366
|
+
* `--fs-cell` and a member's on the `--fs-breadcrumb` of the line it sits in.
|
|
3367
|
+
* The negative margin pays back the padding, so a revealed value starts on the
|
|
3368
|
+
* same left edge as every other value in the card.
|
|
3369
|
+
*/
|
|
3370
|
+
.visitor-preview__reveal {
|
|
3371
|
+
display: inline-flex;
|
|
3372
|
+
align-items: center;
|
|
3373
|
+
gap: 6px;
|
|
3374
|
+
margin: -3px -7px;
|
|
3375
|
+
padding: 3px 7px;
|
|
3376
|
+
border: none;
|
|
3377
|
+
border-radius: var(--r-inner-sm);
|
|
3378
|
+
background: transparent;
|
|
3379
|
+
font: inherit;
|
|
3380
|
+
color: inherit;
|
|
3381
|
+
text-align: left;
|
|
3382
|
+
cursor: pointer;
|
|
3383
|
+
transition: background var(--motion) ease;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
.visitor-preview__reveal:hover {
|
|
3387
|
+
background: var(--hover);
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
.visitor-preview__reveal:focus-visible {
|
|
3391
|
+
outline: 2px solid var(--accent);
|
|
3392
|
+
outline-offset: 1px;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
/* The design's interactive ink - not Vuetify's fixed blue, which is one colour
|
|
3396
|
+
on both themes. `affectedEntities` gives its NRIC eye the same value. */
|
|
3397
|
+
.visitor-preview__eye {
|
|
3398
|
+
color: var(--accent-text);
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3402
|
+
.visitor-preview__reveal {
|
|
3403
|
+
transition: none;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3145
3407
|
/* The width the type filter carried as `max-width="200"` on the v-select. */
|
|
3146
3408
|
.visitor-type-filter {
|
|
3147
3409
|
max-width: 200px;
|
|
@@ -6,6 +6,7 @@ export default function useDocument() {
|
|
|
6
6
|
type = "all",
|
|
7
7
|
site = "",
|
|
8
8
|
parentId = "",
|
|
9
|
+
expiry = "all",
|
|
9
10
|
}: {
|
|
10
11
|
page?: number;
|
|
11
12
|
search?: string;
|
|
@@ -13,6 +14,11 @@ export default function useDocument() {
|
|
|
13
14
|
type?: string;
|
|
14
15
|
site?: string;
|
|
15
16
|
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;
|
|
16
22
|
} = {}) {
|
|
17
23
|
const query: Record<string, any> = {
|
|
18
24
|
page,
|
|
@@ -21,6 +27,7 @@ export default function useDocument() {
|
|
|
21
27
|
type,
|
|
22
28
|
site,
|
|
23
29
|
parentId,
|
|
30
|
+
expiry,
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
return useNuxtApp().$api<Record<string, any>>(`/api/documents`, {
|
|
@@ -76,6 +76,8 @@ export default function usetFacility() {
|
|
|
76
76
|
hourInterval?: number;
|
|
77
77
|
isBookingFeeEnabled: boolean;
|
|
78
78
|
isGuestEnabled: boolean;
|
|
79
|
+
isResidentChecklistEnabled: boolean;
|
|
80
|
+
isSecurityChecklistEnabled: boolean;
|
|
79
81
|
bookingAmount: number | null;
|
|
80
82
|
peakBookingFeeAmount?: number | null;
|
|
81
83
|
bookingFeeGuestAmount?: number | null;
|
|
@@ -173,6 +175,8 @@ export default function usetFacility() {
|
|
|
173
175
|
hourInterval = 1,
|
|
174
176
|
isBookingFeeEnabled = false,
|
|
175
177
|
isGuestEnabled = false,
|
|
178
|
+
isResidentChecklistEnabled = false,
|
|
179
|
+
isSecurityChecklistEnabled = false,
|
|
176
180
|
bookingAmount = 0,
|
|
177
181
|
peakBookingFeeAmount = 0,
|
|
178
182
|
bookingFeeGuestAmount = 0,
|
|
@@ -236,6 +240,13 @@ export default function usetFacility() {
|
|
|
236
240
|
this.hourInterval = hourInterval;
|
|
237
241
|
this.isBookingFeeEnabled = isBookingFeeEnabled;
|
|
238
242
|
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;
|
|
239
250
|
this.bookingAmount = bookingAmount;
|
|
240
251
|
this.peakBookingFeeAmount = peakBookingFeeAmount;
|
|
241
252
|
this.bookingFeeGuestAmount = bookingFeeGuestAmount;
|