@7365admin1/layer-common 4.90.2-staging.491 → 4.90.3

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 (75) hide show
  1. package/CHANGELOG.md +16 -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/InventoryItemDetail.vue +1 -2
  19. package/components/InventoryLinesDialog.vue +13 -91
  20. package/components/InventoryPhotoInput.vue +6 -44
  21. package/components/InventoryReportsTab.vue +3 -23
  22. package/components/InventoryRequestsTab.vue +4 -27
  23. package/components/InventoryStockTab.vue +0 -3
  24. package/components/InvitationClientForm.vue +1 -19
  25. package/components/InvitationForm.vue +4 -31
  26. package/components/InvitationMain.vue +22 -124
  27. package/components/SiteSettings.vue +0 -48
  28. package/components/TableMain.vue +7 -22
  29. package/components/VehicleManagement.vue +5 -80
  30. package/components/VisitorForm.vue +0 -12
  31. package/components/VisitorManagement.vue +5 -267
  32. package/composables/useAccessManagement.ts +1 -17
  33. package/composables/useDocument.ts +0 -7
  34. package/composables/useFacility.ts +0 -11
  35. package/composables/useHidAmico.ts +0 -165
  36. package/composables/useHidNavigation.ts +1 -25
  37. package/composables/useInventory.ts +1 -4
  38. package/composables/useMember.ts +0 -12
  39. package/composables/useNFCPatrolReportFilters.ts +3 -21
  40. package/composables/useNFCPatrolRoute.ts +1 -8
  41. package/composables/usePeople.ts +0 -19
  42. package/composables/useServiceProvider.ts +2 -45
  43. package/composables/useSettingsPermission.ts +0 -14
  44. package/composables/useUser.ts +2 -6
  45. package/composables/useVehicle.ts +1 -40
  46. package/composables/useVerification.ts +0 -3
  47. package/middleware/01.auth.ts +7 -3
  48. package/package.json +1 -1
  49. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  50. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  51. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  52. package/types/document.d.ts +0 -14
  53. package/types/facility.d.ts +0 -4
  54. package/types/inventory.d.ts +0 -27
  55. package/types/member.d.ts +0 -4
  56. package/types/people.d.ts +1 -28
  57. package/types/service-provider.d.ts +0 -5
  58. package/types/site.d.ts +1 -7
  59. package/components/BuildingUnitManagement.vue +0 -298
  60. package/components/HidAccessPermissions.vue +0 -424
  61. package/components/HidProfileQrCode.vue +0 -332
  62. package/components/InventoryPoDialog.vue +0 -111
  63. package/components/VehicleQrStickerDialog.vue +0 -249
  64. package/composables/useHidReaderSelection.ts +0 -50
  65. package/composables/useSiteCategory.ts +0 -45
  66. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
  67. package/utils/hid-enrolment-subject.ts +0 -344
  68. package/utils/hid-permission-assignments.ts +0 -198
  69. package/utils/hid-reader-selection.ts +0 -52
  70. package/utils/inventory-receiving.ts +0 -90
  71. package/utils/invite-group.ts +0 -61
  72. package/utils/invite-sites.ts +0 -25
  73. package/utils/occupancy-role.ts +0 -109
  74. package/utils/service-type.ts +0 -30
  75. package/utils/vehicle-qr-sticker.ts +0 -184
