@7365admin1/layer-common 4.90.2-staging.490 → 4.90.2

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +10 -4
  2. package/assets/css/primitives.css +0 -57
  3. package/assets/css/screens.css +4 -8
  4. package/components/AccessCardDetailsDialog.vue +6 -59
  5. package/components/AccessCardPreviewDialog.vue +53 -371
  6. package/components/AppSelect.vue +4 -143
  7. package/components/BuildingUnitFormEdit.vue +0 -6
  8. package/components/Dialog/UpdateMoreAction.vue +1 -11
  9. package/components/DocumentForm.vue +112 -407
  10. package/components/DocumentManagement.vue +12 -213
  11. package/components/Facility/BookingSetup.vue +0 -63
  12. package/components/HidAccessLogDashboard.vue +17 -74
  13. package/components/HidIntercomManagement.vue +14 -183
  14. package/components/HidQrCodeConfiguration.vue +195 -17
  15. package/components/HidReaderManagement.vue +0 -398
  16. package/components/HidReaderUserRoster.vue +3 -44
  17. package/components/HidUserEnrollment.vue +292 -2255
  18. package/components/InvitationClientForm.vue +1 -19
  19. package/components/InvitationForm.vue +4 -31
  20. package/components/InvitationMain.vue +22 -124
  21. package/components/MemberInformation.vue +4 -4
  22. package/components/PassInformation.vue +2 -2
  23. package/components/SiteSettings.vue +0 -48
  24. package/components/TableMain.vue +7 -22
  25. package/components/VehicleManagement.vue +5 -80
  26. package/components/VisitorForm.vue +19 -65
  27. package/components/VisitorManagement.vue +5 -267
  28. package/composables/useAccessManagement.ts +1 -17
  29. package/composables/useDocument.ts +0 -7
  30. package/composables/useFacility.ts +0 -11
  31. package/composables/useHidAmico.ts +0 -165
  32. package/composables/useHidNavigation.ts +1 -25
  33. package/composables/useMember.ts +0 -12
  34. package/composables/useNFCPatrolReportFilters.ts +3 -21
  35. package/composables/useNFCPatrolRoute.ts +1 -8
  36. package/composables/usePeople.ts +0 -19
  37. package/composables/useServiceProvider.ts +2 -45
  38. package/composables/useSettingsPermission.ts +0 -14
  39. package/composables/useUser.ts +2 -6
  40. package/composables/useVehicle.ts +1 -40
  41. package/composables/useVerification.ts +0 -3
  42. package/middleware/01.auth.ts +7 -3
  43. package/package.json +1 -1
  44. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  45. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  46. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  47. package/types/document.d.ts +0 -14
  48. package/types/facility.d.ts +0 -4
  49. package/types/member.d.ts +0 -4
  50. package/types/people.d.ts +1 -28
  51. package/types/service-provider.d.ts +0 -5
  52. package/types/site.d.ts +1 -7
  53. package/components/BuildingUnitManagement.vue +0 -298
  54. package/components/HidAccessPermissions.vue +0 -424
  55. package/components/HidProfileQrCode.vue +0 -332
  56. package/components/VehicleQrStickerDialog.vue +0 -249
  57. package/composables/useHidReaderSelection.ts +0 -50
  58. package/composables/useSiteCategory.ts +0 -45
  59. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
  60. package/utils/hid-enrolment-subject.ts +0 -344
  61. package/utils/hid-permission-assignments.ts +0 -198
  62. package/utils/hid-reader-selection.ts +0 -52
  63. package/utils/invite-group.ts +0 -61
  64. package/utils/invite-sites.ts +0 -25
  65. package/utils/occupancy-role.ts +0 -109
  66. package/utils/service-type.ts +0 -30
  67. package/utils/vehicle-qr-sticker.ts +0 -184
@@ -16,14 +16,14 @@
16
16
  <v-form ref="formRef" v-model="validForm" :disabled="processing" @click="errorMessage = ''">
