@7365admin1/layer-common 3.1.4-staging.53 → 3.1.4-staging.54
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.
|
@@ -1483,6 +1483,7 @@ const props = defineProps({
|
|
|
1483
1483
|
},
|
|
1484
1484
|
title: { type: String, default: "" },
|
|
1485
1485
|
extraWidgetKeys: { type: Array as () => string[], default: () => [] },
|
|
1486
|
+
hiddenWidgetKeys: { type: Array as () => string[], default: () => [] },
|
|
1486
1487
|
showHeaderActions: { type: Boolean, default: true },
|
|
1487
1488
|
appKey: {
|
|
1488
1489
|
type: String as () =>
|
|
@@ -1530,51 +1531,26 @@ const { downloadPDF } = usePDFDownload();
|
|
|
1530
1531
|
const route = useRoute();
|
|
1531
1532
|
|
|
1532
1533
|
const propertyWidgetPermissions: Record<string, string[]> = {
|
|
1533
|
-
workOrders: [
|
|
1534
|
-
"work_orders:see-all-work-orders",
|
|
1535
|
-
"work-order:see-all-work-orders",
|
|
1536
|
-
],
|
|
1534
|
+
workOrders: ["work_orders:see-all-work-orders"],
|
|
1537
1535
|
incidents: ["incident-reports:see-incident-reports"],
|
|
1538
|
-
visitors: ["
|
|
1536
|
+
visitors: ["visitor-mgmt:see-all-visitor"],
|
|
1539
1537
|
facilityBookings: ["facility-booking-mgmt:see-all-facility-booking"],
|
|
1540
|
-
activity: [
|
|
1541
|
-
"work_orders:see-all-work-orders",
|
|
1542
|
-
"work-order:see-all-work-orders",
|
|
1543
|
-
],
|
|
1538
|
+
activity: ["work_orders:see-all-work-orders"],
|
|
1544
1539
|
upcomingEvents: ["event-mgmt:see-all-event"],
|
|
1545
1540
|
todayReminders: ["event-mgmt:see-all-event"],
|
|
1546
1541
|
todayAttentions: [
|
|
1547
1542
|
"incident-reports:see-incident-reports",
|
|
1548
1543
|
"facility-booking-mgmt:see-all-facility-booking",
|
|
1549
1544
|
],
|
|
1550
|
-
workOrderStatus: [
|
|
1551
|
-
"work_orders:see-all-work-orders",
|
|
1552
|
-
"work-order:see-all-work-orders",
|
|
1553
|
-
],
|
|
1545
|
+
workOrderStatus: ["work_orders:see-all-work-orders"],
|
|
1554
1546
|
feedbacks: ["feedbacks:see-all-feedback"],
|
|
1555
1547
|
activePatrol: ["virtual-patrol:see-all-virtual-patrol-logs"],
|
|
1556
1548
|
};
|
|
1557
1549
|
|
|
1558
1550
|
const moduleWidgetPermissions: Record<string, string[]> = {
|
|
1559
|
-
openWorkOrder: [
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
"work-order:see-all-work-orders",
|
|
1563
|
-
"work-orders:see-all-work-orders",
|
|
1564
|
-
],
|
|
1565
|
-
workOrders: [
|
|
1566
|
-
"work_orders:see-all-work-orders",
|
|
1567
|
-
"work_order:see-all-work-orders",
|
|
1568
|
-
"work-order:see-all-work-orders",
|
|
1569
|
-
"work-orders:see-all-work-orders",
|
|
1570
|
-
],
|
|
1571
|
-
activity: [
|
|
1572
|
-
"work_orders:see-all-work-orders",
|
|
1573
|
-
"work_order:see-all-work-orders",
|
|
1574
|
-
"work-order:see-all-work-orders",
|
|
1575
|
-
"work-orders:see-all-work-orders",
|
|
1576
|
-
"work_orders:see-all-work-orders",
|
|
1577
|
-
],
|
|
1551
|
+
openWorkOrder: ["work_orders:see-all-work-orders"],
|
|
1552
|
+
workOrders: ["work_orders:see-all-work-orders"],
|
|
1553
|
+
activity: ["work_orders:see-all-work-orders"],
|
|
1578
1554
|
recentActivity: [
|
|
1579
1555
|
"work_orders:see-all-work-orders",
|
|
1580
1556
|
"work_order:see-all-work-orders",
|
|
@@ -1594,7 +1570,7 @@ const moduleWidgetPermissions: Record<string, string[]> = {
|
|
|
1594
1570
|
"incident-reports:see-incident-reports",
|
|
1595
1571
|
"incident-reports:see-all-incident-reports",
|
|
1596
1572
|
],
|
|
1597
|
-
visitors: ["visitor:see-all-visitor"],
|
|
1573
|
+
visitors: ["visitor-mgmt:see-all-visitor"],
|
|
1598
1574
|
facilityBookings: ["facility-booking:see-all-facility-booking"],
|
|
1599
1575
|
patrolCompliance: [
|
|
1600
1576
|
"virtual-patrol:see-all-virtual-patrol-logs",
|
|
@@ -1610,6 +1586,7 @@ function hasSchedulePermission(permissions: string[], action: string) {
|
|
|
1610
1586
|
}
|
|
1611
1587
|
|
|
1612
1588
|
function canViewWidget(key: string) {
|
|
1589
|
+
if (props.hiddenWidgetKeys.includes(key)) return false;
|
|
1613
1590
|
const permissions = userAppRole.value?.permissions;
|
|
1614
1591
|
const modulePermissions = isPropertyMode.value
|
|
1615
1592
|
? propertyWidgetPermissions[key]
|