@neutron.co.id/operasional-interfaces 1.12.2 → 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
@@ -26133,7 +26133,7 @@ const _hoisted_6 = { class: "mt-2" };
26133
26133
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26134
26134
  __name: "SubmissionAudit",
26135
26135
  setup(__props) {
26136
- var _a;
26136
+ var _a, _b, _c;
26137
26137
  const {
26138
26138
  fields,
26139
26139
  id,
@@ -26208,20 +26208,30 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26208
26208
  };
26209
26209
  });
26210
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) || [];
26211
26213
  vue.watch(isNew, setDefaultValues, { immediate: true });
26212
26214
  async function setDefaultValues() {
26213
- var _a2;
26215
+ var _a2, _b2, _c2;
26214
26216
  if (!isNew.value)
26215
26217
  return;
26216
26218
  await promise.PromiseUtil.wait(500);
26217
26219
  const defaultValues = {
26218
26220
  submissionStaffIds: [staffId],
26219
26221
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26222
+ branchIds: [branchIds[0]],
26223
+ branches: [branchDisplay[0]],
26220
26224
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26221
26225
  };
26222
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26223
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26224
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
+ }
26225
26235
  }
26226
26236
  const syncResolved = async () => {
26227
26237
  await executeOne("resolvedSubmission", { submissionId: id.value });
@@ -26342,13 +26352,13 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26342
26352
  vue.createElementVNode("div", _hoisted_5, [
26343
26353
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26344
26354
  input: vue.withCtx(() => {
26345
- var _a2, _b;
26355
+ var _a2, _b2;
26346
26356
  return [
26347
26357
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26348
26358
  size: "md",
26349
26359
  color: "warning",
26350
26360
  "icon-left": "spinner",
26351
- "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,
26352
26362
  onClick: syncProcessed
26353
26363
  }, {
26354
26364
  default: vue.withCtx(() => [
@@ -26420,7 +26430,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26420
26430
  }),
26421
26431
  vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-2" }, {
26422
26432
  default: vue.withCtx(() => {
26423
- var _a2, _b;
26433
+ var _a2, _b2;
26424
26434
  return [
26425
26435
  vue.createVNode(vue.unref(office$1.OfficeRelation), {
26426
26436
  modelValue: vue.unref(values),
@@ -26434,7 +26444,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26434
26444
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(values) ? values.value = $event : null),
26435
26445
  field: vue.unref(fields).raiseStaffs,
26436
26446
  query: vue.unref(query.Query).define(roleStaffOptions.value),
26437
- "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
26438
26448
  }, null, 8, ["modelValue", "field", "query", "is-disabled"])
26439
26449
  ];
26440
26450
  }),
@@ -26616,14 +26626,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
26616
26626
  };
26617
26627
  }
26618
26628
  });
26619
- 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"]]);
26620
26630
  const _hoisted_1$3 = { class: "flex flex-wrap" };
26621
26631
  const _hoisted_2$3 = { class: "mt-2" };
26622
26632
  const _hoisted_3$2 = { class: "mt-2" };
26623
26633
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26624
26634
  __name: "SubmissionDecision",
26625
26635
  setup(__props) {
26626
- var _a;
26636
+ var _a, _b, _c;
26627
26637
  const {
26628
26638
  fields,
26629
26639
  id,
@@ -26697,20 +26707,30 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26697
26707
  };
26698
26708
  });
26699
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) || [];
26700
26712
  vue.watch(isNew, setDefaultValues, { immediate: true });
26701
26713
  async function setDefaultValues() {
26702
- var _a2;
26714
+ var _a2, _b2, _c2;
26703
26715
  if (!isNew.value)
26704
26716
  return;
26705
26717
  await promise.PromiseUtil.wait(500);
26706
26718
  const defaultValues = {
26707
26719
  submissionStaffIds: [staffId],
26708
26720
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26721
+ branchIds: [branchIds[0]],
26722
+ branches: [branchDisplay[0]],
26709
26723
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26710
26724
  };
26711
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26712
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26713
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
+ }
26714
26734
  }