17
17
  <v-row no-gutters class="pt-4">
18
18
  <v-col v-if="shouldShowField('attachments')" class="w-100">
19
- <InputLabel class="text-capitalize" title="Attach Image (Optional)" />
19
+ <InputLabel class="text-capitalize" title="Attach Image" />
20
20
  <InputFileV2 v-model="visitor.attachments" multiple :max-length="3" />
21
21
  </v-col>
22
22
 
23
23
  <v-col v-if="shouldShowField('nric')" cols="12">
24
24
  <v-row>
25
25
  <v-col cols="12">
26
- <InputLabel class="text-capitalize" :title="requireNRIC ? 'NRIC (Required)' : 'NRIC (Optional)'" :required="requireNRIC" />
26
+ <InputLabel class="text-capitalize" title="NRIC" :required="requireNRIC" />
27
27
  <v-menu v-model="nricSearchMenu" location="bottom" offset-y :close-on-content-click="false"
28
28
  content-class="visitor-form__menu">
29
29
  <template #activator="{ props }">
@@ -55,11 +55,11 @@
55
55
  <v-col v-if="shouldShowField('contact')" cols="12">
56
56
  <v-row>
57
57
  <v-col cols="12">
58
- <InputLabel class="text-capitalize" :title="requireContact ? 'Phone Number (Required)' : 'Phone Number (Optional)'" :required="requireContact" />
58
+ <InputLabel class="text-capitalize" title="Phone Number" required />
59
59
  <v-menu v-model="phoneSearchMenu" location="bottom" offset-y :close-on-content-click="false"
60
60
  content-class="visitor-form__menu">
61
61
  <template #activator="{ props }">
62
- <InputPhoneNumberV2 v-bind="props" v-model="visitor.contact" :rules="[requireContact ? requiredRule : () => true]"
62
+ <InputPhoneNumberV2 v-bind="props" v-model="visitor.contact" :rules="[requiredRule]"
63
63
  @focus="isPhoneFieldFocused = true" @blur="isPhoneFieldFocused = false" density="comfortable"
64
64
  :key="currentAutofillSource + 'phone-key'" @update:model-value="handleUpdatePhoneNumber" />
65
65
  </template>
@@ -87,13 +87,12 @@
87
87
  <v-col v-if="shouldShowField('plateNumber')" cols="12">
88
88
  <v-row>
89
89
  <v-col cols="12">
90
- <InputLabel class="text-capitalize" :title="isVehicleRequired ? 'Vehicle Number (Required)' : 'Vehicle Number (Optional)'" :required="isVehicleRequired" />
90
+ <InputLabel class="text-capitalize" title="Vehicle Number" :required="isVehicleRequired" />
91
91
  <!-- <v-text-field v-model.trim.uppercase="visitor.plateNumber" density="comfortable" /> -->
92
92
  <v-menu v-model="vehicleSearchMenu" location="bottom" offset-y :close-on-content-click="false"
93
93
  content-class="visitor-form__menu">
94
94
  <template #activator="{ props }">
95
95
  <InputVehicleNumber v-bind="props" v-model="visitor.plateNumber" density="comfortable"
96
- :rules="[isVehicleRequired ? requiredRule : () => true]"
97
96
  @update:model-value="handleUpdateVehicleNumber" @focus="handleFocusPlateNumber"
98
97
  @blur="isPlateNumberFieldFocused = false" />
99
98
  </template>
@@ -118,7 +117,7 @@
118
117
  </v-col>
119
118
 
120
119
  <v-col v-if="shouldShowField('contractorType')" cols="12">
121
- <InputLabel class="text-capitalize" title="Contractor Type (Required)" required />
120
+ <InputLabel class="text-capitalize" title="Contractor Type" required />
122
121
  <v-combobox v-model="contractorTypeObj" v-model:search="contractorTypeInput" ref="contractorTypeCombo"
