@7365admin1/layer-common 4.97.1-staging.676 → 4.97.1-staging.678

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.
@@ -42,7 +42,7 @@
42
42
  Export CSV
43
43
  </v-btn>
44
44
  <v-btn
45
- v-if="canManageAttendanceSettings || canManageSiteDeviceMode"
45
+ v-if="!readOnly && (canManageAttendanceSettings || canManageSiteDeviceMode)"
46
46
  variant="outlined"
47
47
  class="text-none screen-btn-ghost"
48
48
  @click="dialogShowSettings = true"
@@ -131,6 +131,12 @@ const props = defineProps({
131
131
  canViewAllAttendance: { type: Boolean, default: false },
132
132
  canViewAttendanceDetails: { type: Boolean, default: false },
133
133
  canManageAttendanceSettings: { type: Boolean, default: false },
134
+ /**
135
+ * View-only screen (the managing agent's view of a provider's attendance).
136
+ * Hides Settings even for a `*` role, whose site-device-mode right comes from
137
+ * `useAttendancePermission` (the provider apps' catalogue), not from a prop.
138
+ */
139
+ readOnly: { type: Boolean, default: false },
134
140
  });
135
141
 
136
142
  const canViewAllAttendance = computed(() => props.canViewAllAttendance);
@@ -7,6 +7,7 @@
7
7
  :site="site"
8
8
  :service-type="serviceType"
9
9
  :schedule-route="scheduleRoute"
10
+ :read-only="readOnly"
10
11
  text="The app makes a new checklist for every area automatically each midnight. Staff tick off each unit on their mobile app; you follow progress here."
11
12
  how-title="How the Daily Checklist works"
12
13
  how-key="daily-checklist"
@@ -28,7 +29,11 @@
28
29
  reaches zero the day's list closes: it becomes view-only, and any
29
30
  unit not ticked counts as <strong>Missed</strong>.
30
31
  </li>
31
- <li>
32
+ <li v-if="readOnly">
33
+ Click a row to see its areas, then an area to see each unit — who
34
+ did it, when, remarks and photos.
35
+ </li>
36
+ <li v-else>
32
37
  Click a row to see its areas, then an area to see each unit,
33
38
  send a unit back (<strong>Needs redo</strong>) or add a remark.
34
39
  </li>
@@ -208,6 +213,8 @@ const props = defineProps({
208
213
  canDownloadSchedule: { type: Boolean, default: false },
209
214
  canManageScheduleTasks: { type: Boolean, default: false },
210
215
  canGenerateChecklist: { type: Boolean, default: false },
216
+ /** View-only screen (the managing agent's view): hides the setup link. Pass every can-manage flag false too. */
217
+ readOnly: { type: Boolean, default: false },
211
218
  });
212
219
 
213
220
  // "Daily Checklist – Cleaning" / "– Landscape" / "– Pest" / "– Pool" / "– Technician"
@@ -1365,6 +1365,13 @@ const props = defineProps({
1365
1365
  orgSlug: { type: String, default: "" },
1366
1366
  siteSlug: { type: String, default: "" },
1367
1367
  printMode: { type: Boolean, default: false },
1368
+ /**
1369
+ * Where a tile's "view all" / row click goes, by route key (`attendance`,
1370
+ * `scheduleTask`, `feedbacks`, ...), relative to `/{org}/{site}/`. Overrides
1371
+ * the built-in paths for an app whose pages live elsewhere - e.g. Property
1372
+ * Management shows a provider's Daily Checklist under `services/cleaning/checklist`.
1373
+ */
1374
+ routes: { type: Object as () => Record<string, string>, default: () => ({}) },
1368
1375
  });
1369
1376
 
1370
1377
  const emit = defineEmits<{
@@ -3602,7 +3609,7 @@ function goToDashboardRoute(routeKey: string) {
3602
3609
  calendar: "calendar",
3603
3610
  "incident-reports": "incident-reports",
3604
3611
  };
3605
- const path = pathMap[routeKey] || routeKey;
3612
+ const path = props.routes[routeKey] || pathMap[routeKey] || routeKey;
3606
3613
  router.push(`/${props.orgId}/${props.site}/${path}`);
3607
3614
  }
3608
3615
 
@@ -3620,7 +3627,7 @@ function goToListItem(item: TaskItem | FeedbackItem, routeKey: string) {
3620
3627
  feedbacks: "feedbacks",
3621
3628
  scheduleTask: getSchedulePath(),
3622
3629
  };
3623
- const path = pathMap[routeKey] || routeKey;
3630
+ const path = props.routes[routeKey] || pathMap[routeKey] || routeKey;
3624
3631
  const scheduleId = item.raw?.schedule?._id || item.raw?.schedule;
