@neutron.co.id/operasional-modules 1.12.16 → 1.12.17
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.
|
@@ -17,7 +17,16 @@ export const LeaveQuotaResource = Resource.define({
|
|
|
17
17
|
path: "leave-quota/:slug",
|
|
18
18
|
component: "LeaveQuotaSingleView"
|
|
19
19
|
},
|
|
20
|
-
views: {
|
|
20
|
+
views: {
|
|
21
|
+
leaveQuotaStaff: {
|
|
22
|
+
path: "/pengawas/staff-leaveQuotas",
|
|
23
|
+
component: "LeaveQuotaCollectionView"
|
|
24
|
+
},
|
|
25
|
+
leaveQuotaStaffSingle: {
|
|
26
|
+
path: "/pengawas/staff-leaveQuotas/:slug",
|
|
27
|
+
component: "LeaveQuotaSingleView"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
21
30
|
fragments: LeaveQuotaModel.fragments,
|
|
22
31
|
renders: {
|
|
23
32
|
hasConflict: (item) => h(NeonLabel, {
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { usePermit } from "@neon.id/context";
|
|
1
2
|
import { ResourceUtil } from "@neon.id/office";
|
|
3
|
+
import { Query } from "@neon.id/query";
|
|
4
|
+
import { useOperasional } from "@neutron.co.id/operasional-interfaces/office";
|
|
2
5
|
export const LeaveQuotaCollectionView = ResourceUtil.createCollection({
|
|
3
6
|
name: "default",
|
|
4
7
|
definition: "neu:personalia:leaveQuota",
|
|
5
8
|
single: {
|
|
6
9
|
peeks: ["modal"]
|
|
10
|
+
},
|
|
11
|
+
query: () => {
|
|
12
|
+
const permit = usePermit();
|
|
13
|
+
const { staff } = useOperasional();
|
|
14
|
+
if (permit.isAny(["neu:pengawasSDM"])) {
|
|
15
|
+
return Query.define({
|
|
16
|
+
filter: {
|
|
17
|
+
handle: "branchIds",
|
|
18
|
+
operator: "in",
|
|
19
|
+
value: staff.value?.branchIds
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
return Query.define({});
|
|
24
|
+
}
|
|
7
25
|
}
|
|
8
26
|
});
|
|
9
27
|
export const LeaveQuotaSingleView = ResourceUtil.createSingle({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-modules",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.17",
|
|
4
4
|
"description": "Modules of Neutron Operasional.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"build":
|
|
88
|
+
"build": 115
|
|
89
89
|
}
|