123
122
  autocomplete="off" :hide-no-data="false" @update:focused="handleFocusedContractorType"
124
123
  :items="contractorTypes" :rules="[requiredRule]" item-value="value"
@@ -140,7 +139,7 @@
140
139
  <v-col v-if="shouldShowField('name')" cols="12">
141
140
  <v-row>
142
141
  <v-col cols="12">
143
- <InputLabel class="text-capitalize" title="Full Name (Required)" required />
142
+ <InputLabel class="text-capitalize" title="Full Name" required />
144
143
  <v-text-field v-model.trim="visitor.name" density="comfortable" :rules="[requiredRule]" />
145
144
  </v-col>
146
145
  </v-row>
@@ -160,7 +159,7 @@
160
159
  place of `primary`, which is the darker link tone. Without
161
160
  the label this was the only required field in the form with
162
161
  nothing naming it: just a bare Food/Parcel pair. -->
163
- <InputLabel class="text-capitalize" title="Delivery Type (Required)" required />
162
+ <InputLabel class="text-capitalize" title="Delivery Type" required />
164
163
  <v-radio-group v-model="visitor.deliveryType" inline color="accent" :rules="[requiredRule]">
165
164
  <v-radio label="Food" value="Food"></v-radio>
166
165
  <v-radio label="Parcel" value="Parcel"></v-radio>
@@ -171,9 +170,8 @@
171
170
 
172
171
  <template v-if="shouldShowField('company')">
173
172
  <v-col cols="12">
174
- <InputLabel class="text-capitalize" :title="requireCompany ? 'Company Name (Required)' : 'Company Name (Optional)'" :required="requireCompany" />
173
+ <InputLabel class="text-capitalize" title="Company Name" />
175
174
  <v-combobox v-model="visitor.company" v-model:search="companyNameInput" ref="companyCombo"
176
- :rules="[requireCompany ? requiredRule : () => true]"
177
175
  autocomplete="off" :hide-no-data="true" :items="companyNames" item-value="value"
178
176
  @update:model-value="handleSelectCompanyName" variant="outlined" density="comfortable" persistent-hint
179
177
  small-chips>
@@ -184,9 +182,8 @@
184
182
 
185
183
  <template v-if="shouldShowField('delivery-company')">
186
184
  <v-col cols="12">
187
- <InputLabel class="text-capitalize" title="Delivery Company (Required)" required />
185
+ <InputLabel class="text-capitalize" title="Delivery Company" />
188
186
  <v-combobox v-model="deliveryCompany" v-model:search="deliveryCompanyInput" ref="companyCombo"
189
- :rules="[requiredRule]"
190
187
  autocomplete="off" :hide-no-data="false" :items="deliveryCompanyList" item-value="value"
191
188
  :loading="siteDataPending" variant="outlined" density="comfortable" persistent-hint small-chips>
192
189
  <template v-slot:no-data>
@@ -208,7 +205,7 @@
208
205
 
209
206
 
210
207
  <v-col v-if="shouldShowField('block')" cols="12">
211
- <InputLabel class="text-capitalize" title="Block (Required)" required />
208
+ <InputLabel class="text-capitalize" title="Block" required />
212
209
  <v-autocomplete v-model="visitor.block" :items="blocksArray" item-value="value" autocomplete="off"
213
210
  item-title="title" :key="blockListDataPending ? 'block-list-pending' : 'block-list-ready'
214
211
  " :loading="blockListDataPending" @update:model-value="handleChangeBlock" density="comfortable"
@@ -216,13 +213,13 @@
216
213
  </v-col>
217
214
 
218
215
  <v-col v-if="shouldShowField('level')" cols="12">
219
- <InputLabel class="text-capitalize" title="Level (Required)" required />
216
+ <InputLabel class="text-capitalize" title="Level" required />
220
217
  <v-autocomplete v-model="visitor.level" :items="levelsArray" density="comfortable" autocomplete="off"
