@7365admin1/layer-common 4.97.1-staging.614 → 4.97.1-staging.616
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/FeedbackDetail.vue +4 -2
- package/components/FeedbackMain.vue +4 -2
- package/components/WorkOrder/Detail.vue +4 -2
- package/components/WorkOrder/Main.vue +7 -4
- package/composables/useFeedback.ts +8 -6
- package/composables/useSecurityPermission.ts +10 -0
- package/composables/useWorkOrder.ts +15 -14
- package/constants/permissions.ts +13 -1
- package/package.json +1 -1
|
@@ -143,7 +143,7 @@ const {
|
|
|
143
143
|
updateFeedback,
|
|
144
144
|
updateFeedbackServiceProvider,
|
|
145
145
|
updateStatusComplete,
|
|
146
|
-
deleteFeedback: _deleteFeedback,
|
|
146
|
+
// deleteFeedback: _deleteFeedback, (retired: DELETE /api/feedbacks/:id is turned off)
|
|
147
147
|
} = useFeedback();
|
|
148
148
|
|
|
149
149
|
const { getServiceProviderNames } = useServiceProvider();
|
|
@@ -417,7 +417,9 @@ async function deleteFeedback() {
|
|
|
417
417
|
try {
|
|
418
418
|
deleteLoading.value = true;
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
421
|
+
// const response = await _deleteFeedback(feedback.value._id);
|
|
422
|
+
const response: Record<string, any> = await Promise.reject(new Error("Deleting a feedback is no longer available here."));
|
|
421
423
|
const message = response?.message || "Feedback deleted successfully";
|
|
422
424
|
showMessage(message, "success");
|
|
423
425
|
|
|
@@ -680,7 +680,7 @@ const searchText = ref("");
|
|
|
680
680
|
|
|
681
681
|
const {
|
|
682
682
|
getFeedbacks: _getFeedbacks,
|
|
683
|
-
deleteFeedback,
|
|
683
|
+
// deleteFeedback, (retired: DELETE /api/feedbacks/:id is turned off)
|
|
684
684
|
createFeedback,
|
|
685
685
|
getFeedbackById,
|
|
686
686
|
updateFeedback,
|
|
@@ -805,7 +805,9 @@ async function submitDelete() {
|
|
|
805
805
|
if (!feedbackToDelete.value) return;
|
|
806
806
|
submitting.value = true;
|
|
807
807
|
try {
|
|
808
|
-
|
|
808
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
809
|
+
// const response = await deleteFeedback(feedbackToDelete.value._id);
|
|
810
|
+
const response: Record<string, any> = await Promise.reject(new Error("Deleting a feedback is no longer available here."));
|
|
809
811
|
showMessage(response.message, "success");
|
|
810
812
|
await refreshFeedbacks();
|
|
811
813
|
} catch (error) {
|
|
@@ -48,7 +48,7 @@ const {
|
|
|
48
48
|
workOrder,
|
|
49
49
|
getWorkOrderById,
|
|
50
50
|
getWorkOrders: _getWorkOrders,
|
|
51
|
-
updateWorkOrder,
|
|
51
|
+
// updateWorkOrder, (retired: PUT /api/work-orders/:id is turned off)
|
|
52
52
|
createWorkOrder,
|
|
53
53
|
} = useWorkOrder();
|
|
54
54
|
|
|
@@ -226,7 +226,9 @@ async function submitWorkOrder() {
|
|
|
226
226
|
let res: Record<string, any> = {};
|
|
227
227
|
|
|
228
228
|
if (isEditMode.value) {
|
|
229
|
-
|
|
229
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
230
|
+
// res = await updateWorkOrder(workOrder.value._id as string, payload);
|
|
231
|
+
res = await Promise.reject(new Error("Editing a work order is no longer available here."));
|
|
230
232
|
} else {
|
|
231
233
|
res = await createWorkOrder(payload);
|
|
232
234
|
}
|
|
@@ -308,8 +308,7 @@ const {
|
|
|
308
308
|
getWorkOrders: _getWorkOrders,
|
|
309
309
|
createWorkOrder,
|
|
310
310
|
getWorkOrderById,
|
|
311
|
-
updateWorkOrder,
|
|
312
|
-
deleteWorkOrder,
|
|
311
|
+
// updateWorkOrder, deleteWorkOrder, (retired: PUT / DELETE /api/work-orders/:id are turned off)
|
|
313
312
|
} = useWorkOrder();
|
|
314
313
|
|
|
315
314
|
const page = ref(1);
|
|
@@ -479,7 +478,9 @@ async function submitWorkOrder() {
|
|
|
479
478
|
let res: Record<string, any> = {};
|
|
480
479
|
|
|
481
480
|
if (isEditMode.value) {
|
|
482
|
-
|
|
481
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
482
|
+
// res = await updateWorkOrder(_workOrderId.value as string, payload);
|
|
483
|
+
res = await Promise.reject(new Error("Editing a work order is no longer available here."));
|
|
483
484
|
} else {
|
|
484
485
|
res = await createWorkOrder(payload);
|
|
485
486
|
}
|
|
@@ -540,7 +541,9 @@ async function submitDelete() {
|
|
|
540
541
|
if (!workOrderToDelete.value) return;
|
|
541
542
|
submitting.value = true;
|
|
542
543
|
try {
|
|
543
|
-
|
|
544
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
545
|
+
// const response = await deleteWorkOrder(workOrderToDelete.value._id);
|
|
546
|
+
const response: Record<string, any> = await Promise.reject(new Error("Deleting a work order is no longer available here."));
|
|
544
547
|
showMessage(response.message, "success");
|
|
545
548
|
await getAllReqRefresh();
|
|
546
549
|
} catch (error) {
|
|
@@ -197,11 +197,13 @@ export default function useFeedback() {
|
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
201
|
+
// A feedback is deleted with POST /api/feedbacks2/status-update, status "Deleted".
|
|
202
|
+
// function deleteFeedback(id: string) {
|
|
203
|
+
// return useNuxtApp().$api<Record<string, any>>(`/api/feedbacks/${id}`, {
|
|
204
|
+
// method: "DELETE",
|
|
205
|
+
// });
|
|
206
|
+
// }
|
|
205
207
|
|
|
206
208
|
return {
|
|
207
209
|
feedbacks,
|
|
@@ -214,7 +216,7 @@ export default function useFeedback() {
|
|
|
214
216
|
getFeedbackById,
|
|
215
217
|
createFeedback,
|
|
216
218
|
updateFeedback,
|
|
217
|
-
deleteFeedback,
|
|
219
|
+
// deleteFeedback, (retired, see above)
|
|
218
220
|
updateFeedbackServiceProvider,
|
|
219
221
|
updateStatusComplete,
|
|
220
222
|
addFeedBackWorkOrder,
|
|
@@ -830,6 +830,16 @@ export default function useSecurityPermission() {
|
|
|
830
830
|
description:
|
|
831
831
|
"Allows the user to view site visits across the sites they can reach, including other executives' visits.",
|
|
832
832
|
},
|
|
833
|
+
"manage-ops-sites": {
|
|
834
|
+
check: true,
|
|
835
|
+
description:
|
|
836
|
+
"Allows the user to add sites that are not on iSecure365 to Security Ops, edit or deactivate them, and remove people from a site.",
|
|
837
|
+
},
|
|
838
|
+
"work-at-ops-sites": {
|
|
839
|
+
check: true,
|
|
840
|
+
description:
|
|
841
|
+
"Puts the user on every Ops site of the company automatically, including sites added later. They can be removed from a single site in Ops Settings.",
|
|
842
|
+
},
|
|
833
843
|
},
|
|
834
844
|
// NEW. Seeing the CCTV wall, as distinct from setting cameras up
|
|
835
845
|
// (`site-settings:manage-cctv-camera`).
|
|
@@ -143,18 +143,20 @@ export default function useWorkOrder() {
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
146
|
+
// RETIRED 2026-10-29: the old /api/feedbacks and /api/work-orders routes are turned off in API-core; use /api/feedbacks2 and /api/work-orders2.
|
|
147
|
+
// A work order is deleted with POST /api/work-orders2/status-update, status "Deleted".
|
|
148
|
+
// function updateWorkOrder(id: string, payload: object) {
|
|
149
|
+
// return useNuxtApp().$api<Record<string, any>>(`/api/work-orders/${id}`, {
|
|
150
|
+
// method: "PUT",
|
|
151
|
+
// body: payload,
|
|
152
|
+
// });
|
|
153
|
+
// }
|
|
154
|
+
//
|
|
155
|
+
// function deleteWorkOrder(id: string) {
|
|
156
|
+
// return useNuxtApp().$api<Record<string, any>>(`/api/work-orders/${id}`, {
|
|
157
|
+
// method: "DELETE",
|
|
158
|
+
// });
|
|
159
|
+
// }
|
|
158
160
|
|
|
159
161
|
// function deleteWorkOrder(id: string) {
|
|
160
162
|
// return useNuxtApp().$api<Record<string, any>>(
|
|
@@ -194,8 +196,7 @@ export default function useWorkOrder() {
|
|
|
194
196
|
updateStatusWorkOrder,
|
|
195
197
|
getWorkOrders,
|
|
196
198
|
getWorkOrderById,
|
|
197
|
-
updateWorkOrder,
|
|
198
|
-
deleteWorkOrder,
|
|
199
|
+
// updateWorkOrder, deleteWorkOrder (retired, see above)
|
|
199
200
|
getWorkOrderSettings,
|
|
200
201
|
createWorkOrderSettings,
|
|
201
202
|
};
|
package/constants/permissions.ts
CHANGED
|
@@ -355,7 +355,19 @@ export const PERMISSIONS = {
|
|
|
355
355
|
// administers this site, not that they run security at it - measured
|
|
356
356
|
// 2026-10-13, every wildcard holder at a live site was an org owner, a test
|
|
357
357
|
// account or a service provider's administrator.
|
|
358
|
-
|
|
358
|
+
//
|
|
359
|
+
// `manage-ops-sites` and `work-at-ops-sites` (2026-10-30): a security company
|
|
360
|
+
// adds its own sites, including ones not on iSecure365, in Security Ops, Ops
|
|
361
|
+
// Settings. The first lets a role add, edit and deactivate those sites and
|
|
362
|
+
// remove people from one; the second puts the holder on every Ops site of
|
|
363
|
+
// their company, computed by API-core's reach rule rather than copied
|
|
364
|
+
// memberships, so a later hire needs nothing per site.
|
|
365
|
+
"security-ops": [
|
|
366
|
+
"start-site-visit",
|
|
367
|
+
"see-all-site-visits",
|
|
368
|
+
"manage-ops-sites",
|
|
369
|
+
"work-at-ops-sites",
|
|
370
|
+
],
|
|
359
371
|
// Owner answer Q9, 2026-09-11: seeing the CCTV wall. Distinct from
|
|
360
372
|
// `site-settings:manage-cctv-camera`, which is camera setup.
|
|
361
373
|
"cctv-mgmt": ["see-all-cctv", "view-recordings"],
|
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.616",
|
|
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.",
|