@7365admin1/layer-common 4.97.1-staging.676 → 4.97.1-staging.677
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/components/AttendanceMain.vue +7 -1
- package/components/CleaningScheduleMain.vue +3 -0
- package/components/DashboardMain.vue +9 -2
- package/components/ScheduleAreaMain.vue +3 -0
- package/components/ScheduleGuide.vue +3 -1
- package/composables/usePropertyPermission.ts +19 -0
- package/package.json +1 -1
|
@@ -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"
|
|
@@ -208,6 +209,8 @@ const props = defineProps({
|
|
|
208
209
|
canDownloadSchedule: { type: Boolean, default: false },
|
|
209
210
|
canManageScheduleTasks: { type: Boolean, default: false },
|
|
210
211
|
canGenerateChecklist: { type: Boolean, default: false },
|
|
212
|
+
/** View-only screen (the managing agent's view): hides the setup link. Pass every can-manage flag false too. */
|
|
213
|
+
readOnly: { type: Boolean, default: false },
|
|
211
214
|
});
|
|
212
215
|
|
|
213
216
|
// "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}`);
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:site="site"
|
|
7
7
|
:service-type="serviceType"
|
|
8
8
|
:schedule-route="scheduleRoute"
|
|
9
|
+
:read-only="readOnly"
|
|
9
10
|
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."
|
|
10
11
|
/>
|
|
11
12
|
<!--
|
|
@@ -194,6 +195,8 @@ 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)
|
|
@@ -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.
|
|
5
|
+
"version": "4.97.1-staging.677",
|
|
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.",
|