@neutron.co.id/operasional-interfaces 1.9.7 → 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-7782d75c"), 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,
@@ -1821,7 +1836,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1821
1836
  ])
1822
1837
  ]),
1823
1838
  default: withCtx(() => [
1824
- createElementVNode("div", _hoisted_3$4, [
1839
+ createElementVNode("div", _hoisted_3$5, [
1825
1840
  createVNode(unref(NeonCollectionContext), {
1826
1841
  definition: "neu:tempat:checkIn",
1827
1842
  scope: "_checkIns",
@@ -1836,7 +1851,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1836
1851
  "is-main": ""
1837
1852
  }, {
1838
1853
  default: withCtx(() => [
1839
- createElementVNode("div", _hoisted_4$2, [
1854
+ createElementVNode("div", _hoisted_4$3, [
1840
1855
  _hoisted_5$1,
1841
1856
  createElementVNode("div", _hoisted_6, [
1842
1857
  createVNode(unref(OfficeCollectionQuery), { displays: ["table"] }, {
@@ -1859,9 +1874,9 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1859
1874
  };
1860
1875
  }
1861
1876
  });
1862
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_7782d75c_lang = "";
1863
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-7782d75c"]]);
1864
- 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" };
1865
1880
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
1866
1881
  __name: "CheckInSingle",
1867
1882
  setup(__props) {
@@ -1920,7 +1935,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1920
1935
  field: unref(fields).building,
1921
1936
  "is-disabled": ""
1922
1937
  }, null, 8, ["modelValue", "field"]),
1923
- createElementVNode("div", _hoisted_1$i, [
1938
+ createElementVNode("div", _hoisted_1$j, [
1924
1939
  createVNode(unref(NeonField), mergeProps({
1925
1940
  modelValue: unref(values).type,
1926
1941
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -1957,7 +1972,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1957
1972
  });
1958
1973
  const CheckInSingle_vue_vue_type_style_index_0_scoped_e56842b0_lang = "";
1959
1974
  const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-e56842b0"]]);
1960
- 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" };
1961
1976
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
1962
1977
  __name: "CheckInExternal",
1963
1978
  setup(__props) {
@@ -2024,7 +2039,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2024
2039
  field: unref(fields).building,
2025
2040
  "is-disabled": unref(values).type === "checkin" || unref(values).type === "checkout" || unref(values).type === "out"
2026
2041
  }, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("", true),
2027
- createElementVNode("div", _hoisted_1$h, [
2042
+ createElementVNode("div", _hoisted_1$i, [
2028
2043
  createVNode(unref(NeonField), mergeProps({
2029
2044
  modelValue: unref(values).type,
2030
2045
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -2068,8 +2083,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2068
2083
  const CheckInExternal_vue_vue_type_style_index_0_scoped_aeda12b0_lang = "";
2069
2084
  const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-aeda12b0"]]);
2070
2085
  const _withScopeId$1 = (n) => (pushScopeId("data-v-d6ac1ebc"), n = n(), popScopeId(), n);
2071
- const _hoisted_1$g = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h4", { align: "center" }, "Aktifkan kamera untuk scan QR Code", -1));
2072
- 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" }, [
2073
2088
  /* @__PURE__ */ createTextVNode(' Neutron Kantor membutuhkan akses ke kamera. Dengan klik "'),
2074
2089
  /* @__PURE__ */ createElementVNode("b", null, "Saya Setuju"),
2075
2090
  /* @__PURE__ */ createTextVNode('", kamu telah menyetujui syarat dan ketentuan yang berlaku. ')
@@ -2099,8 +2114,8 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2099
2114
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
2100
2115
  }, {
2101
2116
  default: withCtx(() => [
2102
- _hoisted_1$g,
2103
- _hoisted_2$b,
2117
+ _hoisted_1$h,
2118
+ _hoisted_2$c,
2104
2119
  createVNode(unref(NeonButton), {
2105
2120
  "is-full": "",
2106
2121
  size: "md",
@@ -2125,7 +2140,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
2125
2140
  });
2126
2141
  const CheckInAccess_vue_vue_type_style_index_0_scoped_d6ac1ebc_lang = "";
2127
2142
  const CheckInAccess = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-d6ac1ebc"]]);
2128
- const _hoisted_1$f = { class: "buttons" };
2143
+ const _hoisted_1$g = { class: "buttons" };
2129
2144
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
2130
2145
  __name: "CheckInScanError",
2131
2146
  setup(__props) {
@@ -2139,7 +2154,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2139
2154
  default: withCtx(() => [
2140
2155
  createVNode(unref(NeonSheet), null, {
2141
2156
  footer: withCtx(() => [
2142
- createElementVNode("div", _hoisted_1$f, [
2157
+ createElementVNode("div", _hoisted_1$g, [
2143
2158
  createVNode(unref(NeonButton), {
2144
2159
  "is-full": "",
2145
2160
  "is-rounded": "",
@@ -2171,10 +2186,10 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
2171
2186
  }
2172
2187
  });
2173
2188
  const _withScopeId = (n) => (pushScopeId("data-v-dc535804"), n = n(), popScopeId(), n);
2174
- const _hoisted_1$e = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "invalid-message" }, "Invalid Code!", -1));
2175
- const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
2176
- const _hoisted_3$3 = ["onClick"];
2177
- 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" };
2178
2193
  const _sfc_main$S = /* @__PURE__ */ defineComponent({
2179
2194
  __name: "CheckInScanner",
2180
2195
  emits: ["start", "stop", "scanned", "close"],
@@ -2311,20 +2326,20 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2311
2326
  class: "inner",
2312
2327
  onClick: switchCamera
2313
2328
  }, [
2314
- _hoisted_1$e,
2315
- _hoisted_2$a,
2329
+ _hoisted_1$f,
2330
+ _hoisted_2$b,
2316
2331
  createElementVNode("div", {
2317
2332
  class: "button-switch",
2318
2333
  onClick: withModifiers(switchCamera, ["stop"])
2319
2334
  }, [
2320
- createElementVNode("div", _hoisted_4$1, toDisplayString(currentCamera.value), 1),
2335
+ createElementVNode("div", _hoisted_4$2, toDisplayString(currentCamera.value), 1),
2321
2336
  createVNode(unref(NeonButton), {
2322
2337
  "icon-left": "arrows-repeat",
2323
2338
  "is-squared": "",
2324
2339
  size: "sm",
2325
2340
  "is-disabled": !canSwitch.value
2326
2341
  }, null, 8, ["is-disabled"])
2327
- ], 8, _hoisted_3$3)
2342
+ ], 8, _hoisted_3$4)
2328
2343
  ])
2329
2344
  ], 2)
2330
2345
  ]),
@@ -2338,7 +2353,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2338
2353
  });
2339
2354
  const CheckInScanner_vue_vue_type_style_index_0_scoped_dc535804_lang = "";
2340
2355
  const CheckInScanner = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-dc535804"]]);
2341
- 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);
2342
2357
  const _sfc_main$R = /* @__PURE__ */ defineComponent({
2343
2358
  __name: "CheckInScanSuccess",
2344
2359
  emits: ["close"],
@@ -2359,7 +2374,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2359
2374
  onClose: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
2360
2375
  }, {
2361
2376
  default: withCtx(() => [
2362
- _hoisted_1$d
2377
+ _hoisted_1$e
2363
2378
  ]),
2364
2379
  _: 1
2365
2380
  })
@@ -2386,7 +2401,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2386
2401
  };
2387
2402
  }
2388
2403
  });
2389
- 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" };
2390
2405
  const _sfc_main$P = /* @__PURE__ */ defineComponent({
2391
2406
  __name: "CheckInSupervisor",
2392
2407
  setup(__props) {
@@ -2454,7 +2469,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2454
2469
  field: unref(fields).building,
2455
2470
  "is-disabled": unref(values).type === "checkin" || unref(values).type === "checkout" || unref(values).type === "out"
2456
2471
  }, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("", true),
2457
- createElementVNode("div", _hoisted_1$c, [
2472
+ createElementVNode("div", _hoisted_1$d, [
2458
2473
  createVNode(unref(NeonField), mergeProps({
2459
2474
  modelValue: unref(values).type,
2460
2475
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
@@ -2497,8 +2512,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2497
2512
  });
2498
2513
  const CheckInSupervisor_vue_vue_type_style_index_0_scoped_551b53ec_lang = "";
2499
2514
  const CheckInSupervisor = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-551b53ec"]]);
2500
- const _hoisted_1$b = { class: "operasional-identitas" };
2501
- const _hoisted_2$9 = {
2515
+ const _hoisted_1$c = { class: "operasional-identitas" };
2516
+ const _hoisted_2$a = {
2502
2517
  key: 2,
2503
2518
  class: "section"
2504
2519
  };
@@ -2761,7 +2776,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2761
2776
  candidateId.value = null;
2762
2777
  }
2763
2778
  return (_ctx, _cache) => {
2764
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
2779
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [
2765
2780
  state.value === "connect" ? (openBlock(), createBlock(unref(IdentitasConnect), {
2766
2781
  key: 0,
2767
2782
  user: user.value,
@@ -2811,7 +2826,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2811
2826
  }),
2812
2827
  _: 1
2813
2828
  }, 8, ["initial-values", "is-loading", "errors"])) : createCommentVNode("", true),
2814
- user.value && onDelegate ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
2829
+ user.value && onDelegate ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
2815
2830
  createVNode(unref(NeonDivider), {
2816
2831
  "is-dashed": "",
2817
2832
  label: "Delegasi",
@@ -3325,7 +3340,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
3325
3340
  });
3326
3341
  const PlanTypeSingle_vue_vue_type_style_index_0_scoped_7690175d_lang = "";
3327
3342
  const PlanTypeSingle = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-7690175d"]]);
3328
- const _hoisted_1$a = { class: "flex flex-wrap" };
3343
+ const _hoisted_1$b = { class: "flex flex-wrap" };
3329
3344
  const _sfc_main$I = /* @__PURE__ */ defineComponent({
3330
3345
  ...{ name: "ProgressButton" },
3331
3346
  __name: "ProgressButton",
@@ -3341,7 +3356,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
3341
3356
  router.push("/penugasan/yesterday-progresses/new");
3342
3357
  };
3343
3358
  return (_ctx, _cache) => {
3344
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
3359
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
3345
3360
  createVNode(unref(NeonButton), {
3346
3361
  "is-rounded": true,
3347
3362
  size: "sm",
@@ -3372,7 +3387,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
3372
3387
  };
3373
3388
  }
3374
3389
  });
3375
- const _hoisted_1$9 = { class: "flex flex-wrap" };
3390
+ const _hoisted_1$a = { class: "flex flex-wrap" };
3376
3391
  const _sfc_main$H = /* @__PURE__ */ defineComponent({
3377
3392
  ...{ name: "ProgressNoteButton" },
3378
3393
  __name: "ProgressNoteButton",
@@ -3382,7 +3397,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
3382
3397
  router.push("/penugasan/notes/new");
3383
3398
  };
3384
3399
  return (_ctx, _cache) => {
3385
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
3400
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
3386
3401
  createVNode(unref(NeonButton), {
3387
3402
  "is-rounded": true,
3388
3403
  size: "sm",
@@ -3487,8 +3502,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
3487
3502
  });
3488
3503
  const ProgressCollection_vue_vue_type_style_index_0_scoped_73139a91_lang = "";
3489
3504
  const ProgressCollection = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-73139a91"]]);
3490
- const _hoisted_1$8 = { class: "grid gap-2 sm:grid-cols-2" };
3491
- 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" };
3492
3507
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
3493
3508
  __name: "ProgressSingle",
3494
3509
  setup(__props) {
@@ -3507,32 +3522,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3507
3522
  saveOne,
3508
3523
  discardChanges
3509
3524
  } = useSingle();
3510
- const responsibilityOptions = computed(() => {
3511
- var _a2, _b;
3512
- return {
3513
- filter: [
3514
- {
3515
- handle: "condition",
3516
- operator: "eq",
3517
- value: "active"
3518
- },
3519
- {
3520
- $or: [
3521
- {
3522
- handle: "staffWorkIds",
3523
- operator: "in",
3524
- value: (_a2 = staff.value) == null ? void 0 : _a2.id
3525
- },
3526
- {
3527
- handle: "staffSuperviseIds",
3528
- operator: "in",
3529
- value: (_b = staff.value) == null ? void 0 : _b.id
3530
- }
3531
- ]
3532
- }
3533
- ]
3534
- };
3535
- });
3525
+ usePermit();
3526
+ const path = useRoute().path;
3536
3527
  const key = ref(0);
3537
3528
  const diff = computed(() => {
3538
3529
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
@@ -3557,19 +3548,35 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3557
3548
  const sekarang = DateUtil.day(/* @__PURE__ */ new Date());
3558
3549
  const besok = sekarang;
3559
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
+ );
3560
3569
  watch(isNew, setDefaultValues, { immediate: true });
3561
3570
  async function setDefaultValues() {
3562
- var _a2;
3563
3571
  if (!isNew.value)
3564
3572
  return;
3565
3573
  await PromiseUtil.wait(500);
3566
3574
  const defaultValues = {
3567
- staffIds: [staffId],
3568
- staffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
3569
3575
  startedAt: besok.second(0).millisecond(0).toISOString(),
3570
3576
  endedAt: besok.add(90, "m").toISOString()
3571
3577
  };
3572
- values.value = defaultValues;
3578
+ values.value.startedAt = defaultValues.startedAt;
3579
+ values.value.endedAt = defaultValues.endedAt;
3573
3580
  }
3574
3581
  const submissionOptions = computed(() => {
3575
3582
  return {
@@ -3587,6 +3594,46 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3587
3594
  ]
3588
3595
  };
3589
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
+ });
3590
3637
  return (_ctx, _cache) => {
3591
3638
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-progress-single" }, {
3592
3639
  default: withCtx(() => [
@@ -3607,112 +3654,145 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3607
3654
  onCancel: unref(discardChanges),
3608
3655
  onSubmit: unref(saveOne)
3609
3656
  }, {
3610
- default: withCtx(() => [
3611
- createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
3612
- default: withCtx(() => [
3613
- (openBlock(), createBlock(unref(NeonField), mergeProps({
3614
- key: key.value,
3615
- "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)
3616
3685
  }, {
3617
3686
  handle: "startedAt",
3618
- name: "Tanggal",
3619
- type: "date",
3620
- input: "date2",
3687
+ name: "Mulai",
3621
3688
  options: {
3622
- note: "Tanggal progress."
3689
+ note: "Jam mulai."
3623
3690
  }
3624
- }, { "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"]),
3625
3702
  createVNode(unref(NeonField), mergeProps({
3626
- modelValue: unref(values).detail,
3627
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).detail = $event)
3628
- }, 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"])
3629
3723
  ]),
3630
- _: 1
3631
- }),
3632
- 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"]),
3633
3729
  createVNode(unref(NeonField), mergeProps({
3634
- modelValue: unref(values).startedAt,
3635
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
3636
- }, {
3637
- handle: "startedAt",
3638
- name: "Mulai",
3639
- options: {
3640
- note: "Jam mulai."
3641
- }
3642
- }), {
3730
+ modelValue: unref(values).isNotes,
3731
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).isNotes = $event)
3732
+ }, unref(fields).isNotes), {
3643
3733
  input: withCtx(() => [
3644
- createVNode(unref(NeonTime), {
3645
- modelValue: unref(values).startedAt,
3646
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).startedAt = $event),
3647
- "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",
3648
3738
  class: "mt-2"
3649
- }, null, 8, ["modelValue", "is-loading"])
3739
+ }, null, 8, ["modelValue"])
3650
3740
  ]),
3651
3741
  _: 1
3652
3742
  }, 16, ["modelValue"]),
3653
- createVNode(unref(NeonField), mergeProps({
3654
- modelValue: unref(values).endedAt,
3655
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).endedAt = $event)
3656
- }, {
3657
- handle: "endedAt",
3658
- name: "Selesai",
3659
- options: {
3660
- note: "Jam selesai."
3661
- }
3662
- }), {
3663
- input: withCtx(() => [
3664
- createVNode(unref(NeonTime), {
3665
- modelValue: unref(values).endedAt,
3666
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).endedAt = $event),
3667
- "is-loading": unref(isLoading),
3668
- class: "mt-2"
3669
- }, null, 8, ["modelValue", "is-loading"]),
3670
- createElementVNode("div", _hoisted_2$8, toDisplayString(duration.value), 1)
3671
- ]),
3672
- _: 1
3673
- }, 16, ["modelValue"])
3674
- ]),
3675
- createVNode(unref(OfficeRelation), {
3676
- modelValue: unref(values),
3677
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
3678
- field: unref(fields).staffs
3679
- }, null, 8, ["modelValue", "field"]),
3680
- createVNode(unref(NeonField), mergeProps({
3681
- modelValue: unref(values).isNotes,
3682
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).isNotes = $event)
3683
- }, unref(fields).isNotes), {
3684
- input: withCtx(() => [
3685
- createVNode(unref(NeonCheck), {
3686
- modelValue: unref(values).isNotes,
3687
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).isNotes = $event),
3688
- label: "Catatan",
3689
- class: "mt-2"
3690
- }, null, 8, ["modelValue"])
3691
- ]),
3692
- _: 1
3693
- }, 16, ["modelValue"]),
3694
- createVNode(unref(OfficeRelation), {
3695
- modelValue: unref(values),
3696
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => isRef(values) ? values.value = $event : null),
3697
- field: unref(fields).accessStaffs
3698
- }, null, 8, ["modelValue", "field"]),
3699
- createVNode(unref(NeonDivider), {
3700
- "is-dashed": "",
3701
- label: "Referensi"
3702
- }),
3703
- createVNode(unref(OfficeRelation), {
3704
- modelValue: unref(values),
3705
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => isRef(values) ? values.value = $event : null),
3706
- field: unref(fields).responsibilities,
3707
- query: unref(Query).define(responsibilityOptions.value)
3708
- }, null, 8, ["modelValue", "field", "query"]),
3709
- createVNode(unref(OfficeRelation), {
3710
- modelValue: unref(values),
3711
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(values) ? values.value = $event : null),
3712
- field: unref(fields).submissions,
3713
- query: unref(Query).define(submissionOptions.value)
3714
- }, null, 8, ["modelValue", "field", "query"])
3715
- ]),
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
+ }),
3716
3796
  _: 1
3717
3797
  }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
3718
3798
  ]),
@@ -3728,10 +3808,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3728
3808
  };
3729
3809
  }
3730
3810
  });
3731
- const ProgressSingle_vue_vue_type_style_index_0_scoped_1a87343f_lang = "";
3732
- const ProgressSingle = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-1a87343f"]]);
3733
- const _hoisted_1$7 = { class: "grid gap-2 sm:grid-cols-2" };
3734
- 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" };
3735
3815
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
3736
3816
  __name: "ProgressTomorrow",
3737
3817
  setup(__props) {
@@ -3878,7 +3958,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3878
3958
  ]),
3879
3959
  _: 1
3880
3960
  }),
3881
- createElementVNode("div", _hoisted_1$7, [
3961
+ createElementVNode("div", _hoisted_1$8, [
3882
3962
  createVNode(unref(NeonField), mergeProps({
3883
3963
  modelValue: unref(values).startedAt,
3884
3964
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
@@ -3916,7 +3996,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3916
3996
  "is-loading": unref(isLoading),
3917
3997
  class: "mt-2"
3918
3998
  }, null, 8, ["modelValue", "is-loading"]),
3919
- createElementVNode("div", _hoisted_2$7, toDisplayString(duration.value), 1)
3999
+ createElementVNode("div", _hoisted_2$8, toDisplayString(duration.value), 1)
3920
4000
  ]),
3921
4001
  _: 1
3922
4002
  }, 16, ["modelValue"])
@@ -3979,8 +4059,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3979
4059
  });
