@neutron.co.id/operasional-interfaces 1.8.0 → 1.8.1

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
@@ -1,6 +1,6 @@
1
1
  import { ComponentUtil as ComponentUtil$1 } from "@neon.id/utils/client";
2
2
  import { defineComponent, openBlock, createElementBlock, createVNode, unref, ref, computed, h, watch, createBlock, withCtx, mergeProps, createCommentVNode, normalizeClass, pushScopeId, popScopeId, createElementVNode, provide, resolveComponent, createTextVNode, onMounted, isRef, reactive, watchEffect, onBeforeUnmount, withModifiers, toDisplayString, Fragment, normalizeProps, guardReactiveProps, withDirectives, vShow } from "vue";
3
- import { NeonButton, NeonAvatar, NeonDivider, NeonModal, NeonSheet, useToastStore, NeonSlider, NeonSlide, NeonStat, NeonInfo } from "@neon.id/interfaces";
3
+ import { NeonButton, NeonAvatar, NeonDivider, NeonModal, NeonSheet, useToastStore, NeonSlider, NeonSlide, NeonStat, NeonInfo, NeonAlert } from "@neon.id/interfaces";
4
4
  import { GraphUtil, NeonCollectionContext, useSingle, NeonSingle, usePermit, useCollection, NeonCollection, useAppStore } from "@neon.id/context";
5
5
  import { RowUtil } from "@neon.id/display";
6
6
  import { NeonField, NeonForm, NeonFormWrapper, NeonFields, NeonCheck } from "@neon.id/form";
@@ -13,6 +13,13 @@ import { CodeUtil } from "@neon.id/utils/code";
13
13
  import { useClientHandle } from "@urql/vue";
14
14
  import { format, startOfToday, endOfToday } from "date-fns";
15
15
  import { DatePicker } from "v-calendar";
16
+ import dayjs from "dayjs/esm/index.js";
17
+ import "dayjs/esm/locale/en.js";
18
+ import "dayjs/esm/locale/id.js";
19
+ import advancedFormat from "dayjs/esm/plugin/advancedFormat/index.js";
20
+ import durationPlugin from "dayjs/esm/plugin/duration/index.js";
21
+ import isoWeek from "dayjs/esm/plugin/isoWeek/index.js";
22
+ import relativeTimePlugin from "dayjs/esm/plugin/relativeTime/index.js";
16
23
  import { models as models$1 } from "@neutron.co.id/tempat-models";
17
24
  import { useEventBus, useIntervalFn, useThrottleFn } from "@vueuse/core";
18
25
  import { OfficeContent, OfficeCollectionQuery, OfficeCollectionOperation, OfficeTabs, OfficeTab, OfficeRelation, OfficeCollectionTable, OfficeCollectionRelated, OfficeCollectionCalendar, OfficePad } from "@neon.id/office";
@@ -20,6 +27,7 @@ import { defineStore, storeToRefs } from "pinia";
20
27
  import { useRouter, useRoute } from "vue-router";
21
28
  import { ComponentUtil } from "@neon.id/utils/component";
22
29
  import Scanner from "qr-scanner";
30
+ import mitt from "mitt";
23
31
  import { models as models$2 } from "@neutron.co.id/personalia-models";
24
32
  import { CatatSketchPad, CatatPaperSegments, CatatPaperPad } from "@neon.id/catat-interfaces";
25
33
  const _hoisted_1$m = { class: "xxx-button" };
@@ -402,221 +410,17 @@ const _export_sfc = (sfc, props) => {
402
410
  return target;
403
411
  };
404
412
  const OperasionalIdentitas = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-355c8370"]]);
405
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
406
- function getDefaultExportFromCjs(x) {
407
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
413
+ dayjs.extend(durationPlugin);
414
+ dayjs.extend(relativeTimePlugin);
415
+ dayjs.extend(advancedFormat);
416
+ dayjs.extend(isoWeek);
417
+ dayjs.locale("id");
418
+ class DateUtil {
419
+ static get day() {
420
+ return dayjs;
421
+ }
408
422
  }
409
- var dayjs_min = { exports: {} };
410
- (function(module, exports) {
411
- !function(t, e) {
412
- module.exports = e();
413
- }(commonjsGlobal, function() {
414
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f = "month", h2 = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
415
- var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
416
- return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
417
- } }, m = function(t2, e2, n2) {
418
- var r2 = String(t2);
419
- return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
420
- }, v = { s: m, z: function(t2) {
421
- var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
422
- return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
423
- }, m: function t2(e2, n2) {
424
- if (e2.date() < n2.date())
425
- return -t2(n2, e2);
426
- var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f);
427
- return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
428
- }, a: function(t2) {
429
- return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
430
- }, p: function(t2) {
431
- return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h2 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
432
- }, u: function(t2) {
433
- return void 0 === t2;
434
- } }, g = "en", D = {};
435
- D[g] = M;
436
- var p = function(t2) {
437
- return t2 instanceof _;
438
- }, S = function t2(e2, n2, r2) {
439
- var i2;
440
- if (!e2)
441
- return g;
442
- if ("string" == typeof e2) {
443
- var s2 = e2.toLowerCase();
444
- D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
445
- var u2 = e2.split("-");
446
- if (!i2 && u2.length > 1)
447
- return t2(u2[0]);
448
- } else {
449
- var a2 = e2.name;
450
- D[a2] = e2, i2 = a2;
451
- }
452
- return !r2 && i2 && (g = i2), i2 || !r2 && g;
453
- }, w = function(t2, e2) {
454
- if (p(t2))
455
- return t2.clone();
456
- var n2 = "object" == typeof e2 ? e2 : {};
457
- return n2.date = t2, n2.args = arguments, new _(n2);
458
- }, O = v;
459
- O.l = S, O.i = p, O.w = function(t2, e2) {
460
- return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
461
- };
462
- var _ = function() {
463
- function M2(t2) {
464
- this.$L = S(t2.locale, null, true), this.parse(t2);
465
- }
466
- var m2 = M2.prototype;
467
- return m2.parse = function(t2) {
468
- this.$d = function(t3) {
469
- var e2 = t3.date, n2 = t3.utc;
470
- if (null === e2)
471
- return /* @__PURE__ */ new Date(NaN);
472
- if (O.u(e2))
473
- return /* @__PURE__ */ new Date();
474
- if (e2 instanceof Date)
475
- return new Date(e2);
476
- if ("string" == typeof e2 && !/Z$/i.test(e2)) {
477
- var r2 = e2.match($);
478
- if (r2) {
479
- var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
480
- return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
481
- }
482
- }
483
- return new Date(e2);
484
- }(t2), this.$x = t2.x || {}, this.init();
485
- }, m2.init = function() {
486
- var t2 = this.$d;
487
- this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
488
- }, m2.$utils = function() {
489
- return O;
490
- }, m2.isValid = function() {
491
- return !(this.$d.toString() === l);
492
- }, m2.isSame = function(t2, e2) {
493
- var n2 = w(t2);
494
- return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
495
- }, m2.isAfter = function(t2, e2) {
496
- return w(t2) < this.startOf(e2);
497
- }, m2.isBefore = function(t2, e2) {
498
- return this.endOf(e2) < w(t2);
499
- }, m2.$g = function(t2, e2, n2) {
500
- return O.u(t2) ? this[e2] : this.set(n2, t2);
501
- }, m2.unix = function() {
502
- return Math.floor(this.valueOf() / 1e3);
503
- }, m2.valueOf = function() {
504
- return this.$d.getTime();
505
- }, m2.startOf = function(t2, e2) {
506
- var n2 = this, r2 = !!O.u(e2) || e2, h3 = O.p(t2), l2 = function(t3, e3) {
507
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
508
- return r2 ? i2 : i2.endOf(a);
509
- }, $2 = function(t3, e3) {
510
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
511
- }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
512
- switch (h3) {
513
- case c:
514
- return r2 ? l2(1, 0) : l2(31, 11);
515
- case f:
516
- return r2 ? l2(1, M3) : l2(0, M3 + 1);
517
- case o:
518
- var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
519
- return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
520
- case a:
521
- case d:
522
- return $2(v2 + "Hours", 0);
523
- case u:
524
- return $2(v2 + "Minutes", 1);
525
- case s:
526
- return $2(v2 + "Seconds", 2);
527
- case i:
528
- return $2(v2 + "Milliseconds", 3);
529
- default:
530
- return this.clone();
531
- }
532
- }, m2.endOf = function(t2) {
533
- return this.startOf(t2, false);
534
- }, m2.$set = function(t2, e2) {
535
- var n2, o2 = O.p(t2), h3 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h3 + "Date", n2[d] = h3 + "Date", n2[f] = h3 + "Month", n2[c] = h3 + "FullYear", n2[u] = h3 + "Hours", n2[s] = h3 + "Minutes", n2[i] = h3 + "Seconds", n2[r] = h3 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
536
- if (o2 === f || o2 === c) {
537
- var y2 = this.clone().set(d, 1);
538
- y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
539
- } else
540
- l2 && this.$d[l2]($2);
541
- return this.init(), this;
542
- }, m2.set = function(t2, e2) {
543
- return this.clone().$set(t2, e2);
544
- }, m2.get = function(t2) {
545
- return this[O.p(t2)]();
546
- }, m2.add = function(r2, h3) {
547
- var d2, l2 = this;
548
- r2 = Number(r2);
549
- var $2 = O.p(h3), y2 = function(t2) {
550
- var e2 = w(l2);
551
- return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
552
- };
553
- if ($2 === f)
554
- return this.set(f, this.$M + r2);
555
- if ($2 === c)
556
- return this.set(c, this.$y + r2);
557
- if ($2 === a)
558
- return y2(1);
559
- if ($2 === o)
560
- return y2(7);
561
- var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
562
- return O.w(m3, this);
563
- }, m2.subtract = function(t2, e2) {
564
- return this.add(-1 * t2, e2);
565
- }, m2.format = function(t2) {
566
- var e2 = this, n2 = this.$locale();
567
- if (!this.isValid())
568
- return n2.invalidDate || l;
569
- var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f2 = n2.months, h3 = function(t3, n3, i3, s3) {
570
- return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
571
- }, c2 = function(t3) {
572
- return O.s(s2 % 12 || 12, t3, "0");
573
- }, d2 = n2.meridiem || function(t3, e3, n3) {
574
- var r3 = t3 < 12 ? "AM" : "PM";
575
- return n3 ? r3.toLowerCase() : r3;
576
- }, $2 = { YY: String(this.$y).slice(-2), YYYY: O.s(this.$y, 4, "0"), M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h3(n2.monthsShort, a2, f2, 3), MMMM: h3(f2, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h3(n2.weekdaysMin, this.$W, o2, 2), ddd: h3(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c2(1), hh: c2(2), a: d2(s2, u2, true), A: d2(s2, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 };
577
- return r2.replace(y, function(t3, e3) {
578
- return e3 || $2[t3] || i2.replace(":", "");
579
- });
580
- }, m2.utcOffset = function() {
581
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
582
- }, m2.diff = function(r2, d2, l2) {
583
- var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
584
- return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f] = g2, $2[h2] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i] = v2 / t, $2)[y2] || v2, l2 ? g2 : O.a(g2);
585
- }, m2.daysInMonth = function() {
586
- return this.endOf(f).$D;
587
- }, m2.$locale = function() {
588
- return D[this.$L];
589
- }, m2.locale = function(t2, e2) {
590
- if (!t2)
591
- return this.$L;
592
- var n2 = this.clone(), r2 = S(t2, e2, true);
593
- return r2 && (n2.$L = r2), n2;
594
- }, m2.clone = function() {
595
- return O.w(this.$d, this);
596
- }, m2.toDate = function() {
597
- return new Date(this.valueOf());
598
- }, m2.toJSON = function() {
599
- return this.isValid() ? this.toISOString() : null;
600
- }, m2.toISOString = function() {
601
- return this.$d.toISOString();
602
- }, m2.toString = function() {
603
- return this.$d.toUTCString();
604
- }, M2;
605
- }(), T = _.prototype;
606
- return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
607
- T[t2[1]] = function(e2) {
608
- return this.$g(e2, t2[0], t2[1]);
609
- };
610
- }), w.extend = function(t2, e2) {
611
- return t2.$i || (t2(e2, _, w), t2.$i = true), w;
612
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
613
- return w(1e3 * t2);
614
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
615
- });
616
- })(dayjs_min);
617
- var dayjs_minExports = dayjs_min.exports;
618
- const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
619
- const _withScopeId$3 = (n) => (pushScopeId("data-v-3cf0c9ae"), n = n(), popScopeId(), n);
423
+ const _withScopeId$3 = (n) => (pushScopeId("data-v-805321b9"), n = n(), popScopeId(), n);
620
424
  const _hoisted_1$k = {
621
425
  key: 0,
622
426
  class: "input-loading"
@@ -628,7 +432,7 @@ const _hoisted_2$f = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ create
628
432
  -1
629
433
  /* HOISTED */
630
434
  ));
