@7365admin1/layer-common 4.97.1-staging.671 → 4.97.1-staging.673

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.
@@ -188,7 +188,8 @@ const {
188
188
  APP_MECHANICAL_ELECTRICAL,
189
189
  APP_PEST_CONTROL,
190
190
  APP_LANDSCAPING,
191
- APP_POOL_MAINTENANCE
191
+ APP_POOL_MAINTENANCE,
192
+ APP_IRANGER
192
193
  } = useRuntimeConfig().public
193
194
  const APP_CONFIG: Record<string, any> = {
194
195
  property_management_agency: {
@@ -232,6 +233,12 @@ const APP_CONFIG: Record<string, any> = {
232
233
  title: 'Pool Maintenance',
233
234
  icon: 'mdi-pool',
234
235
  link: APP_POOL_MAINTENANCE
236
+ },
237
+ estate_ranger_services: {
238
+ id: 'iranger',
239
+ title: 'iRanger365',
240
+ icon: 'mdi-shield-account-outline',
241
+ link: APP_IRANGER
235
242
  }
236
243
  }
237
244
  // A Real Estate Developer client is served by the Property Management app
@@ -419,6 +419,7 @@ const APP_LIST = [
419
419
  { title: 'Pest Control Services', value: 'pest_control_services' },
420
420
  { title: 'Landscaping Services', value: 'landscaping_services' },
421
421
  { title: 'Pool Maintenance Services', value: 'pool_maintenance_services' },
422
+ { title: 'iRanger365', value: 'estate_ranger_services' },
422
423
  ]
423
424
 
424
425
  /* ── STATE ── */
@@ -311,6 +311,7 @@ const APP_LIST = [
311
311
  { title: "Pest Control Services", value: "pest_control_services" },
312
312
  { title: "Landscaping Services", value: "landscaping_services" },
313
313
  { title: "Pool Maintenance Services", value: "pool_maintenance_services" },
314
+ { title: "iRanger365", value: "estate_ranger_services" },
314
315
  ]
315
316
 
316
317
  const { getByName } = useOrg()
@@ -75,6 +75,7 @@ const orgTypeConfig: Record<string, { label: string; url?: string }> = {
75
75
  pest_control_services: { label: "Pest Control" },
76
76
  landscaping_services: { label: "Landscape" },
77
77
  pool_maintenance_services: { label: "Pool Maintenance" },
78
+ estate_ranger_services: { label: "iRanger365" },
78
79
  };
79
80
 
80
81
  function getOrgTypeMeta(type = "") {
@@ -19,6 +19,7 @@ const APP_URL_KEY_BY_NATURE: Record<string, string> = {
19
19
  pest_control_services: "APP_PEST_CONTROL",
20
20
  landscaping_services: "APP_LANDSCAPING",
21
21
  pool_maintenance_services: "APP_POOL_MAINTENANCE",
22
+ estate_ranger_services: "APP_IRANGER",
22
23
  };
23
24
 
24
25
  export default function useAppLinks() {
@@ -72,6 +72,7 @@ export default function useFeedback() {
72
72
  status = "",
73
73
  provider = "",
74
74
  service = "",
75
+ providerService = "",
75
76
  userId = "",
76
77
  category = "",
77
78
  }: {
@@ -85,6 +86,8 @@ export default function useFeedback() {
85
86
  status?: string;
86
87
  provider?: string | any;
87
88
  service?: string;
89
+ /** Optional: only this provider service's feedbacks (the stored `service` label, e.g. "Cleaning"). */
90
+ providerService?: string;
88
91
  userId?: string;
89
92
  /** Optional: one category (the feedback subject) or a comma list. Empty = all. */
90
93
  category?: string;
@@ -103,6 +106,7 @@ export default function useFeedback() {
103
106
  status,
104
107
  provider,
105
108
  service,
109
+ ...(providerService && { providerService }),
106
110
  ...(category && { category }),
107
111
  ...(currentUser.value?.type != "site" && {
108
112
  userId,
@@ -48,6 +48,7 @@ export default function useLocal() {
48
48
  { title: "Pest Control Services", value: "pest_control_services" },
49
49
  { title: "Landscaping Services", value: "landscaping_services" },
50
50
  { title: "Pool Maintenance Services", value: "pool_maintenance_services" },
51
+ { title: "iRanger365", value: "estate_ranger_services" },
51
52
  ];
52
53
 
53
54
  const natureOfBusinessV2 = [
@@ -64,6 +65,7 @@ export default function useLocal() {
64
65
  { title: "Landscaping Services", value: "landscaping_services" },
65
66
  { title: "Pest Control Services", value: "pest_control_services" },
66
67
  { title: "Pool Maintenance Services", value: "pool_maintenance_services" },
68
+ { title: "iRanger365", value: "estate_ranger_services" },
67
69
  ];
68
70
  const natureOfBusinessV3 = [
69
71
  { title: "Security", value: "security_agency" },
@@ -75,6 +77,7 @@ export default function useLocal() {
75
77
  { title: "Landscaping", value: "landscaping_services" },
76
78
  { title: "Pest Control", value: "pest_control_services" },
77
79
  { title: "Pool Maintenance", value: "pool_maintenance_services" },
80
+ { title: "iRanger365", value: "estate_ranger_services" },
78
81
  ];
79
82
 
80
83
 
@@ -0,0 +1,112 @@
1
+ // Explicit import rather than Nuxt auto-import, like every other catalogue: it
2
+ // lets `utils/module-applications.ts` read this file outside a Nuxt context.
3
+ import { useCommonPermissions } from "./useCommonPermission";
4
+
5
+ /**
6
+ * THE iRANGER365 ROLE CATALOGUE (service nature `estate_ranger_services`).
7
+ *
8
+ * iRanger365 is a standard iService365 service (owner, 2026-11-11): the ranger
9
+ * company's staff hold `estate_ranger_services` memberships whose roles are
10
+ * built from this list in the iRanger web app's role editor, exactly like
11
+ * Security or M&E.
12
+ *
13
+ * Setup and field work only. The Command Centre (dispatch, staff map, safety,
14
+ * alerts, messages, tickets) is run by iSecure365, so its permissions are the
15
+ * `command-centre` resource of `useSecurityPermission`, not here.
16
+ *
17
+ * Three actions decide the person's iRanger365 role on the server (API-core
18
+ * `iranger-role-catalogue.ts`; keep the two in step):
19
+ * visits:work-as-ranger -> RANGER
20
+ * visits:work-as-ambassador -> AMBASSADOR
21
+ * staff:supervise-rangers -> SUPERVISOR
22
+ * Each `manage-*` action is the ranger company's set-up right for that area,
23
+ * for its own clusters only. The owner's `*` is all of the above inside the
24
+ * company.
25
+ */
26
+ const see = (what: string) => ({ check: true, description: `Allows the user to view ${what}.` });
27
+ const manage = (what: string) => ({ check: true, description: `Allows the user to add, change and remove ${what}.` });
28
+
29
+ export default function useRangerPermission() {
30
+ const { memberPermissions, invitationPermissions, rolePermissions } = useCommonPermissions();
31
+
32
+ const permissions: TPermissions = {
33
+ members: memberPermissions,
34
+ roles: rolePermissions,
35
+ invitations: invitationPermissions,
36
+ dashboard: {
37
+ "see-dashboard": see("the iRanger365 dashboard of their company's clusters"),
38
+ },
39
+ clusters: {
40
+ "see-clusters": see("the company's clusters of estates"),
41
+ "manage-clusters": manage("the company's clusters and which estates each one covers"),
42
+ },
43
+ estates: {
44
+ "see-estates": see("estate details: geofence, access instructions, site rules and providers"),
45
+ "manage-estates": manage("estate details: geofence, access instructions, site rules and providers"),
46
+ },
47
+ locations: {
48
+ "see-locations": see("the locations inside an estate"),
49
+ "manage-locations": manage("the locations inside an estate"),
50
+ },
51
+ "sop-cards": {
52
+ "see-sop-cards": see("the estates' SOP cards"),
53
+ "manage-sop-cards": manage("the estates' SOP cards"),
54
+ },
55
+ contractors: {
56
+ "see-contractors": see("the estates' contractors"),
57
+ "manage-contractors": manage("the estates' contractors"),
58
+ },
59
+ "qr-tags": {
60
+ "see-qr-tags": see("QR tags and sticker sheets"),
61
+ "manage-qr-tags": manage("QR tags, print sticker sheets and replace damaged stickers"),
62
+ },
63
+ rota: {
64
+ "see-rota": see("the rangers' rota"),
65
+ "manage-rota": manage("the rangers' rota"),
66
+ },
67
+ keys: {
68
+ "see-keys": see("the key register"),
69
+ "manage-keys": manage("entries in the key register"),
70
+ },
71
+ visits: {
72
+ "work-as-ranger": {
73
+ check: true,
74
+ description: "Works in the field as an iRanger: receives jobs, checks in on site and reports back (iRanger365 app).",
75
+ },
76
+ "work-as-ambassador": {
77
+ check: true,
78
+ description: "Works in the field as a Property Ambassador (iRanger365 app).",
79
+ },
80
+ "see-visits": see("visit plans and completed visits"),
81
+ "manage-visit-plans": manage("visit plans"),
82
+ },
83
+ staff: {
84
+ "see-staff": see("the company's rangers: clusters, skills and titles"),
85
+ "manage-staff": manage("which clusters each ranger covers, their skills and titles"),
86
+ "supervise-rangers": {
87
+ check: true,
88
+ description: "Supervises rangers: sees every job in the company's clusters and is not held to a shift.",
89
+ },
90
+ },
91
+ reports: {
92
+ "see-reports": see("iRanger365 reports"),
93
+ },
94
+ "scan-log": {
95
+ "see-scan-log": see("the QR scan log"),
96
+ },
97
+ "liz-documents": {
98
+ "see-liz-documents": see("the documents Liz (the AI assistant) answers from"),
99
+ "manage-liz-documents": manage("the documents Liz (the AI assistant) answers from"),
100
+ },
101
+ "site-settings": {
102
+ "see-site-settings": see("each estate's iRanger365 settings (Code Red ladder, SMS / WhatsApp, Liz, SOS, resident sticker reports)"),
103
+ "manage-site-settings": manage("each estate's iRanger365 settings (Code Red ladder, SMS / WhatsApp, Liz, SOS, resident sticker reports)"),
104
+ },
105
+ messages: {
106
+ "see-messages": see("iRanger365 messages"),
107
+ "send-messages": { check: true, description: "Allows the user to send iRanger365 messages." },
108
+ },
109
+ };
110
+
111
+ return { permissions };
112
+ }
@@ -903,6 +903,25 @@ export default function useSecurityPermission() {
903
903
  },
904
904
  },
905
905
 
906
+ // iRanger365 Command Centre (owner, 2026-11-11: "Command Centre was run by
907
+ // the iSecure365"). Dispatch board, staff map, safety panel, alerts,
908
+ // messages and tickets for the Rangers working on the sites this security
909
+ // company is engaged on. API-core `iranger-command-centre-access.ts` maps
910
+ // these two strings; the older `iranger-command-centre:*` strings keep
911
+ // working there until staging roles are moved.
912
+ "command-centre": {
913
+ view: {
914
+ check: true,
915
+ description:
916
+ "Allows the user to watch the iRanger365 Command Centre: dispatch board, staff map, safety panel, alerts, messages and tickets (read only).",
917
+ },
918
+ operate: {
919
+ check: true,
920
+ description:
921
+ "Allows the user to run the iRanger365 Command Centre: acknowledge and resolve alerts, assign jobs, send messages and record call-outs.",
922
+ },
923
+ },
924
+
906
925
  };
907
926
 
908
927
  return {
package/constants/app.ts CHANGED
@@ -6,7 +6,8 @@ export const APP_CONSTANTS = {
6
6
  RESIDENT: "resident",
7
7
  LANDSCAPING: "landscaping_services",
8
8
  PEST_CONTROL: "pest_control_services",
9
- POOL_MAINTENANCE: "pool_maintenance_services"
9
+ POOL_MAINTENANCE: "pool_maintenance_services",
10
+ IRANGER: "estate_ranger_services"
10
11
 
11
12
 
12
13
  }
package/nuxt.config.ts CHANGED
@@ -92,6 +92,7 @@ export default defineNuxtConfig({
92
92
  APP_PEST_CONTROL: (process.env.APP_PEST_CONTROL as string) ?? "",
93
93
  APP_LANDSCAPING: (process.env.APP_LANDSCAPING as string) ?? "",
94
94
  APP_POOL_MAINTENANCE: (process.env.APP_POOL_MAINTENANCE as string) ?? "",
95
+ APP_IRANGER: (process.env.APP_IRANGER as string) ?? "",
95
96
  ENTRYPASS_ACM_URL:
96
97
  (process.env.ENTRYPASS_ACM_URL as string) ??
97
98
  "https://entrypass-xsocket.iservice365.app/",
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.671",
5
+ "version": "4.97.1-staging.673",
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.",
@@ -8,7 +8,8 @@ declare type TServiceType =
8
8
  | "mechanical_electrical_services"
9
9
  | "landscaping_services"
10
10
  | "pest_control_services"
11
- | "pool_maintenance_services";
11
+ | "pool_maintenance_services"
12
+ | "estate_ranger_services";
12
13
 
13
14
  declare type TDashboardCardValue = {
14
15
  key: string;
@@ -32,6 +32,7 @@ export const NATURE_APPLICATIONS: Readonly<Record<string, readonly string[]>> =
32
32
  pool_maintenance_services: ["pool"],
33
33
  property_management_agency: ["property-management"],
34
34
  real_estate_developer: ["property-management"],
35
+ estate_ranger_services: ["iranger"],
35
36
  });
36
37
 
37
38
  /**
@@ -5,6 +5,7 @@ import useMechanicalElectricalPermission from "../composables/useMechanicalElect
5
5
  import usePestControlPermission from "../composables/usePestControlPermission";
6
6
  import usePoolMaintenancePermission from "../composables/usePoolMaintenancePermission";
7
7
  import usePropertyPermission from "../composables/usePropertyPermission";
8
+ import useRangerPermission from "../composables/useRangerPermission";
8
9
 
9
10
  /**
10
11
  * WHICH APPLICATION EACH MODULE BELONGS TO.
@@ -69,6 +70,8 @@ export const APPLICATIONS = [
69
70
  label: "Property management",
70
71
  composable: usePropertyPermission,
71
72
  },
73
+ // iRanger365 as a standard service (owner, 2026-11-11), nature `estate_ranger_services`.
74
+ { key: "iranger", label: "iRanger365", composable: useRangerPermission },
72
75
  ] as const;
73
76
 
74
77
  export type ApplicationKey = (typeof APPLICATIONS)[number]["key"];
@@ -117,6 +117,14 @@ export const NAV_SECTIONS: Record<string, string> = {
117
117
  "Pest Control Services": "SERVICES",
118
118
  "Landscaping Services": "SERVICES",
119
119
  "Pool Maintenance Services": "SERVICES",
120
+ // Property Management's "Services at this site" groups (owner, 12 Nov 2026):
121
+ // one per provider service at the site, in the client's own words.
122
+ Cleaning: "SERVICES",
123
+ "M&E": "SERVICES",
124
+ "Pest Control": "SERVICES",
125
+ Pool: "SERVICES",
126
+ Garden: "SERVICES",
127
+ iRanger365: "SERVICES",
120
128
  };
121
129
 
122
130
  export type TSectionedNavItem<T> = { item: T; section: string };
@@ -37,6 +37,7 @@ const ACRONYMS: Record<string, string> = {
37
37
  qr: "QR",
38
38
  hid: "HID",
39
39
  id: "ID",
40
+ sop: "SOP",
40
41
  };
41
42
 
42
43
  /** Only where the rule below still reads wrong. Keep it short. */
@@ -76,6 +77,8 @@ export const RESOURCE_LABELS_BY_TYPE: Record<string, Record<string, string>> = {
76
77
  pest_control_services: { "event-mgmt": "Task Calendar", "schedule-task-mgmt": "Extra checks" },
77
78
  pool_maintenance_services: { "event-mgmt": "Task Calendar", "schedule-task-mgmt": "Extra checks" },
78
79
  landscaping_services: { "event-mgmt": "Task Calendar", "schedule-task-mgmt": "Extra checks" },
80
+ // iRanger365: `visits` holds the field roles, `site-settings` is the per-estate iRanger settings.
81
+ estate_ranger_services: { visits: "Field work and visits", "site-settings": "Estate settings" },
79
82
  };
80
83
 
81
84
  /**
package/utils/role.ts CHANGED
@@ -174,6 +174,7 @@ const ROLE_APP_LABELS: Readonly<Record<string, string>> = Object.freeze({
174
174
  pest_control_services: "Pest Control",
175
175
  pool_maintenance_services: "Pool Maintenance",
176
176
  landscaping_services: "Landscape",
177
+ estate_ranger_services: "iRanger365",
177
178
  resident: "Resident",
178
179
  });
179
180
 
@@ -22,6 +22,7 @@ const SERVICE_TYPE_LABELS: Readonly<Record<string, string>> = Object.freeze({
22
22
  pest_control_services: "Pest Control",
23
23
  landscaping_services: "Landscape",
24
24
  mechanical_electrical_services: "Mechanical & Electrical",
25
+ estate_ranger_services: "iRanger365",
25
26
  });
26
27
 
27
28
  export function serviceTypeLabel(service: string | null | undefined): string {