@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.
- package/CHANGELOG.md +10 -4
- package/assets/css/primitives.css +57 -0
- 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/MemberMain.vue +150 -75
- package/components/RolePermissionFormPreviewUpdate.vue +17 -10
- 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/last-active.ts +3 -1
- package/utils/member-row.ts +85 -0
- package/utils/occupancy-role.ts +109 -0
- 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
|
+
}
|