631
- const _hoisted_3$9 = [
435
+ const _hoisted_3$8 = [
632
436
  _hoisted_2$f
633
437
  ];
634
438
  const _sfc_main$R = /* @__PURE__ */ defineComponent({
@@ -651,13 +455,13 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
651
455
  setup(__props, { emit }) {
652
456
  const props = __props;
653
457
  const internalValue = computed(() => {
654
- const newDate = dayjs(props.modelValue || void 0);
458
+ const newDate = DateUtil.day(props.modelValue || void 0);
655
459
  return newDate.second(0).millisecond(0).toISOString();
656
460
  });
657
461
  function onUpdate(newValue) {
658
462
  if (props.isDisabled)
659
463
  return;
660
- let newDate = dayjs(newValue);
464
+ let newDate = DateUtil.day(newValue);
661
465
  newDate = newDate.second(0).millisecond(0);
662
466
  emit("update:modelValue", newDate.toISOString());
663
467
  }
@@ -668,7 +472,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
668
472
  class: normalizeClass(["neon-time", { "is-disabled": __props.isDisabled }])
669
473
  },
670
474
  [
671
- __props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$k, _hoisted_3$9)) : (openBlock(), createBlock(unref(DatePicker), mergeProps({
475
+ __props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_1$k, _hoisted_3$8)) : (openBlock(), createBlock(unref(DatePicker), mergeProps({
672
476
  key: 1,
673
477
  "model-value": internalValue.value
674
478
  }, {
@@ -690,9 +494,9 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
690
494
  };
691
495
  }
692
496
  });
693
- const NeonTime_vue_vue_type_style_index_0_scoped_3cf0c9ae_lang = "";
497
+ const NeonTime_vue_vue_type_style_index_0_scoped_805321b9_lang = "";
694
498
  const NeonTime_vue_vue_type_style_index_1_lang = "";
695
- const NeonTime = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-3cf0c9ae"]]);
499
+ const NeonTime = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-805321b9"]]);
696
500
  const CheckInModel = models$1.CheckInModel;
697
501
  const useOperasionalStore = defineStore("neu:operasional", () => {
698
502
  const isLoading = ref(false);
@@ -816,29 +620,13 @@ function withOperasional() {
816
620
  store.setStaff(items[0]);
817
621
  }
818
622
  }
819
- function mitt(n) {
820
- return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
821
- var i = n.get(t);
822
- i ? i.push(e) : n.set(t, [e]);
823
- }, off: function(t, e) {
824
- var i = n.get(t);
825
- i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
826
- }, emit: function(t, e) {
827
- var i = n.get(t);
828
- i && i.slice().map(function(n2) {
829
- n2(e);
830
- }), (i = n.get("*")) && i.slice().map(function(n2) {
831
- n2(t, e);
832
- });
833
- } };
834
- }
835
623
  const bus = mitt();
836
624
  const _withScopeId$2 = (n) => (pushScopeId("data-v-ee60c24a"), n = n(), popScopeId(), n);
837
625
  const _hoisted_1$j = { id: "view-checkIns" };
838
626
  const _hoisted_2$e = { class: "summary" };
839
- const _hoisted_3$8 = { class: "wrapper" };
840
- const _hoisted_4$5 = { class: "header" };
841
- const _hoisted_5$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode(
627
+ const _hoisted_3$7 = { class: "wrapper" };
628
+ const _hoisted_4$4 = { class: "header" };
629
+ const _hoisted_5$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode(
842
630
  "div",
843
631
  { class: "start" },
844
632
  [
@@ -848,7 +636,7 @@ const _hoisted_5$4 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ create
848
636
  -1
849
637
  /* HOISTED */
850
638
  ));
851
- const _hoisted_6$3 = { class: "end" };
639
+ const _hoisted_6$2 = { class: "end" };
852
640
  const _sfc_main$Q = /* @__PURE__ */ defineComponent({
853
641
  ...{
854
642
  name: "CheckInPresenceCollection"
@@ -1159,7 +947,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
1159
947
  ])
1160
948
  ]),
1161
949
  default: withCtx(() => [
1162
- createElementVNode("div", _hoisted_3$8, [
950
+ createElementVNode("div", _hoisted_3$7, [
1163
951
  createVNode(unref(NeonCollectionContext), {
1164
952
  definition: "neu:tempat:checkIn",
1165
953
  scope: "_checkIns",
@@ -1174,9 +962,9 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
1174
962
  "is-main": ""
1175
963
  }, {
1176
964
  default: withCtx(() => [
1177
- createElementVNode("div", _hoisted_4$5, [
1178
- _hoisted_5$4,
1179
- createElementVNode("div", _hoisted_6$3, [
965
+ createElementVNode("div", _hoisted_4$4, [
966
+ _hoisted_5$3,
967
+ createElementVNode("div", _hoisted_6$2, [
1180
968
  createVNode(unref(OfficeCollectionQuery), { displays: ["table"] }, {
1181
969
  default: withCtx(() => [
1182
970
  createVNode(unref(OfficeCollectionOperation), { "is-main": "" })
@@ -1554,8 +1342,8 @@ const _hoisted_2$c = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEl
1554
1342
  -1
1555
1343
  /* HOISTED */
1556
1344
  ));
1557
- const _hoisted_3$7 = ["onClick"];
1558
- const _hoisted_4$4 = { class: "mr-2 text-sm" };
1345
+ const _hoisted_3$6 = ["onClick"];
1346
+ const _hoisted_4$3 = { class: "mr-2 text-sm" };
1559
1347
  const _sfc_main$L = /* @__PURE__ */ defineComponent({
1560
1348
  __name: "CheckInScanner",
1561
1349
  emits: ["start", "stop", "scanned", "close"],
@@ -1709,7 +1497,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1709
1497
  }, [
1710
1498
  createElementVNode(
1711
1499
  "div",
1712
- _hoisted_4$4,
1500
+ _hoisted_4$3,
1713
1501
  toDisplayString(currentCamera.value),
1714
1502
  1
1715
1503
  /* TEXT */
@@ -1720,7 +1508,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1720
1508
  size: "sm",
1721
1509
  "is-disabled": !canSwitch.value
1722
1510
  }, null, 8, ["is-disabled"])
1723
- ], 8, _hoisted_3$7)
1511
+ ], 8, _hoisted_3$6)
1724
1512
  ])
1725
1513
  ],
1726
1514
  2
@@ -4117,9 +3905,9 @@ const SubmissionFollowUp_vue_vue_type_style_index_0_scoped_6fd14e52_lang = "";
4117
3905
  const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-6fd14e52"]]);
4118
3906
  const _hoisted_1$9 = { class: "flex flex-wrap" };
4119
3907
  const _hoisted_2$8 = { class: "mt-2" };
4120
- const _hoisted_3$6 = { class: "mt-2" };
4121
- const _hoisted_4$3 = { class: "mt-2" };
4122
- const _hoisted_5$3 = { class: "mt-2" };
3908
+ const _hoisted_3$5 = { class: "mt-2" };
3909
+ const _hoisted_4$2 = { class: "mt-2" };
3910
+ const _hoisted_5$2 = { class: "mt-2" };
4123
3911
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
4124
3912
  __name: "SubmissionAudit",
4125
3913
  setup(__props) {
@@ -4247,7 +4035,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4247
4035
  })) : createCommentVNode("v-if", true)
4248
4036
  ]),
4249
4037
  createTextVNode("    "),
4250
- createElementVNode("div", _hoisted_3$6, [
4038
+ createElementVNode("div", _hoisted_3$5, [
4251
4039
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
4252
4040
  input: withCtx(() => [
4253
4041
  createVNode(unref(NeonButton), {
@@ -4269,7 +4057,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4269
4057
  })) : createCommentVNode("v-if", true)
4270
4058
  ]),
4271
4059
  createTextVNode("    "),
4272
- createElementVNode("div", _hoisted_4$3, [
4060
+ createElementVNode("div", _hoisted_4$2, [
4273
4061
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
4274
4062
  input: withCtx(() => [
4275
4063
  createVNode(unref(NeonButton), {
@@ -4291,7 +4079,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4291
4079
  })) : createCommentVNode("v-if", true)
4292
4080
  ]),
4293
4081
  createTextVNode("    "),
4294
- createElementVNode("div", _hoisted_5$3, [
4082
+ createElementVNode("div", _hoisted_5$2, [
4295
4083
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
4296
4084
  input: withCtx(() => [
4297
4085
  createVNode(unref(NeonButton), {
@@ -4472,7 +4260,7 @@ const SubmissionAudit_vue_vue_type_style_index_0_scoped_7ee6c6b9_lang = "";
4472
4260
  const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-7ee6c6b9"]]);
4473
4261
  const _hoisted_1$8 = { class: "flex flex-wrap" };
4474
4262
  const _hoisted_2$7 = { class: "mt-2" };
4475
- const _hoisted_3$5 = { class: "mt-2" };
4263
+ const _hoisted_3$4 = { class: "mt-2" };
4476
4264
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
4477
4265
  __name: "SubmissionDecision",
4478
4266
  setup(__props) {
@@ -4603,7 +4391,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
4603
4391
  })) : createCommentVNode("v-if", true)
4604
4392
  ]),
4605
4393
  createTextVNode("    "),
4606
- createElementVNode("div", _hoisted_3$5, [
4394
+ createElementVNode("div", _hoisted_3$4, [
4607
4395
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
4608
4396
  input: withCtx(() => {
4609
4397
  var _a2, _b;
@@ -4787,7 +4575,7 @@ const SubmissionDecision_vue_vue_type_style_index_0_scoped_ec347ac5_lang = "";
4787
4575
  const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-ec347ac5"]]);
4788
4576
  const _hoisted_1$7 = { class: "flex flex-wrap" };
4789
4577
  const _hoisted_2$6 = { class: "mt-2" };
4790
- const _hoisted_3$4 = { class: "mt-2" };
4578
+ const _hoisted_3$3 = { class: "mt-2" };
4791
4579
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
4792
4580
  __name: "SubmissionWaitingDecision",
4793
4581
  setup(__props) {
@@ -4920,7 +4708,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
4920
4708
  })) : createCommentVNode("v-if", true)
4921
4709
  ]),
4922
4710
  createTextVNode("    "),
4923
- createElementVNode("div", _hoisted_3$4, [
4711
+ createElementVNode("div", _hoisted_3$3, [
4924
4712
  unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
4925
4713
  input: withCtx(() => {
4926
4714
  var _a2, _b;
@@ -6532,194 +6320,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
6532
6320
  });
6533
6321
  const ProgressCollection_vue_vue_type_style_index_0_scoped_2634660f_lang = "";
6534
6322
  const ProgressCollection = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-2634660f"]]);
6535
- var duration = { exports: {} };
6536
- (function(module, exports) {
6537
- !function(t, s) {
6538
- module.exports = s();
6539
- }(commonjsGlobal, function() {
6540
- var t, s, n = 1e3, i = 6e4, e = 36e5, r = 864e5, o = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, u = 31536e6, h2 = 2592e6, a = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, d = { years: u, months: h2, days: r, hours: e, minutes: i, seconds: n, milliseconds: 1, weeks: 6048e5 }, c = function(t2) {
6541
- return t2 instanceof g;
6542
- }, f = function(t2, s2, n2) {
6543
- return new g(t2, n2, s2.$l);
6544
- }, l = function(t2) {
6545
- return s.p(t2) + "s";
6546
- }, m = function(t2) {
6547
- return t2 < 0;
6548
- }, $ = function(t2) {
6549
- return m(t2) ? Math.ceil(t2) : Math.floor(t2);
6550
- }, y = function(t2) {
6551
- return Math.abs(t2);
6552
- }, v = function(t2, s2) {
6553
- return t2 ? m(t2) ? { negative: true, format: "" + y(t2) + s2 } : { negative: false, format: "" + t2 + s2 } : { negative: false, format: "" };
6554
- }, g = function() {
6555
- function m2(t2, s2, n2) {
6556
- var i2 = this;
6557
- if (this.$d = {}, this.$l = n2, void 0 === t2 && (this.$ms = 0, this.parseFromMilliseconds()), s2)
6558
- return f(t2 * d[l(s2)], this);
6559
- if ("number" == typeof t2)
6560
- return this.$ms = t2, this.parseFromMilliseconds(), this;
6561
- if ("object" == typeof t2)
6562
- return Object.keys(t2).forEach(function(s3) {
6563
- i2.$d[l(s3)] = t2[s3];
6564
- }), this.calMilliseconds(), this;
6565
- if ("string" == typeof t2) {
6566
- var e2 = t2.match(a);
6567
- if (e2) {
6568
- var r2 = e2.slice(2).map(function(t3) {
6569
- return null != t3 ? Number(t3) : 0;
6570
- });
6571
- return this.$d.years = r2[0], this.$d.months = r2[1], this.$d.weeks = r2[2], this.$d.days = r2[3], this.$d.hours = r2[4], this.$d.minutes = r2[5], this.$d.seconds = r2[6], this.calMilliseconds(), this;
6572
- }
6573
- }
6574
- return this;
6575
- }
6576
- var y2 = m2.prototype;
6577
- return y2.calMilliseconds = function() {
6578
- var t2 = this;
6579
- this.$ms = Object.keys(this.$d).reduce(function(s2, n2) {
6580
- return s2 + (t2.$d[n2] || 0) * d[n2];
6581
- }, 0);
6582
- }, y2.parseFromMilliseconds = function() {
6583
- var t2 = this.$ms;
6584
- this.$d.years = $(t2 / u), t2 %= u, this.$d.months = $(t2 / h2), t2 %= h2, this.$d.days = $(t2 / r), t2 %= r, this.$d.hours = $(t2 / e), t2 %= e, this.$d.minutes = $(t2 / i), t2 %= i, this.$d.seconds = $(t2 / n), t2 %= n, this.$d.milliseconds = t2;
6585
- }, y2.toISOString = function() {
6586
- var t2 = v(this.$d.years, "Y"), s2 = v(this.$d.months, "M"), n2 = +this.$d.days || 0;
6587
- this.$d.weeks && (n2 += 7 * this.$d.weeks);
6588
- var i2 = v(n2, "D"), e2 = v(this.$d.hours, "H"), r2 = v(this.$d.minutes, "M"), o2 = this.$d.seconds || 0;
6589
- this.$d.milliseconds && (o2 += this.$d.milliseconds / 1e3);
6590
- var u2 = v(o2, "S"), h3 = t2.negative || s2.negative || i2.negative || e2.negative || r2.negative || u2.negative, a2 = e2.format || r2.format || u2.format ? "T" : "", d2 = (h3 ? "-" : "") + "P" + t2.format + s2.format + i2.format + a2 + e2.format + r2.format + u2.format;
6591
- return "P" === d2 || "-P" === d2 ? "P0D" : d2;
6592
- }, y2.toJSON = function() {
6593
- return this.toISOString();
6594
- }, y2.format = function(t2) {
6595
- var n2 = t2 || "YYYY-MM-DDTHH:mm:ss", i2 = { Y: this.$d.years, YY: s.s(this.$d.years, 2, "0"), YYYY: s.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s.s(this.$d.seconds, 2, "0"), SSS: s.s(this.$d.milliseconds, 3, "0") };
6596
- return n2.replace(o, function(t3, s2) {
6597
- return s2 || String(i2[t3]);
6598
- });
6599
- }, y2.as = function(t2) {
6600
- return this.$ms / d[l(t2)];
6601
- }, y2.get = function(t2) {
6602
- var s2 = this.$ms, n2 = l(t2);
6603
- return "milliseconds" === n2 ? s2 %= 1e3 : s2 = "weeks" === n2 ? $(s2 / d[n2]) : this.$d[n2], 0 === s2 ? 0 : s2;
6604
- }, y2.add = function(t2, s2, n2) {
6605
- var i2;
6606
- return i2 = s2 ? t2 * d[l(s2)] : c(t2) ? t2.$ms : f(t2, this).$ms, f(this.$ms + i2 * (n2 ? -1 : 1), this);
6607
- }, y2.subtract = function(t2, s2) {
6608
- return this.add(t2, s2, true);
6609
- }, y2.locale = function(t2) {
6610
- var s2 = this.clone();
6611
- return s2.$l = t2, s2;
6612
- }, y2.clone = function() {
6613
- return f(this.$ms, this);
6614
- }, y2.humanize = function(s2) {
6615
- return t().add(this.$ms, "ms").locale(this.$l).fromNow(!s2);
6616
- }, y2.valueOf = function() {
6617
- return this.asMilliseconds();
6618
- }, y2.milliseconds = function() {
6619
- return this.get("milliseconds");
6620
- }, y2.asMilliseconds = function() {
6621
- return this.as("milliseconds");
6622
- }, y2.seconds = function() {
6623
- return this.get("seconds");
6624
- }, y2.asSeconds = function() {
6625
- return this.as("seconds");
6626
- }, y2.minutes = function() {
6627
- return this.get("minutes");
6628
- }, y2.asMinutes = function() {
6629
- return this.as("minutes");
6630
- }, y2.hours = function() {
6631
- return this.get("hours");
6632
- }, y2.asHours = function() {
6633
- return this.as("hours");
6634
- }, y2.days = function() {
6635
- return this.get("days");
6636
- }, y2.asDays = function() {
6637
- return this.as("days");
6638
- }, y2.weeks = function() {
6639
- return this.get("weeks");
6640
- }, y2.asWeeks = function() {
6641
- return this.as("weeks");
6642
- }, y2.months = function() {
6643
- return this.get("months");
6644
- }, y2.asMonths = function() {
6645
- return this.as("months");
6646
- }, y2.years = function() {
6647
- return this.get("years");
6648
- }, y2.asYears = function() {
6649
- return this.as("years");
6650
- }, m2;
6651
- }();
6652
- return function(n2, i2, e2) {
6653
- t = e2, s = e2().$utils(), e2.duration = function(t2, s2) {
6654
- var n3 = e2.locale();
6655
- return f(t2, { $l: n3 }, s2);
6656
- }, e2.isDuration = c;
6657
- var r2 = i2.prototype.add, o2 = i2.prototype.subtract;
6658
- i2.prototype.add = function(t2, s2) {
6659
- return c(t2) && (t2 = t2.asMilliseconds()), r2.bind(this)(t2, s2);
6660
- }, i2.prototype.subtract = function(t2, s2) {
6661
- return c(t2) && (t2 = t2.asMilliseconds()), o2.bind(this)(t2, s2);
6662
- };
6663
- };
6664
- });
6665
- })(duration);
6666
- var durationExports = duration.exports;
6667
- const durationPlugin = /* @__PURE__ */ getDefaultExportFromCjs(durationExports);
6668
- var relativeTime = { exports: {} };
6669
- (function(module, exports) {
6670
- !function(r, e) {
6671
- module.exports = e();
6672
- }(commonjsGlobal, function() {
6673
- return function(r, e, t) {
6674
- r = r || {};
6675
- var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
6676
- function i(r2, e2, t2, o2) {
6677
- return n.fromToBase(r2, e2, t2, o2);
6678
- }
6679
- t.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
6680
- for (var f, a, s, l = i2.$locale().relativeTime || o, h2 = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h2.length, c = 0; c < m; c += 1) {
6681
- var y = h2[c];
6682
- y.d && (f = d2 ? t(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
6683
- var p = (r.rounding || Math.round)(Math.abs(f));
6684
- if (s = f > 0, p <= y.r || !y.r) {
6685
- p <= 1 && c > 0 && (y = h2[c - 1]);
6686
- var v = l[y.l];
6687
- u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
6688
- break;
6689
- }
6690
- }
6691
- if (n2)
6692
- return a;
6693
- var M = s ? l.future : l.past;
6694
- return "function" == typeof M ? M(a) : M.replace("%s", a);
6695
- }, n.to = function(r2, e2) {
6696
- return i(r2, e2, this, true);
6697
- }, n.from = function(r2, e2) {
6698
- return i(r2, e2, this);
6699
- };
6700
- var d = function(r2) {
6701
- return r2.$u ? t.utc() : t();
6702
- };
6703
- n.toNow = function(r2) {
6704
- return this.to(d(this), r2);
6705
- }, n.fromNow = function(r2) {
6706
- return this.from(d(this), r2);
6707
- };
6708
- };
6709
- });
6710
- })(relativeTime);
6711
- var relativeTimeExports = relativeTime.exports;
6712
- const relativeTimePlugin = /* @__PURE__ */ getDefaultExportFromCjs(relativeTimeExports);
6713
- dayjs.extend(durationPlugin);
6714
- dayjs.extend(relativeTimePlugin);
6715
- class DateUtil {
6716
- static get day() {
6717
- return dayjs;
6718
- }
6719
- }
6720
6323
  const _hoisted_1$5 = { class: "grid gap-2 sm:grid-cols-2" };
6721
6324
  const _hoisted_2$5 = { class: "text-right text-fg-subdued text-sm" };
6722
- const _hoisted_3$3 = { class: "segments" };
6325
+ const _hoisted_3$2 = { class: "segments" };
6723
6326
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6724
6327
  __name: "ProgressSingle",
6725
6328
  setup(__props) {
@@ -6767,11 +6370,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6767
6370
  const diff = computed(() => {
6768
6371
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
6769
6372
  });
6770
- const duration2 = computed(() => {
6373
+ const duration = computed(() => {
6771
6374
  if (isNaN(diff.value))
6772
6375
  return "-";
6773
- const duration22 = DateUtil.day.duration(diff.value);
6774
- return duration22.format("HH [jam] mm [menit]");
6376
+ const duration2 = DateUtil.day.duration(diff.value);
6377
+ return duration2.format("HH [jam] mm [menit]");
6775
6378
  });
6776
6379
  function onStartedAtUpdate(date) {
6777
6380
  if (!date)
@@ -6784,7 +6387,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6784
6387
  values.value.startedAt = startedAt.toISOString();
6785
6388
  values.value.endedAt = endedAt.toISOString();
6786
6389
  }
6787
- const sekarang = dayjs(/* @__PURE__ */ new Date());
6390
+ const sekarang = DateUtil.day(/* @__PURE__ */ new Date());
6788
6391
  const besok = sekarang;
6789
6392
  watch(
6790
6393
  isNew,
@@ -6944,7 +6547,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6944
6547
  createElementVNode(
6945
6548
  "div",
6946
6549
  _hoisted_2$5,
6947
- toDisplayString(duration2.value),
6550
+ toDisplayString(duration.value),
6948
6551
  1
6949
6552
  /* TEXT */
6950
6553
  )
@@ -7006,7 +6609,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7006
6609
  title: "Catatan"
7007
6610
  }, {
7008
6611
  default: withCtx(({ isTouched }) => [
7009
- createElementVNode("div", _hoisted_3$3, [
6612
+ createElementVNode("div", _hoisted_3$2, [
7010
6613
  createVNode(unref(CatatPaperSegments), {
7011
6614
  display: display.value,
7012
6615
  "onUpdate:display": _cache[10] || (_cache[10] = ($event) => display.value = $event)
@@ -7033,8 +6636,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
7033
6636
  };
7034
6637
  }
7035
6638
  });
7036
- const ProgressSingle_vue_vue_type_style_index_0_scoped_8354411e_lang = "";
7037
- const ProgressSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-8354411e"]]);
6639
+ const ProgressSingle_vue_vue_type_style_index_0_scoped_e7bbc154_lang = "";
6640
+ const ProgressSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-e7bbc154"]]);
7038
6641
  const _hoisted_1$4 = { class: "grid gap-2 sm:grid-cols-2" };
7039
6642
  const _hoisted_2$4 = { class: "text-right text-fg-subdued text-sm" };
7040
6643
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
@@ -7084,11 +6687,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
7084
6687
  const diff = computed(() => {
7085
6688
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7086
6689
  });
7087
- const duration2 = computed(() => {
6690
+ const duration = computed(() => {
7088
6691
  if (isNaN(diff.value))
7089
6692
  return "-";
7090
- const duration22 = DateUtil.day.duration(diff.value);
7091
- return duration22.format("HH [jam] mm [menit]");
6693
+ const duration2 = DateUtil.day.duration(diff.value);
6694
+ return duration2.format("HH [jam] mm [menit]");
7092
6695
  });
7093
6696
  function onStartedAtUpdate(date) {
7094
6697
  if (!date)
@@ -7101,7 +6704,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
7101
6704
  values.value.startedAt = startedAt.toISOString();
7102
6705
  values.value.endedAt = endedAt.toISOString();
7103
6706
  }
7104
- const sekarang = dayjs(/* @__PURE__ */ new Date());
6707
+ const sekarang = DateUtil.day(/* @__PURE__ */ new Date());
7105
6708
  const besok = sekarang.add(1, "day");
7106
6709
  watch(
7107
6710
  isNew,
@@ -7219,7 +6822,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
7219
6822
  createElementVNode(
7220
6823
  "div",
7221
6824
  _hoisted_2$4,
7222
- toDisplayString(duration2.value),
6825
+ toDisplayString(duration.value),
7223
6826
  1
7224
6827
  /* TEXT */
7225
6828
  )
@@ -7269,8 +6872,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
7269
6872
  };
7270
6873
  }
7271
6874
  });
7272
- const ProgressTomorrow_vue_vue_type_style_index_0_scoped_a2784c89_lang = "";
7273
- const ProgressTomorrow = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a2784c89"]]);
6875
+ const ProgressTomorrow_vue_vue_type_style_index_0_scoped_9a139943_lang = "";
6876
+ const ProgressTomorrow = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-9a139943"]]);
7274
6877
  const _hoisted_1$3 = { class: "grid gap-2 sm:grid-cols-2" };
7275
6878
  const _hoisted_2$3 = { class: "text-right text-fg-subdued text-sm" };
7276
6879
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
@@ -7320,11 +6923,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
7320
6923
  const diff = computed(() => {
7321
6924
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7322
6925
  });
7323
- const duration2 = computed(() => {
6926
+ const duration = computed(() => {
7324
6927
  if (isNaN(diff.value))
7325
6928
  return "-";
7326
- const duration22 = DateUtil.day.duration(diff.value);
7327
- return duration22.format("HH [jam] mm [menit]");
6929
+ const duration2 = DateUtil.day.duration(diff.value);
6930
+ return duration2.format("HH [jam] mm [menit]");
7328
6931
  });
7329
6932
  function onStartedAtUpdate(date) {
7330
6933
  if (!date)
@@ -7337,7 +6940,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
7337
6940
  values.value.startedAt = startedAt.toISOString();
7338
6941
  values.value.endedAt = endedAt.toISOString();
7339
6942
  }
7340
- const sekarang = dayjs(/* @__PURE__ */ new Date());
6943
+ const sekarang = DateUtil.day(/* @__PURE__ */ new Date());
7341
6944
  const besok = sekarang.add(-1, "day");
7342
6945
  watch(
7343
6946
  isNew,
@@ -7455,7 +7058,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
7455
7058
  createElementVNode(
7456
7059
  "div",
7457
7060
  _hoisted_2$3,
7458
- toDisplayString(duration2.value),
7061
+ toDisplayString(duration.value),
7459
7062
  1
7460
7063
  /* TEXT */
7461
7064
  )
@@ -7509,8 +7112,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
7509
7112
  };
7510
7113
  }
7511
7114
  });
7512
- const ProgressYesterday_vue_vue_type_style_index_0_scoped_e2e0ccca_lang = "";
7513
- const ProgressYesterday = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e2e0ccca"]]);
7115
+ const ProgressYesterday_vue_vue_type_style_index_0_scoped_3bad8bb9_lang = "";
7116
+ const ProgressYesterday = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3bad8bb9"]]);
7514
7117
  const AttendanceModel = models$2.AttendanceModel;
7515
7118
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
7516
7119
  ...{
@@ -7532,10 +7135,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
7532
7135
  });
7533
7136
  const _hoisted_1$2 = { class: "grid gap-2 sm:grid-cols-2" };
7534
7137
  const _hoisted_2$2 = { class: "text-right text-fg-subdued text-sm" };
7535
- const _hoisted_3$2 = { class: "grid gap-2 sm:grid-cols-2" };
7536
- const _hoisted_4$2 = { class: "text-right text-fg-subdued text-sm" };
7537
- const _hoisted_5$2 = { class: "grid gap-2 sm:grid-cols-2" };
7538
- const _hoisted_6$2 = { class: "text-right text-fg-subdued text-sm" };
7539
7138
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7540
7139
  __name: "AttendanceSingle",
7541
7140
  setup(__props) {
@@ -7553,57 +7152,33 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7553
7152
  discardChanges,
7554
7153
  syncOne
7555
7154
  } = useSingle();
7556
- const keyHomeAt = ref(0);
7557
- const diffHomeAt = computed(() => {
7558
- return DateUtil.day(values.value.earlyAt).diff(values.value.homeAt);
7155
+ const key = ref(0);
7156
+ const diff = computed(() => {
7157
+ return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7559
7158
  });
7560
- const durationHomeAt = computed(() => {
7561
- if (isNaN(diffHomeAt.value))
7159
+ const duration = computed(() => {
7160
+ if (isNaN(diff.value))
7562
7161
  return "-";
7563
- const duration2 = DateUtil.day.duration(diffHomeAt.value);
7162
+ const duration2 = DateUtil.day.duration(diff.value);
7564
7163
  return duration2.format("HH [jam] mm [menit]");
7565
7164
  });
7566
- function onHomeAtUpdate(date) {
7567
- if (!date)
7568
- return;
7569
- const earlyAt = DateUtil.day(date);
7570
- const homeAt = DateUtil.day(date);
7571
- values.value.earlyAt = earlyAt.toISOString();
7572
- values.value.homeAt = homeAt.toISOString();
7573
- }
7574
- const keyComeAt = ref(0);
7575
- const diffComeAt = computed(() => {
7576
- return DateUtil.day(values.value.lateAt).diff(values.value.comeAt);
7165
+ const reverseDiff = computed(() => {
7166
+ return DateUtil.day(values.value.startedAt).diff(values.value.endedAt);
7577
7167
  });
7578
- const durationComeAt = computed(() => {
7579
- if (isNaN(diffComeAt.value))
7168
+ computed(() => {
7169
+ if (isNaN(reverseDiff.value))
7580
7170
  return "-";
7581
- const duration2 = DateUtil.day.duration(diffComeAt.value);
7582
- return duration2.format("HH [jam] mm [menit]");
7583
- });
7584
- function onComeAtUpdate(date) {
7585
- if (!date)
7586
- return;
7587
- const comeAt = DateUtil.day(date);
7588
- const lateAt = DateUtil.day(date);
7589
- values.value.comeAt = comeAt.toISOString();
7590
- values.value.lateAt = lateAt.toISOString();
7591
- }
7592
- const keyStartedAt = ref(0);
7593
- const diffStartedAt = computed(() => {
7594
- return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7595
- });
7596
- const durationStartedAt = computed(() => {
7597
- if (isNaN(diffStartedAt.value))
7598
- return "-";
7599
- const duration2 = DateUtil.day.duration(diffStartedAt.value);
7171
+ const duration2 = DateUtil.day.duration(reverseDiff.value);
7600
7172
  return duration2.format("HH [jam] mm [menit]");
7601
7173
  });
7602
7174
  function onStartedAtUpdate(date) {
7603
7175
  if (!date)
7604
7176
  return;
7605
- const startedAt = DateUtil.day(date);
7606
- const endedAt = DateUtil.day(date);
7177
+ const currentEndedendedAt = DateUtil.day(values.value.endedAt);
7178
+ let startedAt = DateUtil.day(date);
7179
+ let endedAt = DateUtil.day(date);
7180
+ startedAt = startedAt.second(0).millisecond(0);
7181
+ endedAt = endedAt.hour(currentEndedendedAt.hour()).minute(currentEndedendedAt.minute()).second(0).millisecond(0);
7607
7182
  values.value.startedAt = startedAt.toISOString();
7608
7183
  values.value.endedAt = endedAt.toISOString();
7609
7184
  }
@@ -7628,8 +7203,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7628
7203
  onSubmit: unref(saveOne)
7629
7204
  }, {
7630
7205
  default: withCtx(() => [
7631
- createCommentVNode(' <NeonAlert\n icon="circle-info"\n label="Sudah ada Absensi!. "\n description="Untuk hari ini kamu sudah ada absensi yang diajukan, silahkan cari absensi yang telah diajukan dan ajukan kembali untuk pergantiannya."\n color="#F7CF6D"\n /> '),
7632
- createCommentVNode(' <div class="flex flex-wrap">\n <div class="mt-2">\n <NeonField>\n <template #input>\n <NeonButton\n size="md"\n color="success"\n icon-left="up-from-line"\n @click="syncOne"\n >Ajukan</NeonButton\n >\n </template>\n </NeonField>\n </div>\n &nbsp;&nbsp;\n <div class="mt-2">\n <NeonField>\n <template #input>\n <NeonButton\n size="md"\n color="warning"\n icon-left="arrows-retweet"\n @click="syncOne"\n >Ganti</NeonButton\n >\n </template>\n </NeonField>\n </div>\n </div> '),
7633
7206
  createVNode(unref(NeonField), mergeProps({
7634
7207
  modelValue: unref(values).status,
7635
7208
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(values).status = $event)
@@ -7639,23 +7212,31 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7639
7212
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(values) ? values.value = $event : null),
7640
7213
  field: unref(fields).submitStaff
7641
7214
  }, null, 8, ["modelValue", "field"]),
7642
- createVNode(unref(NeonField), mergeProps({
7643
- modelValue: unref(values).attendanceAt,
7644
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).attendanceAt = $event)
7645
- }, unref(fields).attendanceAt), null, 16, ["modelValue"]),
7215
+ (openBlock(), createBlock(unref(NeonField), mergeProps({
7216
+ key: key.value,
7217
+ "model-value": unref(values).startedAt
7218
+ }, {
7219
+ handle: "startedAt",
7220
+ name: "Tanggal",
7221
+ type: "date",
7222
+ input: "date2",
7223
+ options: {
7224
+ note: "Tanggal absensi."
7225
+ }
7226
+ }, { "onUpdate:modelValue": onStartedAtUpdate }), null, 16, ["model-value"])),
7646
7227
  createVNode(unref(NeonField), mergeProps({
7647
7228
  modelValue: unref(values).type,
7648
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).type = $event)
7229
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).type = $event)
7649
7230
  }, unref(fields).type), null, 16, ["modelValue"]),
7650
7231
  createVNode(unref(OfficeRelation), {
7651
7232
  modelValue: unref(values),
7652
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(values) ? values.value = $event : null),
7233
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
7653
7234
  field: unref(fields).decideStaff
7654
7235
  }, null, 8, ["modelValue", "field"]),
7655
7236
  unref(isNew) || unref(isReady) ? (openBlock(), createBlock(unref(NeonField), mergeProps({
7656
7237
  key: 0,
7657
7238
  modelValue: unref(values).notes,
7658
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).notes = $event)
7239
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).notes = $event)
7659
7240
  }, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
7660
7241
  createVNode(unref(NeonDivider), {
7661
7242
  "is-dashed": "",
@@ -7663,153 +7244,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7663
7244
  }),
7664
7245
  createVNode(unref(NeonField), mergeProps({
7665
7246
  modelValue: unref(values).submittedAt,
7666
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).submittedAt = $event)
7247
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).submittedAt = $event)
7667
7248
  }, unref(fields).submittedAt), null, 16, ["modelValue"]),
7668
- createCommentVNode(" EARLY GO HOME "),
7669
- (openBlock(), createBlock(unref(NeonField), mergeProps({
7670
- key: keyHomeAt.value,
7671
- "model-value": unref(values).homeAt
7672
- }, {
7673
- handle: "homeAt",
7674
- name: "Tanggal",
7675
- type: "date",
7676
- input: "date2",
7677
- options: {
7678
- note: "Tanggal absensi."
7679
- }
7680
- }, { "onUpdate:modelValue": onHomeAtUpdate }), null, 16, ["model-value"])),
7681
7249
  createElementVNode("div", _hoisted_1$2, [
7682
- createVNode(unref(NeonField), mergeProps({
7683
- modelValue: unref(values).homeAt,
7684
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).homeAt = $event)
7685
- }, {
7686
- handle: "homeAt",
7687
- name: "Jam Pulang Kerja",
7688
- options: {
7689
- note: "Jam pulang kerja."
7690
- }
7691
- }), {
7692
- input: withCtx(() => [
7693
- createVNode(unref(NeonTime), {
7694
- modelValue: unref(values).homeAt,
7695
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).homeAt = $event),
7696
- "is-loading": unref(isLoading),
7697
- class: "mt-2"
7698
- }, null, 8, ["modelValue", "is-loading"])
7699
- ]),
7700
- _: 1
7701
- /* STABLE */
7702
- }, 16, ["modelValue"]),
7703
- createVNode(unref(NeonField), mergeProps({
7704
- modelValue: unref(values).earlyAt,
7705
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).earlyAt = $event)
7706
- }, {
7707
- handle: "earlyAt",
7708
- name: "Jam Pulang Lebih Awal",
7709
- options: {
7710
- note: "Jam pulang lebih awal."
7711
- }
7712
- }), {
7713
- input: withCtx(() => [
7714
- createVNode(unref(NeonTime), {
7715
- modelValue: unref(values).earlyAt,
7716
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).earlyAt = $event),
7717
- "is-loading": unref(isLoading),
7718
- class: "mt-2"
7719
- }, null, 8, ["modelValue", "is-loading"]),
7720
- createElementVNode(
7721
- "div",
7722
- _hoisted_2$2,
7723
- toDisplayString(durationHomeAt.value),
7724
- 1
7725
- /* TEXT */
7726
- )
7727
- ]),
7728
- _: 1
7729
- /* STABLE */
7730
- }, 16, ["modelValue"])
7731
- ]),
7732
- createCommentVNode(" COME TOO LATE "),
7733
- (openBlock(), createBlock(unref(NeonField), mergeProps({
7734
- key: keyComeAt.value,
7735
- "model-value": unref(values).comeAt
7736
- }, {
7737
- handle: "comeAt",
7738
- name: "Tanggal",
7739
- type: "date",
7740
- input: "date2",
7741
- options: {
7742
- note: "Tanggal absensi."
7743
- }
7744
- }, { "onUpdate:modelValue": onComeAtUpdate }), null, 16, ["model-value"])),
7745
- createElementVNode("div", _hoisted_3$2, [
7746
- createVNode(unref(NeonField), mergeProps({
7747
- modelValue: unref(values).comeAt,
7748
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).comeAt = $event)
7749
- }, {
7750
- handle: "comeAt",
7751
- name: "Jam Datang",
7752
- options: {
7753
- note: "Jam Datang kerja."
7754
- }
7755
- }), {
7756
- input: withCtx(() => [
7757
- createVNode(unref(NeonTime), {
7758
- modelValue: unref(values).comeAt,
7759
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).comeAt = $event),
7760
- "is-loading": unref(isLoading),
7761
- class: "mt-2"
7762
- }, null, 8, ["modelValue", "is-loading"])
7763
- ]),
7764
- _: 1
7765
- /* STABLE */
7766
- }, 16, ["modelValue"]),
7767
- createVNode(unref(NeonField), mergeProps({
7768
- modelValue: unref(values).lateAt,
7769
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).lateAt = $event)
7770
- }, {
7771
- handle: "lateAt",
7772
- name: "Jam Datang Terlambat",
7773
- options: {
7774
- note: "Jam datang terlambat."
7775
- }
7776
- }), {
7777
- input: withCtx(() => [
7778
- createVNode(unref(NeonTime), {
7779
- modelValue: unref(values).lateAt,
7780
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).lateAt = $event),
7781
- "is-loading": unref(isLoading),
7782
- class: "mt-2"
7783
- }, null, 8, ["modelValue", "is-loading"]),
7784
- createElementVNode(
7785
- "div",
7786
- _hoisted_4$2,
7787
- toDisplayString(durationComeAt.value),
7788
- 1
7789
- /* TEXT */
7790
- )
7791
- ]),
7792
- _: 1
7793
- /* STABLE */
7794
- }, 16, ["modelValue"])
7795
- ]),
7796
- createCommentVNode(" TIMEOUT "),
7797
- (openBlock(), createBlock(unref(NeonField), mergeProps({
7798
- key: keyStartedAt.value,
7799
- "model-value": unref(values).startedAt
7800
- }, {
7801
- handle: "startedAt",
7802
- name: "Tanggal",
7803
- type: "date",
7804
- input: "date2",
7805
- options: {
7806
- note: "Tanggal absensi."
7807
- }
7808
- }, { "onUpdate:modelValue": onStartedAtUpdate }), null, 16, ["model-value"])),
7809
- createElementVNode("div", _hoisted_5$2, [
7810
7250
  createVNode(unref(NeonField), mergeProps({
7811
7251
  modelValue: unref(values).startedAt,
7812
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).startedAt = $event)
7252
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).startedAt = $event)
7813
7253
  }, {
7814
7254
  handle: "startedAt",
7815
7255
  name: "Mulai",
@@ -7820,7 +7260,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7820
7260
  input: withCtx(() => [
7821
7261
  createVNode(unref(NeonTime), {
7822
7262
  modelValue: unref(values).startedAt,
7823
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).startedAt = $event),
7263
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).startedAt = $event),
7824
7264
  "is-loading": unref(isLoading),
7825
7265
  class: "mt-2"
7826
7266
  }, null, 8, ["modelValue", "is-loading"])
@@ -7830,7 +7270,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7830
7270
  }, 16, ["modelValue"]),
7831
7271
  createVNode(unref(NeonField), mergeProps({
7832
7272
  modelValue: unref(values).endedAt,
7833
- "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(values).endedAt = $event)
7273
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).endedAt = $event)
7834
7274
  }, {
7835
7275
  handle: "endedAt",
7836
7276
  name: "Selesai",
@@ -7841,14 +7281,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7841
7281
  input: withCtx(() => [
7842
7282
  createVNode(unref(NeonTime), {
7843
7283
  modelValue: unref(values).endedAt,
7844
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).endedAt = $event),
7284
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).endedAt = $event),
7845
7285
  "is-loading": unref(isLoading),
7846
7286
  class: "mt-2"
7847
7287
  }, null, 8, ["modelValue", "is-loading"]),
7848
7288
  createElementVNode(
7849
7289
  "div",
7850
- _hoisted_6$2,
7851
- toDisplayString(durationStartedAt.value),
7290
+ _hoisted_2$2,
7291
+ toDisplayString(duration.value),
7852
7292
  1
7853
7293
  /* TEXT */
7854
7294
  )
@@ -7876,26 +7316,26 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7876
7316
  };
7877
7317
  }
7878
7318
  });
7879
- const AttendanceSingle_vue_vue_type_style_index_0_scoped_f2d3d252_lang = "";
7880
- const AttendanceSingle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f2d3d252"]]);
7319
+ const AttendanceSingle_vue_vue_type_style_index_0_scoped_0c3c6187_lang = "";
7320
+ const AttendanceSingle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-0c3c6187"]]);
7881
7321
  const _hoisted_1$1 = {
7882
- key: 0,
7322
+ key: 1,
7883
7323
  class: "flex flex-wrap"
7884
7324
  };
7885
7325
  const _hoisted_2$1 = { class: "mt-2" };
7886
7326
  const _hoisted_3$1 = { class: "mt-2" };
7887
7327
  const _hoisted_4$1 = {
7888
- key: 8,
7328
+ key: 5,
7889
7329
  class: "grid gap-2 sm:grid-cols-2"
7890
7330
  };
7891
7331
  const _hoisted_5$1 = { class: "text-right text-fg-subdued text-sm" };
7892
7332
  const _hoisted_6$1 = {
7893
- key: 9,
7333
+ key: 6,
7894
7334
  class: "grid gap-2 sm:grid-cols-2"
7895
7335
  };
7896
7336
  const _hoisted_7$1 = { class: "text-right text-fg-subdued text-sm" };
7897
7337
  const _hoisted_8$1 = {
7898
- key: 10,
7338
+ key: 7,
7899
7339
  class: "grid gap-2 sm:grid-cols-2"
7900
7340
  };
7901
7341
  const _hoisted_9$1 = { class: "text-right text-fg-subdued text-sm" };
@@ -7918,62 +7358,27 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7918
7358
  syncOne,
7919
7359
  executeOne
7920
7360
  } = useSingle();
7921
- const keyHomeAt = ref(0);
7922
- const diffHomeAt = computed(() => {
7923
- return DateUtil.day(values.value.earlyAt).diff(values.value.homeAt);
7924
- });
7925
- const durationHomeAt = computed(() => {
7926
- if (isNaN(diffHomeAt.value))
7927
- return "-";
7928
- const duration2 = DateUtil.day.duration(diffHomeAt.value);
7929
- return duration2.format("HH [jam] mm [menit]");
7930
- });
7931
- function onHomeAtUpdate(date) {
7932
- if (!date)
7933
- return;
7934
- const earlyAt = DateUtil.day(date);
7935
- const homeAt = DateUtil.day(date);
7936
- values.value.earlyAt = earlyAt.toISOString();
7937
- values.value.homeAt = homeAt.toISOString();
7938
- values.value.attendanceAt = earlyAt.toISOString();
7939
- }
7940
- const keyComeAt = ref(0);
7941
- const diffComeAt = computed(() => {
7942
- return DateUtil.day(values.value.lateAt).diff(values.value.comeAt);
7943
- });
7944
- const durationComeAt = computed(() => {
7945
- if (isNaN(diffComeAt.value))
7946
- return "-";
7947
- const duration2 = DateUtil.day.duration(diffComeAt.value);
7948
- return duration2.format("HH [jam] mm [menit]");
7949
- });
7950
- function onComeAtUpdate(date) {
7951
- if (!date)
7952
- return;
7953
- const comeAt = DateUtil.day(date);
7954
- const lateAt = DateUtil.day(date);
7955
- values.value.comeAt = comeAt.toISOString();
7956
- values.value.lateAt = lateAt.toISOString();
7957
- values.value.attendanceAt = comeAt.toISOString();
7958
- }
7959
- const keyStartedAt = ref(0);
7960
- const diffStartedAt = computed(() => {
7361
+ const key = ref(0);
7362
+ const diff = computed(() => {
7961
7363
  return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7962
7364
  });
7963
- const durationStartedAt = computed(() => {
7964
- if (isNaN(diffStartedAt.value))
7365
+ const duration = computed(() => {
7366
+ if (isNaN(diff.value))
7965
7367
  return "-";
7966
- const duration2 = DateUtil.day.duration(diffStartedAt.value);
7368
+ const duration2 = DateUtil.day.duration(diff.value);
7967
7369
  return duration2.format("HH [jam] mm [menit]");
7968
7370
  });
7969
7371
  function onStartedAtUpdate(date) {
7970
7372
  if (!date)
7971
7373
  return;
7972
- const startedAt = DateUtil.day(date);
7973
- const endedAt = DateUtil.day(date);
7374
+ const currentEndedendedAt = DateUtil.day(values.value.endedAt);
7375
+ let startedAt = DateUtil.day(date);
7376
+ let endedAt = DateUtil.day(date);
7377
+ startedAt = startedAt.second(0).millisecond(0);
7378
+ endedAt = endedAt.hour(currentEndedendedAt.hour()).minute(currentEndedendedAt.minute()).second(0).millisecond(0);
7974
7379
  values.value.startedAt = startedAt.toISOString();
7975
7380
  values.value.endedAt = endedAt.toISOString();
7976
- values.value.attendanceAt = startedAt.toISOString();
7381
+ conflictAtt.value = false;
7977
7382
  }
7978
7383
  const { staff } = useOperasional();
7979
7384
  const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
@@ -7997,6 +7402,26 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7997
7402
  await executeOne("changeAttendance", { attendanceId: id.value });
7998
7403
  await syncOne();
7999
7404
  };
7405
+ const conflictAtt = ref(false);
7406
+ async function conflictAttendance() {
7407
+ var _a2;
7408
+ const resp = await executeOne("checkAttendance", {
7409
+ staffId: (_a2 = staff.value) == null ? void 0 : _a2.id,
7410
+ startedAt: values.value.startedAt
7411
+ });
7412
+ const countAtt = resp.data.executeAttendance.output.countAttendance;
7413
+ if (values.value.startedAt) {
7414
+ if (countAtt > 1) {
7415
+ conflictAtt.value = true;
7416
+ } else {
7417
+ await submitAbsensi();
7418
+ await syncOne();
7419
+ conflictAtt.value = false;
7420
+ }
7421
+ } else {
7422
+ conflictAtt.value = true;
7423
+ }
7424
+ }
8000
7425
  return (_ctx, _cache) => {
8001
7426
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-attendance-single" }, {
8002
7427
  default: withCtx(() => [
@@ -8018,8 +7443,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8018
7443
  onSubmit: unref(saveOne)
8019
7444
  }, {
8020
7445
  default: withCtx(() => [
8021
- createCommentVNode(' <NeonAlert\n icon="circle-info"\n label="Sudah ada Absensi!. "\n description="Untuk hari ini kamu sudah ada absensi yang diajukan, silahkan cari absensi yang telah diajukan dan ajukan kembali untuk pergantiannya."\n color="#F7CF6D"\n /> '),
8022
- !unref(isNew) ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
7446
+ conflictAtt.value == true ? (openBlock(), createBlock(unref(NeonAlert), {
7447
+ key: 0,
7448
+ icon: "circle-info",
7449
+ label: "Sudah ada Absensi!. ",
7450
+ description: "Untuk hari ini kamu sudah ada absensi yang diajukan, silahkan cari absensi yang telah diajukan dan ajukan kembali untuk pergantiannya.",
7451
+ color: "#F7CF6D"
7452
+ })) : createCommentVNode("v-if", true),
7453
+ !unref(isNew) && conflictAtt.value == false ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
8023
7454
  createElementVNode("div", _hoisted_2$1, [
8024
7455
  createVNode(unref(NeonField), null, {
8025
7456
  input: withCtx(() => [
@@ -8028,7 +7459,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8028
7459
  color: "success",
8029
7460
  "icon-left": "up-from-line",
8030
7461
  "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved",
8031
- onClick: submitAbsensi
7462
+ onClick: conflictAttendance
8032
7463
  }, {
8033
7464
  default: withCtx(() => [
8034
7465
  createTextVNode("Ajukan")
@@ -8049,7 +7480,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8049
7480
  size: "md",
8050
7481
  color: "warning",
8051
7482
  "icon-left": "arrows-retweet",
8052
- "is-disabled": unref(values).status == "approved" || unref(values).status == "draft",
7483
+ "is-disabled": unref(values).status == "notApproved" || unref(values).status == "draft",
8053
7484
  onClick: changeAbsensi
8054
7485
  }, {
8055
7486
  default: withCtx(() => [
@@ -8070,32 +7501,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8070
7501
  field: unref(fields).submitStaff,
8071
7502
  "is-disabled": ""
8072
7503
  }, null, 8, ["modelValue", "field"]),
8073
- unref(values).type == null || unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8074
- key: 1,
8075
- modelValue: unref(values).attendanceAt,
8076
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).attendanceAt = $event)
8077
- }, unref(fields).attendanceAt, {
8078
- "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved"
8079
- }), null, 16, ["modelValue", "is-disabled"])) : createCommentVNode("v-if", true),
8080
- createCommentVNode(" EARLY GO HOME "),
8081
- unref(values).type == "homeEarly" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8082
- key: keyHomeAt.value,
8083
- "model-value": unref(values).homeAt
8084
- }, {
8085
- handle: "homeAt",
8086
- name: "Tanggal",
8087
- type: "date",
8088
- input: "date2",
8089
- options: {
8090
- note: "Tanggal absensi."
8091
- }
8092
- }, {
8093
- "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved",
8094
- "onUpdate:modelValue": onHomeAtUpdate
8095
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
8096
- createCommentVNode(" TIMEOUT "),
8097
- unref(values).type == "timeout" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8098
- key: keyStartedAt.value,
7504
+ (openBlock(), createBlock(unref(NeonField), mergeProps({
7505
+ key: key.value,
8099
7506
  "model-value": unref(values).startedAt
8100
7507
  }, {
8101
7508
  handle: "startedAt",
@@ -8108,57 +7515,41 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8108
7515
  }, {
8109
7516
  "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved",
8110
7517
  "onUpdate:modelValue": onStartedAtUpdate
8111
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
8112
- createCommentVNode(" COME TOO LATE "),
8113
- unref(values).type == "comeLate" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8114
- key: keyComeAt.value,
8115
- "model-value": unref(values).comeAt
8116
- }, {
8117
- handle: "comeAt",
8118
- name: "Tanggal",
8119
- type: "date",
8120
- input: "date2",
8121
- options: {
8122
- note: "Tanggal absensi."
8123
- }
8124
- }, {
8125
- "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved",
8126
- "onUpdate:modelValue": onComeAtUpdate
8127
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
7518
+ }), null, 16, ["model-value", "is-disabled"])),
8128
7519
  createVNode(unref(NeonField), mergeProps({
8129
7520
  modelValue: unref(values).type,
8130
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).type = $event)
7521
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
8131
7522
  }, unref(fields).type, {
8132
7523
  "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved"
8133
7524
  }), null, 16, ["modelValue", "is-disabled"]),
8134
7525
  createVNode(unref(OfficeRelation), {
8135
7526
  modelValue: unref(values),
8136
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
7527
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(values) ? values.value = $event : null),
8137
7528
  field: unref(fields).decideStaff,
8138
7529
  "is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved"
8139
7530
  }, null, 8, ["modelValue", "field", "is-disabled"]),
8140
7531
  unref(isNew) || unref(isReady) ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8141
- key: 5,
7532
+ key: 2,
8142
7533
  modelValue: unref(values).notes,
8143
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).notes = $event)
7534
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).notes = $event)
8144
7535
  }, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
8145
7536
  unref(values).type ? (openBlock(), createBlock(unref(NeonDivider), {
8146
- key: 6,
7537
+ key: 3,
8147
7538
  "is-dashed": "",
8148
7539
  label: "Keterangan"
8149
7540
  })) : createCommentVNode("v-if", true),
8150
7541
  unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8151
- key: 7,
7542
+ key: 4,
8152
7543
  modelValue: unref(values).submittedAt,
8153
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).submittedAt = $event)
7544
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).submittedAt = $event)
8154
7545
  }, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
8155
7546
  createCommentVNode(" EARLY GO HOME "),
8156
7547
  unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
8157
7548
  createVNode(unref(NeonField), mergeProps({
8158
- modelValue: unref(values).homeAt,
8159
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).homeAt = $event)
7549
+ modelValue: unref(values).startedAt,
7550
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).startedAt = $event)
8160
7551
  }, {
8161
- handle: "homeAt",
7552
+ handle: "startedAt",
8162
7553
  name: "Jam Pulang Kerja",
8163
7554
  options: {
8164
7555
  note: "Jam pulang kerja."
@@ -8166,8 +7557,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8166
7557
  }), {
8167
7558
  input: withCtx(() => [
8168
7559
  createVNode(unref(NeonTime), {
8169
- modelValue: unref(values).homeAt,
8170
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).homeAt = $event),
7560
+ modelValue: unref(values).startedAt,
7561
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).startedAt = $event),
8171
7562
  "is-loading": unref(isLoading),
8172
7563
  class: "mt-2"
8173
7564
  }, null, 8, ["modelValue", "is-loading"])
@@ -8176,10 +7567,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8176
7567
  /* STABLE */
8177
7568
  }, 16, ["modelValue"]),
