@7365admin1/layer-common 4.80.1 → 4.81.1-staging.467

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 (50) hide show
  1. package/CHANGELOG.md +10 -4
  2. package/assets/css/primitives.css +57 -0
  3. package/components/AccessCardDetailsDialog.vue +57 -4
  4. package/components/AccessCardPreviewDialog.vue +291 -50
  5. package/components/AppSelect.vue +143 -4
  6. package/components/BuildingUnitFormEdit.vue +6 -0
  7. package/components/BuildingUnitManagement.vue +298 -0
  8. package/components/Dialog/UpdateMoreAction.vue +11 -1
  9. package/components/DocumentForm.vue +407 -112
  10. package/components/DocumentManagement.vue +213 -12
  11. package/components/Facility/BookingSetup.vue +63 -0
  12. package/components/HidAccessLogDashboard.vue +74 -17
  13. package/components/HidAccessPermissions.vue +424 -0
  14. package/components/HidIntercomManagement.vue +183 -14
  15. package/components/HidProfileQrCode.vue +332 -0
  16. package/components/HidQrCodeConfiguration.vue +17 -195
  17. package/components/HidReaderManagement.vue +398 -0
  18. package/components/HidReaderUserRoster.vue +44 -3
  19. package/components/HidUserEnrollment.vue +1521 -248
  20. package/components/InvitationClientForm.vue +19 -1
  21. package/components/MemberMain.vue +150 -75
  22. package/components/RolePermissionFormPreviewUpdate.vue +17 -10
  23. package/components/VisitorForm.vue +12 -0
  24. package/components/VisitorManagement.vue +267 -5
  25. package/composables/useDocument.ts +7 -0
  26. package/composables/useFacility.ts +11 -0
  27. package/composables/useHidAmico.ts +165 -0
  28. package/composables/useHidNavigation.ts +25 -1
  29. package/composables/useHidReaderSelection.ts +50 -0
  30. package/composables/useMember.ts +12 -0
  31. package/composables/usePeople.ts +19 -0
  32. package/composables/useServiceProvider.ts +40 -2
  33. package/composables/useSiteCategory.ts +45 -0
  34. package/package.json +1 -1
  35. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  36. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  37. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
  38. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  39. package/types/document.d.ts +14 -0
  40. package/types/facility.d.ts +4 -0
  41. package/types/member.d.ts +4 -0
  42. package/types/people.d.ts +28 -1
  43. package/types/service-provider.d.ts +5 -0
  44. package/utils/hid-enrolment-subject.ts +144 -0
  45. package/utils/hid-permission-assignments.ts +190 -0
  46. package/utils/hid-reader-selection.ts +52 -0
  47. package/utils/last-active.ts +3 -1
  48. package/utils/member-row.ts +85 -0
  49. package/utils/occupancy-role.ts +109 -0
  50. package/utils/service-type.ts +30 -0
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A SERVICE PROVIDER'S LINE OF BUSINESS, AS PEOPLE NAME IT.
3
+ *
4
+ * `/api/service-providers` returns the service CODE (`mechanical_electrical_services`),
5
+ * which is a database value, not something to show an operator. This is the same
6
+ * mapping `API-core src/utils/converter.ts spmServiceNewToOld` applies — copied
7
+ * rather than imported, because that is a server package this layer does not
8
+ * depend on.
9
+ *
10
+ * NOT the same labels as `utils/module-applications.ts APPLICATIONS`. Those name
11
+ * the seven role-permission applications ("Mechanical & electrical", "Pest
12
+ * control") and are keyed `mechanical-electrical`, not `*_services`. These are
13
+ * the shorter names the service-provider screens use ("M&E", "Pest Control").
14
+ *
15
+ * An unknown code is returned untouched: a new service type shows as its raw
16
+ * code, which is visibly odd, rather than vanishing from the row.
17
+ */
18
+ const SERVICE_TYPE_LABELS: Readonly<Record<string, string>> = Object.freeze({
19
+ security_agency: "Security",
20
+ cleaning_services: "Cleaning",
21
+ pool_maintenance_services: "Pool Maintenance",
22
+ pest_control_services: "Pest Control",
23
+ landscaping_services: "Landscape",
24
+ mechanical_electrical_services: "Mechanical & Electrical",
25
+ });
26
+
27
+ export function serviceTypeLabel(service: string | null | undefined): string {
28
+ const code = String(service ?? "");
29
+ return SERVICE_TYPE_LABELS[code] ?? code;
30
+ }