@neutron.co.id/operasional-interfaces 1.9.6 → 1.10.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.mjs CHANGED
@@ -16,7 +16,7 @@ import { ComponentUtil } from "@neon.id/utils/component";
16
16
  import { DatePicker } from "v-calendar";
17
17
  import { Query } from "@neon.id/query";
18
18
  import { models as models$1 } from "@neutron.co.id/tempat-models";
19
- import { useEventBus, useIntervalFn, useThrottleFn } from "@vueuse/core";
19
+ import { useEventBus, useGeolocation, useIntervalFn, useThrottleFn } from "@vueuse/core";
20
20
  import { defineStore, storeToRefs } from "pinia";
21
21
  import { useClientHandle } from "@urql/vue";
22
22
  import { startOfToday, endOfToday, format } from "date-fns";
@@ -201,13 +201,13 @@ class DateUtil {
201
201
  }
202
202
  }
203
203
  const _withScopeId$3 = (n) => (pushScopeId("data-v-805321b9"), n = n(), popScopeId(), n);
204
- const _hoisted_1$o = {
204
+ const _hoisted_1$p = {
205
205
  key: 0,
206
206
  class: "input-loading"
207
207
  };
208
- const _hoisted_2$h = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "loading placeholder-block placeholder-wave" }, null, -1));
209
- const _hoisted_3$8 = [
210
- _hoisted_2$h
208
+ const _hoisted_2$i = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "loading placeholder-block placeholder-wave" }, null, -1));
209
+ const _hoisted_3$9 = [
210
+ _hoisted_2$i
211
211
  ];
212
212
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
213
213
  __name: "NeonTime",