3625
3632
  if (routeKey === "scheduleTask" && scheduleId) {
3626
3633
  router.push(`/${props.orgId}/${props.site}/${path}/${scheduleId}/${id}`);
@@ -16,7 +16,11 @@
16
16
  </StatusChip>
17
17
  </v-col>
18
18
  </v-row>
19
- <p class="checklist-intro" data-test="checklist-intro">
19
+ <p v-if="readOnly" class="checklist-intro" data-test="checklist-intro">
20
+ Each visit lists this area's units as the provider's staff ticked them.
21
+ A visit marked "Extra check" was added from the Task Calendar.
22
+ </p>
23
+ <p v-else class="checklist-intro" data-test="checklist-intro">
20
24
  Each visit lists this area's units. Staff tick them on their phone; here
21
25
  you can mark a unit <strong>Done</strong> (&#10003;) or send it back with
22
26
  <strong>Needs redo</strong> (&#10007;, with a remark). The last unit of a
@@ -487,6 +491,8 @@ const props = defineProps({
487
491
  serviceType: { type: String, default: "" },
488
492
  canAddRemarks: { type: Boolean, default: false },
489
493
  canManageScheduleTasks: { type: Boolean, default: false },
494
+ /** View-only screen (the managing agent's view): view-only intro. Pass both can-flags false too. */
495
+ readOnly: { type: Boolean, default: false },
490
496
  });
491
497
 
492
498
  const { getUnitCleanerChecklist, updateUnitChecklist } = useCleaningSchedules();
@@ -6,7 +6,8 @@
6
6
  :site="site"
7
7
  :service-type="serviceType"
8
8
  :schedule-route="scheduleRoute"
9
- text="These are the areas on this day's checklist. Click an area to see each unit, tick it as done, or send it back to be redone. Visits today counts the area's normal visits plus any extra checks added today."
9
+ :read-only="readOnly"
10
+ :text="guideText"
10
11
  />
11
12
  <!--
12
13
  DV-0998 / DV-1003: an area set up during the day is not on that day's
@@ -194,10 +195,15 @@ const props = defineProps({
194
195
  // Common / Toilet is a cleaning distinction; apps without it hide the Type
195
196
  // filter and column (saved `type` values are untouched).
196
197
  showAreaType: { type: Boolean, default: true },
198
+ /** View-only screen (the managing agent's view): hides the setup link. Pass every can-manage flag false too. */
199
+ readOnly: { type: Boolean, default: false },
197
200
  });
198
201
 
199
202
  // "Daily Checklist – Cleaning" / "– Landscape" / ... (same title as the day list)
200
203
  const pageTitle = dailyChecklistTitle(props.serviceType);
204
+ const guideText = props.readOnly
205
+ ? "These are the areas on this day's checklist. Click an area to see each unit. Visits today counts the area's normal visits plus any extra checks added today."
206
+ : "These are the areas on this day's checklist. Click an area to see each unit, tick it as done, or send it back to be redone. Visits today counts the area's normal visits plus any extra checks added today.";
201
207
 
202
208
  const submitting = ref(false);
203
209
  const message = ref("");
@@ -43,7 +43,7 @@
43
43
  <ul class="schedule-guide__list">
44
44
  <li v-for="p in problems" :key="p">{{ p }}</li>
45
45
  </ul>
46
- <template #append>
46
+ <template v-if="!readOnly" #append>
47
47
  <v-btn
48
48
  :to="areaLink"
49
49
  variant="outlined"
@@ -71,6 +71,8 @@ const props = defineProps({
71
71
  howTitle: { type: String, default: "" },
72
72
  /** Remembers open/closed per panel on this browser. */
73
73
  howKey: { type: String, default: "" },
74
+ /** View-only screen (e.g. the managing agent's view): no "Set up Areas and Units" link. */
75
+ readOnly: { type: Boolean, default: false },
74
76
  });
75
77
 
76
78
  const HOW_STORE = () => `schedule-guide-how:${props.howKey || props.howTitle}`;
@@ -669,6 +669,25 @@ export default function usePropertyPermission() {
669
669
  },
670
670
  "robot-mgmt": robotPermissions,
671
671
  "cctv-engine": cctvEnginePermissions,
672
+ // The managing agent's VIEW of the providers at the site (owner, 13 Nov 2026):
673
+ // "Services at this site" > Cleaning / M&E / Pest Control / Pool / Garden >
674
+ // Dashboard, Daily Checklist, Attendance. View only - the strings are the
675
+ // providers' own "see all" keys, which API-core's staff-lists guard and the
676
+ // dashboard tiles already accept, so no new string is invented.
677
+ "cleaning-schedule-mgmt": {
678
+ "see-all-schedules": {
679
+ check: true,
680
+ description:
681
+ "Allows the user to view the service providers' daily checklists at the site (areas, units and history). View only.",
682
+ },
683
+ },
684
+ "attendance-mgmt": {
685
+ "see-all-attendance": {
686
+ check: true,
687
+ description:
688
+ "Allows the user to view the service providers' staff attendance at the site. View only.",
689
+ },
690
+ },
672
691
  "site-settings": siteSettingsPermissions
673
692
  };
674
693
 
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.676",
5
+ "version": "4.97.1-staging.678",
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.",