221
218
  :disabled="!visitor.block" :key="levelsDataPending ? 'level-list-pending' : 'level-list-ready'
222
219
  " :loading="levelsDataPending" @update:model-value="handleChangeLevel" :rules="[requiredRule]" />
223
220
  </v-col>
224
221
  <v-col v-if="shouldShowField('unit')" cols="12">
225
- <InputLabel class="text-capitalize" title="Unit (Required)" required />
222
+ <InputLabel class="text-capitalize" title="Unit" required />
226
223
  <v-autocomplete v-model="visitor.unit" :items="unitsArray" density="comfortable" autocomplete="off"
227
224
  item-title="title" item-value="value" :disabled="!visitor.level"
228
225
  :key="unitsDataPending ? 'unit-list-pending' : 'unit-list-ready'" :loading="unitsDataPending"
@@ -230,14 +227,14 @@
230
227
  </v-col>
231
228
 
232
229
  <v-col v-if="shouldShowField('unit')" cols="12">
233
- <InputLabel class="text-capitalize" title="Registered Unit Company Name"
230
+ <InputLabel class="text-capitalize" title="Registered Unit Company Name" required
234
231
  :key="'unit-key' + visitor.level" />
235
232
  <v-text-field v-model.trim="registeredUnitCompanyName" density="comfortable"
236
233
  :loading="buildingUnitDataPending" readonly class="no-pointer" />
237
234
  </v-col>
238
235
 
239
236
  <v-col v-if="shouldShowField('remarks')" cols="12">
240
- <InputLabel class="text-capitalize" title="Remarks (Optional)" />
237
+ <InputLabel class="text-capitalize" title="Remarks" />
241
238
  <v-textarea v-model="visitor.remarks" density="comfortable" :rows="3" no-resize />
242
239
  </v-col>
243
240
 
@@ -834,29 +831,12 @@ const formMode = computed<"add" | "edit" | "register">(() => {
834
831
  return selectedUnregisteredVisitor.value ? "register" : prop.mode;
835
832
  });
836
833
 
837
- // Fields this form actually has for the visitor type - drives both what is
838
- // shown and what is sent on submit, so nothing outside the form is saved.
839
- // typeFieldMap also feeds the details dialog, so it can list more than this:
840
- // - walk-in "company": not on the security mobile app's walk-in, hidden here
841
- // but still shown on older walk-in records in the details dialog;
842
- // - guest "purpose": never drawn in this form.
843
- const formFieldsExcluded: Partial<Record<TVisitorType, string[]>> = {
844
- "walk-in": ["company"],
845
- guest: ["purpose"],
846
- };
847
-
848
- const isFormField = (
849
- fieldKey: keyof TVisitorPayload | "delivery-company"
850
- ) => {
851
- if (formFieldsExcluded[prop.type]?.includes(fieldKey)) return false;
852
- return !!typeFieldMap[prop.type]?.includes(fieldKey);
853
- };
854
-
855
834
  const shouldShowField = (
856
835
  fieldKey: keyof TVisitorPayload | "delivery-company"
857
836
  ) => {
858
837
  if ((!withStep2.value && !withStep3.value) || contractorStep.value === 1) {
859
- return isFormField(fieldKey);
838
+ const visibleFields = typeFieldMap[prop.type];
839
+ return visibleFields?.includes(fieldKey);
860
840
  }
861
841
  };
862
842
 
@@ -886,21 +866,8 @@ const showShowKeysField = computed(() => {
886
866
  return ["guest", "contractor", "walk-in"].includes(prop.type);
887
867
  });
888
868
 
889
- // Required / optional per type - kept in line with the security mobile app.
890
869
  const requireNRIC = computed(() => {
891
- return prop.type === "contractor";
892
- });
893
-
894
- const requireContact = computed(() => {
895
- return ["contractor", "delivery"].includes(prop.type);
896
- });
897
-
898
- const isVehicleRequired = computed(() => {
899
- return ["guest", "pick-up", "drop-off"].includes(prop.type);
900
- });
901
-
902
- const requireCompany = computed(() => {
903
- return prop.type === "contractor";
870
+ return prop.type !== "walk-in" && prop.type !== "guest";
904
871
  });