@@ -243,7 +243,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
243
243
  return openBlock(), createElementBlock("div", {
244
244
  class: normalizeClass(["neon-time", { "is-disabled": __props.isDisabled }])
245
245
  }, [
246
- __props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$o, _hoisted_3$8)) : (openBlock(), createBlock(unref(DatePicker), mergeProps({
246
+ __props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$p, _hoisted_3$9)) : (openBlock(), createBlock(unref(DatePicker), mergeProps({
247
247
  key: 1,
248
248
  "model-value": internalValue.value
249
249
  }, {
@@ -272,10 +272,10 @@ const _export_sfc = (sfc, props) => {
272
272
  return target;
273
273
  };
274
274
  const NeonTime = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-805321b9"]]);
275
- const _hoisted_1$n = { class: "flex flex-wrap" };
276
- const _hoisted_2$g = { class: "mt-2" };
277
- const _hoisted_3$7 = { class: "mt-2" };
278
- const _hoisted_4$5 = {
275
+ const _hoisted_1$o = { class: "flex flex-wrap" };
276
+ const _hoisted_2$h = { class: "mt-2" };
277
+ const _hoisted_3$8 = { class: "mt-2" };
278
+ const _hoisted_4$6 = {
279
279
  key: 3,
280
280
  class: "grid gap-2 sm:grid-cols-2"
281
281
  };
@@ -383,8 +383,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
383
383
  onSubmit: unref(saveOne)
384
384
  }, {
385
385
  default: withCtx(() => [
386
- createElementVNode("div", _hoisted_1$n, [
387
- createElementVNode("div", _hoisted_2$g, [
386
+ createElementVNode("div", _hoisted_1$o, [
387
+ createElementVNode("div", _hoisted_2$h, [
388
388
  createVNode(unref(NeonField), null, {
389
389
  input: withCtx(() => [
390
390
  createVNode(unref(NeonButton), {
@@ -404,7 +404,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
404
404
  })
405
405
  ]),
406
406
  createTextVNode("    "),
407
- createElementVNode("div", _hoisted_3$7, [
407
+ createElementVNode("div", _hoisted_3$8, [
408
408
  createVNode(unref(NeonField), null, {
409
409
  input: withCtx(() => [
410
410
  createVNode(unref(NeonButton), {
@@ -471,7 +471,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
471
471
  modelValue: unref(values).submittedAt,
472
472
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).submittedAt = $event)
473
473
  }, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("", true),
474
- unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
474
+ unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
475
475
  createVNode(unref(NeonField), mergeProps({
476
476
  modelValue: unref(values).startedAt,
477
477
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).startedAt = $event)
@@ -617,8 +617,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
617
617
  });
618
618
  const AttendanceManager_vue_vue_type_style_index_0_scoped_643cca03_lang = "";
619
619
  const AttendanceManager = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-643cca03"]]);
620
- const _hoisted_1$m = { class: "grid gap-2 sm:grid-cols-2" };
621
- const _hoisted_2$f = { class: "text-right text-fg-subdued text-sm" };
620
+ const _hoisted_1$n = { class: "grid gap-2 sm:grid-cols-2" };
621
+ const _hoisted_2$g = { class: "text-right text-fg-subdued text-sm" };
622
622
  const _sfc_main$_ = /* @__PURE__ */ defineComponent({
623
623
  __name: "AttendanceSingle",
624
624
  setup(__props) {
@@ -730,7 +730,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
730
730
  modelValue: unref(values).submittedAt,
731
731
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).submittedAt = $event)
732
732
  }, unref(fields).submittedAt), null, 16, ["modelValue"]),
733
- createElementVNode("div", _hoisted_1$m, [
733
+ createElementVNode("div", _hoisted_1$n, [
734
734
  createVNode(unref(NeonField), mergeProps({
735
735
  modelValue: unref(values).startedAt,
736
736
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).startedAt = $event)
@@ -768,7 +768,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
768
768
  "is-loading": unref(isLoading),
769
769
  class: "mt-2"
770
770
  }, null, 8, ["modelValue", "is-loading"]),
771
- createElementVNode("div", _hoisted_2$f, toDisplayString(duration.value), 1)
771
+ createElementVNode("div", _hoisted_2$g, toDisplayString(duration.value), 1)
772
772
  ]),
773
773
  _: 1
774
774
  }, 16, ["modelValue"])
@@ -790,13 +790,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
790
790
  });
791
791
  const AttendanceSingle_vue_vue_type_style_index_0_scoped_0c3c6187_lang = "";
792
792
  const AttendanceSingle = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-0c3c6187"]]);
793
- const _hoisted_1$l = {
793
+ const _hoisted_1$m = {
794
794
  key: 1,
795
795
  class: "flex flex-wrap"
796
796
  };
797
- const _hoisted_2$e = { class: "mt-2" };
798
- const _hoisted_3$6 = { class: "mt-2" };
799
- const _hoisted_4$4 = {
797
+ const _hoisted_2$f = { class: "mt-2" };
798
+ const _hoisted_3$7 = { class: "mt-2" };
799
+ const _hoisted_4$5 = {
800
800
  key: 5,
801
801
  class: "grid gap-2 sm:grid-cols-2"
802
802
  };
@@ -934,8 +934,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
934
934
  description: "Untuk hari ini kamu sudah ada absensi yang diajukan, silahkan cari absensi yang telah diajukan dan ajukan kembali untuk pergantiannya.",
935
935
  color: "#F7CF6D"
936
936
  })) : createCommentVNode("", true),
937
- !unref(isNew) && conflictAtt.value == false ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
938
- createElementVNode("div", _hoisted_2$e, [
937
+ !unref(isNew) && conflictAtt.value == false ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
938
+ createElementVNode("div", _hoisted_2$f, [
939
939
  createVNode(unref(NeonField), null, {
940
940
  input: withCtx(() => [
941
941
  createVNode(unref(NeonButton), {
@@ -955,7 +955,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
955
955
  })
956
956
  ]),
957
957
  createTextVNode("    "),
958
- createElementVNode("div", _hoisted_3$6, [
958
+ createElementVNode("div", _hoisted_3$7, [
959
959
  createVNode(unref(NeonField), null, {
960
960
  input: withCtx(() => [
961
961
  createVNode(unref(NeonButton), {
@@ -1024,7 +1024,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1024
1024
  modelValue: unref(values).submittedAt,
1025
1025
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).submittedAt = $event)
1026
1026
  }, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("", true),
1027
- unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
1027
+ unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
1028
1028
  createVNode(unref(NeonField), mergeProps({
1029
1029
  modelValue: unref(values).startedAt,
1030
1030
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).startedAt = $event)
@@ -1176,10 +1176,10 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1176
1176
  });
1177
1177
  const AttendanceStaff_vue_vue_type_style_index_0_scoped_8a21c329_lang = "";
1178
1178
  const AttendanceStaff = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-8a21c329"]]);
1179
- const _hoisted_1$k = { class: "flex flex-wrap" };
1180
- const _hoisted_2$d = { class: "mt-2" };
1181
- const _hoisted_3$5 = { class: "mt-2" };
1182
- const _hoisted_4$3 = {
1179
+ const _hoisted_1$l = { class: "flex flex-wrap" };
1180
+ const _hoisted_2$e = { class: "mt-2" };
1181
+ const _hoisted_3$6 = { class: "mt-2" };
1182
+ const _hoisted_4$4 = {
1183
1183
  key: 3,
1184
1184
  class: "grid gap-2 sm:grid-cols-2"
1185
1185
  };
@@ -1287,8 +1287,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1287
1287
  onSubmit: unref(saveOne)
1288
1288
  }, {
1289
1289
  default: withCtx(() => [
1290
- createElementVNode("div", _hoisted_1$k, [
1291
- createElementVNode("div", _hoisted_2$d, [
1290
+ createElementVNode("div", _hoisted_1$l, [
1291
+ createElementVNode("div", _hoisted_2$e, [
1292
1292
  createVNode(unref(NeonField), null, {
1293
1293
  input: withCtx(() => [
1294
1294
  createVNode(unref(NeonButton), {
@@ -1308,7 +1308,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1308
1308
  })
1309
1309
  ]),
1310
1310
  createTextVNode("    "),
1311
- createElementVNode("div", _hoisted_3$5, [
1311
+ createElementVNode("div", _hoisted_3$6, [
1312
1312
  createVNode(unref(NeonField), null, {
1313
1313
  input: withCtx(() => [
1314
1314
  createVNode(unref(NeonButton), {
@@ -1369,7 +1369,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1369
1369
  modelValue: unref(values).submittedAt,
1370
1370
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).submittedAt = $event)
1371
1371
  }, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("", true),
1372
- unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
1372
+ unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
1373
1373
  createVNode(unref(NeonField), mergeProps({
1374
1374
  modelValue: unref(values).startedAt,
1375
1375
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).startedAt = $event)
@@ -1516,11 +1516,11 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1516
1516
  const AttendanceSupervisor_vue_vue_type_style_index_0_scoped_07f6564f_lang = "";
1517
1517
  const AttendanceSupervisor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-07f6564f"]]);
1518
1518
  const CheckInModel = models$1.CheckInModel;
1519
- const _withScopeId$2 = (n) => (pushScopeId("data-v-8637aebc"), n = n(), popScopeId(), n);
1520
- const _hoisted_1$j = { id: "view-checkIns" };
1521
- const _hoisted_2$c = { class: "summary" };
1522
- const _hoisted_3$4 = { class: "wrapper" };
1523
- const _hoisted_4$2 = { class: "header" };
1519
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-094d5b21"), n = n(), popScopeId(), n);
1520
+ const _hoisted_1$k = { id: "view-checkIns" };
1521
+ const _hoisted_2$d = { class: "summary" };
1522
+ const _hoisted_3$5 = { class: "wrapper" };
1523
+ const _hoisted_4$3 = { class: "header" };
1524
1524
  const _hoisted_5$1 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "start" }, [
1525
1525
  /* @__PURE__ */ createElementVNode("div", { class: "title" }, "➡️ Presensi"),
1526
1526
  /* @__PURE__ */ createElementVNode("div", { class: "description" }, "Daftar presensi hari ini.")
@@ -1540,6 +1540,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1540
1540
  const { staff } = useOperasional();
1541
1541
  const attendanceStore = useAttendanceStore();
1542
1542
  const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = storeToRefs(attendanceStore);
1543
+ const { coords } = useGeolocation();
1543
1544
  const toast = useToastStore();
1544
1545
  const id = ref("new");
1545
1546
  const isCheckpoint = ref(false);
@@ -1612,7 +1613,13 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1612
1613
  }
1613
1614
  async function onPresenceHome() {
1614
1615
  var _a;
1615
- await checkInStaff(null, "home", (_a = staff.value) == null ? void 0 : _a.id);
1616
+ await checkInStaff(
1617
+ null,
1618
+ "home",
1619
+ (_a = staff.value) == null ? void 0 : _a.id,
1620
+ coords.value.latitude.toString(),
1621
+ coords.value.longitude.toString()
1622
+ );
1616
1623
  setTimeout(() => {
1617
1624
  router.go(0);
1618
1625
  }, 500);
@@ -1623,9 +1630,15 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1623
1630
  }
1624
1631
  async function onScanned(data) {
1625
1632
  var _a;
1626
- id.value = await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
1633
+ id.value = await checkInStaff(
1634
+ data,
1635
+ type.value,
1636
+ (_a = staff.value) == null ? void 0 : _a.id,
1637
+ coords.value.latitude.toString(),
1638
+ coords.value.longitude.toString()
1639
+ );
1627
1640
  }
1628
- async function checkInStaff(qrKey, type2, staffId) {
1641
+ async function checkInStaff(qrKey, type2, staffId, latitude, longitude) {
1629
1642
  var _a;
1630
1643
  const toastId = "neu:personalia:staff:checkIn";
1631
1644
  let checkInId;
@@ -1638,7 +1651,9 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1638
1651
  staffId,
1639
1652
  key: qrKey,
1640
1653
  type: type2,
1641
- branchId: (_a = staff.value) == null ? void 0 : _a.branchId
1654
+ branchId: (_a = staff.value) == null ? void 0 : _a.branchId,
1655
+ latitude,
1656
+ longitude
1642
1657
  }
1643
1658
  }).toPromise();
1644
1659
  const data = resp.data.executeCheckIn.output;
@@ -1683,14 +1698,14 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1683
1698
  return (_ctx, _cache) => {
1684
1699
  const _component_CheckInSingleExternalView = resolveComponent("CheckInSingleExternalView");
1685
1700
  const _component_CheckInCollection = resolveComponent("CheckInCollection");
1686
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
1701
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
1687
1702
  createVNode(unref(OfficeContent), {
1688
1703
  icon: "barcode-read",
1689
1704
  title: "Presensi",
1690
1705
  "is-expanded": ""
1691
1706
  }, {
1692
1707
  "header-detail": withCtx(() => [
1693
- createElementVNode("div", _hoisted_2$c, [
1708
+ createElementVNode("div", _hoisted_2$d, [
1694
1709
  createVNode(unref(NeonSlider), {
1695
1710
  "per-view": 2,
1696
1711
  gap: 16,
@@ -1723,7 +1738,6 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1723
1738
  default: withCtx(() => [
1724
1739
  createVNode(unref(NeonStat), {
1725
1740
  label: "Checkpoint",
1726
- icon: "barcode-read",
1727
1741
  onClick: onPresenceCheckpoint
1728
1742
  }, {
1729
1743
  default: withCtx(() => [
@@ -1753,7 +1767,6 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1753
1767
  default: withCtx(() => [
1754
1768
  createVNode(unref(NeonStat), {
1755
1769
  label: "Pulang",
1756
- icon: "barcode-read",
1757
1770
  onClick: onPresenceHome
1758
1771
  }, {
1759
1772
  default: withCtx(() => [
@@ -1823,7 +1836,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1823
1836
  ])
1824
1837
  ]),
1825
1838
  default: withCtx(() => [
1826
- createElementVNode("div", _hoisted_3$4, [
1839
+ createElementVNode("div", _hoisted_3$5, [
1827
1840
  createVNode(unref(NeonCollectionContext), {
1828
1841
  definition: "neu:tempat:checkIn",
1829
1842
  scope: "_checkIns",
@@ -1838,7 +1851,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1838
1851
  "is-main": ""
1839
1852
  }, {
1840
1853
  default: withCtx(() => [
1841
- createElementVNode("div", _hoisted_4$2, [
1854
+ createElementVNode("div", _hoisted_4$3, [
1842
1855
  _hoisted_5$1,
1843
1856
  createElementVNode("div", _hoisted_6, [
1844
1857
  createVNode(unref(OfficeCollectionQuery), { displays: ["table"] }, {
@@ -1861,9 +1874,9 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1861
1874
  };
1862
1875
  }
1863
1876
  });
1864
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_8637aebc_lang = "";
1865
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-8637aebc"]]);
1866
- const _hoisted_1$i = { class: "grid gap-4 sm:grid-cols-2" };
1877
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_094d5b21_lang = "";
1878
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-094d5b21"]]);
1879
+ const _hoisted_1$j = { class: "grid gap-4 sm:grid-cols-2" };
1867
1880
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
1868
1881
  __name: "CheckInSingle",
1869
1882
  setup(__props) {
@@ -1922,7 +1935,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1922
1935
  field: unref(fields).building,
1923
1936
  "is-disabled": ""
1924
1937
  }, null, 8, ["modelValue", "field"]),
1925
- createElementVNode("div", _hoisted_1$i, [
1938
+ createElementVNode("div", _hoisted_1$j, [
1926
1939
  createVNode(unref(NeonField), mergeProps({
1927
1940
  modelValue: unref(values).type,
1928
1941
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -1959,7 +1972,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1959
1972
  });
1960
1973
  const CheckInSingle_vue_vue_type_style_index_0_scoped_e56842b0_lang = "";
1961
1974
  const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-e56842b0"]]);
1962
- const _hoisted_1$h = { class: "grid gap-4 sm:grid-cols-2" };
1975
+ const _hoisted_1$i = { class: "grid gap-4 sm:grid-cols-2" };
1963
1976
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
1964
1977
  __name: "CheckInExternal",
1965
1978
  setup(__props) {
@@ -2026,7 +2039,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2026
2039
  field: unref(fields).building,
2027
2040
  "is-disabled": unref(values).type === "checkin" || unref(values).type === "checkout" || unref(values).type === "out"
2028
2041
  }, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("", true),
2029
- createElementVNode("div", _hoisted_1$h, [
2042
+ createElementVNode("div", _hoisted_1$i, [
2030
2043
  createVNode(unref(NeonField), mergeProps({
2031
2044
  modelValue: unref(values).type,
2032
2045
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -2070,8 +2083,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2070
2083
  const CheckInExternal_vue_vue_type_style_index_0_scoped_aeda12b0_lang = "";
2071
2084
  const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-aeda12b0"]]);
2072
2085
  const _withScopeId$1 = (n) => (pushScopeId("data-v-d6ac1ebc"), n = n(), popScopeId(), n);
2073
- const _hoisted_1$g = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h4", { align: "center" }, "Aktifkan kamera untuk scan QR Code", -1));
2074
- const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", { align: "center" }, [
2086
+ const _hoisted_1$h = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h4", { align: "center" }, "Aktifkan kamera untuk scan QR Code", -1));
2087
+ const _hoisted_2$c = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", { align: "center" }, [
2075
2088
  /* @__PURE__ */ createTextVNode(' Neutron Kantor membutuhkan akses ke kamera. Dengan klik "'),
2076
2089
  /* @__PURE__ */ createElementVNode("b", null, "Saya Setuju"),
2077
2090
  /* @__PURE__ */ createTextVNode('", kamu telah menyetujui syarat dan ketentuan yang berlaku. ')
@@ -2101,8 +2114,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2101
2114
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
2102
2115
  }, {
2103
2116
  default: withCtx(() => [
2104
- _hoisted_1$g,
2105
- _hoisted_2$b,
2117
+ _hoisted_1$h,
2118
+ _hoisted_2$c,
2106
2119
  createVNode(unref(NeonButton), {
2107
2120
  "is-full": "",
2108
2121
  size: "md",
@@ -2127,7 +2140,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2127
2140
  });
2128
2141
  const CheckInAccess_vue_vue_type_style_index_0_scoped_d6ac1ebc_lang = "";
2129
2142
  const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-d6ac1ebc"]]);
2130
- const _hoisted_1$f = { class: "buttons" };
2143
+ const _hoisted_1$g = { class: "buttons" };
2131
2144
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
2132
2145
  __name: "CheckInScanError",
2133
2146
  setup(__props) {
@@ -2141,7 +2154,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2141
2154
  default: withCtx(() => [
2142
2155
  createVNode(unref(NeonSheet), null, {
2143
2156
  footer: withCtx(() => [
2144
- createElementVNode("div", _hoisted_1$f, [
2157
+ createElementVNode("div", _hoisted_1$g, [
2145
2158
  createVNode(unref(NeonButton), {
2146
2159
  "is-full": "",
2147
2160
  "is-rounded": "",
@@ -2173,10 +2186,10 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2173
2186
  }
2174
2187
  });
2175
2188
  const _withScopeId = (n) => (pushScopeId("data-v-dc535804"), n = n(), popScopeId(), n);
2176
- const _hoisted_1$e = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "invalid-message" }, "Invalid Code!", -1));
2177
- const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
2178
- const _hoisted_3$3 = ["onClick"];
2179
- const _hoisted_4$1 = { class: "mr-2 text-sm" };
2189
+ const _hoisted_1$f = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "invalid-message" }, "Invalid Code!", -1));
2190
+ const _hoisted_2$b = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
2191
+ const _hoisted_3$4 = ["onClick"];
2192
+ const _hoisted_4$2 = { class: "mr-2 text-sm" };
2180
2193
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
2181
2194
  __name: "CheckInScanner",
2182
2195
  emits: ["start", "stop", "scanned", "close"],
@@ -2313,20 +2326,20 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2313
2326
  class: "inner",
2314
2327
  onClick: switchCamera
2315
2328
  }, [
2316
- _hoisted_1$e,
2317
- _hoisted_2$a,
2329
+ _hoisted_1$f,
2330
+ _hoisted_2$b,
2318
2331
  createElementVNode("div", {
2319
2332
  class: "button-switch",
2320
2333
  onClick: withModifiers(switchCamera, ["stop"])
2321
2334
  }, [
2322
- createElementVNode("div", _hoisted_4$1, toDisplayString(currentCamera.value), 1),
2335
+ createElementVNode("div", _hoisted_4$2, toDisplayString(currentCamera.value), 1),
2323
2336
  createVNode(unref(NeonButton), {
2324
2337
  "icon-left": "arrows-repeat",
2325
2338
  "is-squared": "",
2326
2339
  size: "sm",
2327
2340
  "is-disabled": !canSwitch.value
2328
2341
  }, null, 8, ["is-disabled"])
2329
- ], 8, _hoisted_3$3)
2342
+ ], 8, _hoisted_3$4)
2330
2343
  ])
2331
2344
  ], 2)
2332
2345
  ]),
@@ -2340,7 +2353,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2340
2353
  });
2341
2354
  const CheckInScanner_vue_vue_type_style_index_0_scoped_dc535804_lang = "";
2342
2355
  const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-dc535804"]]);
2343
- const _hoisted_1$d = /* @__PURE__ */ createElementVNode("h3", { align: "center" }, "Presensi Berhasil!", -1);
2356
+ const _hoisted_1$e = /* @__PURE__ */ createElementVNode("h3", { align: "center" }, "Presensi Berhasil!", -1);
2344
2357
  const _sfc_main$R = /* @__PURE__ */ defineComponent({
2345
2358
  __name: "CheckInScanSuccess",
2346
2359
  emits: ["close"],
@@ -2361,7 +2374,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2361
2374
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
2362
2375
  }, {
2363
2376
  default: withCtx(() => [
2364
- _hoisted_1$d
2377
+ _hoisted_1$e
2365
2378
  ]),
2366
2379
  _: 1
2367
2380
  })
@@ -2388,7 +2401,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2388
2401
  };
2389
2402
  }
2390
2403
  });
2391
- const _hoisted_1$c = { class: "grid gap-4 sm:grid-cols-2" };
2404
+ const _hoisted_1$d = { class: "grid gap-4 sm:grid-cols-2" };
2392
2405
  const _sfc_main$P = /* @__PURE__ */ defineComponent({
2393
2406
  __name: "CheckInSupervisor",
2394
2407
  setup(__props) {
@@ -2456,7 +2469,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2456
2469
  field: unref(fields).building,
2457
2470
  "is-disabled": unref(values).type === "checkin" || unref(values).type === "checkout" || unref(values).type === "out"
2458
2471
  }, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("", true),
2459
- createElementVNode("div", _hoisted_1$c, [
2472
+ createElementVNode("div", _hoisted_1$d, [
2460
2473
  createVNode(unref(NeonField), mergeProps({
2461
2474
  modelValue: unref(values).type,
2462
2475
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -2499,8 +2512,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2499
2512
  });
2500
2513
  const CheckInSupervisor_vue_vue_type_style_index_0_scoped_551b53ec_lang = "";
2501
2514
  const CheckInSupervisor = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-551b53ec"]]);
2502
- const _hoisted_1$b = { class: "operasional-identitas" };
2503
- const _hoisted_2$9 = {
2515
+ const _hoisted_1$c = { class: "operasional-identitas" };
2516
+ const _hoisted_2$a = {
2504
2517
  key: 2,
2505
2518
  class: "section"
2506
2519
  };
@@ -2763,7 +2776,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2763
2776
  candidateId.value = null;
2764
2777
  }
2765
2778
  return (_ctx, _cache) => {
2766
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
2779
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
2767
2780
  state.value === "connect" ? (openBlock(), createBlock(unref(IdentitasConnect), {
2768
2781
  key: 0,
2769
2782
  user: user.value,
@@ -2813,7 +2826,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2813
2826
  }),
2814
2827
  _: 1
2815
2828
  }, 8, ["initial-values", "is-loading", "errors"])) : createCommentVNode("", true),
2816
- user.value && onDelegate ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
2829
+ user.value && onDelegate ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
2817
2830
  createVNode(unref(NeonDivider), {
2818
2831
  "is-dashed": "",
2819
2832
  label: "Delegasi",
@@ -3327,7 +3340,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
3327
3340
  });
3328
3341
  const PlanTypeSingle_vue_vue_type_style_index_0_scoped_7690175d_lang = "";
3329
3342
  const PlanTypeSingle = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-7690175d"]]);
3330
- const _hoisted_1$a = { class: "flex flex-wrap" };
3343
+ const _hoisted_1$b = { class: "flex flex-wrap" };
3331
3344
  const _sfc_main$I = /* @__PURE__ */ defineComponent({
3332
3345
  ...{ name: "ProgressButton" },
3333
3346
  __name: "ProgressButton",
@@ -3343,7 +3356,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
3343
3356
  router.push("/penugasan/yesterday-progresses/new");
3344
3357
  };
3345
3358
  return (_ctx, _cache) => {
3346
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
3359
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
3347
3360
  createVNode(unref(NeonButton), {
3348
3361
  "is-rounded": true,
3349
3362
  size: "sm",
@@ -3374,7 +3387,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
3374
3387
  };
3375
3388
  }
3376
3389
  });
3377
- const _hoisted_1$9 = { class: "flex flex-wrap" };
3390
+ const _hoisted_1$a = { class: "flex flex-wrap" };
3378
3391
  const _sfc_main$H = /* @__PURE__ */ defineComponent({
3379
3392
  ...{ name: "ProgressNoteButton" },
3380
3393
  __name: "ProgressNoteButton",
@@ -3384,7 +3397,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
3384
3397
  router.push("/penugasan/notes/new");
3385
3398
  };
3386
3399
  return (_ctx, _cache) => {
3387
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
3400
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
3388
3401
  createVNode(unref(NeonButton), {
3389
3402
  "is-rounded": true,
3390
3403
  size: "sm",
@@ -3489,8 +3502,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
3489
3502
  });
3490
3503
  const ProgressCollection_vue_vue_type_style_index_0_scoped_73139a91_lang = "";
3491
3504
  const ProgressCollection = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-73139a91"]]);
3492
- const _hoisted_1$8 = { class: "grid gap-2 sm:grid-cols-2" };
3493
- const _hoisted_2$8 = { class: "text-right text-fg-subdued text-sm" };
3505
+ const _hoisted_1$9 = { class: "grid gap-2 sm:grid-cols-2" };
3506
+ const _hoisted_2$9 = { class: "text-right text-fg-subdued text-sm" };
3494
3507
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
3495
3508
  __name: "ProgressSingle",
3496
3509
  setup(__props) {
@@ -3509,32 +3522,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3509
3522
  saveOne,
3510
3523
  discardChanges
3511
3524
  } = useSingle();
3512
- const responsibilityOptions = computed(() => {
3513
- var _a2, _b;
3514
- return {
3515
- filter: [
3516
- {
3517
- handle: "condition",
3518
- operator: "eq",
3519
- value: "active"
3520
- },
3521
- {
3522
- $or: [
3523
- {
3524
- handle: "staffWorkIds",
3525
- operator: "in",
3526
- value: (_a2 = staff.value) == null ? void 0 : _a2.id
3527
- },
3528
- {
3529
- handle: "staffSuperviseIds",
3530
- operator: "in",
3531
- value: (_b = staff.value) == null ? void 0 : _b.id
3532
- }
3533
- ]
3534
- }
3535
- ]
3536
- };
3537
- });
3525
+ usePermit();
3526
+ const path = useRoute().path;
3538
3527
  const key = ref(0);
3539
3528
  const diff = computed(() => {
3540
3529
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
@@ -3559,19 +3548,35 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3559
3548
  const sekarang = DateUtil.day(/* @__PURE__ */ new Date());
3560
3549
  const besok = sekarang;
3561
3550
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
3551
+ watch(
3552
+ isNew,
3553
+ (isNew2) => {
3554
+ var _a2;
3555
+ if (!isNew2)
3556
+ return;
3557
+ values.value.staffIds = [staffId];
3558
+ values.value.staffs = [
3559
+ {
3560
+ id: staffId,
3561
+ flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
3562
+ }
3563
+ ];
3564
+ },
3565
+ {
3566
+ immediate: true
3567
+ }
3568
+ );
3562
3569
  watch(isNew, setDefaultValues, { immediate: true });
3563
3570
  async function setDefaultValues() {
3564
- var _a2;
3565
3571
  if (!isNew.value)
3566
3572
  return;
3567
3573
  await PromiseUtil.wait(500);
3568
3574
  const defaultValues = {
3569
- staffIds: [staffId],
3570
- staffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
3571
3575
  startedAt: besok.second(0).millisecond(0).toISOString(),
3572
3576
  endedAt: besok.add(90, "m").toISOString()
3573
3577
  };
3574
- values.value = defaultValues;
3578
+ values.value.startedAt = defaultValues.startedAt;
3579
+ values.value.endedAt = defaultValues.endedAt;
3575
3580
  }
3576
3581
  const submissionOptions = computed(() => {
3577
3582
  return {
@@ -3589,6 +3594,46 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3589
3594
  ]
3590
3595
  };
3591
3596
  });
3597
+ const taskOptions = computed(() => {
3598
+ var _a2, _b;
3599
+ return Query.define({
3600
+ filter: [
3601
+ {
3602
+ estimatedStartDate: {
3603
+ $lte: values.value.startedAt
3604
+ },
3605
+ estimatedEndDate: {
3606
+ $gte: values.value.startedAt
3607
+ }
3608
+ },
3609
+ {
3610
+ $or: [
3611
+ {
3612
+ handle: "givingAssignmentIds",
3613
+ operator: "in",
3614
+ value: (_a2 = staff.value) == null ? void 0 : _a2.id
3615
+ },
3616
+ {
3617
+ handle: "doingAssignmentIds",
3618
+ operator: "in",
3619
+ value: (_b = staff.value) == null ? void 0 : _b.id
3620
+ }
3621
+ ]
3622
+ },
3623
+ {
3624
+ completedDate: {
3625
+ $eq: null
3626
+ }
3627
+ },
3628
+ {
3629
+ canceledDate: {
3630
+ $eq: null
3631
+ }
3632
+ }
3633
+ ],
3634
+ sort: [{ handle: "estimatedStartDate", direction: "ascending" }]
3635
+ });
3636
+ });
3592
3637
  return (_ctx, _cache) => {
3593
3638
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-progress-single" }, {
3594
3639
  default: withCtx(() => [
@@ -3609,112 +3654,145 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3609
3654
  onCancel: unref(discardChanges),
3610
3655
  onSubmit: unref(saveOne)
3611
3656
  }, {
3612
- default: withCtx(() => [
3613
- createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
3614
- default: withCtx(() => [
3615
- (openBlock(), createBlock(unref(NeonField), mergeProps({
3616
- key: key.value,
3617
- "model-value": unref(values).startedAt
3657
+ default: withCtx(() => {
3658
+ var _a2, _b;
3659
+ return [
3660
+ createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
3661
+ default: withCtx(() => [
3662
+ (openBlock(), createBlock(unref(NeonField), mergeProps({
3663
+ key: key.value,
3664
+ "model-value": unref(values).startedAt
3665
+ }, {
3666
+ handle: "startedAt",
3667
+ name: "Tanggal",
3668
+ type: "date",
3669
+ input: "date2",
3670
+ options: {
3671
+ note: "Tanggal progress."
3672
+ }
3673
+ }, { "onUpdate:modelValue": onStartedAtUpdate }), null, 16, ["model-value"])),
3674
+ createVNode(unref(NeonField), mergeProps({
3675
+ modelValue: unref(values).detail,
3676
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).detail = $event)
3677
+ }, unref(fields).detail), null, 16, ["modelValue"])
3678
+ ]),
3679
+ _: 1
3680
+ }),
3681
+ createElementVNode("div", _hoisted_1$9, [
3682
+ createVNode(unref(NeonField), mergeProps({
3683
+ modelValue: unref(values).startedAt,
3684
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
3618
3685
  }, {
3619
3686
  handle: "startedAt",
3620
- name: "Tanggal",
3621
- type: "date",
3622
- input: "date2",
3687
+ name: "Mulai",
3623
3688
  options: {
3624
- note: "Tanggal progress."
3689
+ note: "Jam mulai."
3625
3690
  }
3626
- }, { "onUpdate:modelValue": onStartedAtUpdate }), null, 16, ["model-value"])),
3691
+ }), {
3692
+ input: withCtx(() => [
3693
+ createVNode(unref(NeonTime), {
3694
+ modelValue: unref(values).startedAt,
3695
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).startedAt = $event),
3696
+ "is-loading": unref(isLoading),
3697
+ class: "mt-2"
3698
+ }, null, 8, ["modelValue", "is-loading"])
3699
+ ]),
3700
+ _: 1
3701
+ }, 16, ["modelValue"]),
3627
3702
  createVNode(unref(NeonField), mergeProps({
3628
- modelValue: unref(values).detail,
3629
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).detail = $event)
3630
- }, unref(fields).detail), null, 16, ["modelValue"])
3703
+ modelValue: unref(values).endedAt,
3704
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).endedAt = $event)
3705
+ }, {
3706
+ handle: "endedAt",
3707
+ name: "Selesai",
3708
+ options: {
3709
+ note: "Jam selesai."
3710
+ }
3711
+ }), {
3712
+ input: withCtx(() => [
3713
+ createVNode(unref(NeonTime), {
3714
+ modelValue: unref(values).endedAt,
3715
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).endedAt = $event),
3716
+ "is-loading": unref(isLoading),
3717
+ class: "mt-2"
3718
+ }, null, 8, ["modelValue", "is-loading"]),
3719
+ createElementVNode("div", _hoisted_2$9, toDisplayString(duration.value), 1)
3720
+ ]),
3721
+ _: 1
3722
+ }, 16, ["modelValue"])
3631
3723
  ]),
3632
- _: 1
3633
- }),
3634
- createElementVNode("div", _hoisted_1$8, [
3724
+ createVNode(unref(OfficeRelation), {
3725
+ modelValue: unref(values),
3726
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
3727
+ field: unref(fields).staffs
3728
+ }, null, 8, ["modelValue", "field"]),
3635
3729
  createVNode(unref(NeonField), mergeProps({
3636
- modelValue: unref(values).startedAt,
3637
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
3638
- }, {
3639
- handle: "startedAt",
3640
- name: "Mulai",
3641
- options: {
3642
- note: "Jam mulai."
3643
- }
3644
- }), {
3730
+ modelValue: unref(values).isNotes,
3731
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).isNotes = $event)
3732
+ }, unref(fields).isNotes), {
3645
3733
  input: withCtx(() => [
3646
- createVNode(unref(NeonTime), {
3647
- modelValue: unref(values).startedAt,
3648
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).startedAt = $event),
3649
- "is-loading": unref(isLoading),
3734
+ createVNode(unref(NeonCheck), {
3735
+ modelValue: unref(values).isNotes,
3736
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).isNotes = $event),
3737
+ label: "Catatan",
3650
3738
  class: "mt-2"
3651
- }, null, 8, ["modelValue", "is-loading"])
3739
+ }, null, 8, ["modelValue"])
3652
3740
  ]),
3653
3741
  _: 1
3654
3742
  }, 16, ["modelValue"]),
3655
- createVNode(unref(NeonField), mergeProps({
3656
- modelValue: unref(values).endedAt,
3657
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).endedAt = $event)
3658
- }, {
3659
- handle: "endedAt",
3660
- name: "Selesai",
3661
- options: {
3662
- note: "Jam selesai."
3663
- }
3664
- }), {
3665
- input: withCtx(() => [
3666
- createVNode(unref(NeonTime), {
3667
- modelValue: unref(values).endedAt,
3668
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).endedAt = $event),
3669
- "is-loading": unref(isLoading),
3670
- class: "mt-2"
3671
- }, null, 8, ["modelValue", "is-loading"]),
3672
- createElementVNode("div", _hoisted_2$8, toDisplayString(duration.value), 1)
3673
- ]),
3674
- _: 1
3675
- }, 16, ["modelValue"])
3676
- ]),
3677
- createVNode(unref(OfficeRelation), {
3678
- modelValue: unref(values),
3679
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
3680
- field: unref(fields).staffs
3681
- }, null, 8, ["modelValue", "field"]),
3682
- createVNode(unref(NeonField), mergeProps({
3683
- modelValue: unref(values).isNotes,
3684
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).isNotes = $event)
3685
- }, unref(fields).isNotes), {
3686
- input: withCtx(() => [
3687
- createVNode(unref(NeonCheck), {
3688
- modelValue: unref(values).isNotes,
3689
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).isNotes = $event),
3690
- label: "Catatan",
3691
- class: "mt-2"
3692
- }, null, 8, ["modelValue"])
3693
- ]),
3694
- _: 1
3695
- }, 16, ["modelValue"]),
3696
- createVNode(unref(OfficeRelation), {
3697
- modelValue: unref(values),
3698
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
3699
- field: unref(fields).accessStaffs
3700
- }, null, 8, ["modelValue", "field"]),
3701
- createVNode(unref(NeonDivider), {
3702
- "is-dashed": "",
3703
- label: "Referensi"
3704
- }),
3705
- createVNode(unref(OfficeRelation), {
3706
- modelValue: unref(values),
3707
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isRef(values) ? values.value = $event : null),
3708
- field: unref(fields).responsibilities,
3709
- query: unref(Query).define(responsibilityOptions.value)
3710
- }, null, 8, ["modelValue", "field", "query"]),
3711
- createVNode(unref(OfficeRelation), {
3712
- modelValue: unref(values),
3713
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(values) ? values.value = $event : null),
3714
- field: unref(fields).submissions,
3715
- query: unref(Query).define(submissionOptions.value)
3716
- }, null, 8, ["modelValue", "field", "query"])
3717
- ]),
3743
+ createVNode(unref(OfficeRelation), {
3744
+ modelValue: unref(values),
3745
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
3746
+ field: unref(fields).accessStaffs
3747
+ }, null, 8, ["modelValue", "field"]),
3748
+ createVNode(unref(NeonDivider), {
3749
+ "is-dashed": "",
3750
+ label: "Referensi"
3751
+ }),
3752
+ createVNode(unref(OfficeRelation), {
3753
+ modelValue: unref(values),
3754
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isRef(values) ? values.value = $event : null),
3755
+ field: unref(fields).responsibilities,
3756
+ query: unref(Query).define({
3757
+ filter: [
3758
+ {
3759
+ handle: "condition",
3760
+ operator: "eq",
3761
+ value: "active"
3762
+ },
3763
+ {
3764
+ $or: [
3765
+ {
3766
+ handle: "staffWorkIds",
3767
+ operator: "in",
3768
+ value: (_a2 = unref(staff)) == null ? void 0 : _a2.id
3769
+ },
3770
+ {
3771
+ handle: "staffSuperviseIds",
3772
+ operator: "in",
3773
+ value: (_b = unref(staff)) == null ? void 0 : _b.id
3774
+ }
3775
+ ]
3776
+ }
3777
+ ],
3778
+ sort: [{ handle: "title", direction: "ascending" }]
3779
+ })
3780
+ }, null, 8, ["modelValue", "field", "query"]),
3781
+ createVNode(unref(OfficeRelation), {
3782
+ modelValue: unref(values),
3783
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(values) ? values.value = $event : null),
3784
+ field: unref(fields).submissions,
3785
+ query: unref(Query).define(submissionOptions.value)
3786
+ }, null, 8, ["modelValue", "field", "query"]),
3787
+ unref(path) !== "/pengawas/progresses" ? (openBlock(), createBlock(unref(OfficeRelation), {
3788
+ key: 0,
3789
+ modelValue: unref(values),
3790
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(values) ? values.value = $event : null),
3791
+ field: unref(fields).tasks,
3792
+ query: taskOptions.value
3793
+ }, null, 8, ["modelValue", "field", "query"])) : createCommentVNode("", true)
3794
+ ];
3795
+ }),
3718
3796
  _: 1
3719
3797
  }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
3720
3798
  ]),
@@ -3730,10 +3808,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3730
3808
  };
3731
3809
  }
3732
3810
  });
3733
- const ProgressSingle_vue_vue_type_style_index_0_scoped_1a87343f_lang = "";
3734
- const ProgressSingle = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-1a87343f"]]);
3735
- const _hoisted_1$7 = { class: "grid gap-2 sm:grid-cols-2" };
3736
- const _hoisted_2$7 = { class: "text-right text-fg-subdued text-sm" };
3811
+ const ProgressSingle_vue_vue_type_style_index_0_scoped_71539dd3_lang = "";
3812
+ const ProgressSingle = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-71539dd3"]]);
3813
+ const _hoisted_1$8 = { class: "grid gap-2 sm:grid-cols-2" };
3814
+ const _hoisted_2$8 = { class: "text-right text-fg-subdued text-sm" };
3737
3815
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
3738
3816
  __name: "ProgressTomorrow",
3739
3817
  setup(__props) {
@@ -3880,7 +3958,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3880
3958
  ]),
3881
3959
  _: 1
3882
3960
  }),
3883
- createElementVNode("div", _hoisted_1$7, [
3961
+ createElementVNode("div", _hoisted_1$8, [
3884
3962
  createVNode(unref(NeonField), mergeProps({
3885
3963
  modelValue: unref(values).startedAt,
3886
3964
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
@@ -3918,7 +3996,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3918
3996
  "is-loading": unref(isLoading),
3919
3997
  class: "mt-2"
3920
3998
  }, null, 8, ["modelValue", "is-loading"]),
3921
- createElementVNode("div", _hoisted_2$7, toDisplayString(duration.value), 1)
3999
+ createElementVNode("div", _hoisted_2$8, toDisplayString(duration.value), 1)
3922
4000
  ]),
3923
4001
  _: 1
3924
4002
  }, 16, ["modelValue"])
@@ -3981,8 +4059,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3981
4059
  });
3982
4060
  const ProgressTomorrow_vue_vue_type_style_index_0_scoped_6cdcef51_lang = "";
3983
4061
  const ProgressTomorrow = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-6cdcef51"]]);
3984
- const _hoisted_1$6 = { class: "grid gap-2 sm:grid-cols-2" };
3985
- const _hoisted_2$6 = { class: "text-right text-fg-subdued text-sm" };
4062
+ const _hoisted_1$7 = { class: "grid gap-2 sm:grid-cols-2" };
4063
+ const _hoisted_2$7 = { class: "text-right text-fg-subdued text-sm" };
3986
4064
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
3987
4065
  __name: "ProgressYesterday",
3988
4066
  setup(__props) {
@@ -4129,7 +4207,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
4129
4207
  ]),
4130
4208
  _: 1
4131
4209
  }),
4132
- createElementVNode("div", _hoisted_1$6, [
4210
+ createElementVNode("div", _hoisted_1$7, [
4133
4211
  createVNode(unref(NeonField), mergeProps({
4134
4212
  modelValue: unref(values).startedAt,
4135
4213
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
@@ -4167,7 +4245,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
4167
4245
  "is-loading": unref(isLoading),
4168
4246
  class: "mt-2"
4169
4247
  }, null, 8, ["modelValue", "is-loading"]),
4170
- createElementVNode("div", _hoisted_2$6, toDisplayString(duration.value), 1)
4248
+ createElementVNode("div", _hoisted_2$7, toDisplayString(duration.value), 1)
4171
4249
  ]),
4172
4250
  _: 1
4173
4251
  }, 16, ["modelValue"])
@@ -5642,8 +5720,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
5642
5720
  };
5643
5721
  }
5644
5722
  });
5645
- const _hoisted_1$5 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5646
- const _hoisted_2$5 = { class: "grid gap-4 sm:grid-cols-2" };
5723
+ const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5724
+ const _hoisted_2$6 = { class: "grid gap-4 sm:grid-cols-2" };
5647
5725
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
5648
5726
  __name: "StaffSingle",
5649
5727
  setup(__props) {
@@ -5681,7 +5759,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5681
5759
  onSubmit: unref(saveOne)
5682
5760
  }, {
5683
5761
  default: withCtx(() => [
5684
- createElementVNode("div", _hoisted_1$5, [
5762
+ createElementVNode("div", _hoisted_1$6, [
5685
5763
  createVNode(unref(NeonField), mergeProps({
5686
5764
  modelValue: unref(values).name,
5687
5765
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).name = $event)
@@ -5691,7 +5769,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5691
5769
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).nik = $event)
5692
5770
  }, unref(fields).nik), null, 16, ["modelValue"])
5693
5771
  ]),
5694
- createElementVNode("div", _hoisted_2$5, [
5772
+ createElementVNode("div", _hoisted_2$6, [
5695
5773
  createVNode(unref(NeonField), mergeProps({
5696
5774
  modelValue: unref(values).birthPlace,
5697
5775
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).birthPlace = $event)
@@ -5701,13 +5779,17 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5701
5779
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).birthDate = $event)
5702
5780
  }, unref(fields).birthDate), null, 16, ["modelValue"])
5703
5781
  ]),
5782
+ createVNode(unref(NeonField), mergeProps({
5783
+ modelValue: unref(values).status,
5784
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).status = $event)
5785
+ }, unref(fields).status), null, 16, ["modelValue"]),
5704
5786
  createVNode(unref(NeonField), mergeProps({
5705
5787
  modelValue: unref(values).image,
5706
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).image = $event)
5788
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).image = $event)
5707
5789
  }, unref(fields).image), null, 16, ["modelValue"]),
5708
5790
  createVNode(unref(NeonField), mergeProps({
5709
5791
  modelValue: unref(values).note,
5710
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).note = $event)
5792
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).note = $event)
5711
5793
  }, unref(fields).note), null, 16, ["modelValue"])
5712
5794
  ]),
5713
5795
  _: 1
@@ -5743,13 +5825,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5743
5825
  default: withCtx(() => [
5744
5826
  createVNode(unref(OfficeRelation), {
5745
5827
  modelValue: unref(values),
5746
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
5828
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
5747
5829
  field: unref(fields).branch,
5748
5830
  fragment: { id: 1, display: 1, name: 1 }
5749
5831
  }, null, 8, ["modelValue", "field"]),
5750
5832
  createVNode(unref(OfficeRelation), {
5751
5833
  modelValue: unref(values),
5752
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
5834
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
5753
5835
  field: unref(fields).branches,
5754
5836
  fragment: { id: 1, display: 1, name: 1 }
5755
5837
  }, null, 8, ["modelValue", "field"])
@@ -5768,10 +5850,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5768
5850
  };
5769
5851
  }
5770
5852
  });
5771
- const StaffSingle_vue_vue_type_style_index_0_scoped_0cf4cd99_lang = "";
5772
- const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-0cf4cd99"]]);
5773
- const _hoisted_1$4 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5774
- const _hoisted_2$4 = { class: "grid gap-4 sm:grid-cols-2" };
5853
+ const StaffSingle_vue_vue_type_style_index_0_scoped_9b47f55c_lang = "";
5854
+ const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-9b47f55c"]]);
5855
+ const _hoisted_1$5 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5856
+ const _hoisted_2$5 = { class: "grid gap-4 sm:grid-cols-2" };
5775
5857
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
5776
5858
  __name: "StaffOperasional",
5777
5859
  setup(__props) {
@@ -5809,7 +5891,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5809
5891
  onSubmit: unref(saveOne)
5810
5892
  }, {
5811
5893
  default: withCtx(() => [
5812
- createElementVNode("div", _hoisted_1$4, [
5894
+ createElementVNode("div", _hoisted_1$5, [
5813
5895
  createVNode(unref(NeonField), mergeProps({
5814
5896
  modelValue: unref(values).name,
5815
5897
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).name = $event)
@@ -5819,7 +5901,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5819
5901
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).nik = $event)
5820
5902
  }, unref(fields).nik), null, 16, ["modelValue"])
5821
5903
  ]),
5822
- createElementVNode("div", _hoisted_2$4, [
5904
+ createElementVNode("div", _hoisted_2$5, [
5823
5905
  createVNode(unref(NeonField), mergeProps({
5824
5906
  modelValue: unref(values).birthPlace,
5825
5907
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).birthPlace = $event)
@@ -5829,13 +5911,17 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5829
5911
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).birthDate = $event)
5830
5912
  }, unref(fields).birthDate), null, 16, ["modelValue"])
5831
5913
  ]),
5914
+ createVNode(unref(NeonField), mergeProps({
5915
+ modelValue: unref(values).status,
5916
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).status = $event)
5917
+ }, unref(fields).status), null, 16, ["modelValue"]),
5832
5918
  createVNode(unref(NeonField), mergeProps({
5833
5919
  modelValue: unref(values).image,
5834
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).image = $event)
5920
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).image = $event)
5835
5921
  }, unref(fields).image), null, 16, ["modelValue"]),
5836
5922
  createVNode(unref(NeonField), mergeProps({
5837
5923
  modelValue: unref(values).note,
5838
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).note = $event)
5924
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).note = $event)
5839
5925
  }, unref(fields).note), null, 16, ["modelValue"])
5840
5926
  ]),
5841
5927
  _: 1
@@ -5871,13 +5957,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5871
5957
  default: withCtx(() => [
5872
5958
  createVNode(unref(OfficeRelation), {
5873
5959
  modelValue: unref(values),
5874
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
5960
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
5875
5961
  field: unref(fields).branch,
5876
5962
  fragment: { id: 1, display: 1, name: 1 }
5877
5963
  }, null, 8, ["modelValue", "field"]),
5878
5964
  createVNode(unref(OfficeRelation), {
5879
5965
  modelValue: unref(values),
5880
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
5966
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
5881
5967
  field: unref(fields).branches,
5882
5968
  fragment: { id: 1, display: 1, name: 1 }
5883
5969
  }, null, 8, ["modelValue", "field"])
@@ -5918,8 +6004,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5918
6004
  };
5919
6005
  }
5920
6006
  });
5921
- const StaffOperasional_vue_vue_type_style_index_0_scoped_c62cf70a_lang = "";
5922
- const StaffOperasional = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-c62cf70a"]]);
6007
+ const StaffOperasional_vue_vue_type_style_index_0_scoped_c1a371ec_lang = "";
6008
+ const StaffOperasional = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-c1a371ec"]]);
5923
6009
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
5924
6010
  __name: "StaffIdentity",
5925
6011
  setup(__props) {
@@ -6024,6 +6110,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6024
6110
  },
6025
6111
  // END OPERASIONAL
6026
6112
  { id: "63e1734b78ae4f8388b1b313", name: "Cabang Pendidikan" },
6113
+ { id: "64e6e0669103ea42a4f7d4d0", name: "Cabang KBM" },
6027
6114
  // { id: '6309c2aae64a1324b8663d96', name: 'Admin Pendidikan' },
6028
6115
  { id: "643f6c0bd760fc7b529d4a5d", name: "Pengelola Pengajar" },
6029
6116
  // Keuangan
@@ -6076,6 +6163,40 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6076
6163
  {
6077
6164
  id: "6454a6c2d760fc7b529d4f4f",
6078
6165
  name: "Karyawan Marketing Cabang"
6166
+ },
6167
+ // INVENTORI
6168
+ {
6169
+ id: "64e7f2089103ea42a4f7d512",
6170
+ name: "Cabang Inventori"
6171
+ },
6172
+ {
6173
+ id: "64e7f3629103ea42a4f7d535",
6174
+ name: "Cabang Outlet"
6175
+ },
6176
+ {
6177
+ id: "64e7f3c39103ea42a4f7d552",
6178
+ name: "Pengadaan Inventori"
6179
+ },
6180
+ {
6181
+ id: "64e7f4309103ea42a4f7d579",
6182
+ name: "Pengawasan Pengadaan Inventori"
6183
+ },
6184
+ {
6185
+ id: "64e7f46d9103ea42a4f7d596",
6186
+ name: "Cabang Pengadaan"
6187
+ },
6188
+ {
6189
+ id: "64e817419103ea42a4f7d5bd",
6190
+ name: "Pengelola Resep"
6191
+ },
6192
+ {
6193
+ id: "64e9aa869103ea42a4f7d6a9",
6194
+ name: "Pengawas Inventori"
6195
+ },
6196
+ // Sentral
6197
+ {
6198
+ id: "650917b39103ea42a4f7e189",
6199
+ name: "Pengelola Export"
6079
6200
  }
6080
6201
  ],
6081
6202
  errors: errors.value,
@@ -6354,25 +6475,21 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
6354
6475
  };
6355
6476
  });
6356
6477
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
6357
- watch(
6358
- isNew,
6359
- (isNew2) => {
6360
- var _a2;
6361
- if (!isNew2)
6362
- return;
6363
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
6364
- values.value.submissionStaffIds = [staffId];
6365
- values.value.submissionStaffs = [
6366
- {
6367
- id: staffId,
6368
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
6369
- }
6370
- ];
6371
- },
6372
- {
6373
- immediate: true
6374
- }
6375
- );
6478
+ watch(isNew, setDefaultValues, { immediate: true });
6479
+ async function setDefaultValues() {
6480
+ var _a2;
6481
+ if (!isNew.value)
6482
+ return;
6483
+ await PromiseUtil.wait(500);
6484
+ const defaultValues = {
6485
+ submissionStaffIds: [staffId],
6486
+ submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
6487
+ preparedAt: (/* @__PURE__ */ new Date()).toISOString()
6488
+ };
6489
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
6490
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
6491
+ values.value.preparedAt = defaultValues.preparedAt;
6492
+ }
6376
6493
  const syncRaise = async () => {
6377
6494
  await executeOne("raiseSubmission", { submissionId: id.value });
6378
6495
  await syncOne();
@@ -6545,8 +6662,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
6545
6662
  };
6546
6663
  }
6547
6664
  });
6548
- const SubmissionStaff_vue_vue_type_style_index_0_scoped_db426ce1_lang = "";
6549
- const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-db426ce1"]]);
6665
+ const SubmissionStaff_vue_vue_type_style_index_0_scoped_21c19bac_lang = "";
6666
+ const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-21c19bac"]]);
6550
6667
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
6551
6668
  __name: "SubmissionFollowUp",
6552
6669
  setup(__props) {
@@ -6698,10 +6815,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
6698
6815
  });
6699
6816
  const SubmissionFollowUp_vue_vue_type_style_index_0_scoped_3f0580bf_lang = "";
6700
6817
  const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-3f0580bf"]]);
6701
- const _hoisted_1$3 = { class: "flex flex-wrap" };
6702
- const _hoisted_2$3 = { class: "mt-2" };
6703
- const _hoisted_3$2 = { class: "mt-2" };
6704
- const _hoisted_4 = { class: "mt-2" };
6818
+ const _hoisted_1$4 = { class: "flex flex-wrap" };
6819
+ const _hoisted_2$4 = { class: "mt-2" };
6820
+ const _hoisted_3$3 = { class: "mt-2" };
6821
+ const _hoisted_4$1 = { class: "mt-2" };
6705
6822
  const _hoisted_5 = { class: "mt-2" };
6706
6823
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
6707
6824
  __name: "SubmissionAudit",
@@ -6747,25 +6864,21 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6747
6864
  };
6748
6865
  });
6749
6866
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
6750
- watch(
6751
- isNew,
6752
- (isNew2) => {
6753
- var _a2;
6754
- if (!isNew2)
6755
- return;
6756
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
6757
- values.value.submissionStaffIds = [staffId];
6758
- values.value.submissionStaffs = [
6759
- {
6760
- id: staffId,
6761
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
6762
- }
6763
- ];
6764
- },
6765
- {
6766
- immediate: true
6767
- }
6768
- );
6867
+ watch(isNew, setDefaultValues, { immediate: true });
6868
+ async function setDefaultValues() {
6869
+ var _a2;
6870
+ if (!isNew.value)
6871
+ return;
6872
+ await PromiseUtil.wait(500);
6873
+ const defaultValues = {
6874
+ submissionStaffIds: [staffId],
6875
+ submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
6876
+ preparedAt: (/* @__PURE__ */ new Date()).toISOString()
6877
+ };
6878
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
6879
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
6880
+ values.value.preparedAt = defaultValues.preparedAt;
6881
+ }
6769
6882
  const syncResolved = async () => {
6770
6883
  await executeOne("resolvedSubmission", { submissionId: id.value });
6771
6884
  await syncOne();
@@ -6803,8 +6916,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6803
6916
  onSubmit: unref(saveOne)
6804
6917
  }, {
6805
6918
  default: withCtx(() => [
6806
- createElementVNode("div", _hoisted_1$3, [
6807
- createElementVNode("div", _hoisted_2$3, [
6919
+ createElementVNode("div", _hoisted_1$4, [
6920
+ createElementVNode("div", _hoisted_2$4, [
6808
6921
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6809
6922
  input: withCtx(() => [
6810
6923
  createVNode(unref(NeonButton), {
@@ -6824,7 +6937,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6824
6937
  })) : createCommentVNode("", true)
6825
6938
  ]),
6826
6939
  createTextVNode("    "),
6827
- createElementVNode("div", _hoisted_3$2, [
6940
+ createElementVNode("div", _hoisted_3$3, [
6828
6941
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6829
6942
  input: withCtx(() => [
6830
6943
  createVNode(unref(NeonButton), {
@@ -6844,7 +6957,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6844
6957
  })) : createCommentVNode("", true)
6845
6958
  ]),
6846
6959
  createTextVNode("    "),
6847
- createElementVNode("div", _hoisted_4, [
6960
+ createElementVNode("div", _hoisted_4$1, [
6848
6961
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6849
6962
  input: withCtx(() => [
6850
6963
  createVNode(unref(NeonButton), {
@@ -7051,11 +7164,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
7051
7164
  };
7052
7165
  }
7053
7166
  });
7054
- const SubmissionAudit_vue_vue_type_style_index_0_scoped_a32c1b8b_lang = "";
7055
- const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-a32c1b8b"]]);
7056
- const _hoisted_1$2 = { class: "flex flex-wrap" };
7057
- const _hoisted_2$2 = { class: "mt-2" };
7058
- const _hoisted_3$1 = { class: "mt-2" };
7167
+ const SubmissionAudit_vue_vue_type_style_index_0_scoped_c6a38aff_lang = "";
7168
+ const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-c6a38aff"]]);
7169
+ const _hoisted_1$3 = { class: "flex flex-wrap" };
7170
+ const _hoisted_2$3 = { class: "mt-2" };
7171
+ const _hoisted_3$2 = { class: "mt-2" };
7059
7172
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
7060
7173
  __name: "SubmissionDecision",
7061
7174
  setup(__props) {
@@ -7100,25 +7213,21 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7100
7213
  };
7101
7214
  });
7102
7215
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
7103
- watch(
7104
- isNew,
7105
- (isNew2) => {
7106
- var _a2;
7107
- if (!isNew2)
7108
- return;
7109
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
7110
- values.value.submissionStaffIds = [staffId];
7111
- values.value.submissionStaffs = [
7112
- {
7113
- id: staffId,
7114
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
7115
- }
7116
- ];
7117
- },
7118
- {
7119
- immediate: true
7120
- }
7121
- );
7216
+ watch(isNew, setDefaultValues, { immediate: true });
7217
+ async function setDefaultValues() {
7218
+ var _a2;
7219
+ if (!isNew.value)
7220
+ return;
7221
+ await PromiseUtil.wait(500);
7222
+ const defaultValues = {
7223
+ submissionStaffIds: [staffId],
7224
+ submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
7225
+ preparedAt: (/* @__PURE__ */ new Date()).toISOString()
7226
+ };
7227
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
7228
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
7229
+ values.value.preparedAt = defaultValues.preparedAt;
7230
+ }
7122
7231
  const syncDelay = async () => {
7123
7232
  var _a2;
7124
7233
  await executeOne("delaySubmission", {
@@ -7156,8 +7265,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7156
7265
  onSubmit: unref(saveOne)
7157
7266
  }, {
7158
7267
  default: withCtx(() => [
7159
- createElementVNode("div", _hoisted_1$2, [
7160
- createElementVNode("div", _hoisted_2$2, [
7268
+ createElementVNode("div", _hoisted_1$3, [
7269
+ createElementVNode("div", _hoisted_2$3, [
7161
7270
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7162
7271
  input: withCtx(() => {
7163
7272
  var _a2, _b;
@@ -7180,7 +7289,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7180
7289
  })) : createCommentVNode("", true)
7181
7290
  ]),
7182
7291
  createTextVNode("    "),
7183
- createElementVNode("div", _hoisted_3$1, [
7292
+ createElementVNode("div", _hoisted_3$2, [
7184
7293
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7185
7294
  input: withCtx(() => {
7186
7295
  var _a2, _b;
@@ -7370,11 +7479,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7370
7479
  };
7371
7480
  }
7372
7481
  });
7373
- const SubmissionDecision_vue_vue_type_style_index_0_scoped_71f86b97_lang = "";
7374
- const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-71f86b97"]]);
7375
- const _hoisted_1$1 = { class: "flex flex-wrap" };
7376
- const _hoisted_2$1 = { class: "mt-2" };
7377
- const _hoisted_3 = { class: "mt-2" };
7482
+ const SubmissionDecision_vue_vue_type_style_index_0_scoped_eb7ec311_lang = "";
7483
+ const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-eb7ec311"]]);
7484
+ const _hoisted_1$2 = { class: "flex flex-wrap" };
7485
+ const _hoisted_2$2 = { class: "mt-2" };
7486
+ const _hoisted_3$1 = { class: "mt-2" };
7378
7487
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
7379
7488
  __name: "SubmissionWaitingDecision",
7380
7489
  setup(__props) {
@@ -7419,25 +7528,21 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7419
7528
  };
7420
7529
  });
7421
7530
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
7422
- watch(
7423
- isNew,
7424
- (isNew2) => {
7425
- var _a2;
7426
- if (!isNew2)
7427
- return;
7428
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
7429
- values.value.submissionStaffIds = [staffId];
7430
- values.value.submissionStaffs = [
7431
- {
7432
- id: staffId,
7433
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
7434
- }
7435
- ];
7436
- },
7437
- {
7438
- immediate: true
7439
- }
7440
- );
7531
+ watch(isNew, setDefaultValues, { immediate: true });
7532
+ async function setDefaultValues() {
7533
+ var _a2;
7534
+ if (!isNew.value)
7535
+ return;
7536
+ await PromiseUtil.wait(500);
7537
+ const defaultValues = {
7538
+ submissionStaffIds: [staffId],
7539
+ submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
7540
+ preparedAt: (/* @__PURE__ */ new Date()).toISOString()
7541
+ };
7542
+ values.value.submissionStaffIds = defaultValues.submissionStaffIds;
7543
+ values.value.submissionStaffs = defaultValues.submissionStaffs;
7544
+ values.value.preparedAt = defaultValues.preparedAt;
7545
+ }
7441
7546
  const syncDelay = async () => {
7442
7547
  var _a2;
7443
7548
  await executeOne("delaySubmission", {
@@ -7477,8 +7582,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7477
7582
  onSubmit: unref(saveOne)
7478
7583
  }, {
7479
7584
  default: withCtx(() => [
7480
- createElementVNode("div", _hoisted_1$1, [
7481
- createElementVNode("div", _hoisted_2$1, [
7585
+ createElementVNode("div", _hoisted_1$2, [
7586
+ createElementVNode("div", _hoisted_2$2, [
7482
7587
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7483
7588
  input: withCtx(() => {
7484
7589
  var _a2, _b;
@@ -7501,7 +7606,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7501
7606
  })) : createCommentVNode("", true)
7502
7607
  ]),
7503
7608
  createTextVNode("    "),
7504
- createElementVNode("div", _hoisted_3, [
7609
+ createElementVNode("div", _hoisted_3$1, [
7505
7610
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7506
7611
  input: withCtx(() => {
7507
7612
  var _a2, _b;
@@ -7649,8 +7754,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7649
7754
  };
7650
7755
  }
7651
7756
  });
7652
- const SubmissionWaitingDecision_vue_vue_type_style_index_0_scoped_dee14451_lang = "";
7653
- const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-dee14451"]]);
7757
+ const SubmissionWaitingDecision_vue_vue_type_style_index_0_scoped_1c4b359e_lang = "";
7758
+ const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-1c4b359e"]]);
7654
7759
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7655
7760
  __name: "SubmissionSupervisor",
7656
7761
  setup(__props) {
@@ -8197,8 +8302,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
8197
8302
  const TargetBranch_vue_vue_type_style_index_0_scoped_6a5a6e80_lang = "";
8198
8303
  const TargetBranch = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6a5a6e80"]]);
8199
8304
  const TaskModel = models.TaskModel;
8200
- const _hoisted_1 = { key: 0 };
8201
- const _hoisted_2 = { key: 1 };
8305
+ const _hoisted_1$1 = { key: 0 };
8306
+ const _hoisted_2$1 = { key: 1 };
8202
8307
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8203
8308
  ...{ name: "TaskWorkButton" },
8204
8309
  __name: "TaskWorkButton",
@@ -8289,7 +8394,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8289
8394
  };
8290
8395
  return (_ctx, _cache) => {
8291
8396
  return openBlock(), createElementBlock(Fragment, null, [
8292
- onHandleTaskWork.value.onStartTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_1, [
8397
+ onHandleTaskWork.value.onStartTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
8293
8398
  createVNode(unref(NeonButton), {
8294
8399
  "is-rounded": true,
8295
8400
  size: "sm",
@@ -8299,7 +8404,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8299
8404
  onClick: onClickHandlerStartTaskWork
8300
8405
  })
8301
8406
  ])) : createCommentVNode("", true),
8302
- onHandleTaskWork.value.onFinishedTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_2, [
8407
+ onHandleTaskWork.value.onFinishedTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
8303
8408
  createVNode(unref(NeonButton), {
8304
8409
  "is-rounded": true,
8305
8410
  size: "sm",
@@ -8329,9 +8434,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
8329
8434
  };
8330
8435
  }
8331
8436
  });
8437
+ const _hoisted_1 = { class: "flex flex-wrap gap-2" };
8438
+ const _hoisted_2 = { class: "mt-2" };
8439
+ const _hoisted_3 = { class: "mt-2" };
8440
+ const _hoisted_4 = { class: "mt-2" };
8332
8441
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8333
8442
  __name: "TaskSingle",
8334
8443
  setup(__props) {
8444
+ var _a;
8335
8445
  const {
8336
8446
  fields,
8337
8447
  id,
@@ -8343,12 +8453,87 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8343
8453
  isReady,
8344
8454
  isMain,
8345
8455
  saveOne,
8346
- discardChanges
8456
+ discardChanges,
8457
+ syncOne,
8458
+ executeOne
8347
8459
  } = useSingle();
8348
- function onChangeDateUpdate(date) {
8349
- values.value.estimatedStartDate = date == null ? void 0 : date.start.toISOString();
8350
- values.value.estimatedEndDate = date == null ? void 0 : date.end.toISOString();
8460
+ const { staff } = useOperasional();
8461
+ const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
8462
+ watch(isNew, setDefaultValues, { immediate: true });
8463
+ async function setDefaultValues() {
8464
+ var _a2, _b;
8465
+ if (!isNew.value)
8466
+ return;
8467
+ await PromiseUtil.wait(500);
8468
+ const defaultValues = {
8469
+ doingAssignmentIds: [staffId],
8470
+ doingAssignments: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
8471
+ givingAssignmentIds: [staffId],
8472
+ giveAssignments: [{ id: staffId, flag: (_b = staff.value) == null ? void 0 : _b.flag }]
8473
+ };
8474
+ values.value.doingAssignmentIds = defaultValues.doingAssignmentIds;
8475
+ values.value.doingAssignments = defaultValues.doingAssignments;
8476
+ values.value.givingAssignmentIds = defaultValues.givingAssignmentIds;
8477
+ values.value.giveAssignments = defaultValues.giveAssignments;
8351
8478
  }
8479
+ const submissionOptions = computed(() => {
8480
+ return {
8481
+ filter: [
8482
+ {
8483
+ handle: "status",
8484
+ operator: "in",
8485
+ value: ["approved", "monitored"]
8486
+ },
8487
+ {
8488
+ $or: [
8489
+ {
8490
+ handle: "followUpStaffIds",
8491
+ operator: "in",
8492
+ value: values.value.doingAssignmentIds
8493
+ },
8494
+ {
8495
+ handle: "submissionStaffIds",
8496
+ operator: "in",
8497
+ value: values.value.doingAssignmentIds
8498
+ }
8499
+ ]
8500
+ }
8501
+ ]
8502
+ };
8503
+ });
8504
+ const isDeleted = ref(false);
8505
+ const syncDeleteTask = async () => {
8506
+ const resp = await executeOne("deleteTask", {
8507
+ taskId: id.value,
8508
+ doingAssignmentIds: values.value.doingAssignmentIds,
8509
+ givingAssignmentIds: values.value.givingAssignmentIds
8510
+ });
8511
+ const isSameName = resp.data.executeTask.output.isSameName;
8512
+ if (isSameName === true) {
8513
+ isDeleted.value = false;
8514
+ window.location.href = "/personalia/tasks";
8515
+ } else {
8516
+ isDeleted.value = true;
8517
+ }
8518
+ };
8519
+ const syncDoing = async () => {
8520
+ await executeOne("doingTask", {
8521
+ taskId: id.value
8522
+ });
8523
+ await syncOne();
8524
+ };
8525
+ const syncCompleted = async () => {
8526
+ await executeOne("completedTask", {
8527
+ taskId: id.value
8528
+ });
8529
+ await syncOne();
8530
+ };
8531
+ const syncCanceled = async () => {
8532
+ await executeOne("canceledTask", {
8533
+ taskId: id.value
8534
+ });
8535
+ await syncOne();
8536
+ };
8352
8537
  return (_ctx, _cache) => {
8353
8538
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-task-single" }, {
8354
8539
  default: withCtx(() => [
@@ -8370,162 +8555,216 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8370
8555
  onSubmit: unref(saveOne)
8371
8556
  }, {
8372
8557
  default: withCtx(() => [
8373
- createVNode(unref(NeonField), mergeProps({
8374
- modelValue: unref(values).taskName,
8375
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).taskName = $event)
8376
- }, unref(fields).taskName), null, 16, ["modelValue"]),
8377
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8378
- default: withCtx(() => [
8379
- createVNode(unref(NeonField), mergeProps({
8380
- modelValue: unref(values).internalServiceDescription,
8381
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).internalServiceDescription = $event)
8382
- }, unref(fields).internalServiceDescription), null, 16, ["modelValue"])
8383
- ]),
8384
- _: 1
8385
- }),
8386
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8387
- default: withCtx(() => [
8388
- createVNode(unref(NeonField), mergeProps({
8389
- modelValue: unref(values).externalServiceDescription,
8390
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).externalServiceDescription = $event)
8391
- }, unref(fields).externalServiceDescription), null, 16, ["modelValue"])
8392
- ]),
8393
- _: 1
8394
- }),
8395
- createVNode(unref(OfficeRelation), {
8396
- modelValue: unref(values),
8397
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
8398
- field: unref(fields).branches,
8399
- fragment: { id: 1, display: 1, name: 1 }
8400
- }, null, 8, ["modelValue", "field"]),
8401
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8402
- default: withCtx(() => [
8403
- createVNode(unref(OfficeRelation), {
8404
- modelValue: unref(values),
8405
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(values) ? values.value = $event : null),
8406
- field: unref(fields).giveAssignments
8407
- }, null, 8, ["modelValue", "field"]),
8408
- createVNode(unref(OfficeRelation), {
8409
- modelValue: unref(values),
8410
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
8411
- field: unref(fields).supervisingAssignments
8412
- }, null, 8, ["modelValue", "field"])
8413
- ]),
8414
- _: 1
8415
- }),
8416
- createVNode(unref(NeonFields), { md: "grid gap-3 sm:grid-cols-2" }, {
8417
- default: withCtx(() => [
8418
- createVNode(unref(OfficeRelation), {
8419
- modelValue: unref(values),
8420
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
8421
- field: unref(fields).doingAssignments
8422
- }, null, 8, ["modelValue", "field"]),
8423
- createVNode(unref(OfficeRelation), {
8424
- modelValue: unref(values),
8425
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
8426
- field: unref(fields).helpAssignments
8427
- }, null, 8, ["modelValue", "field"])
8558
+ isDeleted.value == true ? (openBlock(), createBlock(unref(NeonAlert), {
8559
+ key: 0,
8560
+ icon: "circle-info",
8561
+ label: "Akses hapus ditahan.",
8562
+ description: "Tidak dapat menghapus tugas ini, karena bukan anda yang membuat tugas ini.",
8563
+ color: "#F7CF6D"
8564
+ })) : createCommentVNode("", true),
8565
+ createElementVNode("div", _hoisted_1, [
8566
+ createElementVNode("div", _hoisted_2, [
8567
+ unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
8568
+ input: withCtx(() => [
8569
+ createVNode(unref(NeonButton), {
8570
+ size: "md",
8571
+ color: "success",
8572
+ "icon-left": "check",
8573
+ "is-disabled": unref(isNew) || unref(isChanged),
8574
+ onClick: syncCompleted
8575
+ }, {
8576
+ default: withCtx(() => [
8577
+ createTextVNode("Selesai")
8578
+ ]),
8579
+ _: 1
8580
+ }, 8, ["is-disabled"])
8581
+ ]),
8582
+ _: 1
8583
+ })) : createCommentVNode("", true)
8428
8584
  ]),
8429
- _: 1
8430
- }),
8431
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8432
- default: withCtx(() => [
8433
- createVNode(unref(NeonField), {
8434
- "model-value": {
8435
- start: new Date(unref(values).estimatedStartDate || ""),
8436
- end: new Date(unref(values).estimatedEndDate || "")
8437
- },
8438
- name: "Est. Mulai - Selesai",
8439
- note: "Tanggal tugas dimulai dan selesai",
8440
- input: "date-range",
8441
- type: "date-range",
8442
- "is-alone": "",
8443
- "onUpdate:modelValue": onChangeDateUpdate
8444
- }, null, 8, ["model-value"])
8585
+ createElementVNode("div", _hoisted_3, [
8586
+ unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
8587
+ input: withCtx(() => [
8588
+ createVNode(unref(NeonButton), {
8589
+ size: "md",
8590
+ color: "warning",
8591
+ "icon-left": "check",
8592
+ "is-disabled": unref(isNew) || unref(isChanged),
8593
+ onClick: syncCanceled
8594
+ }, {
8595
+ default: withCtx(() => [
8596
+ createTextVNode("Batal")
8597
+ ]),
8598
+ _: 1
8599
+ }, 8, ["is-disabled"])
8600
+ ]),
8601
+ _: 1
8602
+ })) : createCommentVNode("", true)
8445
8603
  ]),
8446
- _: 1
8447
- }),
8448
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8604
+ createElementVNode("div", _hoisted_4, [
8605
+ unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
8606
+ input: withCtx(() => [
8607
+ createVNode(unref(NeonButton), {
8608
+ size: "md",
8609
+ color: "info",
8610
+ "icon-left": "check",
8611
+ "is-disabled": unref(isNew) || unref(isChanged),
8612
+ onClick: syncDoing
8613
+ }, {
8614
+ default: withCtx(() => [
8615
+ createTextVNode("Kerjakan")
8616
+ ]),
8617
+ _: 1
8618
+ }, 8, ["is-disabled"])
8619
+ ]),
8620
+ _: 1
8621
+ })) : createCommentVNode("", true)
8622
+ ])
8623
+ ]),
8624
+ createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
8449
8625
  default: withCtx(() => [
8450
8626
  createVNode(unref(NeonField), mergeProps({
8451
- modelValue: unref(values).estimatedHourDoingAssignment,
8452
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).estimatedHourDoingAssignment = $event)
8453
- }, unref(fields).estimatedHourDoingAssignment), null, 16, ["modelValue"]),
8627
+ modelValue: unref(values).percentStatus,
8628
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).percentStatus = $event)
8629
+ }, unref(fields).percentStatus, {
8630
+ "is-disabled": unref(values).canceledDate !== null || unref(values).completedDate !== null
8631
+ }), null, 16, ["modelValue", "is-disabled"]),
8454
8632
  createVNode(unref(NeonField), mergeProps({
8455
- modelValue: unref(values).estimatedHourCommunicationAssignment,
8456
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).estimatedHourCommunicationAssignment = $event)
8457
- }, unref(fields).estimatedHourCommunicationAssignment), null, 16, ["modelValue"])
8633
+ modelValue: unref(values).taskName,
8634
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).taskName = $event)
8635
+ }, unref(fields).taskName), null, 16, ["modelValue"])
8458
8636
  ]),
8459
8637
  _: 1
8460
8638
  }),
8461
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8639
+ createVNode(unref(NeonField), mergeProps({
8640
+ modelValue: unref(values).detail,
8641
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).detail = $event)
8642
+ }, unref(fields).detail), null, 16, ["modelValue"]),
8643
+ createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
8462
8644
  default: withCtx(() => [
8463
8645
  createVNode(unref(NeonField), mergeProps({
8464
- modelValue: unref(values).estimatedHourCognitiveAssignment,
8465
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).estimatedHourCognitiveAssignment = $event)
8466
- }, unref(fields).estimatedHourCognitiveAssignment), null, 16, ["modelValue"]),
8467
- createVNode(unref(NeonField), mergeProps({
8468
- modelValue: unref(values).estimatedHourCreativeAssignment,
8469
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).estimatedHourCreativeAssignment = $event)
8470
- }, unref(fields).estimatedHourCreativeAssignment), null, 16, ["modelValue"])
8471
- ]),
8472
- _: 1
8473
- }),
8474
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8475
- default: withCtx(() => [
8646
+ modelValue: unref(values).estimatedStartDate,
8647
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).estimatedStartDate = $event)
8648
+ }, unref(fields).estimatedStartDate), null, 16, ["modelValue"]),
8476
8649
  createVNode(unref(NeonField), mergeProps({
8477
- modelValue: unref(values).estimatedHourByDay,
8478
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).estimatedHourByDay = $event)
8479
- }, unref(fields).estimatedHourByDay, { "is-disabled": "" }), null, 16, ["modelValue"])
8650
+ modelValue: unref(values).estimatedEndDate,
8651
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).estimatedEndDate = $event)
8652
+ }, unref(fields).estimatedEndDate), null, 16, ["modelValue"])
8480
8653
  ]),