8178
7569
  createVNode(unref(NeonField), mergeProps({
8179
- modelValue: unref(values).earlyAt,
8180
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).earlyAt = $event)
7570
+ modelValue: unref(values).endedAt,
7571
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).endedAt = $event)
8181
7572
  }, {
8182
- handle: "earlyAt",
7573
+ handle: "endedAt",
8183
7574
  name: "Jam Pulang Lebih Awal",
8184
7575
  options: {
8185
7576
  note: "Jam pulang lebih awal."
@@ -8187,15 +7578,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8187
7578
  }), {
8188
7579
  input: withCtx(() => [
8189
7580
  createVNode(unref(NeonTime), {
8190
- modelValue: unref(values).earlyAt,
8191
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).earlyAt = $event),
7581
+ modelValue: unref(values).endedAt,
7582
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).endedAt = $event),
8192
7583
  "is-loading": unref(isLoading),
8193
7584
  class: "mt-2"
8194
7585
  }, null, 8, ["modelValue", "is-loading"]),
8195
7586
  createElementVNode(
8196
7587
  "div",
8197
7588
  _hoisted_5$1,
8198
- toDisplayString(durationHomeAt.value),
7589
+ toDisplayString(duration.value),
8199
7590
  1
8200
7591
  /* TEXT */
8201
7592
  )
