@neutron.co.id/operasional-interfaces 1.12.1 → 1.12.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.
package/build/index.cjs CHANGED
@@ -20562,7 +20562,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
20562
20562
  discardChanges
20563
20563
  } = context.useSingle();
20564
20564
  vueRouter.useRoute();
20565
- const permit2 = context.usePermit();
20565
+ context.usePermit();
20566
20566
  const { staff } = useOperasional();
20567
20567
  const { coords } = core.useGeolocation();
20568
20568
  vue.watch(isNew, setDefaultValues, { immediate: true });
@@ -20626,11 +20626,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
20626
20626
  modelValue: vue.unref(values),
20627
20627
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
20628
20628
  field: vue.unref(fields).staff,
20629
- "is-disabled": !vue.unref(permit2).isAny([
20630
- "neu:cabangOperasional",
20631
- "neu:admin",
20632
- "neu:karyawan"
20633
- ])
20629
+ "is-disabled": vue.unref(values).type === "in" || vue.unref(values).type === "out" || vue.unref(values).type === "home" || vue.unref(values).type === "checkpoint"
20634
20630
  }, null, 8, ["modelValue", "field", "is-disabled"]),
20635
20631
  vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
20636
20632
  modelValue: vue.unref(values).note,
@@ -20655,7 +20651,7 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
20655
20651
  };
20656
20652
  }
20657
20653
  });
20658
- const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$W, [["__scopeId", "data-v-a0ac19e7"]]);
20654
+ const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$W, [["__scopeId", "data-v-44977e6b"]]);
20659
20655
  const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-aaabd996"), n = n(), vue.popScopeId(), n);
20660
20656
  const _hoisted_1$h = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
20661
20657
  "h4",
@@ -23939,6 +23935,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
23939
23935
  const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
23940
23936
  __name: "ResponsibilitySingle",
23941
23937
  setup(__props) {
23938
+ var _a, _b;
23942
23939
  const {
23943
23940
  fields,
23944
23941
  id,
@@ -23965,13 +23962,13 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
23965
23962
  };
23966
23963
  });
23967
23964
  const branchOptions = vue.computed(() => {
23968
- var _a;
23965
+ var _a2;
23969
23966
  return {
23970
23967
  filter: [
23971
23968
  {
23972
23969
  handle: "_id",
23973
23970
  operator: "in",
23974
- value: (_a = staff.value) == null ? void 0 : _a.branchIds
23971
+ value: (_a2 = staff.value) == null ? void 0 : _a2.branchIds
23975
23972
  }
23976
23973
  ]
23977
23974
  };
@@ -23987,6 +23984,19 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
23987
23984
  ]
23988
23985
  };
23989
23986
  });
23987
+ const branchId = ((_a = staff.value) == null ? void 0 : _a.branchIds) || [];
23988
+ const branchDisplay = ((_b = staff.value) == null ? void 0 : _b.branches) || [];
23989
+ vue.watch(isNew, setInitialValues, { immediate: true });
23990
+ async function setInitialValues() {
23991
+ var _a2;
23992
+ if (!isNew.value)
23993
+ return;
23994
+ await promise.PromiseUtil.wait(1e3);
23995
+ if ((_a2 = staff.value) == null ? void 0 : _a2.branchIds) {
23996
+ values.value.branchIds = [branchId[0]];
23997
+ values.value.branches = [branchDisplay[0]];
23998
+ }
23999
+ }
23990
24000
  return (_ctx, _cache) => {
23991
24001
  return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-responsibility-single" }, {
23992
24002
  default: vue.withCtx(() => [
@@ -24112,7 +24122,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
24112
24122
  title: "Progress"
24113
24123
  }, {
24114
24124
  default: vue.withCtx(() => {
24115
- var _a;
24125
+ var _a2;
24116
24126
  return [
24117
24127
  vue.createVNode(vue.unref(office$1.OfficeCollectionRelated), {
24118
24128
  definition: "neu:personalia:progress",
@@ -24142,7 +24152,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
24142
24152
  "initial-values": {
24143
24153
  responsibilityIds: vue.unref(id),
24144
24154
  responsibilities: vue.unref(values),
24145
- staffIds: (_a = vue.unref(staff)) == null ? void 0 : _a.id,
24155
+ staffIds: (_a2 = vue.unref(staff)) == null ? void 0 : _a2.id,
24146
24156
  staffs: vue.unref(staff)
24147
24157
  }
24148
24158
  }, null, 8, ["query", "is-ready", "initial-values"])
@@ -24162,7 +24172,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
24162
24172
  };
24163
24173
  }
24164
24174
  });
24165
- const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-c8f2af1f"]]);
24175
+ const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-23c57dc8"]]);
24166
24176
  const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
24167
24177
  ...{
24168
24178
  name: "ResponsibilityTypeCollection"
@@ -25555,7 +25565,7 @@ const SubmissionDetailTab = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scop
25555
25565
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
25556
25566
  __name: "SubmissionStaff",
25557
25567
  setup(__props) {
25558
- var _a;
25568
+ var _a, _b, _c;
25559
25569
  const {
25560
25570
  fields,
25561
25571
  id,
@@ -25629,20 +25639,30 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
25629
25639
  };
25630
25640
  });
25631
25641
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
25642
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
25643
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
25632
25644
  vue.watch(isNew, setDefaultValues, { immediate: true });
25633
25645
  async function setDefaultValues() {
25634
- var _a2;
25646
+ var _a2, _b2, _c2;
25635
25647
  if (!isNew.value)
25636
25648
  return;
25637
25649
  await promise.PromiseUtil.wait(500);
25638
25650
  const defaultValues = {
25639
25651
  submissionStaffIds: [staffId],
25640
25652
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
25653
+ branchIds: [branchIds[0]],
25654
+ branches: [branchDisplay[0]],
25641
25655
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
25642
25656
  };
25643
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
25644
- values.value.submissionStaffs = defaultValues.submissionStaffs;
25645
25657
  values.value.preparedAt = defaultValues.preparedAt;
25658
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
25659
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
25660
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
25661
+ }
25662
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
25663
+ values.value.branchIds = defaultValues.branchIds;
25664
+ values.value.branches = defaultValues.branches;
25665
+ }
25646
25666
  }