8481
8654
  _: 1
8482
8655
  }),
8483
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8484
- default: withCtx(() => [
8485
- createVNode(unref(NeonField), mergeProps({
8486
- modelValue: unref(values).priority,
8487
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).priority = $event)
8488
- }, unref(fields).priority), null, 16, ["modelValue"])
8489
- ]),
8490
- _: 1
8656
+ createVNode(unref(NeonField), mergeProps({
8657
+ modelValue: unref(values).estimatedHour,
8658
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).estimatedHour = $event)
8659
+ }, unref(fields).estimatedHour), null, 16, ["modelValue"]),
8660
+ createVNode(unref(OfficeRelation), {
8661
+ modelValue: unref(values),
8662
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
8663
+ field: unref(fields).doingAssignments,
8664
+ "is-disabled": ""
8665
+ }, null, 8, ["modelValue", "field"]),
8666
+ createVNode(unref(OfficeRelation), {
8667
+ modelValue: unref(values),
8668
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
8669
+ field: unref(fields).giveAssignments,
8670
+ "is-disabled": ""
8671
+ }, null, 8, ["modelValue", "field"]),
8672
+ createVNode(unref(OfficeRelation), {
8673
+ modelValue: unref(values),
8674
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
8675
+ field: unref(fields).helpAssignments
8676
+ }, null, 8, ["modelValue", "field"]),
8677
+ createVNode(unref(NeonDivider), {
8678
+ label: "Referensi",
8679
+ "is-dashed": ""
8491
8680
  }),
