@neutron.co.id/operasional-modules 1.12.27 → 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,12 +1,11 @@
1
1
  import { useSingle } from "@neon.id/context";
2
- import { NeonButton, NeonLabel } from "@neon.id/interfaces";
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",
@@ -44,6 +43,7 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
44
43
  "type",
45
44
  // 'specifications',
46
45
  "title",
46
+ "deadline",
47
47
  "raisedAt",
48
48
  "branches",
49
49
  "submissionStaffs",
@@ -63,10 +63,12 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
63
63
  "submissionStaffs",
64
64
  "raiseStaffs",
65
65
  "decideStaffs",
66
- "followUpStaffs"
66
+ "followUpStaffs",
67
+ "deadline"
67
68
  ],
68
69
  sorts: [
69
70
  "type",
71
+ "deadline",
70
72
  "preparedAt",
71
73
  "raisedAt",
72
74
  "processedAt",
@@ -84,7 +86,7 @@ export const SubmissionCollectionStaffView = ResourceUtil.createCollection({
84
86
  value: staff?.id
85
87
  }
86
88
  ],
87
- sort: [{ handle: "createdAt", direction: "descending" }]
89
+ sort: [{ handle: "preparedAt", direction: "descending" }]
88
90
  });
89
91
  }
90
92
  });
@@ -117,6 +119,7 @@ export const SubmissionCollectionFollowUpView = ResourceUtil.createCollection({
117
119
  "type",
118
120
  // 'specifications',
119
121
  "title",
122
+ "deadline",
120
123
  "updatedAt",
121
124
  "branches",
122
125
  "submissionStaffs",
@@ -136,9 +139,10 @@ export const SubmissionCollectionFollowUpView = ResourceUtil.createCollection({
136
139
  "submissionStaffs",
137
140
  "raiseStaffs",
138
141
  "decideStaffs",
139
- "followUpStaffs"
142
+ "followUpStaffs",
143
+ "deadline"
140
144
  ],
141
- sorts: ["type", "updatedAt", "createdAt", "updater"],
145
+ sorts: ["type", "deadline", "updatedAt", "createdAt", "updater"],
142
146
  query: () => {
143
147
  const state = useOperasionalStore();
144
148
  const { staff } = state.getAllStoreValue();
@@ -189,6 +193,7 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
189
193
  "type",
190
194
  // 'specifications',
191
195
  "title",
196
+ "deadline",
192
197
  "raisedAt",
193
198
  "branches",
194
199
  "submissionStaffs",
@@ -208,11 +213,13 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
208
213
  "submissionStaffs",
209
214
  "raiseStaffs",
210
215
  "decideStaffs",
211
- "followUpStaffs"
216
+ "followUpStaffs",
217
+ "deadline"
212
218
  ],
213
219
  sorts: [
214
220
  "type",
215
221
  "preparedAt",
222
+ "deadline",
216
223
  "raisedAt",
217
224
  "processedAt",
218
225
  "createdAt",
@@ -229,7 +236,7 @@ export const SubmissionCollectionAuditView = ResourceUtil.createCollection({
229
236
  value: staff?.id
230
237
  }
231
238
  ],
232
- sort: [{ handle: "createdAt", direction: "descending" }]
239
+ sort: [{ handle: "raisedAt", direction: "descending" }]
233
240
  });
234
241
  }
235
242
  });
@@ -239,9 +246,7 @@ export const SubmissionSingleAuditView = ResourceUtil.createSingle({
239
246
  title: "Pengajuan",
240
247
  slots: {
241
248
  default: "audit",
242
- actions: {
243
- setup: getLabel
244
- }
249
+ actions: () => h(resolveComponent("SubmissionAction"))
245
250
  },
246
251
  path: "/pengajuan/audit-submission"
247
252
  });
@@ -398,9 +403,7 @@ export const SubmissionSingleWaitingDecisionView = ResourceUtil.createSingle({
398
403
  title: "Menunggu Keputusan",
399
404
  slots: {
400
405
  default: "waiting-decision",
401
- actions: {
402
- setup: getLabel
403
- }
406
+ actions: () => h(resolveComponent("SubmissionAction"))
404
407
  },
405
408
  path: "/pengajuan/waiting-decision-submission"
406
409
  });
@@ -465,9 +468,7 @@ export const SubmissionSingleForDecisionView = ResourceUtil.createSingle({
465
468
  title: "Pengajuan",
466
469
  slots: {
467
470
  default: "for-decision",
468
- actions: {
469
- setup: getForDecisionActions
470
- }
471
+ actions: () => h(resolveComponent("SubmissionActionDecision"))
471
472
  },
472
473
  path: "/pengajuan/for-decision-submission"
473
474
  });
@@ -607,65 +608,6 @@ function getLabel() {
607
608
  ]);
608
609
  };
609
610
  }
610
- function getForDecisionActions() {
611
- const { isNew, isChanged, values, isLoading, id, executeOne, syncOne } = useSingle();
612
- const { staff } = useOperasional();
613
- const isDelayDisabled = computed(() => {
614
- return isNew.value || isChanged.value || values.value.status === "prepared" || values.value.status === "raised" || (values.value.delayStaffIds?.includes(staff.value?.id || "") ?? false);
615
- });
616
- const isApproveDisabled = computed(() => {
617
- return isNew.value || isChanged.value || values.value.status === "prepared" || values.value.status === "raised" || (values.value.agreedStaffIds?.includes(staff.value?.id || "") ?? false);
618
- });
619
- const goBack = () => {
620
- window.location.reload();
621
- };
622
- const syncDelay = async () => {
623
- await executeOne("delaySubmission", {
624
- submissionId: id.value,
625
- staffId: staff.value?.id
626
- });
627
- await syncOne();
628
- goBack();
629
- };
630
- const syncApproved = async () => {
631
- await executeOne("approvedSubmission", {
632
- submissionId: id.value,
633
- staffId: staff.value?.id
634
- });
635
- await syncOne();
636
- goBack();
637
- };
638
- return () => {
639
- if (isNew.value)
640
- return null;
641
- return h("div", { class: "flex gap-2 px-1 pt-0.5 pb-1" }, [
642
- h(
643
- NeonButton,
644
- {
645
- size: "xs",
646
- color: "success",
647
- iconLeft: "list-check",
648
- isDisabled: isApproveDisabled.value,
649
- isLoading: isLoading.value,
650
- onClick: syncApproved
651
- },
652
- () => "Disetujui"
653
- ),
654
- h(
655
- NeonButton,
656
- {
657
- size: "xs",
658
- color: "danger",
659
- iconLeft: "circle-stop",
660
- isDisabled: isDelayDisabled.value,
661
- isLoading: isLoading.value,
662
- onClick: syncDelay
663
- },
664
- () => "Ditunda"
665
- )
666
- ]);
667
- };
668
- }
669
611
  function getLabelStaff() {
670
612
  const { isNew, values, isLoading } = useSingle();
671
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.27",
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.23",
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.22.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.23",
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": 125
88
+ "build": 126
89
89
  }