3980
4060
  const ProgressTomorrow_vue_vue_type_style_index_0_scoped_6cdcef51_lang = "";
3981
4061
  const ProgressTomorrow = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-6cdcef51"]]);
3982
- const _hoisted_1$6 = { class: "grid gap-2 sm:grid-cols-2" };
3983
- 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" };
3984
4064
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
3985
4065
  __name: "ProgressYesterday",
3986
4066
  setup(__props) {
@@ -4127,7 +4207,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
4127
4207
  ]),
4128
4208
  _: 1
4129
4209
  }),
4130
- createElementVNode("div", _hoisted_1$6, [
4210
+ createElementVNode("div", _hoisted_1$7, [
4131
4211
  createVNode(unref(NeonField), mergeProps({
4132
4212
  modelValue: unref(values).startedAt,
4133
4213
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).startedAt = $event)
@@ -4165,7 +4245,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
4165
4245
  "is-loading": unref(isLoading),
4166
4246
  class: "mt-2"
4167
4247
  }, null, 8, ["modelValue", "is-loading"]),
4168
- createElementVNode("div", _hoisted_2$6, toDisplayString(duration.value), 1)
4248
+ createElementVNode("div", _hoisted_2$7, toDisplayString(duration.value), 1)
4169
4249
  ]),
4170
4250
  _: 1
4171
4251
  }, 16, ["modelValue"])
