@7365admin1/layer-common 4.97.1-staging.564 → 4.97.1-staging.566

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.
@@ -20,7 +20,7 @@
20
20
  density="compact"
21
21
  class="ma-4"
22
22
  >
23
- Set a location on this HID Face Reader before managing permissions.
23
+ Set a location on this HID Reader before managing permissions.
24
24
  </v-alert>
25
25
 
26
26
  <template v-else>
@@ -293,7 +293,7 @@ const open = computed({
293
293
  const readerId = computed(() => String(props.reader?._id ?? ""));
294
294
  const readerLocation = computed(() => String(props.reader?.location ?? "").trim());
295
295
  const readerLabel = computed(() => {
296
- const name = String(props.reader?.name ?? "").trim() || "HID Face Reader";
296
+ const name = String(props.reader?.name ?? "").trim() || "HID Reader";
297
297
  return readerLocation.value ? `${name} · ${readerLocation.value}` : name;
298
298
  });
299
299
 
@@ -1,14 +1,14 @@
1
1
  <!--
2
2
  HID QR CODE CONFIGURATION - the reader's own settings, inside Site Settings.
3
3
 
4
- It is mounted in `SiteSettings.vue`'s "HID Face Reader" expansion panel, next
4
+ It is mounted in `SiteSettings.vue`'s "HID Reader" expansion panel, next
5
5
  to `HidServiceSettingsPanel`, so it takes the shape the handoff gives a
6
6
  settings module BODY: section labels at 13px/700, explanatory lines at
7
7
  12-13px/600 in `--muted`, the 38x22 toggle, 40px fields and 38px buttons.
8
8
 
9
9
  Two pieces of legacy chrome are gone rather than restyled:
10
10
  * the `#082e43` navy title bar. The design puts NO card inside an accordion
11
- body - the accordion head ("HID Face Reader") is the card, and a second
11
+ body - the accordion head ("HID Reader") is the card, and a second
12
12
  titled panel inside it is a header the design does not draw. Its title is
13
13
  kept as the body's first section label.
14
14
  * the chevron button that sat on that bar. It had no `@click` and no model:
@@ -115,7 +115,7 @@ function buildHidServices(enabled: boolean) {
115
115
 
116
116
  const service = {
117
117
  key: "hid_amico",
118
- name: "HID Face Reader",
118
+ name: "HID Reader",
119
119
  enabled,
120
120
  status: enabled ? "active" : "inactive",
121
121
  };
@@ -154,7 +154,7 @@ async function saveHidService(value: boolean) {
154
154
  hidEnabled.value = value;
155
155
  emit("refresh");
156
156
  await refreshNuxtData(`layout-selected-site-details-${useRuntimeConfig().public.APP}`);
157
- showMessage(`HID Face Reader ${value ? "enabled" : "disabled"} successfully`, "success");
157
+ showMessage(`HID Reader ${value ? "enabled" : "disabled"} successfully`, "success");
158
158
  } catch (error: unknown) {
159
159
  hidEnabled.value = previousValue;
160
160
  showMessage(errorConverter(error), "error");
@@ -191,7 +191,7 @@
191
191
  <v-expansion-panel v-if="canManageHidSettings">
192
192
  <v-expansion-panel-title>
193
193
  <v-icon class="mr-2">mdi-face-recognition</v-icon>
194
- HID Face Reader
194
+ HID Reader
195
195
  </v-expansion-panel-title>
196
196
  <v-expansion-panel-text>
197
197
  <HidServiceSettingsPanel
@@ -99,10 +99,12 @@ export function useHidAccessPermission() {
99
99
  const { userAppRole, userAppModulesDenied } = useLocalSetup();
100
100
 
101
101
  // `hasPermission` needs BOTH the role's string AND a catalogue entry for it.
102
- // The property and security catalogues carry `hid-mgmt`, the four service
103
- // catalogues carry only `use-hid-access`, and no catalogue offers the retired
104
- // `view` and `manage-hid` any more, so the lookup table is built here: these
105
- // flags must answer the same in every app that mounts a HID screen.
102
+ // The property and security catalogues carry `hid-mgmt`, the five service
103
+ // catalogues (cleaning, landscaping, pest control, pool maintenance and,
104
+ // since 2026-10-19, M&E) carry only `use-hid-access`, and no catalogue
105
+ // offers the retired `view` and `manage-hid` any more, so the lookup table
106
+ // is built here: these flags must answer the same in every app that mounts
107
+ // a HID screen.
106
108
  const permissions: TPermissions = {
107
109
  "hid-mgmt": Object.fromEntries(
108
110
  HID_ACTIONS.map((action) => [action, { check: true, description: `HID: ${action}.` }]),
@@ -3,7 +3,7 @@ import type { ComputedRef, Ref } from "vue";
3
3
  /**
4
4
  * THE HID FACE READER MENU IS A PERMISSION, NOT A SERVICE FLAG.
5
5
  *
6
- * This composable used to draw the six item "HID Face Reader" group whenever
6
+ * This composable used to draw the six item "HID Reader" group whenever
7
7
  * `getHidServiceEnabled(site)` was true. That is a SITE SERVICE FLAG: it says
8
8
  * the estate bought HID, not that this member may use it. A module a member
9
9
  * cannot use should not be in the menu at all, so the menu asks the same
@@ -42,7 +42,7 @@ export default function useHidNavigation() {
42
42
  */
43
43
  function getHidFaceReaderMenu({ org, site }: HidNavigationParams) {
44
44
  return {
45
- title: "HID Face Reader",
45
+ title: "HID Reader",
46
46
  children: [
47
47
  {
48
48
  title: "Face Reader",
@@ -51,6 +51,11 @@ export default function useMechanicalElectricalPermission() {
51
51
  "area-mgmt": schedulePermissions["area-mgmt"],
52
52
  "unit-mgmt": schedulePermissions["unit-mgmt"],
53
53
  "site-settings": schedulePermissions["site-settings"],
54
+ // HID access, user side only (2026-10-19): the M&E mobile app gains the
55
+ // HID user side, so an M&E role must be able to hold `use-hid-access`.
56
+ // Taken from the cleaning catalogue like the keys above (one action, same
57
+ // description), so the two cannot drift. Catalogue-only: grants nothing.
58
+ "hid-mgmt": schedulePermissions["hid-mgmt"],
54
59
  "cleaning-schedule-mgmt": schedulePermissions["cleaning-schedule-mgmt"],
55
60
  "schedule-task-mgmt": schedulePermissions["schedule-task-mgmt"],
56
61
  "attendance-mgmt": schedulePermissions["attendance-mgmt"],
@@ -714,11 +714,11 @@ export const SERVER_ONLY_UNGRANTABLE: readonly string[] = Object.freeze([
714
714
  * `:assign-access-card` and `:manage-hid`, which the HID menu accepted and
715
715
  * `core/src/utils/hid-access.util.ts` enforced while no app's catalogue offered
716
716
  * them. HID now has its own `hid-mgmt` family, offered in full by the property
717
- * and security catalogues and as `use-hid-access` by the four service
718
- * catalogues; `assign-access-card` is offered by both card catalogues; `view`
719
- * and `manage-hid` are retired (below). Kept, and still pinned by the drift
720
- * test, so the next string of this shape is recorded here rather than found
721
- * by somebody staring at a blank screen.
717
+ * and security catalogues and as `use-hid-access` by the five service
718
+ * catalogues (M&E joined on 2026-10-19); `assign-access-card` is offered by
719
+ * both card catalogues; `view` and `manage-hid` are retired (below). Kept,
720
+ * and still pinned by the drift test, so the next string of this shape is
721
+ * recorded here rather than found by somebody staring at a blank screen.
722
722
  */
723
723
  export const CHECKED_BUT_UNGRANTABLE: readonly TPermissionString[] =
724
724
  Object.freeze([]);
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.97.1-staging.564",
5
+ "version": "4.97.1-staging.566",
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.",
@@ -74,7 +74,7 @@ export const NAV_SECTIONS: Record<string, string> = {
74
74
  "SOA Mgmt": "PROPERTY",
75
75
 
76
76
  // SECURITY OPERATIONS
77
- "HID Face Reader": "SECURITY OPERATIONS",
77
+ "HID Reader": "SECURITY OPERATIONS",
78
78
  "Daily Occurrence Books": "SECURITY OPERATIONS",
79
79
  Manpower: "SECURITY OPERATIONS",
80
80
  "Virtual Patrol": "SECURITY OPERATIONS",