@neutron.co.id/operasional-modules 1.5.1-beta.1 → 1.6.0
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/build/index.cjs +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.mjs +1 -0
- package/build/personalia/exports.d.ts +1 -0
- package/build/personalia/exports.mjs +1 -0
- package/build/personalia/index.d.ts +2 -0
- package/build/personalia/index.mjs +42 -0
- package/build/personalia/module.d.ts +2 -0
- package/build/personalia/module.mjs +25 -0
- package/build/personalia/plugin.d.ts +2 -0
- package/build/personalia/plugin.mjs +10 -0
- package/build/personalia/resources/checkIn/checkIn.model.d.ts +6 -0
- package/build/personalia/resources/checkIn/checkIn.model.mjs +27 -0
- package/build/personalia/resources/checkIn/checkIn.resource.d.ts +2 -0
- package/build/personalia/resources/checkIn/checkIn.resource.mjs +45 -0
- package/build/personalia/resources/checkIn/checkIn.views.d.ts +72 -0
- package/build/personalia/resources/checkIn/checkIn.views.mjs +32 -0
- package/build/personalia/resources/checkIn/index.d.ts +2 -0
- package/build/personalia/resources/checkIn/index.mjs +2 -0
- package/build/personalia/resources/index.d.ts +7 -0
- package/build/personalia/resources/index.mjs +7 -0
- package/build/personalia/resources/situation/index.d.ts +2 -0
- package/build/personalia/resources/situation/index.mjs +2 -0
- package/build/personalia/resources/situation/situation.model.d.ts +6 -0
- package/build/personalia/resources/situation/situation.model.mjs +46 -0
- package/build/personalia/resources/situation/situation.resource.d.ts +2 -0
- package/build/personalia/resources/situation/situation.resource.mjs +47 -0
- package/build/personalia/resources/situation/situation.views.d.ts +108 -0
- package/build/personalia/resources/situation/situation.views.mjs +155 -0
- package/build/personalia/resources/situationType/index.d.ts +2 -0
- package/build/personalia/resources/situationType/index.mjs +2 -0
- package/build/personalia/resources/situationType/situationType.model.d.ts +6 -0
- package/build/personalia/resources/situationType/situationType.model.mjs +20 -0
- package/build/personalia/resources/situationType/situationType.resource.d.ts +2 -0
- package/build/personalia/resources/situationType/situationType.resource.mjs +26 -0
- package/build/personalia/resources/situationType/situationType.views.d.ts +36 -0
- package/build/personalia/resources/situationType/situationType.views.mjs +12 -0
- package/build/personalia/resources/staff/index.d.ts +2 -0
- package/build/personalia/resources/staff/index.mjs +2 -0
- package/build/personalia/resources/staff/staff.model.d.ts +6 -0
- package/build/personalia/resources/staff/staff.model.mjs +41 -0
- package/build/personalia/resources/staff/staff.resource.d.ts +2 -0
- package/build/personalia/resources/staff/staff.resource.mjs +45 -0
- package/build/personalia/resources/staff/staff.views.d.ts +72 -0
- package/build/personalia/resources/staff/staff.views.mjs +49 -0
- package/build/personalia/resources/submission/index.d.ts +2 -0
- package/build/personalia/resources/submission/index.mjs +2 -0
- package/build/personalia/resources/submission/submission.model.d.ts +6 -0
- package/build/personalia/resources/submission/submission.model.mjs +74 -0
- package/build/personalia/resources/submission/submission.resource.d.ts +2 -0
- package/build/personalia/resources/submission/submission.resource.mjs +80 -0
- package/build/personalia/resources/submission/submission.views.d.ts +180 -0
- package/build/personalia/resources/submission/submission.views.mjs +316 -0
- package/build/personalia/resources/submissionType/index.d.ts +2 -0
- package/build/personalia/resources/submissionType/index.mjs +2 -0
- package/build/personalia/resources/submissionType/submissionType.model.d.ts +6 -0
- package/build/personalia/resources/submissionType/submissionType.model.mjs +21 -0
- package/build/personalia/resources/submissionType/submissionType.resource.d.ts +2 -0
- package/build/personalia/resources/submissionType/submissionType.resource.mjs +26 -0
- package/build/personalia/resources/submissionType/submissionType.views.d.ts +36 -0
- package/build/personalia/resources/submissionType/submissionType.views.mjs +9 -0
- package/build/personalia/resources/task/index.d.ts +2 -0
- package/build/personalia/resources/task/index.mjs +2 -0
- package/build/personalia/resources/task/task.model.d.ts +6 -0
- package/build/personalia/resources/task/task.model.mjs +60 -0
- package/build/personalia/resources/task/task.resource.d.ts +2 -0
- package/build/personalia/resources/task/task.resource.mjs +44 -0
- package/build/personalia/resources/task/task.views.d.ts +108 -0
- package/build/personalia/resources/task/task.views.mjs +159 -0
- package/build/personalia/views.mjs +1 -0
- package/package.json +12 -12
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Query } from "@neon.id/query";
|
|
2
|
+
import { ResourceUtil } from "@neon.id/office";
|
|
3
|
+
import { useOperasional } from "@neutron.co.id/operasional-interfaces";
|
|
4
|
+
import { usePermit } from "@neon.id/context";
|
|
5
|
+
export const SituationCollectionView = ResourceUtil.createCollection({
|
|
6
|
+
name: "default",
|
|
7
|
+
definition: "neu:personalia:situation"
|
|
8
|
+
});
|
|
9
|
+
export const SituationSingleView = ResourceUtil.createSingle({
|
|
10
|
+
name: "default",
|
|
11
|
+
definition: "neu:personalia:situation"
|
|
12
|
+
});
|
|
13
|
+
export const SituationCollectionWorkView = ResourceUtil.createCollection({
|
|
14
|
+
name: "work",
|
|
15
|
+
definition: "neu:personalia:situation",
|
|
16
|
+
title: "Situasi",
|
|
17
|
+
icon: "water",
|
|
18
|
+
scope: "work",
|
|
19
|
+
path: "/pekerjaan/situations",
|
|
20
|
+
single: {
|
|
21
|
+
view: "work",
|
|
22
|
+
peeks: ["modal"]
|
|
23
|
+
// initialValues: () => {
|
|
24
|
+
// const { staff } = useOperasional()
|
|
25
|
+
// return {
|
|
26
|
+
// situationReportedByIds: [staff.value?.id || ''],
|
|
27
|
+
// situationReportedBy: [
|
|
28
|
+
// {
|
|
29
|
+
// id: staff.value?.id,
|
|
30
|
+
// display: staff.value?.display,
|
|
31
|
+
// },
|
|
32
|
+
// ],
|
|
33
|
+
// }
|
|
34
|
+
// },
|
|
35
|
+
},
|
|
36
|
+
columns: [
|
|
37
|
+
"situationStatus",
|
|
38
|
+
"situationType",
|
|
39
|
+
"situationReportedBy",
|
|
40
|
+
"situationResponse",
|
|
41
|
+
"branches",
|
|
42
|
+
"urgentSituationDate",
|
|
43
|
+
"situationRelatedBy",
|
|
44
|
+
"situationSupportedBy"
|
|
45
|
+
],
|
|
46
|
+
query: () => {
|
|
47
|
+
const permit = usePermit();
|
|
48
|
+
const { staff } = useOperasional();
|
|
49
|
+
if (permit.is("neu:cabangOperasional")) {
|
|
50
|
+
return Query.define({
|
|
51
|
+
filter: {
|
|
52
|
+
handle: "branchIds",
|
|
53
|
+
operator: "in",
|
|
54
|
+
value: staff.value?.branchIds
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (permit.is("neu:karyawan")) {
|
|
59
|
+
return Query.define({
|
|
60
|
+
filter: {
|
|
61
|
+
handle: "",
|
|
62
|
+
operator: "mongo",
|
|
63
|
+
value: {
|
|
64
|
+
$and: [
|
|
65
|
+
{
|
|
66
|
+
$or: [
|
|
67
|
+
{
|
|
68
|
+
situationReportedByIds: staff.value?.id
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
situationRelatedByIds: staff.value?.id
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
userId: staff.value?.userId
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export const SituationSingleWorkView = ResourceUtil.createSingle({
|
|
86
|
+
name: "work",
|
|
87
|
+
title: "Situasi",
|
|
88
|
+
definition: "neu:personalia:situation",
|
|
89
|
+
slots: {
|
|
90
|
+
default: "work"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export const SituationCollectionSupportiveView = ResourceUtil.createCollection({
|
|
94
|
+
name: "supportive",
|
|
95
|
+
definition: "neu:personalia:situation",
|
|
96
|
+
title: "Suportif",
|
|
97
|
+
icon: "water",
|
|
98
|
+
scope: "supportive",
|
|
99
|
+
path: "/pekerjaan/supportives",
|
|
100
|
+
single: {
|
|
101
|
+
view: "supportive",
|
|
102
|
+
peeks: ["modal"]
|
|
103
|
+
},
|
|
104
|
+
columns: [
|
|
105
|
+
"situationStatus",
|
|
106
|
+
"situationType",
|
|
107
|
+
"situationReportedBy",
|
|
108
|
+
"situationResponse",
|
|
109
|
+
"branches",
|
|
110
|
+
"urgentSituationDate",
|
|
111
|
+
"situationRelatedBy",
|
|
112
|
+
"situationSupportedBy"
|
|
113
|
+
],
|
|
114
|
+
excludes: ["create"],
|
|
115
|
+
filters: ["situationSupportedBy"],
|
|
116
|
+
query: () => {
|
|
117
|
+
const permit = usePermit();
|
|
118
|
+
const { staff } = useOperasional();
|
|
119
|
+
if (permit.is("neu:cabangOperasional")) {
|
|
120
|
+
return Query.define({
|
|
121
|
+
filter: {
|
|
122
|
+
handle: "branchIds",
|
|
123
|
+
operator: "in",
|
|
124
|
+
value: staff.value?.branchIds
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
if (permit.is("neu:karyawan")) {
|
|
129
|
+
return Query.define({
|
|
130
|
+
filter: {
|
|
131
|
+
handle: "",
|
|
132
|
+
operator: "mongo",
|
|
133
|
+
value: {
|
|
134
|
+
$or: [
|
|
135
|
+
{
|
|
136
|
+
situationSupportedByIds: staff.value?.id
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
userId: staff.value?.userId
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
export const SituationSingleSupportiveView = ResourceUtil.createSingle({
|
|
149
|
+
name: "supportive",
|
|
150
|
+
title: "Suportif",
|
|
151
|
+
definition: "neu:personalia:situation",
|
|
152
|
+
slots: {
|
|
153
|
+
default: "supportive"
|
|
154
|
+
}
|
|
155
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SituationTypeModel: import("@neon.id/model").Model<"neu:personalia:situationType", "branches" | "situationTypeName">;
|
|
2
|
+
export type TSituationTypeModel = typeof SituationTypeModel;
|
|
3
|
+
export declare const fragments: {
|
|
4
|
+
item: Schema.SituationType;
|
|
5
|
+
detail: Schema.Task;
|
|
6
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { models } from "@neutron.co.id/personalia-models";
|
|
2
|
+
export const SituationTypeModel = models.SituationTypeModel;
|
|
3
|
+
const item = {
|
|
4
|
+
id: 1,
|
|
5
|
+
display: 1,
|
|
6
|
+
flag: 1,
|
|
7
|
+
situationTypeName: 1,
|
|
8
|
+
branches: {
|
|
9
|
+
id: 1,
|
|
10
|
+
display: 1
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const detail = {
|
|
14
|
+
...item,
|
|
15
|
+
branchIds: 1
|
|
16
|
+
};
|
|
17
|
+
export const fragments = {
|
|
18
|
+
item,
|
|
19
|
+
detail
|
|
20
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Resource } from "@neon.id/context";
|
|
2
|
+
import {
|
|
3
|
+
SituationTypeCollectionView,
|
|
4
|
+
SituationTypeSingleView
|
|
5
|
+
} from "./situationType.views.mjs";
|
|
6
|
+
import {
|
|
7
|
+
fragments,
|
|
8
|
+
SituationTypeModel
|
|
9
|
+
} from "./situationType.model.mjs";
|
|
10
|
+
export const SituationTypeResource = Resource.define({
|
|
11
|
+
model: SituationTypeModel,
|
|
12
|
+
collection: {
|
|
13
|
+
title: "Tipe Situasi",
|
|
14
|
+
path: "situation-types",
|
|
15
|
+
component: SituationTypeCollectionView,
|
|
16
|
+
menu: true,
|
|
17
|
+
displays: ["table"]
|
|
18
|
+
},
|
|
19
|
+
single: {
|
|
20
|
+
path: "situation-types/:slug",
|
|
21
|
+
component: SituationTypeSingleView
|
|
22
|
+
},
|
|
23
|
+
views: {},
|
|
24
|
+
fragments,
|
|
25
|
+
renders: {}
|
|
26
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const SituationTypeCollectionView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
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 SituationTypeSingleView: import("vue").DefineComponent<{
|
|
5
|
+
id: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
isNew: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
isMain: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
id: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
isNew: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
isMain: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
id: string;
|
|
34
|
+
isNew: boolean;
|
|
35
|
+
isMain: boolean;
|
|
36
|
+
}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResourceUtil } from "@neon.id/office";
|
|
2
|
+
export const SituationTypeCollectionView = ResourceUtil.createCollection({
|
|
3
|
+
name: "default",
|
|
4
|
+
definition: "neu:personalia:situationType",
|
|
5
|
+
single: {
|
|
6
|
+
peeks: ["modal"]
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export const SituationTypeSingleView = ResourceUtil.createSingle({
|
|
10
|
+
name: "default",
|
|
11
|
+
definition: "neu:personalia:situationType"
|
|
12
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const StaffModel: import("@neon.id/model").Model<"neu:personalia:staff", "user" | "note" | "image" | "name" | "branches" | "branch" | "nik" | "birthPlace" | "birthDate">;
|
|
2
|
+
export type TStaffModel = typeof StaffModel;
|
|
3
|
+
export declare const fragments: {
|
|
4
|
+
item: Schema.Staff;
|
|
5
|
+
detail: Schema.Staff;
|
|
6
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { models } from "@neutron.co.id/personalia-models";
|
|
2
|
+
export const StaffModel = models.StaffModel;
|
|
3
|
+
const item = {
|
|
4
|
+
id: 1,
|
|
5
|
+
display: 1,
|
|
6
|
+
flag: 1,
|
|
7
|
+
name: 1,
|
|
8
|
+
nik: 1,
|
|
9
|
+
birthDate: 1,
|
|
10
|
+
birthPlace: 1,
|
|
11
|
+
image: 1,
|
|
12
|
+
branch: {
|
|
13
|
+
id: 1,
|
|
14
|
+
display: 1,
|
|
15
|
+
name: 1
|
|
16
|
+
},
|
|
17
|
+
branches: {
|
|
18
|
+
id: 1,
|
|
19
|
+
display: 1,
|
|
20
|
+
name: 1
|
|
21
|
+
},
|
|
22
|
+
note: 1,
|
|
23
|
+
user: {
|
|
24
|
+
id: 1,
|
|
25
|
+
display: 1,
|
|
26
|
+
username: 1,
|
|
27
|
+
email: 1,
|
|
28
|
+
phone: 1,
|
|
29
|
+
roleIds: 1
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const detail = {
|
|
33
|
+
...item,
|
|
34
|
+
branchId: 1,
|
|
35
|
+
branchIds: 1,
|
|
36
|
+
userId: 1
|
|
37
|
+
};
|
|
38
|
+
export const fragments = {
|
|
39
|
+
item,
|
|
40
|
+
detail
|
|
41
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Resource } from "@neon.id/context";
|
|
2
|
+
import {
|
|
3
|
+
StaffCollectionView,
|
|
4
|
+
StaffCollectionOperasionalView,
|
|
5
|
+
StaffSingleView,
|
|
6
|
+
StaffSingleOperasionalView
|
|
7
|
+
} from "./staff.views.mjs";
|
|
8
|
+
import { fragments, StaffModel } from "./staff.model.mjs";
|
|
9
|
+
export const StaffResource = Resource.define({
|
|
10
|
+
model: StaffModel,
|
|
11
|
+
collection: {
|
|
12
|
+
title: "Karyawan",
|
|
13
|
+
path: "staffs",
|
|
14
|
+
component: StaffCollectionView,
|
|
15
|
+
menu: true,
|
|
16
|
+
displays: ["table"]
|
|
17
|
+
},
|
|
18
|
+
single: {
|
|
19
|
+
path: "staffs/:slug",
|
|
20
|
+
component: StaffSingleView
|
|
21
|
+
},
|
|
22
|
+
views: {
|
|
23
|
+
// collection: {
|
|
24
|
+
// path: 'staffs',
|
|
25
|
+
// label: 'Staffs',
|
|
26
|
+
// icon: 'door-open',
|
|
27
|
+
// menu: true,
|
|
28
|
+
// component: StaffCollectionView,
|
|
29
|
+
// },
|
|
30
|
+
// single: {
|
|
31
|
+
// path: 'staffs/:slug',
|
|
32
|
+
// component: StaffSingleView,
|
|
33
|
+
// },
|
|
34
|
+
staffOperasional: {
|
|
35
|
+
path: "/operasional/staffs",
|
|
36
|
+
component: StaffCollectionOperasionalView
|
|
37
|
+
},
|
|
38
|
+
staffOperasionalSingle: {
|
|
39
|
+
path: "/operasional/staffs/:slug",
|
|
40
|
+
component: StaffSingleOperasionalView
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
fragments,
|
|
44
|
+
renders: {}
|
|
45
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const StaffCollectionView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
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 StaffSingleView: import("vue").DefineComponent<{
|
|
5
|
+
id: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
isNew: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
isMain: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
id: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
isNew: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
isMain: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
id: string;
|
|
34
|
+
isNew: boolean;
|
|
35
|
+
isMain: boolean;
|
|
36
|
+
}, {}>;
|
|
37
|
+
export declare const StaffCollectionOperasionalView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
40
|
+
export declare const StaffSingleOperasionalView: import("vue").DefineComponent<{
|
|
41
|
+
id: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
45
|
+
isNew: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: null;
|
|
48
|
+
};
|
|
49
|
+
isMain: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
|
+
id: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: null;
|
|
59
|
+
};
|
|
60
|
+
isNew: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: null;
|
|
63
|
+
};
|
|
64
|
+
isMain: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
}>>, {
|
|
69
|
+
id: string;
|
|
70
|
+
isNew: boolean;
|
|
71
|
+
isMain: boolean;
|
|
72
|
+
}, {}>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ResourceUtil } from "@neon.id/office";
|
|
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 StaffCollectionView = ResourceUtil.createCollection({
|
|
6
|
+
name: "default",
|
|
7
|
+
definition: "neu:personalia:staff",
|
|
8
|
+
single: {
|
|
9
|
+
peeks: ["modal"]
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export const StaffSingleView = ResourceUtil.createSingle({
|
|
13
|
+
name: "default",
|
|
14
|
+
definition: "neu:personalia:staff"
|
|
15
|
+
});
|
|
16
|
+
export const StaffCollectionOperasionalView = ResourceUtil.createCollection({
|
|
17
|
+
name: "operasional",
|
|
18
|
+
definition: "neu:personalia:staff",
|
|
19
|
+
title: "Karyawan",
|
|
20
|
+
icon: "user-tie",
|
|
21
|
+
scope: "operasional",
|
|
22
|
+
path: "/operasional/staffs",
|
|
23
|
+
query: () => {
|
|
24
|
+
const permit = usePermit();
|
|
25
|
+
const { staff } = useOperasional();
|
|
26
|
+
if (permit.isAny(["neu:cabangOperasional", "neu:sdmCabang"])) {
|
|
27
|
+
return Query.define({
|
|
28
|
+
filter: {
|
|
29
|
+
handle: "branchIds",
|
|
30
|
+
operator: "in",
|
|
31
|
+
value: staff.value?.branchIds
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
} else
|
|
35
|
+
return Query.define({});
|
|
36
|
+
},
|
|
37
|
+
single: {
|
|
38
|
+
view: "operasional",
|
|
39
|
+
peeks: ["modal"]
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export const StaffSingleOperasionalView = ResourceUtil.createSingle({
|
|
43
|
+
name: "operasional",
|
|
44
|
+
title: "Karyawan",
|
|
45
|
+
definition: "neu:personalia:staff",
|
|
46
|
+
slots: {
|
|
47
|
+
default: "operasional"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SubmissionModel: import("@neon.id/model").Model<"neu:personalia:submission", "type" | "image" | "status" | "title" | "branches" | "specifications" | "raisedAt" | "submissionStaffs" | "raiseStaffs" | "decideStaffs" | "followUpStaffs" | "nominal" | "preparedAt" | "processedAt" | "nameStaff" | "agreedStaffs" | "delayStaffs" | "document">;
|
|
2
|
+
export type TSubmissionModel = typeof SubmissionModel;
|
|
3
|
+
export declare const fragments: {
|
|
4
|
+
item: Schema.Submission;
|
|
5
|
+
detail: Schema.Submission;
|
|
6
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { models } from "@neutron.co.id/personalia-models";
|
|
2
|
+
export const SubmissionModel = models.SubmissionModel;
|
|
3
|
+
const item = {
|
|
4
|
+
id: 1,
|
|
5
|
+
display: 1,
|
|
6
|
+
flag: 1,
|
|
7
|
+
status: 1,
|
|
8
|
+
type: {
|
|
9
|
+
id: 1,
|
|
10
|
+
display: 1,
|
|
11
|
+
name: 1
|
|
12
|
+
},
|
|
13
|
+
specifications: 1,
|
|
14
|
+
title: 1,
|
|
15
|
+
raisedAt: 1,
|
|
16
|
+
branches: {
|
|
17
|
+
id: 1,
|
|
18
|
+
display: 1,
|
|
19
|
+
name: 1
|
|
20
|
+
},
|
|
21
|
+
submissionStaffs: {
|
|
22
|
+
id: 1,
|
|
23
|
+
display: 1,
|
|
24
|
+
name: 1
|
|
25
|
+
},
|
|
26
|
+
raiseStaffs: {
|
|
27
|
+
id: 1,
|
|
28
|
+
display: 1,
|
|
29
|
+
name: 1
|
|
30
|
+
},
|
|
31
|
+
decideStaffs: {
|
|
32
|
+
id: 1,
|
|
33
|
+
display: 1,
|
|
34
|
+
name: 1
|
|
35
|
+
},
|
|
36
|
+
followUpStaffs: {
|
|
37
|
+
id: 1,
|
|
38
|
+
display: 1,
|
|
39
|
+
name: 1
|
|
40
|
+
},
|
|
41
|
+
nominal: 1,
|
|
42
|
+
agreedStaffs: {
|
|
43
|
+
id: 1,
|
|
44
|
+
display: 1,
|
|
45
|
+
name: 1
|
|
46
|
+
},
|
|
47
|
+
delayStaffs: {
|
|
48
|
+
id: 1,
|
|
49
|
+
display: 1,
|
|
50
|
+
name: 1
|
|
51
|
+
},
|
|
52
|
+
preparedAt: 1,
|
|
53
|
+
processedAt: 1,
|
|
54
|
+
document: 1,
|
|
55
|
+
updatedAt: 1,
|
|
56
|
+
image: 1,
|
|
57
|
+
nameStaff: 1,
|
|
58
|
+
updatedBy: 1
|
|
59
|
+
};
|
|
60
|
+
const detail = {
|
|
61
|
+
...item,
|
|
62
|
+
branchIds: 1,
|
|
63
|
+
submissionStaffIds: 1,
|
|
64
|
+
raiseStaffIds: 1,
|
|
65
|
+
decideStaffIds: 1,
|
|
66
|
+
followUpStaffIds: 1,
|
|
67
|
+
agreedStaffIds: 1,
|
|
68
|
+
delayStaffIds: 1,
|
|
69
|
+
submissionTypeIds: 1
|
|
70
|
+
};
|
|
71
|
+
export const fragments = {
|
|
72
|
+
item,
|
|
73
|
+
detail
|
|
74
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Resource } from '@neon.id/context';
|
|
2
|
+
export declare const SubmissionResource: Resource<Schema.Submission, import("@neon.id/model").Model<"neu:personalia:submission", "type" | "image" | "status" | "title" | "branches" | "specifications" | "raisedAt" | "submissionStaffs" | "raiseStaffs" | "decideStaffs" | "followUpStaffs" | "nominal" | "preparedAt" | "processedAt" | "nameStaff" | "agreedStaffs" | "delayStaffs" | "document">>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Resource } from "@neon.id/context";
|
|
2
|
+
import {
|
|
3
|
+
SubmissionCollectionView,
|
|
4
|
+
SubmissionSingleView,
|
|
5
|
+
SubmissionCollectionStaffView,
|
|
6
|
+
SubmissionSingleStaffView,
|
|
7
|
+
SubmissionCollectionFollowUpView,
|
|
8
|
+
SubmissionSingleFollowUpView,
|
|
9
|
+
SubmissionCollectionAuditView,
|
|
10
|
+
SubmissionSingleAuditView,
|
|
11
|
+
SubmissionCollectionDecisionView,
|
|
12
|
+
SubmissionSingleDecisionView
|
|
13
|
+
} from "./submission.views.mjs";
|
|
14
|
+
import {
|
|
15
|
+
fragments,
|
|
16
|
+
SubmissionModel
|
|
17
|
+
} from "./submission.model.mjs";
|
|
18
|
+
const formatRupiah = (money) => {
|
|
19
|
+
return new Intl.NumberFormat("id-ID", {
|
|
20
|
+
style: "currency",
|
|
21
|
+
currency: "IDR",
|
|
22
|
+
minimumFractionDigits: 0
|
|
23
|
+
}).format(money);
|
|
24
|
+
};
|
|
25
|
+
export const SubmissionResource = Resource.define({
|
|
26
|
+
model: SubmissionModel,
|
|
27
|
+
collection: {
|
|
28
|
+
title: "Pengajuan",
|
|
29
|
+
path: "submissions",
|
|
30
|
+
component: SubmissionCollectionView,
|
|
31
|
+
menu: true,
|
|
32
|
+
displays: ["table"]
|
|
33
|
+
},
|
|
34
|
+
single: {
|
|
35
|
+
path: "submissions/:slug",
|
|
36
|
+
component: SubmissionSingleView
|
|
37
|
+
},
|
|
38
|
+
views: {
|
|
39
|
+
// Karyawan Pengajuan
|
|
40
|
+
submissionStaff: {
|
|
41
|
+
path: "/pengajuan/staff-submission",
|
|
42
|
+
component: SubmissionCollectionStaffView
|
|
43
|
+
},
|
|
44
|
+
submissionStaffSingle: {
|
|
45
|
+
path: "/pengajuan/staff-submission/:slug",
|
|
46
|
+
component: SubmissionSingleStaffView
|
|
47
|
+
},
|
|
48
|
+
// Karyawan Tidak Lanjut
|
|
49
|
+
submissionFollowUp: {
|
|
50
|
+
path: "/pengajuan/follow-up-submission",
|
|
51
|
+
component: SubmissionCollectionFollowUpView
|
|
52
|
+
},
|
|
53
|
+
submissionFollowUpSingle: {
|
|
54
|
+
path: "/pengajuan/follow-up-submission/:slug",
|
|
55
|
+
component: SubmissionSingleFollowUpView
|
|
56
|
+
},
|
|
57
|
+
// Pengawas Pengajuan
|
|
58
|
+
submissionAudit: {
|
|
59
|
+
path: "/pengajuan/audit-submission",
|
|
60
|
+
component: SubmissionCollectionAuditView
|
|
61
|
+
},
|
|
62
|
+
submissionAuditSingle: {
|
|
63
|
+
path: "/pengajuan/audit-submission/:slug",
|
|
64
|
+
component: SubmissionSingleAuditView
|
|
65
|
+
},
|
|
66
|
+
// Pengambil Keputusan
|
|
67
|
+
submissionDecision: {
|
|
68
|
+
path: "/pengajuan/decision-submission",
|
|
69
|
+
component: SubmissionCollectionDecisionView
|
|
70
|
+
},
|
|
71
|
+
submissionDecisionSingle: {
|
|
72
|
+
path: "/pengajuan/decision-submission/:slug",
|
|
73
|
+
component: SubmissionSingleDecisionView
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
fragments,
|
|
77
|
+
renders: {
|
|
78
|
+
nominal: (item) => `${item.nominal ? formatRupiah(item.nominal) : "-"}`
|
|
79
|
+
}
|
|
80
|
+
});
|