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