@neutron.co.id/operasional-modules 1.4.3 → 1.4.4
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.
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { Resource } from "@neon.id/context";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
StaffCollectionDefaultView,
|
|
4
|
+
StaffSingleDefaultView
|
|
5
|
+
} from "./staff.views.mjs";
|
|
3
6
|
import { fragments, StaffModel } from "./staff.model.mjs";
|
|
4
7
|
export const StaffResource = Resource.define({
|
|
5
8
|
model: StaffModel,
|
|
6
9
|
collection: {
|
|
7
10
|
title: "Karyawan",
|
|
8
11
|
path: "staffs",
|
|
9
|
-
component:
|
|
12
|
+
component: StaffCollectionDefaultView,
|
|
10
13
|
menu: true,
|
|
11
14
|
displays: ["table"]
|
|
12
15
|
},
|
|
13
16
|
single: {
|
|
14
|
-
path: "
|
|
15
|
-
component:
|
|
17
|
+
path: "staffs/:slug",
|
|
18
|
+
component: StaffSingleDefaultView
|
|
16
19
|
},
|
|
17
20
|
views: {
|
|
18
21
|
// collection: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const StaffCollectionDefaultView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const StaffSingleDefaultView: import("vue").DefineComponent<{
|
|
5
5
|
id: {
|
|
6
6
|
type: StringConstructor;
|
|
7
7
|
default: null;
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { ResourceUtil } from "@neon.id/office";
|
|
2
|
-
|
|
2
|
+
import { Query } from "@neon.id/query";
|
|
3
|
+
import { usePermit } from "@neon.id/context";
|
|
4
|
+
import { useOperasional } from "@neutron.co.id/operasional-interfaces";
|
|
5
|
+
export const StaffCollectionDefaultView = ResourceUtil.createCollection({
|
|
3
6
|
name: "default",
|
|
4
7
|
definition: "neu:personalia:staff",
|
|
8
|
+
query: () => {
|
|
9
|
+
const permit = usePermit();
|
|
10
|
+
const { staff } = useOperasional();
|
|
11
|
+
if (permit.is("neu:cabangPendidikan")) {
|
|
12
|
+
return Query.define({
|
|
13
|
+
filter: {
|
|
14
|
+
handle: "branchIds",
|
|
15
|
+
operator: "in",
|
|
16
|
+
value: staff.value?.branchIds
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
} else
|
|
20
|
+
return Query.define({});
|
|
21
|
+
},
|
|
5
22
|
single: {
|
|
6
23
|
peeks: ["modal"]
|
|
7
24
|
}
|
|
8
25
|
});
|
|
9
|
-
export const
|
|
26
|
+
export const StaffSingleDefaultView = ResourceUtil.createSingle({
|
|
10
27
|
name: "default",
|
|
11
28
|
definition: "neu:personalia:staff"
|
|
12
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ["CheckInCollectionExternalView","CheckInCollectionView","CheckInSingleExternalView","CheckInSingleView","
|
|
1
|
+
export default ["CheckInCollectionExternalView","CheckInCollectionView","CheckInSingleExternalView","CheckInSingleView","StaffCollectionDefaultView","StaffSingleDefaultView","SituationCollectionSupportiveView","SituationCollectionView","SituationCollectionWorkView","SituationSingleSupportiveView","SituationSingleView","SituationSingleWorkView","SituationTypeCollectionView","SituationTypeSingleView","TaskCollectionPlanView","TaskCollectionView","TaskCollectionWorkView","TaskSinglePlanView","TaskSingleView","TaskSingleWorkView"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-modules",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Modules of Neutron.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"build":
|
|
74
|
+
"build": 37
|
|
75
75
|
}
|