@@ -5640,8 +5720,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
5640
5720
  };
5641
5721
  }
5642
5722
  });
5643
- const _hoisted_1$5 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5644
- 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" };
5645
5725
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
5646
5726
  __name: "StaffSingle",
5647
5727
  setup(__props) {
@@ -5679,7 +5759,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5679
5759
  onSubmit: unref(saveOne)
5680
5760
  }, {
5681
5761
  default: withCtx(() => [
5682
- createElementVNode("div", _hoisted_1$5, [
5762
+ createElementVNode("div", _hoisted_1$6, [
5683
5763
  createVNode(unref(NeonField), mergeProps({
5684
5764
  modelValue: unref(values).name,
5685
5765
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).name = $event)
@@ -5689,7 +5769,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5689
5769
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).nik = $event)
5690
5770
  }, unref(fields).nik), null, 16, ["modelValue"])
5691
5771
  ]),
5692
- createElementVNode("div", _hoisted_2$5, [
5772
+ createElementVNode("div", _hoisted_2$6, [
5693
5773
  createVNode(unref(NeonField), mergeProps({
5694
5774
  modelValue: unref(values).birthPlace,
5695
5775
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).birthPlace = $event)
@@ -5699,13 +5779,17 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5699
5779
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).birthDate = $event)
5700
5780
  }, unref(fields).birthDate), null, 16, ["modelValue"])
5701
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"]),
5702
5786
  createVNode(unref(NeonField), mergeProps({
5703
5787
  modelValue: unref(values).image,
5704
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).image = $event)
5788
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).image = $event)
5705
5789
  }, unref(fields).image), null, 16, ["modelValue"]),