@@ -8207,10 +7598,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8207
7598
  createCommentVNode(" COME TOO LATE "),
8208
7599
  unref(values).type == "comeLate" ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
8209
7600
  createVNode(unref(NeonField), mergeProps({
8210
- modelValue: unref(values).comeAt,
8211
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).comeAt = $event)
7601
+ modelValue: unref(values).startedAt,
7602
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).startedAt = $event)
8212
7603
  }, {
8213
- handle: "comeAt",
7604
+ handle: "startedAt",
8214
7605
  name: "Jam Datang",
8215
7606
  options: {
8216
7607
  note: "Jam Datang kerja."
@@ -8218,8 +7609,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8218
7609
  }), {
8219
7610
  input: withCtx(() => [
8220
7611
  createVNode(unref(NeonTime), {
8221
- modelValue: unref(values).comeAt,
8222
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).comeAt = $event),
7612
+ modelValue: unref(values).startedAt,
7613
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).startedAt = $event),
8223
7614
  "is-loading": unref(isLoading),
8224
7615
  class: "mt-2"
8225
7616
  }, null, 8, ["modelValue", "is-loading"])
@@ -8228,10 +7619,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8228
7619
  /* STABLE */
8229
7620
  }, 16, ["modelValue"]),
8230
7621
  createVNode(unref(NeonField), mergeProps({
8231
- modelValue: unref(values).lateAt,
8232
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).lateAt = $event)
7622
+ modelValue: unref(values).endedAt,
7623
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).endedAt = $event)
8233
7624
  }, {
8234
- handle: "lateAt",
7625
+ handle: "endedAt",
8235
7626
  name: "Jam Datang Terlambat",
8236
7627
  options: {
8237
7628
  note: "Jam datang terlambat."
@@ -8239,15 +7630,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8239
7630
  }), {
8240
7631
  input: withCtx(() => [
8241
7632
  createVNode(unref(NeonTime), {
8242
- modelValue: unref(values).lateAt,
8243
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).lateAt = $event),
7633
+ modelValue: unref(values).endedAt,
7634
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).endedAt = $event),
8244
7635
  "is-loading": unref(isLoading),
8245
7636
  class: "mt-2"
8246
7637
  }, null, 8, ["modelValue", "is-loading"]),
