@neutron.co.id/operasional-interfaces 1.12.6 → 1.12.7

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.
@@ -3334,8 +3334,8 @@ function addYears(dirtyDate, dirtyAmount) {
3334
3334
  var amount = toInteger(dirtyAmount);
3335
3335
  return addMonths(dirtyDate, amount * 12);
3336
3336
  }
3337
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3338
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
3337
+ var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3338
+ var freeGlobal$1 = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1;
3339
3339
  var _freeGlobal = freeGlobal$1;
3340
3340
  var freeGlobal = _freeGlobal;
3341
3341
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -10896,7 +10896,7 @@ var parseLocale = function parseLocale2(preset, object, isLocal) {
10896
10896
  L2 = l;
10897
10897
  return l || !isLocal && L2;
10898
10898
  };
10899
- var dayjs = function dayjs2(date, c2) {
10899
+ var dayjs$1 = function dayjs(date, c2) {
10900
10900
  if (isDayjs(date)) {
10901
10901
  return date.clone();
10902
10902
  }
@@ -10906,7 +10906,7 @@ var dayjs = function dayjs2(date, c2) {
10906
10906
  return new Dayjs(cfg);
10907
10907
  };
10908
10908
  var wrapper$1 = function wrapper(date, instance) {
10909
- return dayjs(date, {
10909
+ return dayjs$1(date, {
10910
10910
  locale: instance.$L,
10911
10911
  utc: instance.$u,
10912
10912
  x: instance.$x,
@@ -10969,14 +10969,14 @@ var Dayjs = /* @__PURE__ */ function() {
10969
10969
  return !(this.$d.toString() === INVALID_DATE_STRING);
10970
10970
  };
10971
10971
  _proto.isSame = function isSame(that, units) {
10972
- var other = dayjs(that);
10972
+ var other = dayjs$1(that);
10973
10973
  return this.startOf(units) <= other && other <= this.endOf(units);
10974
10974
  };
10975
10975
  _proto.isAfter = function isAfter(that, units) {
10976
- return dayjs(that) < this.startOf(units);
10976
+ return dayjs$1(that) < this.startOf(units);
10977
10977
  };
10978
10978
  _proto.isBefore = function isBefore(that, units) {
10979
- return this.endOf(units) < dayjs(that);
10979
+ return this.endOf(units) < dayjs$1(that);
10980
10980
  };
10981
10981
  _proto.$g = function $g(input2, get2, set2) {
10982
10982
  if (Utils.u(input2))
@@ -11061,7 +11061,7 @@ var Dayjs = /* @__PURE__ */ function() {
11061
11061
  number = Number(number);
11062
11062
  var unit = Utils.p(units);
11063
11063
  var instanceFactorySet = function instanceFactorySet2(n) {
11064
- var d3 = dayjs(_this2);
11064
+ var d3 = dayjs$1(_this2);
11065
11065
  return Utils.w(d3.date(d3.date() + Math.round(n * number)), _this2);
11066
11066
  };
11067
11067
  if (unit === M3) {
@@ -11165,7 +11165,7 @@ var Dayjs = /* @__PURE__ */ function() {
11165
11165
  _proto.diff = function diff(input2, units, _float) {
11166
11166
  var _this4 = this;
11167
11167
  var unit = Utils.p(units);
11168
- var that = dayjs(input2);
11168
+ var that = dayjs$1(input2);
11169
11169
  var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
11170
11170
  var diff2 = this - that;
11171
11171
  var getMonth = function getMonth2() {
@@ -11236,28 +11236,28 @@ var Dayjs = /* @__PURE__ */ function() {
11236
11236
  return Dayjs2;
11237
11237
  }();
11238
11238
  var proto = Dayjs.prototype;
11239
- dayjs.prototype = proto;
11239
+ dayjs$1.prototype = proto;
11240
11240
  [["$ms", MS], ["$s", S3], ["$m", MIN], ["$H", H3], ["$W", D2], ["$M", M3], ["$y", Y2], ["$D", DATE]].forEach(function(g) {
11241
11241
  proto[g[1]] = function(input2) {
11242
11242
  return this.$g(input2, g[0], g[1]);
11243
11243
  };
11244
11244
  });
11245
- dayjs.extend = function(plugin, option) {
11245
+ dayjs$1.extend = function(plugin, option) {
11246
11246
  if (!plugin.$i) {
11247
- plugin(option, Dayjs, dayjs);
11247
+ plugin(option, Dayjs, dayjs$1);
11248
11248
  plugin.$i = true;
11249
11249
  }
11250
- return dayjs;
11250
+ return dayjs$1;
11251
11251
  };
11252
- dayjs.locale = parseLocale;
11253
- dayjs.isDayjs = isDayjs;
11254
- dayjs.unix = function(timestamp) {
11255
- return dayjs(timestamp * 1e3);
11252
+ dayjs$1.locale = parseLocale;
11253
+ dayjs$1.isDayjs = isDayjs;
11254
+ dayjs$1.unix = function(timestamp) {
11255
+ return dayjs$1(timestamp * 1e3);
11256
11256
  };
11257
- dayjs.en = Ls[L2];
11258
- dayjs.Ls = Ls;
11259
- dayjs.p = {};
11260
- const dayjs$1 = dayjs;
11257
+ dayjs$1.en = Ls[L2];
11258
+ dayjs$1.Ls = Ls;
11259
+ dayjs$1.p = {};
11260
+ const dayjs$2 = dayjs$1;
11261
11261
  var locale = {
11262
11262
  name: "id",
11263
11263
  weekdays: "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
@@ -11293,7 +11293,7 @@ var locale = {
11293
11293
  return n + ".";
11294
11294
  }
11295
11295
  };
11296
- dayjs$1.locale(locale, null, true);
11296
+ dayjs$2.locale(locale, null, true);
11297
11297
  const advancedFormat = function(o, c2) {
11298
11298
  var proto2 = c2.prototype;
11299
11299
  var oldFormat = proto2.format;
@@ -11783,14 +11783,14 @@ const relativeTimePlugin = function(o, c2, d3) {
11783
11783
  return this.from(makeNow(this), withoutSuffix);
11784
11784
  };
11785
11785
  };
11786
- dayjs$1.extend(durationPlugin);
11787
- dayjs$1.extend(relativeTimePlugin);
11788
- dayjs$1.extend(advancedFormat);
11789
- dayjs$1.extend(isoWeek);
11790
- dayjs$1.locale("id");
11786
+ dayjs$2.extend(durationPlugin);
11787
+ dayjs$2.extend(relativeTimePlugin);
11788
+ dayjs$2.extend(advancedFormat);
11789
+ dayjs$2.extend(isoWeek);
11790
+ dayjs$2.locale("id");
11791
11791
  class DateUtil {
11792
11792
  static get day() {
11793
- return dayjs$1;
11793
+ return dayjs$2;
11794
11794
  }
11795
11795
  }
11796
11796
  const _withScopeId = (n) => (pushScopeId("data-v-805321b9"), n = n(), popScopeId(), n);
@@ -13863,6 +13863,37 @@ const StatusStaff = Choice.define({
13863
13863
  }
13864
13864
  ]
13865
13865
  });
13866
+ const StatusWork = Choice.define({
13867
+ handle: "statusWork",
13868
+ name: "Work Status",
13869
+ items: [
13870
+ {
13871
+ label: "Off",
13872
+ value: "off",
13873
+ color: "danger"
13874
+ },
13875
+ {
13876
+ label: "Kerja",
13877
+ value: "work",
13878
+ color: "success"
13879
+ },
13880
+ {
13881
+ label: "Cuti",
13882
+ value: "leave",
13883
+ color: "warning"
13884
+ },
13885
+ {
13886
+ label: "Libur",
13887
+ value: "holiday",
13888
+ color: "info"
13889
+ },
13890
+ {
13891
+ label: "Pulang",
13892
+ value: "home",
13893
+ color: "info"
13894
+ }
13895
+ ]
13896
+ });
13866
13897
  const PriorityStatus = Choice.define({
13867
13898
  handle: "priorityStatus",
13868
13899
  name: "Priority Status",
@@ -17746,6 +17777,302 @@ const SituationTypeModel = Model.define({
17746
17777
  fluffy: {}
17747
17778
  }
17748
17779
  });
17780
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
17781
+ function getDefaultExportFromCjs(x2) {
17782
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
17783
+ }
17784
+ var dayjs_min = { exports: {} };
17785
+ (function(module, exports) {
17786
+ !function(t2, e2) {
17787
+ module.exports = e2();
17788
+ }(commonjsGlobal, function() {
17789
+ var t2 = 1e3, e2 = 6e4, n = 36e5, r = "millisecond", i2 = "second", s3 = "minute", u2 = "hour", a3 = "day", o = "week", c2 = "month", f = "quarter", h4 = "year", d3 = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y3 = /\[([^\]]+)]|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, M4 = { 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(t3) {
17790
+ var e3 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
17791
+ return "[" + t3 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]";
17792
+ } }, m3 = function(t3, e3, n2) {
17793
+ var r2 = String(t3);
17794
+ return !r2 || r2.length >= e3 ? t3 : "" + Array(e3 + 1 - r2.length).join(n2) + t3;
17795
+ }, v = { s: m3, z: function(t3) {
17796
+ var e3 = -t3.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i3 = n2 % 60;
17797
+ return (e3 <= 0 ? "+" : "-") + m3(r2, 2, "0") + ":" + m3(i3, 2, "0");
17798
+ }, m: function t3(e3, n2) {
17799
+ if (e3.date() < n2.date())
17800
+ return -t3(n2, e3);
17801
+ var r2 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i3 = e3.clone().add(r2, c2), s4 = n2 - i3 < 0, u3 = e3.clone().add(r2 + (s4 ? -1 : 1), c2);
17802
+ return +(-(r2 + (n2 - i3) / (s4 ? i3 - u3 : u3 - i3)) || 0);
17803
+ }, a: function(t3) {
17804
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
17805
+ }, p: function(t3) {
17806
+ return { M: c2, y: h4, w: o, d: a3, D: d3, h: u2, m: s3, s: i2, ms: r, Q: f }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
17807
+ }, u: function(t3) {
17808
+ return void 0 === t3;
17809
+ } }, g = "en", D3 = {};
17810
+ D3[g] = M4;
17811
+ var p = "$isDayjsObject", S4 = function(t3) {
17812
+ return t3 instanceof _ || !(!t3 || !t3[p]);
17813
+ }, w2 = function t3(e3, n2, r2) {
17814
+ var i3;
17815
+ if (!e3)
17816
+ return g;
17817
+ if ("string" == typeof e3) {
17818
+ var s4 = e3.toLowerCase();
17819
+ D3[s4] && (i3 = s4), n2 && (D3[s4] = n2, i3 = s4);
17820
+ var u3 = e3.split("-");
17821
+ if (!i3 && u3.length > 1)
17822
+ return t3(u3[0]);
17823
+ } else {
17824
+ var a4 = e3.name;
17825
+ D3[a4] = e3, i3 = a4;
17826
+ }
17827
+ return !r2 && i3 && (g = i3), i3 || !r2 && g;
17828
+ }, O2 = function(t3, e3) {
17829
+ if (S4(t3))
17830
+ return t3.clone();
17831
+ var n2 = "object" == typeof e3 ? e3 : {};
17832
+ return n2.date = t3, n2.args = arguments, new _(n2);
17833
+ }, b2 = v;
17834
+ b2.l = w2, b2.i = S4, b2.w = function(t3, e3) {
17835
+ return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
17836
+ };
17837
+ var _ = function() {
17838
+ function M5(t3) {
17839
+ this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
17840
+ }
17841
+ var m4 = M5.prototype;
17842
+ return m4.parse = function(t3) {
17843
+ this.$d = function(t4) {
17844
+ var e3 = t4.date, n2 = t4.utc;
17845
+ if (null === e3)
17846
+ return /* @__PURE__ */ new Date(NaN);
17847
+ if (b2.u(e3))
17848
+ return /* @__PURE__ */ new Date();
17849
+ if (e3 instanceof Date)
17850
+ return new Date(e3);
17851
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
17852
+ var r2 = e3.match($);
17853
+ if (r2) {
17854
+ var i3 = r2[2] - 1 || 0, s4 = (r2[7] || "0").substring(0, 3);
17855
+ return n2 ? new Date(Date.UTC(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s4)) : new Date(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s4);
17856
+ }
17857
+ }
17858
+ return new Date(e3);
17859
+ }(t3), this.init();
17860
+ }, m4.init = function() {
17861
+ var t3 = this.$d;
17862
+ this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
17863
+ }, m4.$utils = function() {
17864
+ return b2;
17865
+ }, m4.isValid = function() {
17866
+ return !(this.$d.toString() === l);
17867
+ }, m4.isSame = function(t3, e3) {
17868
+ var n2 = O2(t3);
17869
+ return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
17870
+ }, m4.isAfter = function(t3, e3) {
17871
+ return O2(t3) < this.startOf(e3);
17872
+ }, m4.isBefore = function(t3, e3) {
17873
+ return this.endOf(e3) < O2(t3);
17874
+ }, m4.$g = function(t3, e3, n2) {
17875
+ return b2.u(t3) ? this[e3] : this.set(n2, t3);
17876
+ }, m4.unix = function() {
17877
+ return Math.floor(this.valueOf() / 1e3);
17878
+ }, m4.valueOf = function() {
17879
+ return this.$d.getTime();
17880
+ }, m4.startOf = function(t3, e3) {
17881
+ var n2 = this, r2 = !!b2.u(e3) || e3, f2 = b2.p(t3), l2 = function(t4, e4) {
17882
+ var i3 = b2.w(n2.$u ? Date.UTC(n2.$y, e4, t4) : new Date(n2.$y, e4, t4), n2);
17883
+ return r2 ? i3 : i3.endOf(a3);
17884
+ }, $2 = function(t4, e4) {
17885
+ return b2.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
17886
+ }, y4 = this.$W, M6 = this.$M, m5 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
17887
+ switch (f2) {
17888
+ case h4:
17889
+ return r2 ? l2(1, 0) : l2(31, 11);
17890
+ case c2:
17891
+ return r2 ? l2(1, M6) : l2(0, M6 + 1);
17892
+ case o:
17893
+ var g2 = this.$locale().weekStart || 0, D4 = (y4 < g2 ? y4 + 7 : y4) - g2;
17894
+ return l2(r2 ? m5 - D4 : m5 + (6 - D4), M6);
17895
+ case a3:
17896
+ case d3:
17897
+ return $2(v2 + "Hours", 0);
17898
+ case u2:
17899
+ return $2(v2 + "Minutes", 1);
17900
+ case s3:
17901
+ return $2(v2 + "Seconds", 2);
17902
+ case i2:
17903
+ return $2(v2 + "Milliseconds", 3);
17904
+ default:
17905
+ return this.clone();
17906
+ }
17907
+ }, m4.endOf = function(t3) {
17908
+ return this.startOf(t3, false);
17909
+ }, m4.$set = function(t3, e3) {
17910
+ var n2, o2 = b2.p(t3), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a3] = f2 + "Date", n2[d3] = f2 + "Date", n2[c2] = f2 + "Month", n2[h4] = f2 + "FullYear", n2[u2] = f2 + "Hours", n2[s3] = f2 + "Minutes", n2[i2] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a3 ? this.$D + (e3 - this.$W) : e3;
17911
+ if (o2 === c2 || o2 === h4) {
17912
+ var y4 = this.clone().set(d3, 1);
17913
+ y4.$d[l2]($2), y4.init(), this.$d = y4.set(d3, Math.min(this.$D, y4.daysInMonth())).$d;
17914
+ } else
17915
+ l2 && this.$d[l2]($2);
17916
+ return this.init(), this;
17917
+ }, m4.set = function(t3, e3) {
17918
+ return this.clone().$set(t3, e3);
17919
+ }, m4.get = function(t3) {
17920
+ return this[b2.p(t3)]();
17921
+ }, m4.add = function(r2, f2) {
17922
+ var d4, l2 = this;
17923
+ r2 = Number(r2);
17924
+ var $2 = b2.p(f2), y4 = function(t3) {
17925
+ var e3 = O2(l2);
17926
+ return b2.w(e3.date(e3.date() + Math.round(t3 * r2)), l2);
17927
+ };
17928
+ if ($2 === c2)
17929
+ return this.set(c2, this.$M + r2);
17930
+ if ($2 === h4)
17931
+ return this.set(h4, this.$y + r2);
17932
+ if ($2 === a3)
17933
+ return y4(1);
17934
+ if ($2 === o)
17935
+ return y4(7);
17936
+ var M6 = (d4 = {}, d4[s3] = e2, d4[u2] = n, d4[i2] = t2, d4)[$2] || 1, m5 = this.$d.getTime() + r2 * M6;
17937
+ return b2.w(m5, this);
17938
+ }, m4.subtract = function(t3, e3) {
17939
+ return this.add(-1 * t3, e3);
17940
+ }, m4.format = function(t3) {
17941
+ var e3 = this, n2 = this.$locale();
17942
+ if (!this.isValid())
17943
+ return n2.invalidDate || l;
17944
+ var r2 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s4 = this.$H, u3 = this.$m, a4 = this.$M, o2 = n2.weekdays, c3 = n2.months, f2 = n2.meridiem, h5 = function(t4, n3, i4, s5) {
17945
+ return t4 && (t4[n3] || t4(e3, r2)) || i4[n3].slice(0, s5);
17946
+ }, d4 = function(t4) {
17947
+ return b2.s(s4 % 12 || 12, t4, "0");
17948
+ }, $2 = f2 || function(t4, e4, n3) {
17949
+ var r3 = t4 < 12 ? "AM" : "PM";
17950
+ return n3 ? r3.toLowerCase() : r3;
17951
+ };
17952
+ return r2.replace(y3, function(t4, r3) {
17953
+ return r3 || function(t5) {
17954
+ switch (t5) {
17955
+ case "YY":
17956
+ return String(e3.$y).slice(-2);
17957
+ case "YYYY":
17958
+ return b2.s(e3.$y, 4, "0");
17959
+ case "M":
17960
+ return a4 + 1;
17961
+ case "MM":
17962
+ return b2.s(a4 + 1, 2, "0");
17963
+ case "MMM":
17964
+ return h5(n2.monthsShort, a4, c3, 3);
17965
+ case "MMMM":
17966
+ return h5(c3, a4);
17967
+ case "D":
17968
+ return e3.$D;
17969
+ case "DD":
17970
+ return b2.s(e3.$D, 2, "0");
17971
+ case "d":
17972
+ return String(e3.$W);
17973
+ case "dd":
17974
+ return h5(n2.weekdaysMin, e3.$W, o2, 2);
17975
+ case "ddd":
17976
+ return h5(n2.weekdaysShort, e3.$W, o2, 3);
17977
+ case "dddd":
17978
+ return o2[e3.$W];
17979
+ case "H":
17980
+ return String(s4);
17981
+ case "HH":
17982
+ return b2.s(s4, 2, "0");
17983
+ case "h":
17984
+ return d4(1);
17985
+ case "hh":
17986
+ return d4(2);
17987
+ case "a":
17988
+ return $2(s4, u3, true);
17989
+ case "A":
17990
+ return $2(s4, u3, false);
17991
+ case "m":
17992
+ return String(u3);
17993
+ case "mm":
17994
+ return b2.s(u3, 2, "0");
17995
+ case "s":
17996
+ return String(e3.$s);
17997
+ case "ss":
17998
+ return b2.s(e3.$s, 2, "0");
17999
+ case "SSS":
18000
+ return b2.s(e3.$ms, 3, "0");
18001
+ case "Z":
18002
+ return i3;
18003
+ }
18004
+ return null;
18005
+ }(t4) || i3.replace(":", "");
18006
+ });
18007
+ }, m4.utcOffset = function() {
18008
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
18009
+ }, m4.diff = function(r2, d4, l2) {
18010
+ var $2, y4 = this, M6 = b2.p(d4), m5 = O2(r2), v2 = (m5.utcOffset() - this.utcOffset()) * e2, g2 = this - m5, D4 = function() {
18011
+ return b2.m(y4, m5);
18012
+ };
18013
+ switch (M6) {
18014
+ case h4:
18015
+ $2 = D4() / 12;
18016
+ break;
18017
+ case c2:
18018
+ $2 = D4();
18019
+ break;
18020
+ case f:
18021
+ $2 = D4() / 3;
18022
+ break;
18023
+ case o:
18024
+ $2 = (g2 - v2) / 6048e5;
18025
+ break;
18026
+ case a3:
18027
+ $2 = (g2 - v2) / 864e5;
18028
+ break;
18029
+ case u2:
18030
+ $2 = g2 / n;
18031
+ break;
18032
+ case s3:
18033
+ $2 = g2 / e2;
18034
+ break;
18035
+ case i2:
18036
+ $2 = g2 / t2;
18037
+ break;
18038
+ default:
18039
+ $2 = g2;
18040
+ }
18041
+ return l2 ? $2 : b2.a($2);
18042
+ }, m4.daysInMonth = function() {
18043
+ return this.endOf(c2).$D;
18044
+ }, m4.$locale = function() {
18045
+ return D3[this.$L];
18046
+ }, m4.locale = function(t3, e3) {
18047
+ if (!t3)
18048
+ return this.$L;
18049
+ var n2 = this.clone(), r2 = w2(t3, e3, true);
18050
+ return r2 && (n2.$L = r2), n2;
18051
+ }, m4.clone = function() {
18052
+ return b2.w(this.$d, this);
18053
+ }, m4.toDate = function() {
18054
+ return new Date(this.valueOf());
18055
+ }, m4.toJSON = function() {
18056
+ return this.isValid() ? this.toISOString() : null;
18057
+ }, m4.toISOString = function() {
18058
+ return this.$d.toISOString();
18059
+ }, m4.toString = function() {
18060
+ return this.$d.toUTCString();
18061
+ }, M5;
18062
+ }(), k2 = _.prototype;
18063
+ return O2.prototype = k2, [["$ms", r], ["$s", i2], ["$m", s3], ["$H", u2], ["$W", a3], ["$M", c2], ["$y", h4], ["$D", d3]].forEach(function(t3) {
18064
+ k2[t3[1]] = function(e3) {
18065
+ return this.$g(e3, t3[0], t3[1]);
18066
+ };
18067
+ }), O2.extend = function(t3, e3) {
18068
+ return t3.$i || (t3(e3, _, O2), t3.$i = true), O2;
18069
+ }, O2.locale = w2, O2.isDayjs = S4, O2.unix = function(t3) {
18070
+ return O2(1e3 * t3);
18071
+ }, O2.en = D3[g], O2.Ls = D3, O2.p = {}, O2;
18072
+ });
18073
+ })(dayjs_min);
18074
+ var dayjs_minExports = dayjs_min.exports;
18075
+ const dayjs2 = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
17749
18076
  const StaffModel$1 = Model.define({
17750
18077
  name: "Staff",
17751
18078
  definition: "neu:personalia:staff",
@@ -17952,6 +18279,249 @@ const StaffModel$1 = Model.define({
17952
18279
  return roleIds;
17953
18280
  }
17954
18281
  }
18282
+ }),
18283
+ workStatus: Field.define({
18284
+ handle: "workStatus",
18285
+ name: "Status",
18286
+ type: "string",
18287
+ input: "select",
18288
+ options: {
18289
+ note: "Status dari karyawan.",
18290
+ default: "notActive",
18291
+ enums: StatusWork.values,
18292
+ choices: StatusWork.items,
18293
+ isVirtual: true,
18294
+ isPersisted: true
18295
+ },
18296
+ virtual: {
18297
+ dependency: {
18298
+ checkIns: {
18299
+ _id: 1,
18300
+ type: 1,
18301
+ checkInAt: 1
18302
+ },
18303
+ submitStaffAttendances: {
18304
+ _id: 1,
18305
+ type: 1,
18306
+ startedAt: 1,
18307
+ status: 1
18308
+ }
18309
+ },
18310
+ reduce(o) {
18311
+ var _a;
18312
+ if (!o.checkIns.length)
18313
+ return "off";
18314
+ const opts = { pattern: "yyyy-MM-dd" };
18315
+ const todayDate = DateUtil$1.formatTz((/* @__PURE__ */ new Date()).toISOString(), opts);
18316
+ const arrCheckIn = o.checkIns.filter(
18317
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18318
+ );
18319
+ const arrCheckInReverse = arrCheckIn.reverse();
18320
+ const checkInAtReverse = arrCheckInReverse[0];
18321
+ const lastPresence = DateUtil$1.formatTz(
18322
+ checkInAtReverse == null ? void 0 : checkInAtReverse.checkInAt,
18323
+ opts
18324
+ );
18325
+ const arrCheckInHome = o.checkIns.filter(
18326
+ (field) => field.type == "home"
18327
+ );
18328
+ const arrCheckInHomeReverse = (_a = arrCheckInHome.reverse()[0]) == null ? void 0 : _a.checkInAt;
18329
+ const lastPresenceHome = DateUtil$1.formatTz(
18330
+ arrCheckInHomeReverse,
18331
+ opts
18332
+ );
18333
+ const arrAttendance = o.submitStaffAttendances.filter(
18334
+ (field) => field.type == "leave" && field.status == "approved"
18335
+ ).map((field) => DateUtil$1.formatTz(field.startedAt, opts));
18336
+ if (arrAttendance.includes(todayDate)) {
18337
+ return "leave";
18338
+ } else {
18339
+ if (todayDate == lastPresence) {
18340
+ if (todayDate == lastPresenceHome) {
18341
+ return "home";
18342
+ } else {
18343
+ return "work";
18344
+ }
18345
+ } else {
18346
+ return "off";
18347
+ }
18348
+ }
18349
+ }
18350
+ }
18351
+ }),
18352
+ workCome: Field.define({
18353
+ handle: "workCome",
18354
+ name: "Masuk",
18355
+ type: "date",
18356
+ input: "date2",
18357
+ display: "date",
18358
+ options: {
18359
+ note: "Presensi masuk hari ini.",
18360
+ isVirtual: true,
18361
+ isPersisted: true
18362
+ },
18363
+ virtual: {
18364
+ dependency: {
18365
+ checkIns: {
18366
+ _id: 1,
18367
+ type: 1,
18368
+ checkInAt: 1
18369
+ }
18370
+ },
18371
+ reduce(o) {
18372
+ var _a, _b;
18373
+ if (!o.checkIns.length)
18374
+ return null;
18375
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18376
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18377
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18378
+ );
18379
+ const checkInsNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18380
+ (field) => field.checkInAt != null
18381
+ );
18382
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18383
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18384
+ );
18385
+ console.log({ checkInAtCome });
18386
+ if (!checkInAtCome.length) {
18387
+ return null;
18388
+ } else {
18389
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
18390
+ return resultCheckInCome;
18391
+ }
18392
+ }
18393
+ }
18394
+ }),
18395
+ workHome: Field.define({
18396
+ handle: "workHome",
18397
+ name: "Pulang",
18398
+ type: "date",
18399
+ input: "date2",
18400
+ display: "date",
18401
+ options: {
18402
+ note: "Presensi pulang hari ini.",
18403
+ isVirtual: true,
18404
+ isPersisted: true
18405
+ },
18406
+ virtual: {
18407
+ dependency: {
18408
+ checkIns: {
18409
+ _id: 1,
18410
+ type: 1,
18411
+ checkInAt: 1
18412
+ }
18413
+ },
18414
+ reduce(o) {
18415
+ var _a;
18416
+ if (!o.checkIns.length)
18417
+ return null;
18418
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18419
+ const checkInsHome = o.checkIns.filter(
18420
+ (field) => field.type == "home"
18421
+ );
18422
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18423
+ (field) => field.checkInAt != null
18424
+ );
18425
+ const checkInAtHome = checkInsHomeNotNull.filter(
18426
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18427
+ ).reverse();
18428
+ if (!checkInAtHome.length) {
18429
+ return null;
18430
+ } else {
18431
+ const resultCheckInHome = (_a = checkInAtHome[0]) == null ? void 0 : _a.checkInAt;
18432
+ const todayDateOnly = dayjs2(lateTodayDate).format("YYYY-MM-DD");
18433
+ const homeDateOnly = dayjs2(resultCheckInHome).format("YYYY-MM-DD");
18434
+ if (todayDateOnly == homeDateOnly) {
18435
+ return resultCheckInHome;
18436
+ } else {
18437
+ return null;
18438
+ }
18439
+ }
18440
+ }
18441
+ }
18442
+ }),
18443
+ workNote: Field.define({
18444
+ handle: "workNote",
18445
+ name: "Keterangan",
18446
+ type: "string",
18447
+ input: "short-text",
18448
+ options: {
18449
+ note: "Keterangan presensi hari ini.",
18450
+ isVirtual: true,
18451
+ isPersisted: true
18452
+ },
18453
+ virtual: {
18454
+ dependency: {
18455
+ workStatus: 1,
18456
+ checkIns: {
18457
+ _id: 1,
18458
+ type: 1,
18459
+ checkInAt: 1
18460
+ }
18461
+ },
18462
+ reduce(o) {
18463
+ var _a, _b, _c, _d, _e, _f;
18464
+ if (!o.checkIns.length)
18465
+ return null;
18466
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18467
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18468
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18469
+ );
18470
+ const checkInsComeNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18471
+ (field) => field.checkInAt != null
18472
+ );
18473
+ const checkInAtCome = checkInsComeNotNull == null ? void 0 : checkInsComeNotNull.filter(
18474
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18475
+ );
18476
+ const resultCheckInCome = checkInAtCome[0];
18477
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18478
+ const checkInsHome = (_b = o.checkIns) == null ? void 0 : _b.filter(
18479
+ (field) => field.type == "home"
18480
+ );
18481
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18482
+ (field) => field.checkInAt != null
18483
+ );
18484
+ const checkInAtHome = (_c = checkInsHomeNotNull == null ? void 0 : checkInsHomeNotNull.filter(
18485
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18486
+ )) == null ? void 0 : _c.reverse();
18487
+ const resultCheckInHome = checkInAtHome[0];
18488
+ const opts = { pattern: "yyyy-MM-dd" };
18489
+ const todayDateOnly = DateUtil$1.formatTz(
18490
+ (/* @__PURE__ */ new Date()).toISOString(),
18491
+ opts
18492
+ );
18493
+ const arrCheckInHome = (_d = o.checkIns) == null ? void 0 : _d.filter(
18494
+ (field) => field.type == "home"
18495
+ );
18496
+ const arrCheckInHomeReverse = (_e = arrCheckInHome == null ? void 0 : arrCheckInHome.reverse()[0]) == null ? void 0 : _e.checkInAt;
18497
+ const lastPresenceHome = DateUtil$1.formatTz(
18498
+ arrCheckInHomeReverse,
18499
+ opts
18500
+ );
18501
+ if (o.workStatus == "leave") {
18502
+ return "Cuti";
18503
+ } else if (o.workStatus == "off") {
18504
+ return "Belum Masuk";
18505
+ } else {
18506
+ if (todayDateOnly == lastPresenceHome) {
18507
+ const workMinutes = ((_f = DateUtil$1) == null ? void 0 : _f.diff(
18508
+ resultCheckInCome == null ? void 0 : resultCheckInCome.checkInAt,
18509
+ resultCheckInHome == null ? void 0 : resultCheckInHome.checkInAt,
18510
+ "minutes"
18511
+ )) || 0;
18512
+ const hours = Math.floor(workMinutes / 60);
18513
+ const minutes = workMinutes % 60;
18514
+ if (workMinutes < 540) {
18515
+ return `Jam kerja tidak memenuhi waktu minimal: ${hours} Jam ${minutes} minutes`;
18516
+ } else {
18517
+ return `Tepat Waktu: ${hours - 1} Jam ${minutes} minutes`;
18518
+ }
18519
+ } else {
18520
+ return "Sedang Bekerja";
18521
+ }
18522
+ }
18523
+ }
18524
+ }
17955
18525
  })
17956
18526
  },
17957
18527
  fragments: {
@@ -17990,7 +18560,11 @@ const StaffModel$1 = Model.define({
17990
18560
  display: 1,
17991
18561
  flag: 1,
17992
18562
  name: 1
17993
- }
18563
+ },
18564
+ workStatus: 1,
18565
+ workCome: 1,
18566
+ workHome: 1,
18567
+ workNote: 1
17994
18568
  },
17995
18569
  detail: {
17996
18570
  id: 1,
@@ -18031,7 +18605,11 @@ const StaffModel$1 = Model.define({
18031
18605
  branchId: 1,
18032
18606
  branchIds: 1,
18033
18607
  userId: 1,
18034
- virtualRoleIds: 1
18608
+ virtualRoleIds: 1,
18609
+ workStatus: 1,
18610
+ workCome: 1,
18611
+ workHome: 1,
18612
+ workNote: 1
18035
18613
  },
18036
18614
  fluffy: {}
18037
18615
  }