8492
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8493
- default: withCtx(() => [
8494
- createVNode(unref(NeonField), mergeProps({
8495
- modelValue: unref(values).status,
8496
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).status = $event)
8497
- }, unref(fields).status, { "is-disabled": "" }), null, 16, ["modelValue"])
8498
- ]),
8499
- _: 1
8681
+ createVNode(unref(OfficeRelation), {
8682
+ modelValue: unref(values),
8683
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isRef(values) ? values.value = $event : null),
8684
+ field: unref(fields).submissions,
8685
+ query: unref(Query).define(submissionOptions.value)
8686
+ }, null, 8, ["modelValue", "field", "query"]),
8687
+ createVNode(unref(NeonDivider), {
8688
+ label: "Keterangan",
8689
+ "is-dashed": ""
8500
8690
  }),
8501
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8691
+ createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
8502
8692
  default: withCtx(() => [
8503
8693
  createVNode(unref(NeonField), mergeProps({
8504
- modelValue: unref(values).estimatedRealizedAssignmentStart,
8505
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).estimatedRealizedAssignmentStart = $event)
8506
- }, unref(fields).estimatedRealizedAssignmentStart), null, 16, ["modelValue"]),
8694
+ modelValue: unref(values).completedDate,
8695
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).completedDate = $event)
8696
+ }, unref(fields).completedDate, { "is-disabled": "" }), null, 16, ["modelValue"]),
8507
8697
  createVNode(unref(NeonField), mergeProps({
8508
- modelValue: unref(values).estimatedRealizedAssignmentEnd,
8509
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).estimatedRealizedAssignmentEnd = $event)
8510
- }, unref(fields).estimatedRealizedAssignmentEnd), null, 16, ["modelValue"])
8698
+ modelValue: unref(values).canceledDate,
8699
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).canceledDate = $event)
8700
+ }, unref(fields).canceledDate, { "is-disabled": "" }), null, 16, ["modelValue"])
8511
8701
  ]),