8247
7638
  createElementVNode(
8248
7639
  "div",
8249
7640
  _hoisted_7$1,
8250
- toDisplayString(durationComeAt.value),
7641
+ toDisplayString(duration.value),
8251
7642
  1
8252
7643
  /* TEXT */
8253
7644
  )
@@ -8260,7 +7651,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8260
7651
  unref(values).type == "timeout" ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
8261
7652
  createVNode(unref(NeonField), mergeProps({
8262
7653
  modelValue: unref(values).startedAt,
8263
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).startedAt = $event)
7654
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).startedAt = $event)
8264
7655
  }, {
8265
7656
  handle: "startedAt",
8266
7657
  name: "Mulai",
@@ -8271,7 +7662,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8271
7662
  input: withCtx(() => [
8272
7663
  createVNode(unref(NeonTime), {
8273
7664
  modelValue: unref(values).startedAt,
8274
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).startedAt = $event),
7665
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).startedAt = $event),
8275
7666
  "is-loading": unref(isLoading),
8276
7667
  class: "mt-2"
8277
7668
  }, null, 8, ["modelValue", "is-loading"])
@@ -8281,7 +7672,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8281
7672
  }, 16, ["modelValue"]),
8282
7673
  createVNode(unref(NeonField), mergeProps({
8283
7674
  modelValue: unref(values).endedAt,
8284
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).endedAt = $event)
7675
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).endedAt = $event)
8285
7676
  }, {
8286
7677
  handle: "endedAt",
8287
7678
  name: "Selesai",
@@ -8292,14 +7683,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8292
7683
  input: withCtx(() => [
8293
7684
  createVNode(unref(NeonTime), {
8294
7685
  modelValue: unref(values).endedAt,
8295
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).endedAt = $event),
7686
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).endedAt = $event),
8296
7687
  "is-loading": unref(isLoading),
8297
7688
  class: "mt-2"
8298
7689
  }, null, 8, ["modelValue", "is-loading"]),