905
872
 
906
873
  const hidQrCodePassConfig = computed(() => {
@@ -943,20 +910,8 @@ const hidQrReaderId = computed(() => (
943
910
  hidQrConfiguredReaderId.value || String(hidQrReader.value?._id || "")
944
911
  ));
945
912
 
946
- /*
947
- * Visitor QR passes are hidden at the manager's request (2026-09-23).
948
- *
949
- * A flag rather than a deletion: issuing, the preview dialog, printing and the
950
- * regenerate handler below are all intact and untouched, so bringing the
951
- * feature back is this one line. Every surface that offers a Visitor QR reads
952
- * `hidQrCodePassAllowed`, which is why the switch belongs here and not in each
953
- * of them.
954
- */
955
- const HID_VISITOR_QR_ENABLED = false;
956
-
957
913
  const hidQrCodePassAllowed = computed(() => {
958
914
  return (
959
- HID_VISITOR_QR_ENABLED &&
960
915
  hidQrCodePassEnabled.value &&
961
916
  ["guest", "contractor", "walk-in"].includes(prop.type)
962
917
  );
@@ -1987,8 +1942,7 @@ async function submit(options: { skipNonCheckedOutCheck?: boolean } = {}) {
1987
1942
  if (formMode.value === "add" || formMode.value === "register") {
1988
1943
  const allowedFields = typeFieldMap[prop.type];
1989
1944
  for (const key of allowedFields as (keyof TVisitorPayload)[]) {
1990
- // only what the form has (see isFormField)
1991
- if (isFormField(key) && visitor[key] !== undefined) {
1945
+ if (visitor[key] !== undefined) {
1992
1946
  payload = {
1993
1947
  ...payload,
1994
1948
  [key]: visitor[key],
@@ -750,35 +750,11 @@
750
750
  class="visitor-preview__row"
751
751
  >
752
752
  <div class="visitor-preview__label">{{ label }}</div>
753
- <div>
754
- <!-- Was a hover tooltip on the value: the full NRIC only
755
- reachable by hovering, which says nothing is there to
756
- reach and cannot be reached at all on a touch screen.
757
- The eye alone, at the 14px the Incident Report screens
758
- draw it, is a 14px target - the floor is 24px. So the
759
- NUMBER is the control and the eye is its affordance:
760
- the whole masked value is pressable, which makes the
761
- target the width of the digits rather than of a glyph,
762
- and being a real `button` it also takes a tab stop,
763
- which a `v-icon` with a click handler never did. -->
764
- <button
765
- type="button"
766
- class="visitor-preview__reveal"
767
- :aria-label="showVisitorNric ? 'Hide NRIC' : 'Show NRIC'"
768
- :aria-pressed="showVisitorNric"
769
- @click="showVisitorNric = !showVisitorNric"
770
- >
771
- <span class="visitor-preview__value">
772
- {{
773
- showVisitorNric
774
- ? selectedVisitorObject[key]
775
- : maskNRIC(selectedVisitorObject[key])
776
- }}
777
- </span>
778
- <v-icon size="16" class="visitor-preview__eye">
779
- {{ showVisitorNric ? "mdi-eye-off-outline" : "mdi-eye-outline" }}
780
- </v-icon>
781
- </button>
753
+ <div
754
+ v-tooltip:top="selectedVisitorObject[key]"
755
+ class="visitor-preview__value"
756
+ >
757
+ {{ maskNRIC(selectedVisitorObject[key]) }}
782
758
  </div>
783
759
  </div>
784
760
 
@@ -828,84 +804,6 @@
828
804
  </div>
829
805
  </div>
830
806
 
831
- <!--
832
- THE CONTRACTOR'S PARTY.
833
-
834
- The list row has always said `( +2 members)` beside the name
835
- and then had nowhere to send you for the names themselves. The
836
- block spans both columns rather than sitting in the 116px
837
- value track: a member is a record, not a value, and several of
838
- them in a 250px column is unreadable.
839
-
840
- Read off `selectedVisitorDataObject` (the raw row) and not
841
- `selectedVisitorObject`, which filters itself down to
842
- `typeFieldMap` plus five fixed keys - `members` is on neither
843
- list, and widening that computed would change what four other
844
- dialogs on this screen see.
845
- -->
846
- <div
847
- v-else-if="key === 'members' && selectedVisitorMembers.length"
848
- class="visitor-preview__row visitor-preview__row--block"
849
- >
850
- <div class="visitor-preview__label">
851
- {{ label }} ({{ selectedVisitorMembers.length }})
852
- </div>
853
- <div class="visitor-preview__members">
854
- <div
855
- v-for="(member, index) in selectedVisitorMembers"
856
- :key="member?.nric || member?.name || index"
857
- class="visitor-preview__member"
858
- >
859
- <div class="visitor-preview__value">
860
- {{ member?.name || "N/A" }}
861
- </div>
862
- <template v-for="field in memberDetailFields" :key="field.key">
863
- <div
864
- v-if="member?.[field.key]"
865
- class="visitor-preview__member-line"
866
- >
867
- <span class="visitor-preview__member-key">
868
- {{ field.label }}
869
- </span>
870
- <!-- A member's NRIC is the same class of data as the
871
- visitor's, so it gets the same control. Each
872
- member reveals separately - one toggle for the
873
- whole card would show three people's NRICs to
874
- read one. -->
875
- <button
876
- v-if="field.key === 'nric'"
877
- type="button"
878
- class="visitor-preview__reveal"
879
- :aria-label="
880
- isMemberNricShown(index)
881
- ? `Hide NRIC for ${member?.name || 'this member'}`
882
- : `Show NRIC for ${member?.name || 'this member'}`
883
- "
884
- :aria-pressed="isMemberNricShown(index)"
885
- @click="toggleMemberNric(index)"
886
- >
887
- <span>
888
- {{
889
- isMemberNricShown(index)
890
- ? member.nric
891
- : maskNRIC(member.nric)
892
- }}
893
- </span>
894
- <v-icon size="16" class="visitor-preview__eye">
895
- {{
896
- isMemberNricShown(index)
897
- ? "mdi-eye-off-outline"
898
- : "mdi-eye-outline"
899
- }}
900
- </v-icon>
901
- </button>
902
- <span v-else>{{ member[field.key] }}</span>
903
- </div>
904
- </template>
905
- </div>
906
- </div>
907
- </div>
908
-
909
807
  <!-- The vehicle number, with Block on its right: the Registered
910
808
  tab only, for someone who may add vehicles. It opens the
911
809
  Vehicle Mgmt Block Listed form with the category taken from
@@ -2226,71 +2124,6 @@ const isSelectedVisitorPendingApproval = computed(
2226
2124
  () => selectedVisitorStatus.value === "pending"
2227
2125
  );
2228
2126
 
2229
- /**
2230
- * The members a contractor brought with them. Not gated on the Guests tab: the
2231
- * list row's own `( +N members)` count is not either, and a contractor with a
2232
- * party has one wherever the screen shows it.
2233
- *
2234
- * Blank entries are dropped rather than drawn as an empty card - the payload
2235
- * carries `""` for every detail nobody filled in, so a member with no name and
2236
- * no details would otherwise render as a bare inset box.
2237
- */
2238
- const selectedVisitorMembers = computed<Record<string, any>[]>(() => {
2239
- const members = selectedVisitorDataObject.value?.members;
2240
- if (!Array.isArray(members)) return [];
2241
-
2242
- return members.filter(
2243
- (member: Record<string, any>) =>
2244
- member?.name || member?.nric || member?.contact || member?.plateNumber
2245
- );
2246
- });
2247
-
2248
- /**
2249
- * WHICH NRICs ARE UNCOVERED RIGHT NOW.
2250
- *
2251
- * Per member and not per card, so revealing one person's number does not
2252
- * uncover the rest of the party's. Both are cleared when the dialog closes -
2253
- * a preview must not open on the next visitor with the last one's NRIC
2254
- * already showing, and it is the same `selectedVisitorId` that would carry it
2255
- * across if the same row were reopened.
2256
- */
2257
- const showVisitorNric = ref(false);
2258
- const shownMemberNrics = ref<number[]>([]);
2259
-
2260
- function isMemberNricShown(index: number) {
2261
- return shownMemberNrics.value.includes(index);
2262
- }
2263
-
2264
- function toggleMemberNric(index: number) {
2265
- shownMemberNrics.value = isMemberNricShown(index)
2266
- ? shownMemberNrics.value.filter((x) => x !== index)
2267
- : [...shownMemberNrics.value, index];
2268
- }
2269
-
2270
- watch(
2271
- () => dialog.viewVisitor,
2272
- (open) => {
2273
- if (open) return;
2274
- showVisitorNric.value = false;
2275
- shownMemberNrics.value = [];
2276
- }
2277
- );
2278
-
2279
- /**
2280
- * What a member row prints under the name, in order. `plateNumber` is in here
2281
- * because the API returns it on `members[]` even though neither
2282
- * `TMemberInfo` (this package) nor `TContractorMembers` (API-core's visitor
2283
- * model, name and nric only) declares it - the two types have drifted from the
2284
- * document and from each other. Reading the key defensively costs nothing and
2285
- * shows the vehicle a member actually arrived in; the types are somebody's to
2286
- * reconcile separately.
2287
- */
2288
- const memberDetailFields = [
2289
- { key: "nric", label: "NRIC" },
2290
- { key: "contact", label: "Contact" },
2291
- { key: "plateNumber", label: "Vehicle" },
2292
- ] as const;
2293
-
2294
2127
  const formatType = (item: any) =>
2295
2128
  (item.deliveryType ? item.deliveryType + "-" : "") + item.type;
2296
2129
 
@@ -2304,7 +2137,6 @@ const formattedFields = {
2304
2137
  level: "Level",
2305
2138
  unit: "Unit",
2306
2139
  purpose: "Purpose",
2307
- members: "Members",
2308
2140
  checkIn: "Check In",
2309
2141
  snapshotEntryImage: "Entry Image",
2310
2142
  checkOut: "Check Out",
@@ -3311,100 +3143,6 @@ watchEffect(async () => {
3311
3143
  word-break: break-word;
3312
3144
  }
3313
3145
 
3314
- /* A row whose value is a set of records rather than a value - it drops the
3315
- two-column grid and runs the full width of the card body. */
3316
- .visitor-preview__row--block {
3317
- display: block;
3318
- }
3319
-
3320
- .visitor-preview__members {
3321
- display: flex;
3322
- flex-direction: column;
3323
- gap: 8px;
3324
- margin-top: 8px;
3325
- }
3326
-
3327
- /*
3328
- * An added member reads as an inset on the card it sits in - `--hover` on
3329
- * `--border` at the inner radius. Those are `Card/MemberInfoSummary`'s three
3330
- * decisions, unchanged, so a member looks the same in the preview as it does
3331
- * in the form that created it. Only the TYPE differs: that card still prints
3332
- * `<strong>Label:</strong> value`, which is the pattern this dialog just moved
3333
- * off, so the lines below are set on the scale rather than inherited.
3334
- */
3335
- .visitor-preview__member {
3336
- padding: 9px 12px;
3337
- border: 1px solid var(--border);
3338
- border-radius: var(--r-inner);
3339
- background: var(--hover);
3340
- }
3341
-
3342
- .visitor-preview__member-line {
3343
- display: flex;
3344
- gap: 8px;
3345
- margin-top: 3px;
3346
- font-size: var(--fs-breadcrumb);
3347
- color: var(--text2);
3348
- word-break: break-word;
3349
- }
3350
-
3351
- .visitor-preview__member-key {
3352
- flex: 0 0 52px;
3353
- color: var(--muted);
3354
- }
3355
-
3356
- /*
3357
- * THE NRIC REVEAL.
3358
- *
3359
- * The pressable thing is the masked number, not the glyph beside it: an eye on
3360
- * its own is a 14-16px target where 24px is the floor, and on a 12.5px member
3361
- * line an `AppButton variant="icon"` - the layer's 32px icon square - would
3362
- * make the NRIC line half again the height of the Contact line under it.
3363
- * Pressing the digits gives a target the width of the value at no cost to the
3364
- * rhythm, and reads the right way round: the number is what changes.
3365
- *
3366
- * It inherits its type rather than setting any, so the visitor's NRIC stays on
3367
- * `--fs-cell` and a member's on the `--fs-breadcrumb` of the line it sits in.
3368
- * The negative margin pays back the padding, so a revealed value starts on the
3369
- * same left edge as every other value in the card.
3370
- */
3371
- .visitor-preview__reveal {
3372
- display: inline-flex;
3373
- align-items: center;
3374
- gap: 6px;
3375
- margin: -3px -7px;
3376
- padding: 3px 7px;
3377
- border: none;
3378
- border-radius: var(--r-inner-sm);
3379
- background: transparent;
3380
- font: inherit;
3381
- color: inherit;
3382
- text-align: left;
3383
- cursor: pointer;
3384
- transition: background var(--motion) ease;
3385
- }
3386
-
3387
- .visitor-preview__reveal:hover {
3388
- background: var(--hover);
3389
- }
3390
-
3391
- .visitor-preview__reveal:focus-visible {
3392
- outline: 2px solid var(--accent);
3393
- outline-offset: 1px;
3394
- }
3395
-
3396
- /* The design's interactive ink - not Vuetify's fixed blue, which is one colour
3397
- on both themes. `affectedEntities` gives its NRIC eye the same value. */
3398
- .visitor-preview__eye {
3399
- color: var(--accent-text);
3400
- }
3401
-
3402
- @media (prefers-reduced-motion: reduce) {
3403
- .visitor-preview__reveal {
3404
- transition: none;
3405
- }
3406
- }
3407
-
3408
3146
  /* The width the type filter carried as `max-width="200"` on the v-select. */
3409
3147
  .visitor-type-filter {
3410
3148
  max-width: 200px;
@@ -319,23 +319,7 @@ export default function useAccessManagement() {
319
319
  );
320
320
  }
321
321
 
322
- /**
323
- * `holderType` is the GROUP the card was given from — "Visitor/Resident",
324
- * "Management" or "Service Provider" (core `EAccessCardHolderTypes`).
325
- *
326
- * It is what lets the server resolve the holder afterwards: `assignees`
327
- * carries a `users` id for a resident, but a membership id for a service
328
- * provider, and only the group says which collection to look in. Omit it and
329
- * the card stores `holderType: null`, so card details cannot name the holder.
330
- */
331
- function assignUser(payload: {
332
- assignees: string[];
333
- unit: string;
334
- type: string;
335
- acm_url: string;
336
- id?: string;
337
- holderType?: "Visitor/Resident" | "Management" | "Service Provider";
338
- }) {
322
+ function assignUser(payload: { assignees: string[]; unit: string; type: string; acm_url: string; id?: string }) {
339
323
  return useNuxtApp().$api<Record<string, any>>(
340
324
  `/api/access-management/assign-user`,
341
325
  { method: "POST", body: payload }
@@ -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;