@7365admin1/layer-common 4.11.1-staging.315 → 4.12.0
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 +14 -4
- 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/HidIntercomManagement.vue +43 -193
- package/components/HidReaderUserRoster.vue +2 -32
- package/components/HidUserEnrollment.vue +212 -771
- package/components/InvitationClientForm.vue +84 -22
- package/components/Layout/Header.vue +0 -26
- package/components/VisitorManagement.vue +5 -267
- package/composables/useAccessManagement.ts +0 -5
- package/composables/useDocument.ts +0 -7
- package/composables/useFacility.ts +0 -11
- package/composables/useHidAmico.ts +0 -97
- package/composables/useHidNavigation.ts +1 -25
- package/composables/usePeople.ts +0 -19
- package/composables/useUser.ts +6 -2
- package/composables/useWebUsb.ts +11 -14
- package/package.json +1 -1
- package/types/document.d.ts +0 -14
- package/types/facility.d.ts +0 -4
- package/types/people.d.ts +1 -4
- package/utils/client-invite-modules.ts +56 -0
- package/utils/materialSymbols.ts +0 -3
- package/components/HidProfileQrCode.vue +0 -323
- package/components/NotificationBell.vue +0 -321
- package/composables/useNotification.ts +0 -78
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
|
@@ -68,8 +68,50 @@
|
|
|
68
68
|
</v-autocomplete>
|
|
69
69
|
</v-col>
|
|
70
70
|
|
|
71
|
-
<!--
|
|
72
|
-
|
|
71
|
+
<!--
|
|
72
|
+
MODULES, for a NEW client (owner, 2026-09-14). Its owner gets the
|
|
73
|
+
client's own full-access owner role, bounded by exactly these, so
|
|
74
|
+
there is no role to pick; everything of the chosen service starts
|
|
75
|
+
ticked. A module unticked here is hidden from the client's people.
|
|
76
|
+
-->
|
|
77
|
+
<v-col v-if="newClient" cols="12" class="mt-2">
|
|
78
|
+
<div v-for="app in invite.app" :key="`modules-${app}`" class="mb-4">
|
|
79
|
+
<InputLabel :title="`Modules for ${appTitle(app)}`" required />
|
|
80
|
+
<p class="text-caption text-medium-emphasis mb-2">
|
|
81
|
+
The client's owner gets full access to the modules ticked here,
|
|
82
|
+
and nothing else. You can change this later on the client's
|
|
83
|
+
details.
|
|
84
|
+
</p>
|
|
85
|
+
<div v-for="group in inviteModuleGroups(app)" :key="`${app}-${group.key}`" class="mb-2">
|
|
86
|
+
<div class="text-subtitle-2">{{ group.label }}</div>
|
|
87
|
+
<v-row no-gutters>
|
|
88
|
+
<v-col v-for="key in group.modules" :key="`${app}-${group.key}-${key}`" cols="12" sm="6">
|
|
89
|
+
<v-checkbox
|
|
90
|
+
v-if="ALWAYS_ALLOWED_MODULES.includes(key)"
|
|
91
|
+
:model-value="true"
|
|
92
|
+
:label="`${formatResourceLabel(key)} — always included`"
|
|
93
|
+
disabled
|
|
94
|
+
density="compact"
|
|
95
|
+
hide-details
|
|
96
|
+
color="primary"
|
|
97
|
+
/>
|
|
98
|
+
<v-checkbox
|
|
99
|
+
v-else
|
|
100
|
+
v-model="modulesByApp[app]"
|
|
101
|
+
:value="key"
|
|
102
|
+
:label="formatResourceLabel(key)"
|
|
103
|
+
density="compact"
|
|
104
|
+
hide-details
|
|
105
|
+
color="primary"
|
|
106
|
+
/>
|
|
107
|
+
</v-col>
|
|
108
|
+
</v-row>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</v-col>
|
|
112
|
+
|
|
113
|
+
<!-- ROLE: only for an organisation that already exists -->
|
|
114
|
+
<v-col v-if="!newClient" cols="12">
|
|
73
115
|
<InputLabel title="Role" required />
|
|
74
116
|
<v-autocomplete
|
|
75
117
|
v-model="invite.role"
|
|
@@ -147,6 +189,9 @@ import useUser from '../composables/useUser'
|
|
|
147
189
|
import useUtils from '../composables/useUtils'
|
|
148
190
|
import useOrg from '../composables/useOrg'
|
|
149
191
|
import useMember from '../composables/useMember'
|
|
192
|
+
import { inviteModuleGroups } from '../utils/client-invite-modules'
|
|
193
|
+
import { ALWAYS_ALLOWED_MODULES } from '../utils/org-modules'
|
|
194
|
+
import { formatResourceLabel } from '../utils/permission-labels'
|
|
150
195
|
|
|
151
196
|
const APP = useRuntimeConfig().public.APP
|
|
152
197
|
|
|
@@ -269,27 +314,9 @@ watch(
|
|
|
269
314
|
const roles = ref<any[]>([])
|
|
270
315
|
const { getRoles } = useRole()
|
|
271
316
|
|
|
272
|
-
/*
|
|
273
|
-
* `type` is the ROLE type, not the service the client subscribes to, and the
|
|
274
|
-
* only caller (`ClientMain.vue` "Invite Client") passes no `app` prop -- so
|
|
275
|
-
* this sent `type: ""` and the endpoint applied no type filter at all. The
|
|
276
|
-
* dropdown therefore listed every org-less role of every type, which includes
|
|
277
|
-
* the platform's OWN staff roles (`type: "admin"` -- the two rows the console's
|
|
278
|
-
* `/super-admin/role-permissions` screen edits). Offering a Seven365 console
|
|
279
|
-
* staff role on a CLIENT invitation is the defect.
|
|
280
|
-
*
|
|
281
|
-
* A client admin's role is `type: "organization"`, which is what the client
|
|
282
|
-
* roles screen (`org/[organization]/roles-permissions.vue`) already lists. This
|
|
283
|
-
* narrows to exactly that. It is a narrowing of this one picker only: no role
|
|
284
|
-
* changes, no permission changes, and the org-less `organization` roles that
|
|
285
|
-
* were already being picked are all still offered.
|
|
286
|
-
*
|
|
287
|
-
* Keying off the selected service instead would empty the dropdown -- no
|
|
288
|
-
* org-less role carries a service type -- so `props.app` is not the filter.
|
|
289
|
-
*/
|
|
290
317
|
const { data: roleData, refresh: refreshRoles } = await useLazyAsyncData(
|
|
291
318
|
"roles",
|
|
292
|
-
() => getRoles({ org: org.value?._id, type:
|
|
319
|
+
() => getRoles({ org: org.value?._id, type: props.app, limit: 50 }),
|
|
293
320
|
{ watch: [() => props.app] }
|
|
294
321
|
)
|
|
295
322
|
|
|
@@ -319,10 +346,34 @@ watch(
|
|
|
319
346
|
}
|
|
320
347
|
)
|
|
321
348
|
|
|
349
|
+
/* ================= NEW CLIENT: MODULES ================= */
|
|
350
|
+
/*
|
|
351
|
+
* No organisation yet means this invitation creates a client. The server drops
|
|
352
|
+
* any role on such an invitation (the owner gets the client's own owner role)
|
|
353
|
+
* and stores the modules chosen here, one application per request.
|
|
354
|
+
*/
|
|
355
|
+
const newClient = computed(() => !org.value?._id)
|
|
356
|
+
|
|
357
|
+
const appTitle = (value: string) => APP_LIST.find(app => app.value === value)?.title ?? value
|
|
358
|
+
|
|
359
|
+
/** Ticked modules per chosen application; a newly chosen one starts with all ticked. */
|
|
360
|
+
const modulesByApp = ref<Record<string, string[]>>({})
|
|
361
|
+
|
|
362
|
+
function syncModules(chosen: string[]) {
|
|
363
|
+
const next: Record<string, string[]> = {}
|
|
364
|
+
for (const app of chosen) {
|
|
365
|
+
next[app] = modulesByApp.value[app] ?? inviteModuleGroups(app).flatMap(group => group.modules)
|
|
366
|
+
}
|
|
367
|
+
modulesByApp.value = next
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
syncModules(invite.value.app)
|
|
371
|
+
|
|
322
372
|
/* ================= EVENTS ================= */
|
|
323
373
|
async function handleUpdateApp(value: string[]) {
|
|
324
374
|
invite.value.role = ""
|
|
325
375
|
invite.value.site = ""
|
|
376
|
+
syncModules(value)
|
|
326
377
|
await refreshRoles()
|
|
327
378
|
}
|
|
328
379
|
|
|
@@ -403,7 +454,18 @@ async function submit() {
|
|
|
403
454
|
|
|
404
455
|
app: [app],
|
|
405
456
|
|
|
406
|
-
|
|
457
|
+
...(newClient.value
|
|
458
|
+
? {
|
|
459
|
+
// Always-allowed modules are ticked and locked, so the list is
|
|
460
|
+
// never empty (an empty list would mean "everything").
|
|
461
|
+
modules: [
|
|
462
|
+
...new Set([
|
|
463
|
+
...ALWAYS_ALLOWED_MODULES,
|
|
464
|
+
...(modulesByApp.value[app] ?? inviteModuleGroups(app).flatMap(group => group.modules)),
|
|
465
|
+
]),
|
|
466
|
+
],
|
|
467
|
+
}
|
|
468
|
+
: { role: invite.value.role }),
|
|
407
469
|
|
|
408
470
|
org: org.value?._id,
|
|
409
471
|
|
|
@@ -41,11 +41,6 @@
|
|
|
41
41
|
@click="toggleTheme"
|
|
42
42
|
/>
|
|
43
43
|
|
|
44
|
-
<NotificationBell
|
|
45
|
-
v-if="props.showNotifications"
|
|
46
|
-
:site-id="routeSiteId"
|
|
47
|
-
/>
|
|
48
|
-
|
|
49
44
|
<v-menu offset="10px" :close-on-content-click="false">
|
|
50
45
|
<template #activator="{ props }">
|
|
51
46
|
<v-btn fab variant="text" icon v-bind="props" class="ms-2 me-1">
|
|
@@ -101,18 +96,6 @@ const props = defineProps({
|
|
|
101
96
|
type: Boolean,
|
|
102
97
|
default: false,
|
|
103
98
|
},
|
|
104
|
-
/**
|
|
105
|
-
* Whether to show the notification bell.
|
|
106
|
-
*
|
|
107
|
-
* Off by default, and opt-in per application rather than always on: this
|
|
108
|
-
* header is mounted by every app in the estate, and only the ones whose
|
|
109
|
-
* modules actually raise notifications should grow a bell that would
|
|
110
|
-
* otherwise sit there permanently empty.
|
|
111
|
-
*/
|
|
112
|
-
showNotifications: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
default: false,
|
|
115
|
-
},
|
|
116
99
|
});
|
|
117
100
|
|
|
118
101
|
const menu = defineModel("menu", { type: Boolean });
|
|
@@ -145,15 +128,6 @@ const { currentUser } = useLocalAuth();
|
|
|
145
128
|
*/
|
|
146
129
|
const { site } = useSite();
|
|
147
130
|
|
|
148
|
-
/**
|
|
149
|
-
* The site the user is currently inside, straight off the route. Empty outside
|
|
150
|
-
* a site, where the feed falls back to everything addressed to this user.
|
|
151
|
-
*/
|
|
152
|
-
const routeSiteId = computed(() => {
|
|
153
|
-
const param = useRoute().params.site;
|
|
154
|
-
return typeof param === "string" ? param : "";
|
|
155
|
-
});
|
|
156
|
-
|
|
157
131
|
/**
|
|
158
132
|
* The shared `site` state is only populated by the screens that load a site
|
|
159
133
|
* document, so on most screens - the dashboard included - the bar had no name
|
|
@@ -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
|
<div
|
|
902
800
|
v-else-if="selectedVisitorObject[key]"
|
|
903
801
|
class="visitor-preview__row"
|
|
@@ -2000,71 +1898,6 @@ const isSelectedVisitorPendingApproval = computed(
|
|
|
2000
1898
|
() => selectedVisitorStatus.value === "pending"
|
|
2001
1899
|
);
|
|
2002
1900
|
|
|
2003
|
-
/**
|
|
2004
|
-
* The members a contractor brought with them. Not gated on the Guests tab: the
|
|
2005
|
-
* list row's own `( +N members)` count is not either, and a contractor with a
|
|
2006
|
-
* party has one wherever the screen shows it.
|
|
2007
|
-
*
|
|
2008
|
-
* Blank entries are dropped rather than drawn as an empty card - the payload
|
|
2009
|
-
* carries `""` for every detail nobody filled in, so a member with no name and
|
|
2010
|
-
* no details would otherwise render as a bare inset box.
|
|
2011
|
-
*/
|
|
2012
|
-
const selectedVisitorMembers = computed<Record<string, any>[]>(() => {
|
|
2013
|
-
const members = selectedVisitorDataObject.value?.members;
|
|
2014
|
-
if (!Array.isArray(members)) return [];
|
|
2015
|
-
|
|
2016
|
-
return members.filter(
|
|
2017
|
-
(member: Record<string, any>) =>
|
|
2018
|
-
member?.name || member?.nric || member?.contact || member?.plateNumber
|
|
2019
|
-
);
|
|
2020
|
-
});
|
|
2021
|
-
|
|
2022
|
-
/**
|
|
2023
|
-
* WHICH NRICs ARE UNCOVERED RIGHT NOW.
|
|
2024
|
-
*
|
|
2025
|
-
* Per member and not per card, so revealing one person's number does not
|
|
2026
|
-
* uncover the rest of the party's. Both are cleared when the dialog closes -
|
|
2027
|
-
* a preview must not open on the next visitor with the last one's NRIC
|
|
2028
|
-
* already showing, and it is the same `selectedVisitorId` that would carry it
|
|
2029
|
-
* across if the same row were reopened.
|
|
2030
|
-
*/
|
|
2031
|
-
const showVisitorNric = ref(false);
|
|
2032
|
-
const shownMemberNrics = ref<number[]>([]);
|
|
2033
|
-
|
|
2034
|
-
function isMemberNricShown(index: number) {
|
|
2035
|
-
return shownMemberNrics.value.includes(index);
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
function toggleMemberNric(index: number) {
|
|
2039
|
-
shownMemberNrics.value = isMemberNricShown(index)
|
|
2040
|
-
? shownMemberNrics.value.filter((x) => x !== index)
|
|
2041
|
-
: [...shownMemberNrics.value, index];
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
watch(
|
|
2045
|
-
() => dialog.viewVisitor,
|
|
2046
|
-
(open) => {
|
|
2047
|
-
if (open) return;
|
|
2048
|
-
showVisitorNric.value = false;
|
|
2049
|
-
shownMemberNrics.value = [];
|
|
2050
|
-
}
|
|
2051
|
-
);
|
|
2052
|
-
|
|
2053
|
-
/**
|
|
2054
|
-
* What a member row prints under the name, in order. `plateNumber` is in here
|
|
2055
|
-
* because the API returns it on `members[]` even though neither
|
|
2056
|
-
* `TMemberInfo` (this package) nor `TContractorMembers` (API-core's visitor
|
|
2057
|
-
* model, name and nric only) declares it - the two types have drifted from the
|
|
2058
|
-
* document and from each other. Reading the key defensively costs nothing and
|
|
2059
|
-
* shows the vehicle a member actually arrived in; the types are somebody's to
|
|
2060
|
-
* reconcile separately.
|
|
2061
|
-
*/
|
|
2062
|
-
const memberDetailFields = [
|
|
2063
|
-
{ key: "nric", label: "NRIC" },
|
|
2064
|
-
{ key: "contact", label: "Contact" },
|
|
2065
|
-
{ key: "plateNumber", label: "Vehicle" },
|
|
2066
|
-
] as const;
|
|
2067
|
-
|
|
2068
1901
|
const formatType = (item: any) =>
|
|
2069
1902
|
(item.deliveryType ? item.deliveryType + "-" : "") + item.type;
|
|
2070
1903
|
|
|
@@ -2078,7 +1911,6 @@ const formattedFields = {
|
|
|
2078
1911
|
level: "Level",
|
|
2079
1912
|
unit: "Unit",
|
|
2080
1913
|
purpose: "Purpose",
|
|
2081
|
-
members: "Members",
|
|
2082
1914
|
checkIn: "Check In",
|
|
2083
1915
|
snapshotEntryImage: "Entry Image",
|
|
2084
1916
|
checkOut: "Check Out",
|
|
@@ -3057,100 +2889,6 @@ watchEffect(async () => {
|
|
|
3057
2889
|
word-break: break-word;
|
|
3058
2890
|
}
|
|
3059
2891
|
|
|
3060
|
-
/* A row whose value is a set of records rather than a value - it drops the
|
|
3061
|
-
two-column grid and runs the full width of the card body. */
|
|
3062
|
-
.visitor-preview__row--block {
|
|
3063
|
-
display: block;
|
|
3064
|
-
}
|
|
3065
|
-
|
|
3066
|
-
.visitor-preview__members {
|
|
3067
|
-
display: flex;
|
|
3068
|
-
flex-direction: column;
|
|
3069
|
-
gap: 8px;
|
|
3070
|
-
margin-top: 8px;
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
/*
|
|
3074
|
-
* An added member reads as an inset on the card it sits in - `--hover` on
|
|
3075
|
-
* `--border` at the inner radius. Those are `Card/MemberInfoSummary`'s three
|
|
3076
|
-
* decisions, unchanged, so a member looks the same in the preview as it does
|
|
3077
|
-
* in the form that created it. Only the TYPE differs: that card still prints
|
|
3078
|
-
* `<strong>Label:</strong> value`, which is the pattern this dialog just moved
|
|
3079
|
-
* off, so the lines below are set on the scale rather than inherited.
|
|
3080
|
-
*/
|
|
3081
|
-
.visitor-preview__member {
|
|
3082
|
-
padding: 9px 12px;
|
|
3083
|
-
border: 1px solid var(--border);
|
|
3084
|
-
border-radius: var(--r-inner);
|
|
3085
|
-
background: var(--hover);
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
.visitor-preview__member-line {
|
|
3089
|
-
display: flex;
|
|
3090
|
-
gap: 8px;
|
|
3091
|
-
margin-top: 3px;
|
|
3092
|
-
font-size: var(--fs-breadcrumb);
|
|
3093
|
-
color: var(--text2);
|
|
3094
|
-
word-break: break-word;
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
.visitor-preview__member-key {
|
|
3098
|
-
flex: 0 0 52px;
|
|
3099
|
-
color: var(--muted);
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
/*
|
|
3103
|
-
* THE NRIC REVEAL.
|
|
3104
|
-
*
|
|
3105
|
-
* The pressable thing is the masked number, not the glyph beside it: an eye on
|
|
3106
|
-
* its own is a 14-16px target where 24px is the floor, and on a 12.5px member
|
|
3107
|
-
* line an `AppButton variant="icon"` - the layer's 32px icon square - would
|
|
3108
|
-
* make the NRIC line half again the height of the Contact line under it.
|
|
3109
|
-
* Pressing the digits gives a target the width of the value at no cost to the
|
|
3110
|
-
* rhythm, and reads the right way round: the number is what changes.
|
|
3111
|
-
*
|
|
3112
|
-
* It inherits its type rather than setting any, so the visitor's NRIC stays on
|
|
3113
|
-
* `--fs-cell` and a member's on the `--fs-breadcrumb` of the line it sits in.
|
|
3114
|
-
* The negative margin pays back the padding, so a revealed value starts on the
|
|
3115
|
-
* same left edge as every other value in the card.
|
|
3116
|
-
*/
|
|
3117
|
-
.visitor-preview__reveal {
|
|
3118
|
-
display: inline-flex;
|
|
3119
|
-
align-items: center;
|
|
3120
|
-
gap: 6px;
|
|
3121
|
-
margin: -3px -7px;
|
|
3122
|
-
padding: 3px 7px;
|
|
3123
|
-
border: none;
|
|
3124
|
-
border-radius: var(--r-inner-sm);
|
|
3125
|
-
background: transparent;
|
|
3126
|
-
font: inherit;
|
|
3127
|
-
color: inherit;
|
|
3128
|
-
text-align: left;
|
|
3129
|
-
cursor: pointer;
|
|
3130
|
-
transition: background var(--motion) ease;
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
.visitor-preview__reveal:hover {
|
|
3134
|
-
background: var(--hover);
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
.visitor-preview__reveal:focus-visible {
|
|
3138
|
-
outline: 2px solid var(--accent);
|
|
3139
|
-
outline-offset: 1px;
|
|
3140
|
-
}
|
|
3141
|
-
|
|
3142
|
-
/* The design's interactive ink - not Vuetify's fixed blue, which is one colour
|
|
3143
|
-
on both themes. `affectedEntities` gives its NRIC eye the same value. */
|
|
3144
|
-
.visitor-preview__eye {
|
|
3145
|
-
color: var(--accent-text);
|
|
3146
|
-
}
|
|
3147
|
-
|
|
3148
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3149
|
-
.visitor-preview__reveal {
|
|
3150
|
-
transition: none;
|
|
3151
|
-
}
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
2892
|
/* The width the type filter carried as `max-width="200"` on the v-select. */
|
|
3155
2893
|
.visitor-type-filter {
|
|
3156
2894
|
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
|
);
|
|
@@ -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;
|