8299
7690
  createElementVNode(
8300
7691
  "div",
8301
7692
  _hoisted_9$1,
8302
- toDisplayString(durationStartedAt.value),
7693
+ toDisplayString(duration.value),
8303
7694
  1
8304
7695
  /* TEXT */
8305
7696
  )
@@ -8327,23 +7718,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
8327
7718
  };
8328
7719
  }
8329
7720
  });
8330
- const AttendanceStaff_vue_vue_type_style_index_0_scoped_922e86d6_lang = "";
8331
- const AttendanceStaff = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-922e86d6"]]);
7721
+ const AttendanceStaff_vue_vue_type_style_index_0_scoped_724535b0_lang = "";
7722
+ const AttendanceStaff = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-724535b0"]]);
8332
7723
  const _hoisted_1 = { class: "flex flex-wrap" };
8333
7724
  const _hoisted_2 = { class: "mt-2" };
8334
7725
  const _hoisted_3 = { class: "mt-2" };
8335
7726
  const _hoisted_4 = {
8336
- key: 7,
7727
+ key: 3,
8337
7728
  class: "grid gap-2 sm:grid-cols-2"
8338
7729
  };
8339
7730
  const _hoisted_5 = { class: "text-right text-fg-subdued text-sm" };
8340
7731
  const _hoisted_6 = {
8341
- key: 8,
7732
+ key: 4,
8342
7733
  class: "grid gap-2 sm:grid-cols-2"
8343
7734
  };