5706
5790
  createVNode(unref(NeonField), mergeProps({
5707
5791
  modelValue: unref(values).note,
5708
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).note = $event)
5792
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).note = $event)
5709
5793
  }, unref(fields).note), null, 16, ["modelValue"])
5710
5794
  ]),
5711
5795
  _: 1
@@ -5741,13 +5825,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5741
5825
  default: withCtx(() => [
5742
5826
  createVNode(unref(OfficeRelation), {
5743
5827
  modelValue: unref(values),
5744
- "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),
5745
5829
  field: unref(fields).branch,
5746
5830
  fragment: { id: 1, display: 1, name: 1 }
5747
5831
  }, null, 8, ["modelValue", "field"]),
5748
5832
  createVNode(unref(OfficeRelation), {
5749
5833
  modelValue: unref(values),
5750
- "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),
5751
5835
  field: unref(fields).branches,
5752
5836
  fragment: { id: 1, display: 1, name: 1 }
5753
5837
  }, null, 8, ["modelValue", "field"])
@@ -5766,10 +5850,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5766
5850
  };
5767
5851
  }
5768
5852
  });
5769
- const StaffSingle_vue_vue_type_style_index_0_scoped_0cf4cd99_lang = "";
5770
- const StaffSingle = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-0cf4cd99"]]);
5771
- const _hoisted_1$4 = { class: "grid gap-4 sm:grid-cols-[3fr_1fr]" };
5772
- 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" };
5773
5857
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
5774
5858
  __name: "StaffOperasional",