25647
25667
  const syncRaise = async () => {
25648
25668
  var _a2;
@@ -25675,13 +25695,13 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
25675
25695
  default: vue.withCtx(() => [
25676
25696
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
25677
25697
  input: vue.withCtx(() => {
25678
- var _a2, _b;
25698
+ var _a2, _b2;
25679
25699
  return [
25680
25700
  vue.createVNode(vue.unref(interfaces.NeonButton), {
25681
25701
  size: "md",
25682
25702
  color: "dark",
25683
25703
  "icon-left": "arrow-up-from-line",
25684
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || !vue.unref(values).agreedStaffs || !vue.unref(values).branches || !vue.unref(values).decideStaffs || !vue.unref(values).followUpStaffs || !vue.unref(values).raiseStaffs || !vue.unref(values).submissionStaffs || !vue.unref(values).title || !vue.unref(values).type || ((_b = vue.unref(values).hasRaiseStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
25704
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || !vue.unref(values).agreedStaffs || !vue.unref(values).branches || !vue.unref(values).decideStaffs || !vue.unref(values).followUpStaffs || !vue.unref(values).raiseStaffs || !vue.unref(values).submissionStaffs || !vue.unref(values).title || !vue.unref(values).type || ((_b2 = vue.unref(values).hasRaiseStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
25685
25705
  onClick: syncRaise
25686
25706
  }, {
25687
25707
  default: vue.withCtx(() => [
@@ -25894,7 +25914,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
25894
25914
  };
25895
25915
  }
25896
25916
  });
25897
- const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-10e7cda9"]]);
25917
+ const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-e39fa184"]]);
25898
25918
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
25899
25919
  __name: "SubmissionFollowUp",
25900
25920
  setup(__props) {
@@ -26113,7 +26133,7 @@ const _hoisted_6 = { class: "mt-2" };
26113
26133
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26114
26134
  __name: "SubmissionAudit",
26115
26135
  setup(__props) {
26116
- var _a;
26136
+ var _a, _b, _c;
26117
26137
  const {
26118
26138
  fields,
26119
26139
  id,
@@ -26188,20 +26208,30 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26188
26208
  };
26189
26209
  });
26190
26210
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
26211
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
26212
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
26191
26213
  vue.watch(isNew, setDefaultValues, { immediate: true });
26192
26214
  async function setDefaultValues() {
26193
- var _a2;
26215
+ var _a2, _b2, _c2;
26194
26216
  if (!isNew.value)
26195
26217
  return;
26196
26218
  await promise.PromiseUtil.wait(500);
26197
26219
  const defaultValues = {
26198
26220
  submissionStaffIds: [staffId],
26199
26221
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26222
+ branchIds: [branchIds[0]],
26223
+ branches: [branchDisplay[0]],
26200
26224
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26201
26225
  };
26202
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26203
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26204
26226
  values.value.preparedAt = defaultValues.preparedAt;
26227
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
26228
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26229
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
26230
+ }
26231
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
26232
+ values.value.branchIds = defaultValues.branchIds;
26233
+ values.value.branches = defaultValues.branches;
26234
+ }
26205
26235
  }
26206
26236
  const syncResolved = async () => {
26207
26237
  await executeOne("resolvedSubmission", { submissionId: id.value });
@@ -26322,13 +26352,13 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26322
26352
  vue.createElementVNode("div", _hoisted_5, [
26323
26353
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26324
26354
  input: vue.withCtx(() => {
26325
- var _a2, _b;
26355
+ var _a2, _b2;
26326
26356
  return [
26327
26357
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26328
26358
  size: "md",
26329
26359
  color: "warning",
26330
26360
  "icon-left": "spinner",
26331
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || vue.unref(values).status !== "delay" && ((_b = vue.unref(values).hasProcessStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26361
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || vue.unref(values).status !== "delay" && ((_b2 = vue.unref(values).hasProcessStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26332
26362
  onClick: syncProcessed
26333
26363
  }, {
26334
26364
  default: vue.withCtx(() => [
@@ -26400,7 +26430,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26400
26430
  }),
26401
26431
  vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-2" }, {
26402
26432
  default: vue.withCtx(() => {
26403
- var _a2, _b;
26433
+ var _a2, _b2;
26404
26434
  return [
26405
26435
  vue.createVNode(vue.unref(office$1.OfficeRelation), {
26406
26436
  modelValue: vue.unref(values),
@@ -26414,7 +26444,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26414
26444
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(values) ? values.value = $event : null),
26415
26445
  field: vue.unref(fields).raiseStaffs,
26416
26446
  query: vue.unref(query.Query).define(roleStaffOptions.value),
26417
- "is-disabled": vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || ((_b = vue.unref(values).hasProcessStaffIds) == null ? void 0 : _b.length) ? true : false
26447
+ "is-disabled": vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved" || ((_b2 = vue.unref(values).hasProcessStaffIds) == null ? void 0 : _b2.length) ? true : false
26418
26448
  }, null, 8, ["modelValue", "field", "query", "is-disabled"])
26419
26449
  ];
26420
26450
  }),
@@ -26596,14 +26626,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26596
26626
  };
26597
26627
  }
26598
26628
  });
26599
- const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-b5d55040"]]);
26629
+ const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-3ef7852b"]]);
26600
26630
  const _hoisted_1$3 = { class: "flex flex-wrap" };
26601
26631
  const _hoisted_2$3 = { class: "mt-2" };
26602
26632
  const _hoisted_3$2 = { class: "mt-2" };
26603
26633
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26604
26634
  __name: "SubmissionDecision",
26605
26635
  setup(__props) {
26606
- var _a;
26636
+ var _a, _b, _c;
26607
26637
  const {
26608
26638
  fields,
26609
26639
  id,
@@ -26677,20 +26707,30 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26677
26707
  };
26678
26708
  });
26679
26709
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
26710
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
26711
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
26680
26712
  vue.watch(isNew, setDefaultValues, { immediate: true });
26681
26713
  async function setDefaultValues() {
26682
- var _a2;
26714
+ var _a2, _b2, _c2;
26683
26715
  if (!isNew.value)
26684
26716
  return;
26685
26717
  await promise.PromiseUtil.wait(500);
26686
26718
  const defaultValues = {
26687
26719
  submissionStaffIds: [staffId],
26688
26720
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26721
+ branchIds: [branchIds[0]],
26722
+ branches: [branchDisplay[0]],
26689
26723
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26690
26724
  };
26691
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26692
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26693
26725
  values.value.preparedAt = defaultValues.preparedAt;
26726
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
26727
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26728
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
26729
+ }
26730
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
26731
+ values.value.branchIds = defaultValues.branchIds;
26732
+ values.value.branches = defaultValues.branches;
26733
+ }
26694
26734
  }
26695
26735
  const syncDelay = async () => {
26696
26736
  var _a2;
@@ -26733,13 +26773,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26733
26773
  vue.createElementVNode("div", _hoisted_2$3, [
26734
26774
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26735
26775
  input: vue.withCtx(() => {
26736
- var _a2, _b;
26776
+ var _a2, _b2;
26737
26777
  return [
26738
26778
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26739
26779
  size: "md",
26740
26780
  color: "danger",
26741
26781
  "icon-left": "circle-stop",
26742
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b = vue.unref(values).delayStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26782
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b2 = vue.unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26743
26783
  onClick: syncDelay
26744
26784
  }, {
26745
26785
  default: vue.withCtx(() => [
@@ -26758,13 +26798,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26758
26798
  vue.createElementVNode("div", _hoisted_3$2, [
26759
26799
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26760
26800
  input: vue.withCtx(() => {
26761
- var _a2, _b;
26801
+ var _a2, _b2;
26762
26802
  return [
26763
26803
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26764
26804
  size: "md",
26765
26805
  color: "success",
26766
26806
  "icon-left": "list-check",
26767
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b = vue.unref(values).agreedStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26807
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b2 = vue.unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26768
26808
  onClick: syncApproved
26769
26809
  }, {
26770
26810
  default: vue.withCtx(() => [
@@ -27021,14 +27061,14 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
27021
27061
  };
27022
27062
  }
27023
27063
  });
27024
- const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-4cdac464"]]);
27064
+ const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-b87a8600"]]);
27025
27065
  const _hoisted_1$2 = { class: "flex flex-wrap" };
27026
27066
  const _hoisted_2$2 = { class: "mt-2" };
27027
27067
  const _hoisted_3$1 = { class: "mt-2" };
27028
27068
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27029
27069
  __name: "SubmissionWaitingDecision",
27030
27070
  setup(__props) {
27031
- var _a;
27071
+ var _a, _b, _c;
27032
27072
  const {
27033
27073
  fields,
27034
27074
  id,
@@ -27102,20 +27142,30 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27102
27142
  };
27103
27143
  });
27104
27144
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
27145
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
27146
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
27105
27147
  vue.watch(isNew, setDefaultValues, { immediate: true });
27106
27148
  async function setDefaultValues() {
27107
- var _a2;
27149
+ var _a2, _b2, _c2;
27108
27150
  if (!isNew.value)
27109
27151
  return;
27110
27152
  await promise.PromiseUtil.wait(500);
27111
27153
  const defaultValues = {
27112
27154
  submissionStaffIds: [staffId],
27113
27155
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
27156
+ branchIds: [branchIds[0]],
27157
+ branches: [branchDisplay[0]],
27114
27158
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
27115
27159
  };
27116
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
27117
- values.value.submissionStaffs = defaultValues.submissionStaffs;
27118
27160
  values.value.preparedAt = defaultValues.preparedAt;
27161
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
27162
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
27163
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
27164
+ }
27165
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
27166
+ values.value.branchIds = defaultValues.branchIds;
27167
+ values.value.branches = defaultValues.branches;
27168
+ }
27119
27169
  }
27120
27170
  const syncDelay = async () => {
27121
27171
  var _a2;
@@ -27160,13 +27210,13 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27160
27210
  vue.createElementVNode("div", _hoisted_2$2, [
27161
27211
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
27162
27212
  input: vue.withCtx(() => {
27163
- var _a2, _b;
27213
+ var _a2, _b2;
27164
27214
  return [
27165
27215
  vue.createVNode(vue.unref(interfaces.NeonButton), {
27166
27216
  size: "md",
27167
27217
  color: "danger",
27168
27218
  "icon-left": "circle-stop",
27169
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b = vue.unref(values).delayStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27219
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b2 = vue.unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27170
27220
  onClick: syncDelay
27171
27221
  }, {
27172
27222
  default: vue.withCtx(() => [
@@ -27185,13 +27235,13 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27185
27235
  vue.createElementVNode("div", _hoisted_3$1, [
27186
27236
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
27187
27237
  input: vue.withCtx(() => {
27188
- var _a2, _b;
27238
+ var _a2, _b2;
27189
27239
  return [
27190
27240
  vue.createVNode(vue.unref(interfaces.NeonButton), {
27191
27241
  size: "md",
27192
27242
  color: "success",
27193
27243
  "icon-left": "list-check",
27194
- "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b = vue.unref(values).agreedStaffIds) == null ? void 0 : _b.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27244
+ "is-disabled": vue.unref(isNew) || vue.unref(isChanged) || vue.unref(values).status === "prepared" || vue.unref(values).status === "raised" || ((_b2 = vue.unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27195
27245
  onClick: syncApproved
27196
27246
  }, {
27197
27247
  default: vue.withCtx(() => [
@@ -27404,7 +27454,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27404
27454
  };
27405
27455
  }
27406
27456
  });
27407
- const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-2f69bab1"]]);
27457
+ const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-a3b47d86"]]);
27408
27458
  const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
27409
27459
  __name: "SubmissionSupervisor",
27410
27460
  setup(__props) {