8344
7735
  const _hoisted_7 = { class: "text-right text-fg-subdued text-sm" };
8345
7736
  const _hoisted_8 = {
8346
- key: 9,
7737
+ key: 5,
8347
7738
  class: "grid gap-2 sm:grid-cols-2"
8348
7739
  };
8349
7740
  const _hoisted_9 = { class: "text-right text-fg-subdued text-sm" };
@@ -8366,57 +7757,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8366
7757
  syncOne,
8367
7758
  executeOne
8368
7759
  } = useSingle();
8369
- const keyHomeAt = ref(0);
8370
- const diffHomeAt = computed(() => {
8371
- return DateUtil.day(values.value.earlyAt).diff(values.value.homeAt);
8372
- });
8373
- const durationHomeAt = computed(() => {
8374
- if (isNaN(diffHomeAt.value))
8375
- return "-";
8376
- const duration2 = DateUtil.day.duration(diffHomeAt.value);
8377
- return duration2.format("HH [jam] mm [menit]");
8378
- });
8379
- function onHomeAtUpdate(date) {
8380
- if (!date)
8381
- return;
8382
- const earlyAt = DateUtil.day(date);
8383
- const homeAt = DateUtil.day(date);
8384
- values.value.earlyAt = earlyAt.toISOString();
8385
- values.value.homeAt = homeAt.toISOString();
8386
- }
8387
- const keyComeAt = ref(0);
8388
- const diffComeAt = computed(() => {
8389
- return DateUtil.day(values.value.lateAt).diff(values.value.comeAt);
7760
+ const key = ref(0);
7761
+ const diff = computed(() => {
7762
+ return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
8390
7763
  });
8391
- const durationComeAt = computed(() => {
8392
- if (isNaN(diffComeAt.value))
7764
+ const duration = computed(() => {
7765
+ if (isNaN(diff.value))
8393
7766
  return "-";
8394
- const duration2 = DateUtil.day.duration(diffComeAt.value);
7767
+ const duration2 = DateUtil.day.duration(diff.value);
8395
7768
  return duration2.format("HH [jam] mm [menit]");
8396
7769
  });
8397
- function onComeAtUpdate(date) {
8398
- if (!date)
8399
- return;
8400
- const comeAt = DateUtil.day(date);
8401
- const lateAt = DateUtil.day(date);
8402
- values.value.comeAt = comeAt.toISOString();
8403
- values.value.lateAt = lateAt.toISOString();
8404
- }
8405
- const keyStartedAt = ref(0);
8406
- const diffStartedAt = computed(() => {
8407
- return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
7770
+ const reverseDiff = computed(() => {
7771
+ return DateUtil.day(values.value.startedAt).diff(values.value.endedAt);
8408
7772
  });
8409
- const durationStartedAt = computed(() => {
8410
- if (isNaN(diffStartedAt.value))
7773
+ const reverseDuration = computed(() => {
7774
+ if (isNaN(reverseDiff.value))
8411
7775
  return "-";
8412
- const duration2 = DateUtil.day.duration(diffStartedAt.value);
7776
+ const duration2 = DateUtil.day.duration(reverseDiff.value);
8413
7777
  return duration2.format("HH [jam] mm [menit]");
8414
7778
  });
8415
7779
  function onStartedAtUpdate(date) {
8416
7780
  if (!date)
8417
7781
  return;
8418
- const startedAt = DateUtil.day(date);
8419
- const endedAt = DateUtil.day(date);
7782
+ const currentEndedendedAt = DateUtil.day(values.value.endedAt);
7783
+ let startedAt = DateUtil.day(date);
7784
+ let endedAt = DateUtil.day(date);
7785
+ startedAt = startedAt.second(0).millisecond(0);
7786
+ endedAt = endedAt.hour(currentEndedendedAt.hour()).minute(currentEndedendedAt.minute()).second(0).millisecond(0);
8420
7787
  values.value.startedAt = startedAt.toISOString();
8421
7788
  values.value.endedAt = endedAt.toISOString();
8422
7789
  }
@@ -8514,32 +7881,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8514
7881
  field: unref(fields).submitStaff,
8515
7882
  "is-disabled": ""
8516
7883
  }, null, 8, ["modelValue", "field"]),
8517
- unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8518
- key: 0,
8519
- modelValue: unref(values).attendanceAt,
8520
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).attendanceAt = $event)
8521
- }, unref(fields).attendanceAt, {
8522
- "is-disabled": unref(values).status == "approved"
8523
- }), null, 16, ["modelValue", "is-disabled"])) : createCommentVNode("v-if", true),
8524
- createCommentVNode(" EARLY GO HOME "),
8525
- unref(values).type == "homeEarly" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8526
- key: keyHomeAt.value,
8527
- "model-value": unref(values).homeAt
8528
- }, {
8529
- handle: "homeAt",
8530
- name: "Tanggal",
8531
- type: "date",
8532
- input: "date2",
8533
- options: {
8534
- note: "Tanggal absensi."
8535
- }
8536
- }, {
8537
- "is-disabled": unref(values).status == "approved",
8538
- "onUpdate:modelValue": onHomeAtUpdate
8539
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
8540
- createCommentVNode(" TIMEOUT "),
8541
- unref(values).type == "timeout" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8542
- key: keyStartedAt.value,
7884
+ (openBlock(), createBlock(unref(NeonField), mergeProps({
7885
+ key: key.value,
8543
7886
  "model-value": unref(values).startedAt
8544
7887
  }, {
8545
7888
  handle: "startedAt",
@@ -8552,57 +7895,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8552
7895
  }, {
8553
7896
  "is-disabled": unref(values).status == "approved",
8554
7897
  "onUpdate:modelValue": onStartedAtUpdate
8555
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
8556
- createCommentVNode(" COME TOO LATE "),
8557
- unref(values).type == "comeLate" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8558
- key: keyComeAt.value,
8559
- "model-value": unref(values).comeAt
8560
- }, {
8561
- handle: "comeAt",
8562
- name: "Tanggal",
8563
- type: "date",
8564
- input: "date2",
8565
- options: {
8566
- note: "Tanggal absensi."
8567
- }
8568
- }, {
8569
- "is-disabled": unref(values).status == "approved",
8570
- "onUpdate:modelValue": onComeAtUpdate
8571
- }), null, 16, ["model-value", "is-disabled"])) : createCommentVNode("v-if", true),
7898
+ }), null, 16, ["model-value", "is-disabled"])),
8572
7899
  createVNode(unref(NeonField), mergeProps({
8573
7900
  modelValue: unref(values).type,
8574
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).type = $event)
7901
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).type = $event)
8575
7902
  }, unref(fields).type, {
8576
7903
  "is-disabled": unref(values).status == "approved"
8577
7904
  }), null, 16, ["modelValue", "is-disabled"]),