5775
5859
  setup(__props) {
@@ -5807,7 +5891,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5807
5891
  onSubmit: unref(saveOne)
5808
5892
  }, {
5809
5893
  default: withCtx(() => [
5810
- createElementVNode("div", _hoisted_1$4, [
5894
+ createElementVNode("div", _hoisted_1$5, [
5811
5895
  createVNode(unref(NeonField), mergeProps({
5812
5896
  modelValue: unref(values).name,
5813
5897
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).name = $event)
@@ -5817,7 +5901,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5817
5901
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).nik = $event)
5818
5902
  }, unref(fields).nik), null, 16, ["modelValue"])
5819
5903
  ]),
5820
- createElementVNode("div", _hoisted_2$4, [
5904
+ createElementVNode("div", _hoisted_2$5, [
5821
5905
  createVNode(unref(NeonField), mergeProps({
5822
5906
  modelValue: unref(values).birthPlace,
5823
5907
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).birthPlace = $event)
@@ -5827,13 +5911,17 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5827
5911
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).birthDate = $event)
5828
5912
  }, unref(fields).birthDate), null, 16, ["modelValue"])
5829
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"]),
5830
5918
  createVNode(unref(NeonField), mergeProps({
5831
5919
  modelValue: unref(values).image,
5832
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).image = $event)
5920
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).image = $event)
5833
5921
  }, unref(fields).image), null, 16, ["modelValue"]),
5834
5922
  createVNode(unref(NeonField), mergeProps({
5835
5923
  modelValue: unref(values).note,
5836
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).note = $event)
5924
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).note = $event)
5837
5925
  }, unref(fields).note), null, 16, ["modelValue"])
5838
5926
  ]),
5839
5927
  _: 1
@@ -5869,13 +5957,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5869
5957
  default: withCtx(() => [
5870
5958
  createVNode(unref(OfficeRelation), {
5871
5959
  modelValue: unref(values),
5872
- "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),
5873
5961
  field: unref(fields).branch,
5874
5962
  fragment: { id: 1, display: 1, name: 1 }
5875
5963
  }, null, 8, ["modelValue", "field"]),
5876
5964
  createVNode(unref(OfficeRelation), {
5877
5965
  modelValue: unref(values),
5878
- "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),
5879
5967
  field: unref(fields).branches,
5880
5968
  fragment: { id: 1, display: 1, name: 1 }
5881
5969
  }, null, 8, ["modelValue", "field"])
@@ -5916,8 +6004,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5916
6004
  };
5917
6005
  }
5918
6006
  });
5919
- const StaffOperasional_vue_vue_type_style_index_0_scoped_c62cf70a_lang = "";
5920
- 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"]]);
5921
6009
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
5922
6010
  __name: "StaffIdentity",
5923
6011
  setup(__props) {
@@ -6022,6 +6110,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6022
6110
  },
6023
6111
  // END OPERASIONAL
6024
6112
  { id: "63e1734b78ae4f8388b1b313", name: "Cabang Pendidikan" },
6113
+ { id: "64e6e0669103ea42a4f7d4d0", name: "Cabang KBM" },
6025
6114
  // { id: '6309c2aae64a1324b8663d96', name: 'Admin Pendidikan' },
6026
6115
  { id: "643f6c0bd760fc7b529d4a5d", name: "Pengelola Pengajar" },
6027
6116
  // Keuangan
@@ -6074,7 +6163,41 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6074
6163
  {
6075
6164
  id: "6454a6c2d760fc7b529d4f4f",
6076
6165
  name: "Karyawan Marketing Cabang"
6077
- }
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"
6200
+ }
6078
6201
  ],
6079
6202
  errors: errors.value,
6080
6203
  "on-choose": onChoose,
@@ -6352,25 +6475,21 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
6352
6475
  };
6353
6476
  });
6354
6477
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
6355
- watch(
6356
- isNew,
6357
- (isNew2) => {
6358
- var _a2;
6359
- if (!isNew2)
6360
- return;
6361
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
6362
- values.value.submissionStaffIds = [staffId];
6363
- values.value.submissionStaffs = [
6364
- {
6365
- id: staffId,
6366
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
6367
- }
6368
- ];
6369
- },
6370
- {
6371
- immediate: true
6372
- }
6373
- );
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
+ }
6374
6493
  const syncRaise = async () => {
6375
6494
  await executeOne("raiseSubmission", { submissionId: id.value });
6376
6495
  await syncOne();
@@ -6543,8 +6662,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
6543
6662
  };