26715
26735
  const syncDelay = async () => {
26716
26736
  var _a2;
@@ -26753,13 +26773,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26753
26773
  vue.createElementVNode("div", _hoisted_2$3, [
26754
26774
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26755
26775
  input: vue.withCtx(() => {
26756
- var _a2, _b;
26776
+ var _a2, _b2;
26757
26777
  return [
26758
26778
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26759
26779
  size: "md",
26760
26780
  color: "danger",
26761
26781
  "icon-left": "circle-stop",
26762
- "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,
26763
26783
  onClick: syncDelay
26764
26784
  }, {
26765
26785
  default: vue.withCtx(() => [
@@ -26778,13 +26798,13 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
26778
26798
  vue.createElementVNode("div", _hoisted_3$2, [
26779
26799
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
26780
26800
  input: vue.withCtx(() => {
26781
- var _a2, _b;
26801
+ var _a2, _b2;
26782
26802
  return [
26783
26803
  vue.createVNode(vue.unref(interfaces.NeonButton), {
26784
26804
  size: "md",
26785
26805
  color: "success",
26786
26806
  "icon-left": "list-check",
26787
- "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,
26788
26808
  onClick: syncApproved
26789
26809
  }, {
26790
26810
  default: vue.withCtx(() => [
@@ -27041,14 +27061,14 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
27041
27061
  };
27042
27062
  }
27043
27063
  });
27044
- 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"]]);
27045
27065
  const _hoisted_1$2 = { class: "flex flex-wrap" };
27046
27066
  const _hoisted_2$2 = { class: "mt-2" };
27047
27067
  const _hoisted_3$1 = { class: "mt-2" };
27048
27068
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27049
27069
  __name: "SubmissionWaitingDecision",
27050
27070
  setup(__props) {
27051
- var _a;
27071
+ var _a, _b, _c;
27052
27072
  const {
27053
27073
  fields,
27054
27074
  id,
@@ -27122,20 +27142,30 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27122
27142
  };
27123
27143
  });
27124
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) || [];
27125
27147
  vue.watch(isNew, setDefaultValues, { immediate: true });
27126
27148
  async function setDefaultValues() {
27127
- var _a2;
27149
+ var _a2, _b2, _c2;
27128
27150
  if (!isNew.value)
27129
27151
  return;
27130
27152
  await promise.PromiseUtil.wait(500);
27131
27153
  const defaultValues = {
27132
27154
  submissionStaffIds: [staffId],
27133
27155
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
27156
+ branchIds: [branchIds[0]],
27157
+ branches: [branchDisplay[0]],
27134
27158
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
27135
27159
  };
27136
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
27137
- values.value.submissionStaffs = defaultValues.submissionStaffs;
27138
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
+ }
27139
27169
  }
27140
27170
  const syncDelay = async () => {
27141
27171
  var _a2;
@@ -27180,13 +27210,13 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27180
27210
  vue.createElementVNode("div", _hoisted_2$2, [
27181
27211
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
27182
27212
  input: vue.withCtx(() => {
27183
- var _a2, _b;
27213
+ var _a2, _b2;
27184
27214
  return [
27185
27215
  vue.createVNode(vue.unref(interfaces.NeonButton), {
27186
27216
  size: "md",
27187
27217
  color: "danger",
27188
27218
  "icon-left": "circle-stop",
27189
- "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,
27190
27220
  onClick: syncDelay
27191
27221
  }, {
27192
27222
  default: vue.withCtx(() => [
@@ -27205,13 +27235,13 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27205
27235
  vue.createElementVNode("div", _hoisted_3$1, [
27206
27236
  vue.unref(isReady) ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), { key: 0 }, {
27207
27237
  input: vue.withCtx(() => {
27208
- var _a2, _b;
27238
+ var _a2, _b2;
27209
27239
  return [
27210
27240
  vue.createVNode(vue.unref(interfaces.NeonButton), {
27211
27241
  size: "md",
27212
27242
  color: "success",
27213
27243
  "icon-left": "list-check",
27214
- "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,
27215
27245
  onClick: syncApproved
27216
27246
  }, {
27217
27247
  default: vue.withCtx(() => [
@@ -27424,7 +27454,7 @@ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27424
27454
  };
27425
27455
  }
27426
27456
  });
27427
- 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"]]);
27428
27458
  const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
27429
27459
  __name: "SubmissionSupervisor",
27430
27460
  setup(__props) {
package/build/index.mjs CHANGED
@@ -26131,7 +26131,7 @@ const _hoisted_6 = { class: "mt-2" };
26131
26131
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
26132
26132
  __name: "SubmissionAudit",
26133
26133
  setup(__props) {
26134
- var _a;
26134
+ var _a, _b, _c;
26135
26135
  const {
26136
26136
  fields,
26137
26137
  id,
@@ -26206,20 +26206,30 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
26206
26206
  };
26207
26207
  });
26208
26208
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
26209
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
26210
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
26209
26211
  watch(isNew, setDefaultValues, { immediate: true });
26210
26212
  async function setDefaultValues() {
26211
- var _a2;
26213
+ var _a2, _b2, _c2;
26212
26214
  if (!isNew.value)
26213
26215
  return;
26214
26216
  await PromiseUtil.wait(500);
26215
26217
  const defaultValues = {
26216
26218
  submissionStaffIds: [staffId],
26217
26219
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26220
+ branchIds: [branchIds[0]],
26221
+ branches: [branchDisplay[0]],
26218
26222
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26219
26223
  };
26220
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26221
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26222
26224
  values.value.preparedAt = defaultValues.preparedAt;
26225
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
26226
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26227
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
26228
+ }
26229
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
26230
+ values.value.branchIds = defaultValues.branchIds;
26231
+ values.value.branches = defaultValues.branches;
26232
+ }
26223
26233
  }
26224
26234
  const syncResolved = async () => {
26225
26235
  await executeOne("resolvedSubmission", { submissionId: id.value });
@@ -26340,13 +26350,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
26340
26350
  createElementVNode("div", _hoisted_5, [
26341
26351
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
26342
26352
  input: withCtx(() => {
26343
- var _a2, _b;
26353
+ var _a2, _b2;
26344
26354
  return [
26345
26355
  createVNode(unref(NeonButton), {
26346
26356
  size: "md",
26347
26357
  color: "warning",
26348
26358
  "icon-left": "spinner",
26349
- "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || unref(values).status !== "delay" && ((_b = unref(values).hasProcessStaffIds) == null ? void 0 : _b.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26359
+ "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || unref(values).status !== "delay" && ((_b2 = unref(values).hasProcessStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26350
26360
  onClick: syncProcessed
26351
26361
  }, {
26352
26362
  default: withCtx(() => [
@@ -26418,7 +26428,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
26418
26428
  }),
26419
26429
  createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
26420
26430
  default: withCtx(() => {
26421
- var _a2, _b;
26431
+ var _a2, _b2;
26422
26432
  return [
26423
26433
  createVNode(unref(OfficeRelation), {
26424
26434
  modelValue: unref(values),
@@ -26432,7 +26442,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
26432
26442
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
26433
26443
  field: unref(fields).raiseStaffs,
26434
26444
  query: unref(Query).define(roleStaffOptions.value),
26435
- "is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || ((_b = unref(values).hasProcessStaffIds) == null ? void 0 : _b.length) ? true : false
26445
+ "is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || ((_b2 = unref(values).hasProcessStaffIds) == null ? void 0 : _b2.length) ? true : false
26436
26446
  }, null, 8, ["modelValue", "field", "query", "is-disabled"])
26437
26447
  ];
26438
26448
  }),
@@ -26614,14 +26624,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
26614
26624
  };
26615
26625
  }
26616
26626
  });
26617
- const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-b5d55040"]]);
26627
+ const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-3ef7852b"]]);
26618
26628
  const _hoisted_1$3 = { class: "flex flex-wrap" };
26619
26629
  const _hoisted_2$3 = { class: "mt-2" };
26620
26630
  const _hoisted_3$2 = { class: "mt-2" };
26621
26631
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
26622
26632
  __name: "SubmissionDecision",
26623
26633
  setup(__props) {
26624
- var _a;
26634
+ var _a, _b, _c;
26625
26635
  const {
26626
26636
  fields,
26627
26637
  id,
@@ -26695,20 +26705,30 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
26695
26705
  };
26696
26706
  });
26697
26707
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
26708
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
26709
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
26698
26710
  watch(isNew, setDefaultValues, { immediate: true });
26699
26711
  async function setDefaultValues() {
26700
- var _a2;
26712
+ var _a2, _b2, _c2;
26701
26713
  if (!isNew.value)
26702
26714
  return;
26703
26715
  await PromiseUtil.wait(500);
26704
26716
  const defaultValues = {
26705
26717
  submissionStaffIds: [staffId],
26706
26718
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
26719
+ branchIds: [branchIds[0]],
26720
+ branches: [branchDisplay[0]],
26707
26721
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
26708
26722
  };
26709
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26710
- values.value.submissionStaffs = defaultValues.submissionStaffs;
26711
26723
  values.value.preparedAt = defaultValues.preparedAt;
26724
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
26725
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
26726
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
26727
+ }
26728
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
26729
+ values.value.branchIds = defaultValues.branchIds;
26730
+ values.value.branches = defaultValues.branches;
26731
+ }
26712
26732
  }
26713
26733
  const syncDelay = async () => {
26714
26734
  var _a2;
@@ -26751,13 +26771,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
26751
26771
  createElementVNode("div", _hoisted_2$3, [
26752
26772
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
26753
26773
  input: withCtx(() => {
26754
- var _a2, _b;
26774
+ var _a2, _b2;
26755
26775
  return [
26756
26776
  createVNode(unref(NeonButton), {
26757
26777
  size: "md",
26758
26778
  color: "danger",
26759
26779
  "icon-left": "circle-stop",
26760
- "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b = unref(values).delayStaffIds) == null ? void 0 : _b.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26780
+ "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26761
26781
  onClick: syncDelay
26762
26782
  }, {
26763
26783
  default: withCtx(() => [
@@ -26776,13 +26796,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
26776
26796
  createElementVNode("div", _hoisted_3$2, [
26777
26797
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
26778
26798
  input: withCtx(() => {
26779
- var _a2, _b;
26799
+ var _a2, _b2;
26780
26800
  return [
26781
26801
  createVNode(unref(NeonButton), {
26782
26802
  size: "md",
26783
26803
  color: "success",
26784
26804
  "icon-left": "list-check",
26785
- "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b = unref(values).agreedStaffIds) == null ? void 0 : _b.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26805
+ "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
26786
26806
  onClick: syncApproved
26787
26807
  }, {
26788
26808
  default: withCtx(() => [
@@ -27039,14 +27059,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
27039
27059
  };
27040
27060
  }
27041
27061
  });
27042
- const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-4cdac464"]]);
27062
+ const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-b87a8600"]]);
27043
27063
  const _hoisted_1$2 = { class: "flex flex-wrap" };
27044
27064
  const _hoisted_2$2 = { class: "mt-2" };
27045
27065
  const _hoisted_3$1 = { class: "mt-2" };
27046
27066
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
27047
27067
  __name: "SubmissionWaitingDecision",
27048
27068
  setup(__props) {
27049
- var _a;
27069
+ var _a, _b, _c;
27050
27070
  const {
27051
27071
  fields,
27052
27072
  id,
@@ -27120,20 +27140,30 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
27120
27140
  };
27121
27141
  });
27122
27142
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
27143
+ const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
27144
+ const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
27123
27145
  watch(isNew, setDefaultValues, { immediate: true });
27124
27146
  async function setDefaultValues() {
27125
- var _a2;
27147
+ var _a2, _b2, _c2;
27126
27148
  if (!isNew.value)
27127
27149
  return;
27128
27150
  await PromiseUtil.wait(500);
27129
27151
  const defaultValues = {
27130
27152
  submissionStaffIds: [staffId],
27131
27153
  submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
27154
+ branchIds: [branchIds[0]],
27155
+ branches: [branchDisplay[0]],
27132
27156
  preparedAt: (/* @__PURE__ */ new Date()).toISOString()
27133
27157
  };
27134
- values.value.submissionStaffIds = defaultValues.submissionStaffIds;
27135
- values.value.submissionStaffs = defaultValues.submissionStaffs;
27136
27158
  values.value.preparedAt = defaultValues.preparedAt;
27159
+ if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
27160
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
27161
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
27162
+ }
27163
+ if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
27164
+ values.value.branchIds = defaultValues.branchIds;
27165
+ values.value.branches = defaultValues.branches;
27166
+ }
27137
27167
  }
27138
27168
  const syncDelay = async () => {
27139
27169
  var _a2;
@@ -27178,13 +27208,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
27178
27208
  createElementVNode("div", _hoisted_2$2, [
27179
27209
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
27180
27210
  input: withCtx(() => {
27181
- var _a2, _b;
27211
+ var _a2, _b2;
27182
27212
  return [
27183
27213
  createVNode(unref(NeonButton), {
27184
27214
  size: "md",
27185
27215
  color: "danger",
27186
27216
  "icon-left": "circle-stop",
27187
- "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b = unref(values).delayStaffIds) == null ? void 0 : _b.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27217
+ "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27188
27218
  onClick: syncDelay
27189
27219
  }, {
27190
27220
  default: withCtx(() => [
@@ -27203,13 +27233,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
27203
27233
  createElementVNode("div", _hoisted_3$1, [
27204
27234
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
27205
27235
  input: withCtx(() => {
27206
- var _a2, _b;
27236
+ var _a2, _b2;
27207
27237
  return [
27208
27238
  createVNode(unref(NeonButton), {
27209
27239
  size: "md",
27210
27240
  color: "success",
27211
27241
  "icon-left": "list-check",
27212
- "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b = unref(values).agreedStaffIds) == null ? void 0 : _b.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27242
+ "is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
27213
27243
  onClick: syncApproved
27214
27244
  }, {
27215
27245
  default: withCtx(() => [
@@ -27422,7 +27452,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
27422
27452
  };
27423
27453
  }
27424
27454
  });
27425
- const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-2f69bab1"]]);
27455
+ const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-a3b47d86"]]);
27426
27456
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
27427
27457
  __name: "SubmissionSupervisor",
27428
27458
  setup(__props) {