@@ -70,8 +70,6 @@ export default function useMember() {
70
70
  status = "active",
71
71
  siteId = "",
72
72
  roleState = "",
73
- /** A building unit id, or "none": members on no unit yet. */
74
- unit = "",
75
73
  people = false,
76
74
  } = {}) {
77
75
  const query: Record<string, any> = { page, limit, type, status };
@@ -85,7 +83,6 @@ export default function useMember() {
85
83
  if (user) query.user = user;
86
84
  if (org) query.org = org;
87
85
  if (siteId) query.siteId = siteId;
88
- if (unit) query.unit = unit;
89
86
  return useNuxtApp().$api<Record<string, any>>("/api/members", {
90
87
  method: "GET",
91
88
  query,
@@ -161,14 +158,6 @@ export default function useMember() {
161
158
  });
162
159
  }
163
160
 
164
- /** Attach a member to a building unit, or detach them (`unit` ""). */
165
- function updateMemberUnit(id: string, unit: string) {
166
- return useNuxtApp().$api<Record<string, any>>("/api/members/unit", {
167
- method: "PUT",
168
- body: { id, unit },
169
- });
170
- }
171
-
172
161
  function getByUserTypeOrg(user: string, type: string, org: string) {
173
162
  return useNuxtApp().$api<TMember>(
174
163
  `/api/members/user/${user}/app/${type}/org`,
@@ -237,7 +226,6 @@ export default function useMember() {
237
226
  undoCrossSiteRoleFix,
238
227
  getSiteAccess,
239
228
  saveSiteAccess,
240
- updateMemberUnit,
241
229
  members,
242
230
  member,
243
231
  page,
@@ -31,27 +31,9 @@ export function useNFCPatrolReportFilters(site: string) {
31
31
  loading.value = true;
32
32
 
33
33
  try {
34
- // Deleted routes too, labelled, so their past patrols can still be
35
- // reported on. An API from before route deletion refuses the parameter
36
- // with a 400: ask again without it, and the list is what it was.
37
- const response = await getPatrolRoutes({
38
- site,
39
- page: 1,
40
- limit: 100,
41
- includeDeleted: true,
42
- }).catch((error: any) => {
43
- const status = Number(error?.statusCode ?? error?.response?.status ?? 0);
44
- if (status !== 400) throw error;
45
- return getPatrolRoutes({ site, page: 1, limit: 100 });
46
- });
47
- const items: Array<Record<string, any>> = response.items ?? [];
48
- const isDeleted = (route: Record<string, any>) => route.status === "Deleted";
49
- // Routes still in use first, so the report opens on one of them.
50
- const routes = [
51
- ...items.filter((route) => !isDeleted(route)),
52
- ...items.filter(isDeleted),
53
- ].map((route) => ({
54
- title: isDeleted(route) ? `${route.name} (deleted)` : route.name,
34
+ const response = await getPatrolRoutes({ site, page: 1, limit: 100 });
35
+ const routes = (response.items ?? []).map((route: Record<string, any>) => ({
36
+ title: route.name,
55
37
  value: route._id,
56
38
  startTimes: route.startTimes ?? [],
57
39
  }));
@@ -4,24 +4,17 @@ export default function useNFCPatrolRoute() {
4
4
  limit = 20,
5
5
  site = "",
6
6
  search = "",
7
- includeDeleted = false,
8
7
  } = {}) {
9
8
  const query: Record<string, any> = {
10
9
  page,
11
10
  limit,
12
11
  site,
13
12
  };
14
-
13
+
15
14
  // Only include search parameter if it has a value
16
15
  if (search) {
17
16
  query.search = search;
18
17
  }
19
-
20
- // Deleted routes are left out unless asked for; only the patrol log
21
- // report's route picker asks, so their past patrols stay reachable.
22
- if (includeDeleted) {
23
- query.includeDeleted = true;
24
- }
25
18
 
26
19
  return useNuxtApp().$api<Record<string, any>>(`/api/nfc-patrol-route`, {
27
20
  method: "GET",
@@ -115,24 +115,6 @@ export default function () {
115
115
  });
116
116
  }
117
117
 
118
- /**
119
- * The blocks, levels and units at a site that actually have an occupant.
120
- * The other half of the unit picker: this narrows the cascade, then
121
- * `getPeopleByUnit` answers "which person in this unit?".
122
- */
123
- async function getOccupiedStructure(
124
- site: string,
125
- { type = "", status = "active", block = "", level = "" } = {}
126
- ) {
127
- return await useNuxtApp().$api<Record<string, any>>(
128
- `/api/people/site/${site}/occupied-structure`,
129
- {
130
- method: "GET",
131
- query: { type, status, block, level },
132
- }
133
- );
134
- }
135
-
136
118
  async function getPeopleByUnit(
137
119
  _id: string,
138
120
  { status = "active", type = "" } = {}
@@ -166,7 +148,6 @@ export default function () {
166
148
  findPersonByPlateNumberMultipleResult,
167
149
  findPersonByContact,
168
150
  getPeopleByUnit,
169
- getOccupiedStructure,
170
151
  searchCompanyList,
171
152
  findUsersByPlateNumber,
172
153
  reviewResidentPerson,
@@ -15,21 +15,6 @@ export type TSiteProviderMember = {
15
15
  lastLoginAt?: string | null;
16
16
  /** a subcontractor: the provider that brought its company onto the site */
17
17
  invitedVia?: string;
18
- /** The building unit this person is attached to (a unit's Management tab). */
19
- unit?: string | null;
20
- unitName?: string;
21
- /**
22
- * The person's user account. Anything acting on the PERSON needs this rather
23
- * than `_id`, which identifies the membership: an access card carries it as
24
- * `userId`, and HID reader access is bound by it -
25
- * `resolvePermissionUserBindings` drops every subject without one.
26
- *
27
- * Returned from core 3.130. Before that the repository projected it and the
28
- * service layer dropped it, so against an older API it is absent on every
29
- * row - `providerAccountsKnown` is how the HID enrolment screen tells the two
30
- * apart rather than reading an absence as "nobody has an account".
31
- */
32
- user?: string | null;
33
18
  };
34
19
 
35
20
  export type TSiteProviderCompany = {
@@ -105,8 +90,6 @@ export default function useServiceProvider() {
105
90
  status = "",
106
91
  /** "engagements": also providers engaged through an accepted invitation. */
107
92
  include = "",
108
- /** A building unit id, or "none": providers on no unit yet. */
109
- unit = "",
110
93
  } = {}) {
111
94
  return useNuxtApp().$api<Record<string, any>>("/api/service-providers", {
112
95
  method: "GET",
@@ -119,7 +102,6 @@ export default function useServiceProvider() {
119
102
  siteId,
120
103
  ...(status ? { status } : {}),
121
104
  ...(include ? { include } : {}),
122
- ...(unit ? { unit } : {}),
123
105
  },
124
106
  });
125
107
  }
@@ -287,17 +269,6 @@ export default function useServiceProvider() {
287
269
  );
288
270
  }
289
271
 
290
- /** Attach a provider to a building unit, or detach it (`unit` ""). */
291
- async function updateUnit(id: string, unit: string) {
292
- return useNuxtApp().$api<Record<string, any>>(
293
- `/api/service-providers/${id}/unit`,
294
- {
295
- method: "PATCH",
296
- body: { unit },
297
- }
298
- );
299
- }
300
-
301
272
  async function getByEmail({
302
273
  email = "",
303
274
  orgId = "",
@@ -322,29 +293,17 @@ export default function useServiceProvider() {
322
293
  * Members > Service Providers: the provider people with access to this
323
294
  * site, and one entry per provider company with its head count. The
324
295
  * site's own organisation only - the server refuses anyone else.
325
- * `unit`: a building unit id, or "none" (people on no unit yet).
326
296
  */
327
- function getSiteMembers(siteId: string, unit = ""): Promise<{
297
+ function getSiteMembers(siteId: string): Promise<{
328
298
  items: TSiteProviderMember[];
329
299
  companies: TSiteProviderCompany[];
330
300
  }> {
331
301
  return useNuxtApp().$api("/api/service-providers/site-members", {
332
302
  method: "GET",
333
- query: { siteId, ...(unit ? { unit } : {}) },
303
+ query: { siteId },
334
304
  });
335
305
  }
336
306
 
337
- /** Attach one of those people to a building unit, or detach them (`unit` ""). */
338
- function updateSiteMemberUnit(id: string, unit: string) {
339
- return useNuxtApp().$api<Record<string, any>>(
340
- `/api/service-providers/site-members/${id}/unit`,
341
- {
342
- method: "PATCH",
343
- body: { unit },
344
- }
345
- );
346
- }
347
-
348
307
  /** The same list as an Excel file, under the same filters. */
349
308
  function exportSiteMembers(
350
309
  siteId: string,
@@ -361,7 +320,6 @@ export default function useServiceProvider() {
361
320
 
362
321
  return {
363
322
  getSiteMembers,
364
- updateSiteMemberUnit,
365
323
  exportSiteMembers,
366
324
  serviceProviders,
367
325
  serviceProvider,
@@ -380,7 +338,6 @@ export default function useServiceProvider() {
380
338
  add,
381
339
  addViaInvite,
382
340
  updateStatus,
383
- updateUnit,
384
341
  getByEmail,
385
342
  };
386
343
  }
@@ -122,19 +122,6 @@ export function useSettingsPermission() {
122
122
  );
123
123
  });
124
124
 
125
- // Vehicle QR stickers switch: whoever may update vehicles (same grant the
126
- // server checks on PUT /api/vehicles/qr/settings/site/:site).
127
- const vehiclePermissions: TPermissions = {
128
- "vehicle-mgmt": {
129
- "update-vehicle": { check: true, description: "Allows the user to update vehicle details." },
130
- },
131
- };
132
- const canManageVehicleQr = computed(() => {
133
- if (!userAppRole.value) return false;
134
- if (userAppRole.value.permissions.includes("*")) return true;
135
- return hasPermission(userAppRole.value, vehiclePermissions, "vehicle-mgmt", "update-vehicle");
136
- });
137
-
138
125
  const canManageSiteSettings = computed(() => {
139
126
  return canManageSiteInformation.value || canManageANPRCamera.value || canManageCCTVCamera.value || canManageDeliveryCompanies.value || canManageResidentVisitors.value || canManageWorkOrderSettings.value || canManageBillingAndSOAConfiguration.value || canManageNFCManagement.value || canManageNFCPatrolSettings.value || canManageEntryPass.value || canManageRedDotSettings.value
140
127
  })
@@ -151,7 +138,6 @@ export function useSettingsPermission() {
151
138
  canManageNFCPatrolSettings,
152
139
  canManageEntryPass,
153
140
  canManageRedDotSettings,
154
- canManageVehicleQr,
155
141
  canManageSiteSettings
156
142
 
157
143
  };
@@ -1,5 +1,3 @@
1
- import { inviteSitePayload } from "../utils/invite-sites";
2
-
3
1
  export default function useUser() {
4
2
  function inviteUser({
5
3
  email = "",
@@ -67,10 +65,7 @@ export default function useUser() {
67
65
  org = "",
68
66
  site = "",
69
67
  siteName = "",
70
- sites = [] as string[],
71
68
  } = {}) {
72
- // `sites` = the several chosen sites; the old single `site` still works.
73
- const chosen = sites.length ? sites : site ? [site] : [];
74
69
  return useNuxtApp().$api<Record<string, any>>("/api/auth/invite/member", {
75
70
  method: "POST",
76
71
  body: {
@@ -79,7 +74,8 @@ export default function useUser() {
79
74
  role,
80
75
  name,
81
76
  org,
82
- ...inviteSitePayload(chosen, siteName),
77
+ ...(site && { siteId: site }),
78
+ ...(siteName && { siteName }),
83
79
  },
84
80
  });
85
81
  }
@@ -272,41 +272,6 @@ function getSpecificVehicleById(id: string){
272
272
  }
273
273
 
274
274
 
275
- // Vehicle QR stickers (core vehicle-qr). Per-site switch, bulk sticker data,
276
- // and re-issue (the old sticker stops working).
277
- function getVehicleQrSettings(site: string) {
278
- return useNuxtApp().$api<{ site: string; enabled: boolean }>(
279
- `/api/vehicles/qr/settings/site/${site}`,
280
- { method: "GET" },
281
- );
282
- }
283
-
284
- function setVehicleQrSettings(site: string, enabled: boolean) {
285
- return useNuxtApp().$api<{ site: string; enabled: boolean }>(
286
- `/api/vehicles/qr/settings/site/${site}`,
287
- { method: "PUT", body: { enabled } },
288
- );
289
- }
290
-
291
- function getVehicleQrStickers(site: string, vehicleIds: string[]) {
292
- return useNuxtApp().$api<{
293
- site: { _id: string; name: string };
294
- items: Array<Record<string, any>>;
295
- missing: string[];
296
- }>("/api/vehicles/qr/stickers", {
297
- method: "POST",
298
- body: { site, vehicleIds },
299
- });
300
- }
301
-
302
- function regenerateVehicleQr(id: string) {
303
- return useNuxtApp().$api<{ vehicleId: string; qr: string; token: string }>(
304
- `/api/vehicles/qr/regenerate/id/${id}`,
305
- { method: "PUT" },
306
- );
307
- }
308
-
309
-
310
275
  return {
311
276
  getVehicles,
312
277
  addVehicle,
@@ -325,10 +290,6 @@ function getSpecificVehicleById(id: string){
325
290
  getActiveCameraCounts,
326
291
  syncVehicle,
327
292
  searchMultipleVehiclesByUnitId,
328
- getSpecificVehicleById,
329
- getVehicleQrSettings,
330
- setVehicleQrSettings,
331
- getVehicleQrStickers,
332
- regenerateVehicleQr,
293
+ getSpecificVehicleById
333
294
  };
334
295
  }
@@ -11,8 +11,6 @@ export default function useVerification() {
11
11
  limit = 20,
12
12
  // "seven365": only the invitations Seven365 sent (the console's lists).
13
13
  origin = "",
14
- // true: one entry per multi-site invitation group, with its `sites`.
15
- group = false,
16
14
  } = {}): Promise<{
17
15
  items: TMiniVerification[];
18
16
  pages: number;
@@ -24,7 +22,6 @@ export default function useVerification() {
24
22
  status, search, page, type, email, app, siteId, orgId, limit,
25
23
  // Sent only when asked for: an older API refuses a key it does not know.
26
24
  ...(origin && { origin }),
27
- ...(group && { group: "true" }),
28
25
  },
29
26
  });
30
27
  }
@@ -4,9 +4,13 @@ export default defineNuxtRouteMiddleware(async (route) => {
4
4
  // Get access token from cookies
5
5
  const sid = useCookie("sid", cookieConfig).value;
6
6
 
7
- // No longer saves `?email=` as a browser-wide `service-provider-email` cookie
8
- // (30 days): nothing reads it, and a leftover from another account sent the
9
- // org app's sign-in to that account's create page.
7
+ const serviceProviderEmail = (route.query.email as string) ?? "";
8
+
9
+
10
+ if (serviceProviderEmail) {
11
+ useCookie("service-provider-email", cookieConfig).value =
12
+ serviceProviderEmail;
13
+ }
10
14
 
11
15
  if (!sid) {
12
16
  // Redirect to login page if no access token
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.90.2-staging.491",
5
+ "version": "4.90.3",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
@@ -5,7 +5,7 @@
5
5
  :org="orgId"
6
6
  message="Enable HID as a service for this site before managing HID users."
7
7
  >
8
- <HidUserEnrollment :site="siteId" :org="orgId" />
8
+ <HidUserEnrollment :site="siteId" />
9
9
  </HidEnabledGate>
10
10
  </v-container>
11
11
  </template>
@@ -5,7 +5,7 @@
5
5
  :org="orgId"
6
6
  message="Enable HID as a service for this site before managing physical HID cards."
7
7
  >
8
- <HidUserEnrollment :site="siteId" :org="orgId" card-management />
8
+ <HidUserEnrollment :site="siteId" card-management />
9
9
  </HidEnabledGate>
10
10
  </v-container>
11
11
  </template>
@@ -5,7 +5,7 @@
5
5
  :org="orgId"
6
6
  message="Enable HID as a service for this site before managing HID readers."
7
7
  >
8
- <HidReaderManagement :site="siteId" :org="orgId" />
8
+ <HidReaderManagement :site="siteId" />
9
9
  </HidEnabledGate>
10
10
  </v-container>
11
11
  </template>
@@ -3,18 +3,4 @@ declare type TDocument = {
3
3
  name: string;
4
4
  attachment: string;
5
5
  type: string;
6
- /**
7
- * Set at upload or renewal, absent when the document never expires.
8
- *
9
- * An ISO instant on the way out of the API and a `YYYY-MM-DD` string on the
10
- * way back in, which is what `InputDatePicker` binds to - hence the loose
11
- * type rather than `string`.
12
- */
13
- expiryDate?: string | Date | null;
14
- remarks?: string;
15
- size?: number;
16
- parentId?: string | null;
17
- createdAt?: string | Date;
18
- updatedAt?: string | Date;
19
- status?: string;
20
6
  };
@@ -73,10 +73,6 @@ declare type TFacility = {
73
73
  hourInterval?: number;
74
74
  isBookingFeeEnabled: boolean;
75
75
  isGuestEnabled: boolean;
76
- /** Residents may complete this facility's checklist themselves. */
77
- isResidentChecklistEnabled?: boolean;
78
- /** Security may complete it. Mutually exclusive with the above. */
79
- isSecurityChecklistEnabled?: boolean;
80
76
  bookingAmount: number | null;
81
77
  peakBookingFeeAmount?: number | null;
82
78
  bookingFeeGuestAmount?: number | null;
@@ -105,12 +105,6 @@ declare type TInventoryTransaction = {
105
105
  location?: { type: "common_area" | "tenant_unit"; area?: string; unit?: string; unitName?: string; tenantName?: string };
106
106
  reference?: string;
107
107
  supplier?: string;
108
- /** Receiving (2026-10): missing on older rows = PO. */
109
- receivingType?: "PO" | "DO" | "CASH";
110
- doNumber?: string;
111
- doDate?: string | null;
112
- receiptNumber?: string;
113
- poOrderedQty?: number | null;
114
108
  unitCost: number;
115
109
  totalCost: number;
116
110
  photos?: { before: string[]; after: string[]; other: string[] };
@@ -170,24 +164,3 @@ declare type TInventoryHandover = {
170
164
  createdAt: string;
171
165
  decidedAt?: string;
172
166
  };
173
-
174
- /** GET /stores/:id/reports/purchase-order: one item of a PO, ordered (null = not recorded) vs received. */
175
- declare type TInventoryPoLine = {
176
- item: string;
177
- itemName: string;
178
- unit: string;
179
- ordered: number | null;
180
- received: number;
181
- outstanding: number | null;
182
- deliveries: {
183
- _id: string;
184
- date: string;
185
- qty: number;
186
- receivingType: "PO" | "DO" | "CASH";
187
- doNumber: string;
188
- doDate: string | null;
189
- receiptNumber: string;
190
- supplier: string;
191
- receivedBy: string;
192
- }[];
193
- };
package/types/member.d.ts CHANGED
@@ -10,10 +10,6 @@ declare type TMember = {
10
10
  customerOrgId?: string;
11
11
  customerSiteId?: string;
12
12
  status?: string;
13
- email?: string;
14
- /** The building unit this member manages (a unit's Management tab). */
15
- unit?: string | null;
16
- unitName?: string;
17
13
  createdAt?: string;
18
14
  updatedAt?: string;
19
15
  deletedAt?: string;
package/types/people.d.ts CHANGED
@@ -22,38 +22,11 @@ declare type TPeople = {
22
22
  email?: string;
23
23
  files?: { name: string, id: string }[];
24
24
  isOwner?: boolean;
25
- /**
26
- * Owner / occupant / person-in-charge, as the BUSINESS people form asks it.
27
- * Absent on everyone else - `isOwner` is still the flag that decides unit
28
- * ownership, and the server derives it from this when it is sent. See
29
- * `OccupancyRoles` in core's `person.model.ts`.
30
- */
31
- occupancyRole?: TOccupancyRole;
32
- // Link to this person's `users` row. Empty for the person types that carry
33
- // no login, and empty for a resident whose account was never written.
34
- user?: string;
35
- };
36
-
37
- declare type TOccupancyRole = "owner" | "occupant" | "person-in-charge";
38
-
39
- /** One standing and everything the product says about it. See `utils/occupancy-role.ts`. */
40
- declare type TOccupancyRoleOption = {
41
- value: TOccupancyRole;
42
- /** The label a stored role is printed with. */
43
- title: string;
44
- /** The row menu's wording. */
45
- action: string;
46
- /** The confirmation's heading and its sentence. */
47
- prompt: string;
48
- description: string;
49
25
  };
50
26
 
51
27
  declare type TPlateNumber = { plateNumber: string, recNo?: string, _id?: string, status: TVehicleStatus, type: TVehicleType, anprCameras?: TVehicleAnprCamera[] };
52
28
 
53
29
 
54
- // `""` is the FORM's "nothing picked yet" - it is stripped from the payload
55
- // before it is sent, because absence is what the server reads as "never
56
- // asked". See `PeopleFormMgmt.vue`.
57
- declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type" | "isOwner"> & { status?: string; user?: string; occupancyRole?: TOccupancyRole | "" }
30
+ declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type" | "isOwner"> & { status?: string }
58
31
 
59
32
  declare type TPeopleType = "guest" | "resident" | "tenant"
@@ -7,11 +7,6 @@ declare type TServiceProvider = {
7
7
  serviceProviderOrgId: string;
8
8
  type: string;
9
9
  nature: string;
10
- status?: string;
11
- email?: string;
12
- /** The building unit this provider serves (a unit's Management tab). */
13
- unit?: string | null;
14
- unitName?: string;
15
10
  };
16
11
 
17
12
  declare type TServiceProviderName = {
package/types/site.d.ts CHANGED
@@ -5,10 +5,7 @@ declare type THidQrCodeFormat = "0" | "1" | "2";
5
5
  declare type THidPermissionCategory =
6
6
  | "resident"
7
7
  | "property_management"
8
- /** A provider COMPANY - granting one admits every active member of that org. */
9
- | "service_provider"
10
- /** ONE PERSON from a provider company, by their membership at this site. */
11
- | "service_provider_member";
8
+ | "service_provider";
12
9
 
13
10
  declare type THidPermissionAssignment = {
14
11
  subjectId: string;
@@ -30,10 +27,7 @@ declare type THidSitePermissions = {
30
27
  counts: {
31
28
  resident: number;
32
29
  propertyManagement: number;
33
- /** Provider COMPANIES granted. */
34
30
  serviceProvider: number;
35
- /** Named provider people granted. Counted apart from the companies. */
36
- serviceProviderMember: number;
37
31
  intercom: number;
38
32
  };
39
33
  };