6544
6663
  }
6545
6664
  });
6546
- const SubmissionStaff_vue_vue_type_style_index_0_scoped_db426ce1_lang = "";
6547
- 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"]]);
6548
6667
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
6549
6668
  __name: "SubmissionFollowUp",
6550
6669
  setup(__props) {
@@ -6696,10 +6815,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
6696
6815
  });
6697
6816
  const SubmissionFollowUp_vue_vue_type_style_index_0_scoped_3f0580bf_lang = "";
6698
6817
  const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-3f0580bf"]]);
6699
- const _hoisted_1$3 = { class: "flex flex-wrap" };
6700
- const _hoisted_2$3 = { class: "mt-2" };
6701
- const _hoisted_3$2 = { class: "mt-2" };
6702
- 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" };
6703
6822
  const _hoisted_5 = { class: "mt-2" };
6704
6823
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
6705
6824
  __name: "SubmissionAudit",
@@ -6745,25 +6864,21 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6745
6864
  };
6746
6865
  });
6747
6866
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
6748
- watch(
6749
- isNew,
6750
- (isNew2) => {
6751
- var _a2;
6752
- if (!isNew2)
6753
- return;
6754
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
6755
- values.value.submissionStaffIds = [staffId];
6756
- values.value.submissionStaffs = [
6757
- {
6758
- id: staffId,
6759
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
6760
- }
6761
- ];
6762
- },
6763
- {
6764
- immediate: true
6765
- }
6766
- );
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
+ }
6767
6882
  const syncResolved = async () => {
6768
6883
  await executeOne("resolvedSubmission", { submissionId: id.value });
6769
6884
  await syncOne();
@@ -6801,8 +6916,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6801
6916
  onSubmit: unref(saveOne)
6802
6917
  }, {
6803
6918
  default: withCtx(() => [
6804
- createElementVNode("div", _hoisted_1$3, [
6805
- createElementVNode("div", _hoisted_2$3, [
6919
+ createElementVNode("div", _hoisted_1$4, [
6920
+ createElementVNode("div", _hoisted_2$4, [
6806
6921
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6807
6922
  input: withCtx(() => [
6808
6923
  createVNode(unref(NeonButton), {
@@ -6822,7 +6937,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6822
6937
  })) : createCommentVNode("", true)
6823
6938
  ]),
6824
6939
  createTextVNode("    "),
6825
- createElementVNode("div", _hoisted_3$2, [
6940
+ createElementVNode("div", _hoisted_3$3, [
6826
6941
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6827
6942
  input: withCtx(() => [
6828
6943
  createVNode(unref(NeonButton), {
@@ -6842,7 +6957,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
6842
6957
  })) : createCommentVNode("", true)
6843
6958
  ]),
6844
6959
  createTextVNode("    "),
6845
- createElementVNode("div", _hoisted_4, [
6960
+ createElementVNode("div", _hoisted_4$1, [
6846
6961
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
6847
6962
  input: withCtx(() => [
6848
6963
  createVNode(unref(NeonButton), {
@@ -7049,11 +7164,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
7049
7164
  };
7050
7165
  }
7051
7166
  });
7052
- const SubmissionAudit_vue_vue_type_style_index_0_scoped_a32c1b8b_lang = "";
7053
- const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-a32c1b8b"]]);
7054
- const _hoisted_1$2 = { class: "flex flex-wrap" };
7055
- const _hoisted_2$2 = { class: "mt-2" };
7056
- 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" };
7057
7172
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
7058
7173
  __name: "SubmissionDecision",
7059
7174
  setup(__props) {
@@ -7098,25 +7213,21 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7098
7213
  };
7099
7214
  });
7100
7215
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
7101
- watch(
7102
- isNew,
7103
- (isNew2) => {
7104
- var _a2;
7105
- if (!isNew2)
7106
- return;
7107
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
7108
- values.value.submissionStaffIds = [staffId];
7109
- values.value.submissionStaffs = [
7110
- {
7111
- id: staffId,
7112
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
7113
- }
7114
- ];
7115
- },
7116
- {
7117
- immediate: true
7118
- }
7119
- );
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
+ }
7120
7231
  const syncDelay = async () => {
7121
7232
  var _a2;
7122
7233
  await executeOne("delaySubmission", {
@@ -7154,8 +7265,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7154
7265
  onSubmit: unref(saveOne)
7155
7266
  }, {
7156
7267
  default: withCtx(() => [
7157
- createElementVNode("div", _hoisted_1$2, [
7158
- createElementVNode("div", _hoisted_2$2, [
7268
+ createElementVNode("div", _hoisted_1$3, [
7269
+ createElementVNode("div", _hoisted_2$3, [
7159
7270
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7160
7271
  input: withCtx(() => {
7161
7272
  var _a2, _b;
@@ -7178,7 +7289,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7178
7289
  })) : createCommentVNode("", true)
7179
7290
  ]),
7180
7291
  createTextVNode("    "),
7181
- createElementVNode("div", _hoisted_3$1, [
7292
+ createElementVNode("div", _hoisted_3$2, [
7182
7293
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7183
7294
  input: withCtx(() => {
7184
7295
  var _a2, _b;
@@ -7368,11 +7479,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
7368
7479
  };
7369
7480
  }
7370
7481
  });
7371
- const SubmissionDecision_vue_vue_type_style_index_0_scoped_71f86b97_lang = "";
7372
- const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-71f86b97"]]);
7373
- const _hoisted_1$1 = { class: "flex flex-wrap" };
7374
- const _hoisted_2$1 = { class: "mt-2" };
7375
- 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" };
7376
7487
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
7377
7488
  __name: "SubmissionWaitingDecision",
7378
7489
  setup(__props) {
@@ -7417,25 +7528,21 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7417
7528
  };
7418
7529
  });
7419
7530
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
7420
- watch(
7421
- isNew,
7422
- (isNew2) => {
7423
- var _a2;
7424
- if (!isNew2)
7425
- return;
7426
- values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
7427
- values.value.submissionStaffIds = [staffId];
7428
- values.value.submissionStaffs = [
7429
- {
7430
- id: staffId,
7431
- flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
7432
- }
7433
- ];
7434
- },
7435
- {
7436
- immediate: true
7437
- }
7438
- );
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
+ }
7439
7546
  const syncDelay = async () => {
7440
7547
  var _a2;
7441
7548
  await executeOne("delaySubmission", {
@@ -7475,8 +7582,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7475
7582
  onSubmit: unref(saveOne)
7476
7583
  }, {
7477
7584
  default: withCtx(() => [
7478
- createElementVNode("div", _hoisted_1$1, [
7479
- createElementVNode("div", _hoisted_2$1, [
7585
+ createElementVNode("div", _hoisted_1$2, [
7586
+ createElementVNode("div", _hoisted_2$2, [
7480
7587
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7481
7588
  input: withCtx(() => {
7482
7589
  var _a2, _b;
@@ -7499,7 +7606,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7499
7606
  })) : createCommentVNode("", true)
7500
7607
  ]),
7501
7608
  createTextVNode("    "),
7502
- createElementVNode("div", _hoisted_3, [
7609
+ createElementVNode("div", _hoisted_3$1, [
7503
7610
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
7504
7611
  input: withCtx(() => {
7505
7612
  var _a2, _b;
@@ -7647,8 +7754,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
7647
7754
  };
7648
7755
  }
7649
7756
  });
7650
- const SubmissionWaitingDecision_vue_vue_type_style_index_0_scoped_dee14451_lang = "";
7651
- 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"]]);
7652
7759
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
7653
7760
  __name: "SubmissionSupervisor",
7654
7761
  setup(__props) {
@@ -8195,8 +8302,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
8195
8302
  const TargetBranch_vue_vue_type_style_index_0_scoped_6a5a6e80_lang = "";
8196
8303
  const TargetBranch = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6a5a6e80"]]);
8197
8304
  const TaskModel = models.TaskModel;
8198
- const _hoisted_1 = { key: 0 };
8199
- const _hoisted_2 = { key: 1 };
8305
+ const _hoisted_1$1 = { key: 0 };
8306
+ const _hoisted_2$1 = { key: 1 };
8200
8307
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8201
8308
  ...{ name: "TaskWorkButton" },
8202
8309
  __name: "TaskWorkButton",
@@ -8287,7 +8394,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8287
8394
  };
8288
8395
  return (_ctx, _cache) => {
8289
8396
  return openBlock(), createElementBlock(Fragment, null, [
8290
- onHandleTaskWork.value.onStartTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_1, [
8397
+ onHandleTaskWork.value.onStartTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
8291
8398
  createVNode(unref(NeonButton), {
8292
8399
  "is-rounded": true,
8293
8400
  size: "sm",
@@ -8297,7 +8404,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8297
8404
  onClick: onClickHandlerStartTaskWork
8298
8405
  })
8299
8406
  ])) : createCommentVNode("", true),
8300
- onHandleTaskWork.value.onFinishedTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_2, [
8407
+ onHandleTaskWork.value.onFinishedTaskWorking ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
8301
8408
  createVNode(unref(NeonButton), {
8302
8409
  "is-rounded": true,
8303
8410
  size: "sm",
@@ -8327,9 +8434,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
8327
8434
  };
8328
8435
  }
8329
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" };
8330
8441
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8331
8442
  __name: "TaskSingle",
8332
8443
  setup(__props) {
8444
+ var _a;
8333
8445
  const {
8334
8446
  fields,
8335
8447
  id,
@@ -8341,12 +8453,87 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8341
8453
  isReady,
8342
8454
  isMain,
8343
8455
  saveOne,
8344
- discardChanges
8456
+ discardChanges,
8457
+ syncOne,
8458
+ executeOne
8345
8459
  } = useSingle();
8346
- function onChangeDateUpdate(date) {
8347
- values.value.estimatedStartDate = date == null ? void 0 : date.start.toISOString();
8348
- 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;
8349
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
+ };
8350
8537
  return (_ctx, _cache) => {
8351
8538
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-task-single" }, {
8352
8539
  default: withCtx(() => [
@@ -8368,162 +8555,216 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8368
8555
  onSubmit: unref(saveOne)
8369
8556
  }, {
8370
8557
  default: withCtx(() => [
8371
- createVNode(unref(NeonField), mergeProps({
8372
- modelValue: unref(values).taskName,
8373
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).taskName = $event)
8374
- }, unref(fields).taskName), null, 16, ["modelValue"]),
8375
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8376
- default: withCtx(() => [
8377
- createVNode(unref(NeonField), mergeProps({
8378
- modelValue: unref(values).internalServiceDescription,
8379
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).internalServiceDescription = $event)
8380
- }, unref(fields).internalServiceDescription), null, 16, ["modelValue"])
8381
- ]),
8382
- _: 1
8383
- }),
8384
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8385
- default: withCtx(() => [
8386
- createVNode(unref(NeonField), mergeProps({
8387
- modelValue: unref(values).externalServiceDescription,
8388
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).externalServiceDescription = $event)
8389
- }, unref(fields).externalServiceDescription), null, 16, ["modelValue"])
8390
- ]),
8391
- _: 1
8392
- }),
8393
- createVNode(unref(OfficeRelation), {
8394
- modelValue: unref(values),
8395
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
8396
- field: unref(fields).branches,
8397
- fragment: { id: 1, display: 1, name: 1 }
8398
- }, null, 8, ["modelValue", "field"]),
8399
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8400
- default: withCtx(() => [
8401
- createVNode(unref(OfficeRelation), {
8402
- modelValue: unref(values),
8403
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(values) ? values.value = $event : null),
8404
- field: unref(fields).giveAssignments
8405
- }, null, 8, ["modelValue", "field"]),
8406
- createVNode(unref(OfficeRelation), {
8407
- modelValue: unref(values),
8408
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
8409
- field: unref(fields).supervisingAssignments
8410
- }, null, 8, ["modelValue", "field"])
8411
- ]),
8412
- _: 1
8413
- }),
8414
- createVNode(unref(NeonFields), { md: "grid gap-3 sm:grid-cols-2" }, {
8415
- default: withCtx(() => [
8416
- createVNode(unref(OfficeRelation), {
8417
- modelValue: unref(values),
8418
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => isRef(values) ? values.value = $event : null),
8419
- field: unref(fields).doingAssignments
8420
- }, null, 8, ["modelValue", "field"]),
8421
- createVNode(unref(OfficeRelation), {
8422
- modelValue: unref(values),
8423
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => isRef(values) ? values.value = $event : null),
8424
- field: unref(fields).helpAssignments
8425
- }, 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)
8426
8584
  ]),
8427
- _: 1
8428
- }),
8429
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8430
- default: withCtx(() => [
8431
- createVNode(unref(NeonField), {
8432
- "model-value": {
8433
- start: new Date(unref(values).estimatedStartDate || ""),
8434
- end: new Date(unref(values).estimatedEndDate || "")
8435
- },
8436
- name: "Est. Mulai - Selesai",
8437
- note: "Tanggal tugas dimulai dan selesai",
8438
- input: "date-range",
8439
- type: "date-range",
8440
- "is-alone": "",
8441
- "onUpdate:modelValue": onChangeDateUpdate
8442
- }, 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)
8443
8603
  ]),
8444
- _: 1
8445
- }),
8446
- 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" }, {
8447
8625
  default: withCtx(() => [
8448
8626
  createVNode(unref(NeonField), mergeProps({
8449
- modelValue: unref(values).estimatedHourDoingAssignment,
8450
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).estimatedHourDoingAssignment = $event)
8451
- }, 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"]),
8452
8632
  createVNode(unref(NeonField), mergeProps({
8453
- modelValue: unref(values).estimatedHourCommunicationAssignment,
8454
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).estimatedHourCommunicationAssignment = $event)
8455
- }, 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"])
8456
8636
  ]),
8457
8637
  _: 1
8458
8638
  }),
8459
- 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" }, {
8460
8644
  default: withCtx(() => [
8461
8645
  createVNode(unref(NeonField), mergeProps({
8462
- modelValue: unref(values).estimatedHourCognitiveAssignment,
8463
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).estimatedHourCognitiveAssignment = $event)
8464
- }, unref(fields).estimatedHourCognitiveAssignment), null, 16, ["modelValue"]),
8465
- createVNode(unref(NeonField), mergeProps({
8466
- modelValue: unref(values).estimatedHourCreativeAssignment,
8467
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).estimatedHourCreativeAssignment = $event)
8468
- }, unref(fields).estimatedHourCreativeAssignment), null, 16, ["modelValue"])
8469
- ]),
8470
- _: 1
8471
- }),
8472
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8473
- 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"]),
8474
8649
  createVNode(unref(NeonField), mergeProps({
8475
- modelValue: unref(values).estimatedHourByDay,
8476
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).estimatedHourByDay = $event)
8477
- }, 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"])
8478
8653
  ]),
8479
8654
  _: 1
8480
8655
  }),
8481
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8482
- default: withCtx(() => [
8483
- createVNode(unref(NeonField), mergeProps({
8484
- modelValue: unref(values).priority,
8485
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).priority = $event)
8486
- }, unref(fields).priority), null, 16, ["modelValue"])
8487
- ]),
8488
- _: 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": ""
8489
8680
  }),
8490
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8491
- default: withCtx(() => [
8492
- createVNode(unref(NeonField), mergeProps({
8493
- modelValue: unref(values).status,
8494
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).status = $event)
8495
- }, unref(fields).status, { "is-disabled": "" }), null, 16, ["modelValue"])
8496
- ]),
8497
- _: 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": ""
8498
8690
  }),
8499
- createVNode(unref(NeonFields), { md: "grid gap-4 sm:grid-cols-2" }, {
8691
+ createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
8500
8692
  default: withCtx(() => [
8501
8693
  createVNode(unref(NeonField), mergeProps({
8502
- modelValue: unref(values).estimatedRealizedAssignmentStart,
8503
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).estimatedRealizedAssignmentStart = $event)
8504
- }, 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"]),
8505
8697
  createVNode(unref(NeonField), mergeProps({
8506
- modelValue: unref(values).estimatedRealizedAssignmentEnd,
8507
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).estimatedRealizedAssignmentEnd = $event)
8508
- }, 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"])
8509
8701
  ]),
8510
8702
  _: 1
8511
8703
  }),
8512
- createVNode(unref(NeonFields), { md: "grid gap-4" }, {
8513
- default: withCtx(() => [
8514
- createVNode(unref(NeonField), mergeProps({
8515
- modelValue: unref(values).resultAssignment,
8516
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).resultAssignment = $event)
8517
- }, 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"])
8518
8718
  ]),
8519
8719
  _: 1
8520
- })
8720
+ })) : createCommentVNode("", true)
8521
8721
  ]),
8522
8722
  _: 1
8523
8723
  }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
8524
8724
  ]),
8525
8725
  _: 1
8526
- })
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)
8527
8768
  ]),
8528
8769
  _: 1
8529
8770
  }, 8, ["use-url"])