@neutron.co.id/operasional-modules 1.12.26 → 1.12.28
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,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const SubmissionResource: Resource<Schema.Submission, import("@neon.id/model").Model<"neu:personalia:submission", "type" | "image" | "nameStaff" | "status" | "title" | "branches" | "statusStaff" | "agreedStaffs" | "approvedAt" | "brand" | "decideStaffs" | "decidedAt" | "delayAt" | "delayStaffs" | "department" | "detailDecide" | "detailDecideOther" | "detailProcess" | "detailRaise" | "document" | "followUpStaffs" | "hasProcessStaffs" | "hasRaiseStaffs" | "nominal" | "preparedAt" | "processedAt" | "raiseStaffs" | "raisedAt" | "specifications" | "submissionStaffs" | "virtualFollowUpStaffs" | "workingHours" | "yetProcessStaffs" | "yetRaiseStaffs", Schema.Submission>>;
|
|
3
|
+
export declare const SubmissionResource: Resource<Schema.Submission, import("@neon.id/model").Model<"neu:personalia:submission", "type" | "image" | "nameStaff" | "status" | "title" | "branches" | "statusStaff" | "agreedStaffs" | "approvedAt" | "brand" | "deadline" | "decideStaffs" | "decidedAt" | "delayAt" | "delayStaffs" | "department" | "detailDecide" | "detailDecideOther" | "detailProcess" | "detailRaise" | "document" | "followUpStaffs" | "hasProcessStaffs" | "hasRaiseStaffs" | "nominal" | "preparedAt" | "processedAt" | "raiseStaffs" | "raisedAt" | "specifications" | "submissionStaffs" | "virtualFollowUpStaffs" | "workingHours" | "yetProcessStaffs" | "yetRaiseStaffs", Schema.Submission>>;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { useSingle } from "@neon.id/context";
|
|
2
|
-
import {
|
|
2
|
+
import { NeonLabel } from "@neon.id/interfaces";
|
|
3
3
|
import { ResourceUtil } from "@neon.id/office";
|
|
4
4
|
import { Query } from "@neon.id/query";
|
|
5
5
|
import {
|
|
6
|
-
useOperasional,
|
|
7
6
|
useOperasionalStore
|
|
8
7
|
} from "@neutron.co.id/operasional-interfaces/office";
|
|
9
|
-
import { computed, h } from "vue";
|
|
8
|
+
import { computed, h, resolveComponent } from "vue";
|
|
10
9
|
export const SubmissionCollectionView = ResourceUtil.createCollection({
|
|
11
10
|
name: "default",
|
|
12
11
|
definition: "neu:personalia:submission",
|
|
13
12
|
single: {
|
|
14
13
|
peeks: ["page"]
|
|
15
|
-
}
|
|
14
|
+
},
|
|
15
|
+
columns: [
|
|
16
|
+
"title"
|
|
17
|
+
],
|
|
18
|
+
excludes: ["create", "click", "delete", "search", "sort", "filter", "openAsPage", "display"]
|
|
16
19
|
});
|
|
17
20
|
export const SubmissionSingleView = ResourceUtil.createSingle({
|
|
18
21
|
name: "default",
|
|
@@ -40,6 +43,7 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
|
|
|
40
43
|
"type",
|
|
41
44
|
// 'specifications',
|
|
42
45
|
"title",
|
|
46
|
+
"deadline",
|
|
43
47
|
"raisedAt",
|
|
44
48
|
"branches",
|
|
45
49
|
"submissionStaffs",
|
|
@@ -59,10 +63,12 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
|
|
|
59
63
|
"submissionStaffs",
|
|
60
64
|
"raiseStaffs",
|
|
61
65
|
"decideStaffs",
|
|
62
|
-
"followUpStaffs"
|
|
66
|
+
"followUpStaffs",
|
|
67
|
+
"deadline"
|
|
63
68
|
],
|
|
64
69
|
sorts: [
|
|
65
70
|
"type",
|
|
71
|
+
"deadline",
|
|
66
72
|
"preparedAt",
|
|
67
73
|
"raisedAt",
|
|
68
74
|
"processedAt",
|
|
@@ -80,7 +86,7 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
|
|
|
80
86
|
value: staff?.id
|
|
81
87
|
}
|
|
82
88
|
],
|
|
83
|
-
sort: [{ handle: "
|
|
89
|
+
sort: [{ handle: "preparedAt", direction: "descending" }]
|
|
84
90
|
});
|
|
85
91
|
}
|
|
86
92
|
});
|
|
@@ -113,6 +119,7 @@ export const SubmissionCollectionFollowUpView = ResourceUtil.createCollection({
|
|
|
113
119
|
"type",
|
|
114
120
|
// 'specifications',
|
|
115
121
|
"title",
|
|
122
|
+
"deadline",
|
|
116
123
|
"updatedAt",
|
|
117
124
|
"branches",
|
|
118
125
|
"submissionStaffs",
|
|
@@ -132,9 +139,10 @@ export const SubmissionCollectionFollowUpView = ResourceUtil.createCollection({
|
|
|
132
139
|
"submissionStaffs",
|
|
133
140
|
"raiseStaffs",
|
|
134
141
|
"decideStaffs",
|
|
135
|
-
"followUpStaffs"
|
|
142
|
+
"followUpStaffs",
|
|
143
|
+
"deadline"
|
|
136
144
|
],
|
|
137
|
-
sorts: ["type", "updatedAt", "createdAt", "updater"],
|
|
145
|
+
sorts: ["type", "deadline", "updatedAt", "createdAt", "updater"],
|
|
138
146
|
query: () => {
|
|
139
147
|
const state = useOperasionalStore();
|
|
140
148
|
const { staff } = state.getAllStoreValue();
|
|
@@ -185,6 +193,7 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
|
|
|
185
193
|
"type",
|
|
186
194
|
// 'specifications',
|
|
187
195
|
"title",
|
|
196
|
+
"deadline",
|
|
188
197
|
"raisedAt",
|
|
189
198
|
"branches",
|
|
190
199
|
"submissionStaffs",
|
|
@@ -204,11 +213,13 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
|
|
|
204
213
|
"submissionStaffs",
|
|
205
214
|
"raiseStaffs",
|
|
206
215
|
"decideStaffs",
|
|
207
|
-
"followUpStaffs"
|
|
216
|
+
"followUpStaffs",
|
|
217
|
+
"deadline"
|
|
208
218
|
],
|
|
209
219
|
sorts: [
|
|
210
220
|
"type",
|
|
211
221
|
"preparedAt",
|
|
222
|
+
"deadline",
|
|
212
223
|
"raisedAt",
|
|
213
224
|
"processedAt",
|
|
214
225
|
"createdAt",
|
|
@@ -225,7 +236,7 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
|
|
|
225
236
|
value: staff?.id
|
|
226
237
|
}
|
|
227
238
|
],
|
|
228
|
-
sort: [{ handle: "
|
|
239
|
+
sort: [{ handle: "raisedAt", direction: "descending" }]
|
|
229
240
|
});
|
|
230
241
|
}
|
|
231
242
|
});
|
|
@@ -235,9 +246,7 @@ export const SubmissionSingleAuditView = ResourceUtil.createSingle({
|
|
|
235
246
|
title: "Pengajuan",
|
|
236
247
|
slots: {
|
|
237
248
|
default: "audit",
|
|
238
|
-
actions:
|
|
239
|
-
setup: getLabel
|
|
240
|
-
}
|
|
249
|
+
actions: () => h(resolveComponent("SubmissionAction"))
|
|
241
250
|
},
|
|
242
251
|
path: "/pengajuan/audit-submission"
|
|
243
252
|
});
|
|
@@ -394,9 +403,7 @@ export const SubmissionSingleWaitingDecisionView = ResourceUtil.createSingle({
|
|
|
394
403
|
title: "Menunggu Keputusan",
|
|
395
404
|
slots: {
|
|
396
405
|
default: "waiting-decision",
|
|
397
|
-
actions:
|
|
398
|
-
setup: getLabel
|
|
399
|
-
}
|
|
406
|
+
actions: () => h(resolveComponent("SubmissionAction"))
|
|
400
407
|
},
|
|
401
408
|
path: "/pengajuan/waiting-decision-submission"
|
|
402
409
|
});
|
|
@@ -461,9 +468,7 @@ export const SubmissionSingleForDecisionView = ResourceUtil.createSingle({
|
|
|
461
468
|
title: "Pengajuan",
|
|
462
469
|
slots: {
|
|
463
470
|
default: "for-decision",
|
|
464
|
-
actions:
|
|
465
|
-
setup: getForDecisionActions
|
|
466
|
-
}
|
|
471
|
+
actions: () => h(resolveComponent("SubmissionActionDecision"))
|
|
467
472
|
},
|
|
468
473
|
path: "/pengajuan/for-decision-submission"
|
|
469
474
|
});
|
|
@@ -603,65 +608,6 @@ function getLabel() {
|
|
|
603
608
|
]);
|
|
604
609
|
};
|
|
605
610
|
}
|
|
606
|
-
function getForDecisionActions() {
|
|
607
|
-
const { isNew, isChanged, values, isLoading, id, executeOne, syncOne } = useSingle();
|
|
608
|
-
const { staff } = useOperasional();
|
|
609
|
-
const isDelayDisabled = computed(() => {
|
|
610
|
-
return isNew.value || isChanged.value || values.value.status === "prepared" || values.value.status === "raised" || (values.value.delayStaffIds?.includes(staff.value?.id || "") ?? false);
|
|
611
|
-
});
|
|
612
|
-
const isApproveDisabled = computed(() => {
|
|
613
|
-
return isNew.value || isChanged.value || values.value.status === "prepared" || values.value.status === "raised" || (values.value.agreedStaffIds?.includes(staff.value?.id || "") ?? false);
|
|
614
|
-
});
|
|
615
|
-
const goBack = () => {
|
|
616
|
-
window.location.reload();
|
|
617
|
-
};
|
|
618
|
-
const syncDelay = async () => {
|
|
619
|
-
await executeOne("delaySubmission", {
|
|
620
|
-
submissionId: id.value,
|
|
621
|
-
staffId: staff.value?.id
|
|
622
|
-
});
|
|
623
|
-
await syncOne();
|
|
624
|
-
goBack();
|
|
625
|
-
};
|
|
626
|
-
const syncApproved = async () => {
|
|
627
|
-
await executeOne("approvedSubmission", {
|
|
628
|
-
submissionId: id.value,
|
|
629
|
-
staffId: staff.value?.id
|
|
630
|
-
});
|
|
631
|
-
await syncOne();
|
|
632
|
-
goBack();
|
|
633
|
-
};
|
|
634
|
-
return () => {
|
|
635
|
-
if (isNew.value)
|
|
636
|
-
return null;
|
|
637
|
-
return h("div", { class: "flex gap-2 px-1 pt-0.5 pb-1" }, [
|
|
638
|
-
h(
|
|
639
|
-
NeonButton,
|
|
640
|
-
{
|
|
641
|
-
size: "xs",
|
|
642
|
-
color: "success",
|
|
643
|
-
iconLeft: "list-check",
|
|
644
|
-
isDisabled: isApproveDisabled.value,
|
|
645
|
-
isLoading: isLoading.value,
|
|
646
|
-
onClick: syncApproved
|
|
647
|
-
},
|
|
648
|
-
() => "Disetujui"
|
|
649
|
-
),
|
|
650
|
-
h(
|
|
651
|
-
NeonButton,
|
|
652
|
-
{
|
|
653
|
-
size: "xs",
|
|
654
|
-
color: "danger",
|
|
655
|
-
iconLeft: "circle-stop",
|
|
656
|
-
isDisabled: isDelayDisabled.value,
|
|
657
|
-
isLoading: isLoading.value,
|
|
658
|
-
onClick: syncDelay
|
|
659
|
-
},
|
|
660
|
-
() => "Ditunda"
|
|
661
|
-
)
|
|
662
|
-
]);
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
611
|
function getLabelStaff() {
|
|
666
612
|
const { isNew, values, isLoading } = useSingle();
|
|
667
613
|
const actions = {
|
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.28",
|
|
4
4
|
"description": "Modules of Neutron Operasional.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"@neon.id/interfaces": "^1.57.0",
|
|
49
49
|
"@neon.id/office": "1.46.0",
|
|
50
50
|
"@neon.id/query": "^1.12.0",
|
|
51
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
51
|
+
"@neutron.co.id/personalia-models": "1.13.27",
|
|
52
52
|
"pretty-bytes": "^6.1.1",
|
|
53
53
|
"vue": "^3.4.31"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@antfu/eslint-config": "2.22.3",
|
|
57
|
-
"@neon.id/cli": "0.
|
|
57
|
+
"@neon.co.id/cli": "0.1.0",
|
|
58
58
|
"@neon.id/eslint": "0.3.0",
|
|
59
59
|
"@neon.id/module-builder": "1.8.0",
|
|
60
60
|
"@neon.id/types": "1.69.0",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"@neon.id/interfaces": "^1.57.0",
|
|
79
79
|
"@neon.id/office": "1.46.0",
|
|
80
80
|
"@neon.id/query": "^1.12.0",
|
|
81
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
81
|
+
"@neutron.co.id/personalia-models": "1.13.27",
|
|
82
82
|
"@nuxt/kit": "^3.12.3",
|
|
83
83
|
"pretty-bytes": "^6.1.1"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"build":
|
|
88
|
+
"build": 126
|
|
89
89
|
}
|