8512
8702
  _: 1
8513
8703
  }),
8514
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8515
- default: withCtx(() => [
8516
- createVNode(unref(NeonField), mergeProps({
8517
- modelValue: unref(values).resultAssignment,
8518
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).resultAssignment = $event)
8519
- }, unref(fields).resultAssignment), null, 16, ["modelValue"])
8704
+ unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 1 }, {
8705
+ input: withCtx(() => [
8706
+ createVNode(unref(NeonButton), {
8707
+ size: "md",
8708
+ color: "danger",
8709
+ "icon-left": "trash",
8710
+ "is-disabled": unref(isNew) || unref(isChanged),
8711
+ onClick: syncDeleteTask
8712
+ }, {
8713
+ default: withCtx(() => [
8714
+ createTextVNode("Hapus")
8715
+ ]),
8716
+ _: 1
8717
+ }, 8, ["is-disabled"])
8520
8718
  ]),
8521
8719
  _: 1
8522
- })
8720
+ })) : createCommentVNode("", true)
8523
8721
  ]),
8524
8722
  _: 1
8525
8723
  }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
8526
8724
  ]),
8527
8725
  _: 1
8528
- })
8726
+ }),
8727
+ !unref(isNew) ? (openBlock(), createBlock(unref(OfficeTab), {
8728
+ key: 0,
8729
+ handle: "progress",
8730
+ icon: "info-circle",
8731
+ title: "Progress"
8732
+ }, {
8733
+ default: withCtx(() => {
8734
+ var _a2;
8735
+ return [
8736
+ createVNode(unref(OfficeCollectionRelated), {
8737
+ definition: "neu:personalia:progress",
8738
+ title: "Progress",
8739
+ description: "Progress dari tugas ini.",
8740
+ query: unref(Query).define({
8741
+ filter: [
8742
+ {
8743
+ taskIds: unref(id)
8744
+ }
8745
+ ],
8746
+ sort: {
8747
+ handle: "startedAt",
8748
+ direction: "descending"
8749
+ }
8750
+ }),
8751
+ "is-ready": unref(isReady),
8752
+ columns: ["display", "startedAt", "endedAt"],
8753
+ sorts: ["startedAt", "createdAt", "updatedAt"],
8754
+ "initial-values": {
8755
+ taskIds: unref(id),
8756
+ tasks: unref(values),
8757
+ submissionIds: unref(values).submissionIds,
8758
+ submissions: unref(values).submissions,
8759
+ staffIds: (_a2 = unref(staff)) == null ? void 0 : _a2.id,
8760
+ staffs: unref(staff)
8761
+ },
8762
+ peeks: ["modal"]
8763
+ }, null, 8, ["query", "is-ready", "initial-values"])
8764
+ ];
8765
+ }),
8766
+ _: 1
8767
+ })) : createCommentVNode("", true)
8529
8768
  ]),
8530
8769
  _: 1
8531
8770
  }, 8, ["use-url"])