8578
7905
  createVNode(unref(OfficeRelation), {
8579
7906
  modelValue: unref(values),
8580
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
7907
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(values) ? values.value = $event : null),
8581
7908
  field: unref(fields).decideStaff,
8582
7909
  "is-disabled": unref(values).status == "approved"
8583
7910
  }, null, 8, ["modelValue", "field", "is-disabled"]),
8584
7911
  unref(isNew) || unref(isReady) ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8585
- key: 4,
7912
+ key: 0,
8586
7913
  modelValue: unref(values).notes,
8587
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).notes = $event)
7914
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).notes = $event)
8588
7915
  }, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
8589
7916
  unref(values).type ? (openBlock(), createBlock(unref(NeonDivider), {
8590
- key: 5,
7917
+ key: 1,
8591
7918
  "is-dashed": "",
8592
7919
  label: "Keterangan"
8593
7920
  })) : createCommentVNode("v-if", true),
8594
7921
  unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
8595
- key: 6,
7922
+ key: 2,
8596
7923
  modelValue: unref(values).submittedAt,
8597
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).submittedAt = $event)
7924
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(values).submittedAt = $event)
8598
7925
  }, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
8599
7926
  createCommentVNode(" EARLY GO HOME "),
8600
7927
  unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4, [
8601
7928
  createVNode(unref(NeonField), mergeProps({
8602
- modelValue: unref(values).homeAt,
8603
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).homeAt = $event)
7929
+ modelValue: unref(values).startedAt,
7930
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).startedAt = $event)
8604
7931
  }, {
8605
- handle: "homeAt",
7932
+ handle: "startedAt",
8606
7933
  name: "Jam Pulang Kerja",
8607
7934
  options: {
8608
7935
  note: "Jam pulang kerja."
@@ -8610,8 +7937,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8610
7937
  }), {
8611
7938
  input: withCtx(() => [
8612
7939
  createVNode(unref(NeonTime), {
8613
- modelValue: unref(values).homeAt,
8614
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).homeAt = $event),
7940
+ modelValue: unref(values).startedAt,
7941
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).startedAt = $event),
8615
7942
  "is-loading": unref(isLoading),
8616
7943
  class: "mt-2"
8617
7944
  }, null, 8, ["modelValue", "is-loading"])
@@ -8620,10 +7947,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8620
7947
  /* STABLE */
8621
7948
  }, 16, ["modelValue"]),
8622
7949
  createVNode(unref(NeonField), mergeProps({
8623
- modelValue: unref(values).earlyAt,
8624
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).earlyAt = $event)
7950
+ modelValue: unref(values).endedAt,
7951
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).endedAt = $event)
8625
7952
  }, {
8626
- handle: "earlyAt",
7953
+ handle: "endedAt",
8627
7954
  name: "Jam Pulang Lebih Awal",
8628
7955
  options: {
8629
7956
  note: "Jam pulang lebih awal."
@@ -8631,15 +7958,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8631
7958
  }), {
8632
7959
  input: withCtx(() => [
8633
7960
  createVNode(unref(NeonTime), {
8634
- modelValue: unref(values).earlyAt,
8635
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).earlyAt = $event),
7961
+ modelValue: unref(values).endedAt,
7962
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).endedAt = $event),
8636
7963
  "is-loading": unref(isLoading),
8637
7964
  class: "mt-2"
8638
7965
  }, null, 8, ["modelValue", "is-loading"]),
8639
7966
  createElementVNode(
8640
7967
  "div",
8641
7968
  _hoisted_5,
8642
- toDisplayString(durationHomeAt.value),
7969
+ toDisplayString(reverseDuration.value),
8643
7970
  1
8644
7971
  /* TEXT */
8645
7972
  )
@@ -8651,10 +7978,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8651
7978
  createCommentVNode(" COME TOO LATE "),
8652
7979
  unref(values).type == "comeLate" ? (openBlock(), createElementBlock("div", _hoisted_6, [
8653
7980
  createVNode(unref(NeonField), mergeProps({
8654
- modelValue: unref(values).comeAt,
8655
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).comeAt = $event)
7981
+ modelValue: unref(values).startedAt,
7982
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).startedAt = $event)
8656
7983
  }, {
8657
- handle: "comeAt",
7984
+ handle: "startedAt",
8658
7985
  name: "Jam Datang",
8659
7986
  options: {
8660
7987
  note: "Jam Datang kerja."
@@ -8662,8 +7989,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8662
7989
  }), {
8663
7990
  input: withCtx(() => [
8664
7991
  createVNode(unref(NeonTime), {
8665
- modelValue: unref(values).comeAt,
8666
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).comeAt = $event),
7992
+ modelValue: unref(values).startedAt,
7993
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).startedAt = $event),
8667
7994
  "is-loading": unref(isLoading),
8668
7995
  class: "mt-2"
8669
7996
  }, null, 8, ["modelValue", "is-loading"])
@@ -8672,10 +7999,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8672
7999
  /* STABLE */
8673
8000
  }, 16, ["modelValue"]),
8674
8001
  createVNode(unref(NeonField), mergeProps({
8675
- modelValue: unref(values).lateAt,
8676
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).lateAt = $event)
8002
+ modelValue: unref(values).endedAt,
8003
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).endedAt = $event)
8677
8004
  }, {
8678
- handle: "lateAt",
8005
+ handle: "endedAt",
8679
8006
  name: "Jam Datang Terlambat",
8680
8007
  options: {
8681
8008
  note: "Jam datang terlambat."
@@ -8683,15 +8010,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8683
8010
  }), {
8684
8011
  input: withCtx(() => [
8685
8012
  createVNode(unref(NeonTime), {
8686
- modelValue: unref(values).lateAt,
8687
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).lateAt = $event),
8013
+ modelValue: unref(values).endedAt,
8014
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).endedAt = $event),
8688
8015
  "is-loading": unref(isLoading),
8689
8016
  class: "mt-2"
8690
8017
  }, null, 8, ["modelValue", "is-loading"]),
8691
8018
  createElementVNode(
8692
8019
  "div",
8693
8020
  _hoisted_7,
8694
- toDisplayString(durationComeAt.value),
8021
+ toDisplayString(duration.value),
8695
8022
  1
8696
8023
  /* TEXT */
8697
8024
  )
@@ -8704,7 +8031,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8704
8031
  unref(values).type == "timeout" ? (openBlock(), createElementBlock("div", _hoisted_8, [
8705
8032
  createVNode(unref(NeonField), mergeProps({
8706
8033
  modelValue: unref(values).startedAt,
8707
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).startedAt = $event)
8034
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).startedAt = $event)
8708
8035
  }, {
8709
8036
  handle: "startedAt",
8710
8037
  name: "Mulai",
@@ -8715,7 +8042,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8715
8042
  input: withCtx(() => [
8716
8043
  createVNode(unref(NeonTime), {
8717
8044
  modelValue: unref(values).startedAt,
8718
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).startedAt = $event),
8045
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).startedAt = $event),
8719
8046
  "is-loading": unref(isLoading),
8720
8047
  class: "mt-2"
8721
8048
  }, null, 8, ["modelValue", "is-loading"])
@@ -8725,7 +8052,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8725
8052
  }, 16, ["modelValue"]),
8726
8053
  createVNode(unref(NeonField), mergeProps({
8727
8054
  modelValue: unref(values).endedAt,
8728
- "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).endedAt = $event)
8055
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).endedAt = $event)
8729
8056
  }, {
8730
8057
  handle: "endedAt",
8731
8058
  name: "Selesai",
@@ -8736,14 +8063,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8736
8063
  input: withCtx(() => [
8737
8064
  createVNode(unref(NeonTime), {
8738
8065
  modelValue: unref(values).endedAt,
8739
- "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).endedAt = $event),
8066
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).endedAt = $event),
8740
8067
  "is-loading": unref(isLoading),
8741
8068
  class: "mt-2"
8742
8069
  }, null, 8, ["modelValue", "is-loading"]),
8743
8070
  createElementVNode(
8744
8071
  "div",
8745
8072
  _hoisted_9,
8746
- toDisplayString(durationStartedAt.value),
8073
+ toDisplayString(duration.value),
8747
8074
  1
8748
8075
  /* TEXT */
8749
8076
  )
@@ -8771,8 +8098,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8771
8098
  };
8772
8099
  }
8773
8100
  });
8774
- const AttendanceManager_vue_vue_type_style_index_0_scoped_eb6a78b6_lang = "";
8775
- const AttendanceManager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eb6a78b6"]]);
8101
+ const AttendanceManager_vue_vue_type_style_index_0_scoped_643cca03_lang = "";
8102
+ const AttendanceManager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-643cca03"]]);
8776
8103
  const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8777
8104
  __proto__: null,
8778
8105
  AttendanceCollection: _sfc_main$3,