@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.
@@ -3446,8 +3446,8 @@ function addYears(dirtyDate, dirtyAmount) {
3446
3446
  var amount = toInteger(dirtyAmount);
3447
3447
  return addMonths(dirtyDate, amount * 12);
3448
3448
  }
3449
- var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3450
- var freeGlobal$1$1 = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1;
3449
+ var commonjsGlobal$3 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3450
+ var freeGlobal$1$1 = typeof commonjsGlobal$3 == "object" && commonjsGlobal$3 && commonjsGlobal$3.Object === Object && commonjsGlobal$3;
3451
3451
  var _freeGlobal$1 = freeGlobal$1$1;
3452
3452
  var freeGlobal$2 = _freeGlobal$1;
3453
3453
  var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
@@ -11008,7 +11008,7 @@ var parseLocale$1 = function parseLocale(preset, object, isLocal) {
11008
11008
  L2 = l;
11009
11009
  return l || !isLocal && L2;
11010
11010
  };
11011
- var dayjs$2 = function dayjs(date, c2) {
11011
+ var dayjs$3 = function dayjs(date, c2) {
11012
11012
  if (isDayjs$1(date)) {
11013
11013
  return date.clone();
11014
11014
  }
@@ -11018,7 +11018,7 @@ var dayjs$2 = function dayjs(date, c2) {
11018
11018
  return new Dayjs$1(cfg);
11019
11019
  };
11020
11020
  var wrapper$2 = function wrapper(date, instance) {
11021
- return dayjs$2(date, {
11021
+ return dayjs$3(date, {
11022
11022
  locale: instance.$L,
11023
11023
  utc: instance.$u,
11024
11024
  x: instance.$x,
@@ -11081,14 +11081,14 @@ var Dayjs$1 = /* @__PURE__ */ function() {
11081
11081
  return !(this.$d.toString() === INVALID_DATE_STRING$1);
11082
11082
  };
11083
11083
  _proto.isSame = function isSame(that, units) {
11084
- var other = dayjs$2(that);
11084
+ var other = dayjs$3(that);
11085
11085
  return this.startOf(units) <= other && other <= this.endOf(units);
11086
11086
  };
11087
11087
  _proto.isAfter = function isAfter(that, units) {
11088
- return dayjs$2(that) < this.startOf(units);
11088
+ return dayjs$3(that) < this.startOf(units);
11089
11089
  };
11090
11090
  _proto.isBefore = function isBefore(that, units) {
11091
- return this.endOf(units) < dayjs$2(that);
11091
+ return this.endOf(units) < dayjs$3(that);
11092
11092
  };
11093
11093
  _proto.$g = function $g(input2, get2, set2) {
11094
11094
  if (Utils$1.u(input2))
@@ -11173,7 +11173,7 @@ var Dayjs$1 = /* @__PURE__ */ function() {
11173
11173
  number = Number(number);
11174
11174
  var unit = Utils$1.p(units);
11175
11175
  var instanceFactorySet = function instanceFactorySet2(n) {
11176
- var d3 = dayjs$2(_this2);
11176
+ var d3 = dayjs$3(_this2);
11177
11177
  return Utils$1.w(d3.date(d3.date() + Math.round(n * number)), _this2);
11178
11178
  };
11179
11179
  if (unit === M3) {
@@ -11277,7 +11277,7 @@ var Dayjs$1 = /* @__PURE__ */ function() {
11277
11277
  _proto.diff = function diff(input2, units, _float) {
11278
11278
  var _this4 = this;
11279
11279
  var unit = Utils$1.p(units);
11280
- var that = dayjs$2(input2);
11280
+ var that = dayjs$3(input2);
11281
11281
  var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE$1;
11282
11282
  var diff2 = this - that;
11283
11283
  var getMonth = function getMonth2() {
@@ -11348,28 +11348,28 @@ var Dayjs$1 = /* @__PURE__ */ function() {
11348
11348
  return Dayjs2;
11349
11349
  }();
11350
11350
  var proto$1 = Dayjs$1.prototype;
11351
- dayjs$2.prototype = proto$1;
11351
+ dayjs$3.prototype = proto$1;
11352
11352
  [["$ms", MS$1], ["$s", S3], ["$m", MIN$1], ["$H", H3], ["$W", D2], ["$M", M3], ["$y", Y2], ["$D", DATE$1]].forEach(function(g) {
11353
11353
  proto$1[g[1]] = function(input2) {
11354
11354
  return this.$g(input2, g[0], g[1]);
11355
11355
  };
11356
11356
  });
11357
- dayjs$2.extend = function(plugin, option) {
11357
+ dayjs$3.extend = function(plugin, option) {
11358
11358
  if (!plugin.$i) {
11359
- plugin(option, Dayjs$1, dayjs$2);
11359
+ plugin(option, Dayjs$1, dayjs$3);
11360
11360
  plugin.$i = true;
11361
11361
  }
11362
- return dayjs$2;
11362
+ return dayjs$3;
11363
11363
  };
11364
- dayjs$2.locale = parseLocale$1;
11365
- dayjs$2.isDayjs = isDayjs$1;
11366
- dayjs$2.unix = function(timestamp) {
11367
- return dayjs$2(timestamp * 1e3);
11364
+ dayjs$3.locale = parseLocale$1;
11365
+ dayjs$3.isDayjs = isDayjs$1;
11366
+ dayjs$3.unix = function(timestamp) {
11367
+ return dayjs$3(timestamp * 1e3);
11368
11368
  };
11369
- dayjs$2.en = Ls$1[L2];
11370
- dayjs$2.Ls = Ls$1;
11371
- dayjs$2.p = {};
11372
- const dayjs$3 = dayjs$2;
11369
+ dayjs$3.en = Ls$1[L2];
11370
+ dayjs$3.Ls = Ls$1;
11371
+ dayjs$3.p = {};
11372
+ const dayjs$4 = dayjs$3;
11373
11373
  var locale$1 = {
11374
11374
  name: "id",
11375
11375
  weekdays: "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
@@ -11405,7 +11405,7 @@ var locale$1 = {
11405
11405
  return n + ".";
11406
11406
  }
11407
11407
  };
11408
- dayjs$3.locale(locale$1, null, true);
11408
+ dayjs$4.locale(locale$1, null, true);
11409
11409
  const advancedFormat$1 = function(o, c2) {
11410
11410
  var proto2 = c2.prototype;
11411
11411
  var oldFormat = proto2.format;
@@ -11714,16 +11714,16 @@ var Duration$1 = /* @__PURE__ */ function() {
11714
11714
  var manipulateDuration$1 = function manipulateDuration(date, duration, k2) {
11715
11715
  return date.add(duration.years() * k2, "y").add(duration.months() * k2, "M").add(duration.days() * k2, "d").add(duration.hours() * k2, "h").add(duration.minutes() * k2, "m").add(duration.seconds() * k2, "s").add(duration.milliseconds() * k2, "ms");
11716
11716
  };
11717
- const durationPlugin$1 = function(option, Dayjs2, dayjs3) {
11718
- $d$1 = dayjs3;
11719
- $u$1 = dayjs3().$utils();
11720
- dayjs3.duration = function(input2, unit) {
11721
- var $l = dayjs3.locale();
11717
+ const durationPlugin$1 = function(option, Dayjs2, dayjs4) {
11718
+ $d$1 = dayjs4;
11719
+ $u$1 = dayjs4().$utils();
11720
+ dayjs4.duration = function(input2, unit) {
11721
+ var $l = dayjs4.locale();
11722
11722
  return wrapper2(input2, {
11723
11723
  $l
11724
11724
  }, unit);
11725
11725
  };
11726
- dayjs3.isDuration = isDuration$1;
11726
+ dayjs4.isDuration = isDuration$1;
11727
11727
  var oldAdd = Dayjs2.prototype.add;
11728
11728
  var oldSubtract = Dayjs2.prototype.subtract;
11729
11729
  Dayjs2.prototype.add = function(value, unit) {
@@ -11895,14 +11895,14 @@ const relativeTimePlugin$1 = function(o, c2, d3) {
11895
11895
  return this.from(makeNow(this), withoutSuffix);
11896
11896
  };
11897
11897
  };
11898
- dayjs$3.extend(durationPlugin$1);
11899
- dayjs$3.extend(relativeTimePlugin$1);
11900
- dayjs$3.extend(advancedFormat$1);
11901
- dayjs$3.extend(isoWeek$1);
11902
- dayjs$3.locale("id");
11898
+ dayjs$4.extend(durationPlugin$1);
11899
+ dayjs$4.extend(relativeTimePlugin$1);
11900
+ dayjs$4.extend(advancedFormat$1);
11901
+ dayjs$4.extend(isoWeek$1);
11902
+ dayjs$4.locale("id");
11903
11903
  class DateUtil {
11904
11904
  static get day() {
11905
- return dayjs$3;
11905
+ return dayjs$4;
11906
11906
  }
11907
11907
  }
11908
11908
  const _withScopeId$3 = (n) => (pushScopeId("data-v-805321b9"), n = n(), popScopeId(), n);
@@ -14167,6 +14167,37 @@ const StatusStaff$1 = Choice.define({
14167
14167
  }
14168
14168
  ]
14169
14169
  });
14170
+ const StatusWork$1 = Choice.define({
14171
+ handle: "statusWork",
14172
+ name: "Work Status",
14173
+ items: [
14174
+ {
14175
+ label: "Off",
14176
+ value: "off",
14177
+ color: "danger"
14178
+ },
14179
+ {
14180
+ label: "Kerja",
14181
+ value: "work",
14182
+ color: "success"
14183
+ },
14184
+ {
14185
+ label: "Cuti",
14186
+ value: "leave",
14187
+ color: "warning"
14188
+ },
14189
+ {
14190
+ label: "Libur",
14191
+ value: "holiday",
14192
+ color: "info"
14193
+ },
14194
+ {
14195
+ label: "Pulang",
14196
+ value: "home",
14197
+ color: "info"
14198
+ }
14199
+ ]
14200
+ });
14170
14201
  const PriorityStatus$1 = Choice.define({
14171
14202
  handle: "priorityStatus",
14172
14203
  name: "Priority Status",
@@ -18050,6 +18081,302 @@ const SituationTypeModel$1 = Model.define({
18050
18081
  fluffy: {}
18051
18082
  }
18052
18083
  });
18084
+ var commonjsGlobal$2 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
18085
+ function getDefaultExportFromCjs$1(x2) {
18086
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
18087
+ }
18088
+ var dayjs_min$1 = { exports: {} };
18089
+ (function(module, exports) {
18090
+ !function(t2, e3) {
18091
+ module.exports = e3();
18092
+ }(commonjsGlobal$2, function() {
18093
+ var t2 = 1e3, e3 = 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) {
18094
+ var e4 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
18095
+ return "[" + t3 + (e4[(n2 - 20) % 10] || e4[n2] || e4[0]) + "]";
18096
+ } }, m3 = function(t3, e4, n2) {
18097
+ var r2 = String(t3);
18098
+ return !r2 || r2.length >= e4 ? t3 : "" + Array(e4 + 1 - r2.length).join(n2) + t3;
18099
+ }, v = { s: m3, z: function(t3) {
18100
+ var e4 = -t3.utcOffset(), n2 = Math.abs(e4), r2 = Math.floor(n2 / 60), i3 = n2 % 60;
18101
+ return (e4 <= 0 ? "+" : "-") + m3(r2, 2, "0") + ":" + m3(i3, 2, "0");
18102
+ }, m: function t3(e4, n2) {
18103
+ if (e4.date() < n2.date())
18104
+ return -t3(n2, e4);
18105
+ var r2 = 12 * (n2.year() - e4.year()) + (n2.month() - e4.month()), i3 = e4.clone().add(r2, c2), s4 = n2 - i3 < 0, u3 = e4.clone().add(r2 + (s4 ? -1 : 1), c2);
18106
+ return +(-(r2 + (n2 - i3) / (s4 ? i3 - u3 : u3 - i3)) || 0);
18107
+ }, a: function(t3) {
18108
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
18109
+ }, p: function(t3) {
18110
+ 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$/, "");
18111
+ }, u: function(t3) {
18112
+ return void 0 === t3;
18113
+ } }, g = "en", D3 = {};
18114
+ D3[g] = M4;
18115
+ var p = "$isDayjsObject", S4 = function(t3) {
18116
+ return t3 instanceof _ || !(!t3 || !t3[p]);
18117
+ }, w2 = function t3(e4, n2, r2) {
18118
+ var i3;
18119
+ if (!e4)
18120
+ return g;
18121
+ if ("string" == typeof e4) {
18122
+ var s4 = e4.toLowerCase();
18123
+ D3[s4] && (i3 = s4), n2 && (D3[s4] = n2, i3 = s4);
18124
+ var u3 = e4.split("-");
18125
+ if (!i3 && u3.length > 1)
18126
+ return t3(u3[0]);
18127
+ } else {
18128
+ var a4 = e4.name;
18129
+ D3[a4] = e4, i3 = a4;
18130
+ }
18131
+ return !r2 && i3 && (g = i3), i3 || !r2 && g;
18132
+ }, O2 = function(t3, e4) {
18133
+ if (S4(t3))
18134
+ return t3.clone();
18135
+ var n2 = "object" == typeof e4 ? e4 : {};
18136
+ return n2.date = t3, n2.args = arguments, new _(n2);
18137
+ }, b2 = v;
18138
+ b2.l = w2, b2.i = S4, b2.w = function(t3, e4) {
18139
+ return O2(t3, { locale: e4.$L, utc: e4.$u, x: e4.$x, $offset: e4.$offset });
18140
+ };
18141
+ var _ = function() {
18142
+ function M5(t3) {
18143
+ this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
18144
+ }
18145
+ var m4 = M5.prototype;
18146
+ return m4.parse = function(t3) {
18147
+ this.$d = function(t4) {
18148
+ var e4 = t4.date, n2 = t4.utc;
18149
+ if (null === e4)
18150
+ return /* @__PURE__ */ new Date(NaN);
18151
+ if (b2.u(e4))
18152
+ return /* @__PURE__ */ new Date();
18153
+ if (e4 instanceof Date)
18154
+ return new Date(e4);
18155
+ if ("string" == typeof e4 && !/Z$/i.test(e4)) {
18156
+ var r2 = e4.match($);
18157
+ if (r2) {
18158
+ var i3 = r2[2] - 1 || 0, s4 = (r2[7] || "0").substring(0, 3);
18159
+ 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);
18160
+ }
18161
+ }
18162
+ return new Date(e4);
18163
+ }(t3), this.init();
18164
+ }, m4.init = function() {
18165
+ var t3 = this.$d;
18166
+ 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();
18167
+ }, m4.$utils = function() {
18168
+ return b2;
18169
+ }, m4.isValid = function() {
18170
+ return !(this.$d.toString() === l);
18171
+ }, m4.isSame = function(t3, e4) {
18172
+ var n2 = O2(t3);
18173
+ return this.startOf(e4) <= n2 && n2 <= this.endOf(e4);
18174
+ }, m4.isAfter = function(t3, e4) {
18175
+ return O2(t3) < this.startOf(e4);
18176
+ }, m4.isBefore = function(t3, e4) {
18177
+ return this.endOf(e4) < O2(t3);
18178
+ }, m4.$g = function(t3, e4, n2) {
18179
+ return b2.u(t3) ? this[e4] : this.set(n2, t3);
18180
+ }, m4.unix = function() {
18181
+ return Math.floor(this.valueOf() / 1e3);
18182
+ }, m4.valueOf = function() {
18183
+ return this.$d.getTime();
18184
+ }, m4.startOf = function(t3, e4) {
18185
+ var n2 = this, r2 = !!b2.u(e4) || e4, f2 = b2.p(t3), l2 = function(t4, e5) {
18186
+ var i3 = b2.w(n2.$u ? Date.UTC(n2.$y, e5, t4) : new Date(n2.$y, e5, t4), n2);
18187
+ return r2 ? i3 : i3.endOf(a3);
18188
+ }, $2 = function(t4, e5) {
18189
+ return b2.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e5)), n2);
18190
+ }, y4 = this.$W, M6 = this.$M, m5 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
18191
+ switch (f2) {
18192
+ case h4:
18193
+ return r2 ? l2(1, 0) : l2(31, 11);
18194
+ case c2:
18195
+ return r2 ? l2(1, M6) : l2(0, M6 + 1);
18196
+ case o:
18197
+ var g2 = this.$locale().weekStart || 0, D4 = (y4 < g2 ? y4 + 7 : y4) - g2;
18198
+ return l2(r2 ? m5 - D4 : m5 + (6 - D4), M6);
18199
+ case a3:
18200
+ case d3:
18201
+ return $2(v2 + "Hours", 0);
18202
+ case u2:
18203
+ return $2(v2 + "Minutes", 1);
18204
+ case s3:
18205
+ return $2(v2 + "Seconds", 2);
18206
+ case i2:
18207
+ return $2(v2 + "Milliseconds", 3);
18208
+ default:
18209
+ return this.clone();
18210
+ }
18211
+ }, m4.endOf = function(t3) {
18212
+ return this.startOf(t3, false);
18213
+ }, m4.$set = function(t3, e4) {
18214
+ 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 + (e4 - this.$W) : e4;
18215
+ if (o2 === c2 || o2 === h4) {
18216
+ var y4 = this.clone().set(d3, 1);
18217
+ y4.$d[l2]($2), y4.init(), this.$d = y4.set(d3, Math.min(this.$D, y4.daysInMonth())).$d;
18218
+ } else
18219
+ l2 && this.$d[l2]($2);
18220
+ return this.init(), this;
18221
+ }, m4.set = function(t3, e4) {
18222
+ return this.clone().$set(t3, e4);
18223
+ }, m4.get = function(t3) {
18224
+ return this[b2.p(t3)]();
18225
+ }, m4.add = function(r2, f2) {
18226
+ var d4, l2 = this;
18227
+ r2 = Number(r2);
18228
+ var $2 = b2.p(f2), y4 = function(t3) {
18229
+ var e4 = O2(l2);
18230
+ return b2.w(e4.date(e4.date() + Math.round(t3 * r2)), l2);
18231
+ };
18232
+ if ($2 === c2)
18233
+ return this.set(c2, this.$M + r2);
18234
+ if ($2 === h4)
18235
+ return this.set(h4, this.$y + r2);
18236
+ if ($2 === a3)
18237
+ return y4(1);
18238
+ if ($2 === o)
18239
+ return y4(7);
18240
+ var M6 = (d4 = {}, d4[s3] = e3, d4[u2] = n, d4[i2] = t2, d4)[$2] || 1, m5 = this.$d.getTime() + r2 * M6;
18241
+ return b2.w(m5, this);
18242
+ }, m4.subtract = function(t3, e4) {
18243
+ return this.add(-1 * t3, e4);
18244
+ }, m4.format = function(t3) {
18245
+ var e4 = this, n2 = this.$locale();
18246
+ if (!this.isValid())
18247
+ return n2.invalidDate || l;
18248
+ 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) {
18249
+ return t4 && (t4[n3] || t4(e4, r2)) || i4[n3].slice(0, s5);
18250
+ }, d4 = function(t4) {
18251
+ return b2.s(s4 % 12 || 12, t4, "0");
18252
+ }, $2 = f2 || function(t4, e5, n3) {
18253
+ var r3 = t4 < 12 ? "AM" : "PM";
18254
+ return n3 ? r3.toLowerCase() : r3;
18255
+ };
18256
+ return r2.replace(y3, function(t4, r3) {
18257
+ return r3 || function(t5) {
18258
+ switch (t5) {
18259
+ case "YY":
18260
+ return String(e4.$y).slice(-2);
18261
+ case "YYYY":
18262
+ return b2.s(e4.$y, 4, "0");
18263
+ case "M":
18264
+ return a4 + 1;
18265
+ case "MM":
18266
+ return b2.s(a4 + 1, 2, "0");
18267
+ case "MMM":
18268
+ return h5(n2.monthsShort, a4, c3, 3);
18269
+ case "MMMM":
18270
+ return h5(c3, a4);
18271
+ case "D":
18272
+ return e4.$D;
18273
+ case "DD":
18274
+ return b2.s(e4.$D, 2, "0");
18275
+ case "d":
18276
+ return String(e4.$W);
18277
+ case "dd":
18278
+ return h5(n2.weekdaysMin, e4.$W, o2, 2);
18279
+ case "ddd":
18280
+ return h5(n2.weekdaysShort, e4.$W, o2, 3);
18281
+ case "dddd":
18282
+ return o2[e4.$W];
18283
+ case "H":
18284
+ return String(s4);
18285
+ case "HH":
18286
+ return b2.s(s4, 2, "0");
18287
+ case "h":
18288
+ return d4(1);
18289
+ case "hh":
18290
+ return d4(2);
18291
+ case "a":
18292
+ return $2(s4, u3, true);
18293
+ case "A":
18294
+ return $2(s4, u3, false);
18295
+ case "m":
18296
+ return String(u3);
18297
+ case "mm":
18298
+ return b2.s(u3, 2, "0");
18299
+ case "s":
18300
+ return String(e4.$s);
18301
+ case "ss":
18302
+ return b2.s(e4.$s, 2, "0");
18303
+ case "SSS":
18304
+ return b2.s(e4.$ms, 3, "0");
18305
+ case "Z":
18306
+ return i3;
18307
+ }
18308
+ return null;
18309
+ }(t4) || i3.replace(":", "");
18310
+ });
18311
+ }, m4.utcOffset = function() {
18312
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
18313
+ }, m4.diff = function(r2, d4, l2) {
18314
+ var $2, y4 = this, M6 = b2.p(d4), m5 = O2(r2), v2 = (m5.utcOffset() - this.utcOffset()) * e3, g2 = this - m5, D4 = function() {
18315
+ return b2.m(y4, m5);
18316
+ };
18317
+ switch (M6) {
18318
+ case h4:
18319
+ $2 = D4() / 12;
18320
+ break;
18321
+ case c2:
18322
+ $2 = D4();
18323
+ break;
18324
+ case f:
18325
+ $2 = D4() / 3;
18326
+ break;
18327
+ case o:
18328
+ $2 = (g2 - v2) / 6048e5;
18329
+ break;
18330
+ case a3:
18331
+ $2 = (g2 - v2) / 864e5;
18332
+ break;
18333
+ case u2:
18334
+ $2 = g2 / n;
18335
+ break;
18336
+ case s3:
18337
+ $2 = g2 / e3;
18338
+ break;
18339
+ case i2:
18340
+ $2 = g2 / t2;
18341
+ break;
18342
+ default:
18343
+ $2 = g2;
18344
+ }
18345
+ return l2 ? $2 : b2.a($2);
18346
+ }, m4.daysInMonth = function() {
18347
+ return this.endOf(c2).$D;
18348
+ }, m4.$locale = function() {
18349
+ return D3[this.$L];
18350
+ }, m4.locale = function(t3, e4) {
18351
+ if (!t3)
18352
+ return this.$L;
18353
+ var n2 = this.clone(), r2 = w2(t3, e4, true);
18354
+ return r2 && (n2.$L = r2), n2;
18355
+ }, m4.clone = function() {
18356
+ return b2.w(this.$d, this);
18357
+ }, m4.toDate = function() {
18358
+ return new Date(this.valueOf());
18359
+ }, m4.toJSON = function() {
18360
+ return this.isValid() ? this.toISOString() : null;
18361
+ }, m4.toISOString = function() {
18362
+ return this.$d.toISOString();
18363
+ }, m4.toString = function() {
18364
+ return this.$d.toUTCString();
18365
+ }, M5;
18366
+ }(), k2 = _.prototype;
18367
+ return O2.prototype = k2, [["$ms", r], ["$s", i2], ["$m", s3], ["$H", u2], ["$W", a3], ["$M", c2], ["$y", h4], ["$D", d3]].forEach(function(t3) {
18368
+ k2[t3[1]] = function(e4) {
18369
+ return this.$g(e4, t3[0], t3[1]);
18370
+ };
18371
+ }), O2.extend = function(t3, e4) {
18372
+ return t3.$i || (t3(e4, _, O2), t3.$i = true), O2;
18373
+ }, O2.locale = w2, O2.isDayjs = S4, O2.unix = function(t3) {
18374
+ return O2(1e3 * t3);
18375
+ }, O2.en = D3[g], O2.Ls = D3, O2.p = {}, O2;
18376
+ });
18377
+ })(dayjs_min$1);
18378
+ var dayjs_minExports$1 = dayjs_min$1.exports;
18379
+ const dayjs2 = /* @__PURE__ */ getDefaultExportFromCjs$1(dayjs_minExports$1);
18053
18380
  const StaffModel$2 = Model.define({
18054
18381
  name: "Staff",
18055
18382
  definition: "neu:personalia:staff",
@@ -18256,6 +18583,249 @@ const StaffModel$2 = Model.define({
18256
18583
  return roleIds;
18257
18584
  }
18258
18585
  }
18586
+ }),
18587
+ workStatus: Field.define({
18588
+ handle: "workStatus",
18589
+ name: "Status",
18590
+ type: "string",
18591
+ input: "select",
18592
+ options: {
18593
+ note: "Status dari karyawan.",
18594
+ default: "notActive",
18595
+ enums: StatusWork$1.values,
18596
+ choices: StatusWork$1.items,
18597
+ isVirtual: true,
18598
+ isPersisted: true
18599
+ },
18600
+ virtual: {
18601
+ dependency: {
18602
+ checkIns: {
18603
+ _id: 1,
18604
+ type: 1,
18605
+ checkInAt: 1
18606
+ },
18607
+ submitStaffAttendances: {
18608
+ _id: 1,
18609
+ type: 1,
18610
+ startedAt: 1,
18611
+ status: 1
18612
+ }
18613
+ },
18614
+ reduce(o) {
18615
+ var _a;
18616
+ if (!o.checkIns.length)
18617
+ return "off";
18618
+ const opts = { pattern: "yyyy-MM-dd" };
18619
+ const todayDate = DateUtil$1.formatTz((/* @__PURE__ */ new Date()).toISOString(), opts);
18620
+ const arrCheckIn = o.checkIns.filter(
18621
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18622
+ );
18623
+ const arrCheckInReverse = arrCheckIn.reverse();
18624
+ const checkInAtReverse = arrCheckInReverse[0];
18625
+ const lastPresence = DateUtil$1.formatTz(
18626
+ checkInAtReverse == null ? void 0 : checkInAtReverse.checkInAt,
18627
+ opts
18628
+ );
18629
+ const arrCheckInHome = o.checkIns.filter(
18630
+ (field) => field.type == "home"
18631
+ );
18632
+ const arrCheckInHomeReverse = (_a = arrCheckInHome.reverse()[0]) == null ? void 0 : _a.checkInAt;
18633
+ const lastPresenceHome = DateUtil$1.formatTz(
18634
+ arrCheckInHomeReverse,
18635
+ opts
18636
+ );
18637
+ const arrAttendance = o.submitStaffAttendances.filter(
18638
+ (field) => field.type == "leave" && field.status == "approved"
18639
+ ).map((field) => DateUtil$1.formatTz(field.startedAt, opts));
18640
+ if (arrAttendance.includes(todayDate)) {
18641
+ return "leave";
18642
+ } else {
18643
+ if (todayDate == lastPresence) {
18644
+ if (todayDate == lastPresenceHome) {
18645
+ return "home";
18646
+ } else {
18647
+ return "work";
18648
+ }
18649
+ } else {
18650
+ return "off";
18651
+ }
18652
+ }
18653
+ }
18654
+ }
18655
+ }),
18656
+ workCome: Field.define({
18657
+ handle: "workCome",
18658
+ name: "Masuk",
18659
+ type: "date",
18660
+ input: "date2",
18661
+ display: "date",
18662
+ options: {
18663
+ note: "Presensi masuk hari ini.",
18664
+ isVirtual: true,
18665
+ isPersisted: true
18666
+ },
18667
+ virtual: {
18668
+ dependency: {
18669
+ checkIns: {
18670
+ _id: 1,
18671
+ type: 1,
18672
+ checkInAt: 1
18673
+ }
18674
+ },
18675
+ reduce(o) {
18676
+ var _a, _b;
18677
+ if (!o.checkIns.length)
18678
+ return null;
18679
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18680
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18681
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18682
+ );
18683
+ const checkInsNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18684
+ (field) => field.checkInAt != null
18685
+ );
18686
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18687
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18688
+ );
18689
+ console.log({ checkInAtCome });
18690
+ if (!checkInAtCome.length) {
18691
+ return null;
18692
+ } else {
18693
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
18694
+ return resultCheckInCome;
18695
+ }
18696
+ }
18697
+ }
18698
+ }),
18699
+ workHome: Field.define({
18700
+ handle: "workHome",
18701
+ name: "Pulang",
18702
+ type: "date",
18703
+ input: "date2",
18704
+ display: "date",
18705
+ options: {
18706
+ note: "Presensi pulang hari ini.",
18707
+ isVirtual: true,
18708
+ isPersisted: true
18709
+ },
18710
+ virtual: {
18711
+ dependency: {
18712
+ checkIns: {
18713
+ _id: 1,
18714
+ type: 1,
18715
+ checkInAt: 1
18716
+ }
18717
+ },
18718
+ reduce(o) {
18719
+ var _a;
18720
+ if (!o.checkIns.length)
18721
+ return null;
18722
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18723
+ const checkInsHome = o.checkIns.filter(
18724
+ (field) => field.type == "home"
18725
+ );
18726
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18727
+ (field) => field.checkInAt != null
18728
+ );
18729
+ const checkInAtHome = checkInsHomeNotNull.filter(
18730
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18731
+ ).reverse();
18732
+ if (!checkInAtHome.length) {
18733
+ return null;
18734
+ } else {
18735
+ const resultCheckInHome = (_a = checkInAtHome[0]) == null ? void 0 : _a.checkInAt;
18736
+ const todayDateOnly = dayjs2(lateTodayDate).format("YYYY-MM-DD");
18737
+ const homeDateOnly = dayjs2(resultCheckInHome).format("YYYY-MM-DD");
18738
+ if (todayDateOnly == homeDateOnly) {
18739
+ return resultCheckInHome;
18740
+ } else {
18741
+ return null;
18742
+ }
18743
+ }
18744
+ }
18745
+ }
18746
+ }),
18747
+ workNote: Field.define({
18748
+ handle: "workNote",
18749
+ name: "Keterangan",
18750
+ type: "string",
18751
+ input: "short-text",
18752
+ options: {
18753
+ note: "Keterangan presensi hari ini.",
18754
+ isVirtual: true,
18755
+ isPersisted: true
18756
+ },
18757
+ virtual: {
18758
+ dependency: {
18759
+ workStatus: 1,
18760
+ checkIns: {
18761
+ _id: 1,
18762
+ type: 1,
18763
+ checkInAt: 1
18764
+ }
18765
+ },
18766
+ reduce(o) {
18767
+ var _a, _b, _c, _d, _e, _f;
18768
+ if (!o.checkIns.length)
18769
+ return null;
18770
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18771
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18772
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18773
+ );
18774
+ const checkInsComeNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18775
+ (field) => field.checkInAt != null
18776
+ );
18777
+ const checkInAtCome = checkInsComeNotNull == null ? void 0 : checkInsComeNotNull.filter(
18778
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18779
+ );
18780
+ const resultCheckInCome = checkInAtCome[0];
18781
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18782
+ const checkInsHome = (_b = o.checkIns) == null ? void 0 : _b.filter(
18783
+ (field) => field.type == "home"
18784
+ );
18785
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18786
+ (field) => field.checkInAt != null
18787
+ );
18788
+ const checkInAtHome = (_c = checkInsHomeNotNull == null ? void 0 : checkInsHomeNotNull.filter(
18789
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18790
+ )) == null ? void 0 : _c.reverse();
18791
+ const resultCheckInHome = checkInAtHome[0];
18792
+ const opts = { pattern: "yyyy-MM-dd" };
18793
+ const todayDateOnly = DateUtil$1.formatTz(
18794
+ (/* @__PURE__ */ new Date()).toISOString(),
18795
+ opts
18796
+ );
18797
+ const arrCheckInHome = (_d = o.checkIns) == null ? void 0 : _d.filter(
18798
+ (field) => field.type == "home"
18799
+ );
18800
+ const arrCheckInHomeReverse = (_e = arrCheckInHome == null ? void 0 : arrCheckInHome.reverse()[0]) == null ? void 0 : _e.checkInAt;
18801
+ const lastPresenceHome = DateUtil$1.formatTz(
18802
+ arrCheckInHomeReverse,
18803
+ opts
18804
+ );
18805
+ if (o.workStatus == "leave") {
18806
+ return "Cuti";
18807
+ } else if (o.workStatus == "off") {
18808
+ return "Belum Masuk";
18809
+ } else {
18810
+ if (todayDateOnly == lastPresenceHome) {
18811
+ const workMinutes = ((_f = DateUtil$1) == null ? void 0 : _f.diff(
18812
+ resultCheckInCome == null ? void 0 : resultCheckInCome.checkInAt,
18813
+ resultCheckInHome == null ? void 0 : resultCheckInHome.checkInAt,
18814
+ "minutes"
18815
+ )) || 0;
18816
+ const hours = Math.floor(workMinutes / 60);
18817
+ const minutes = workMinutes % 60;
18818
+ if (workMinutes < 540) {
18819
+ return `Jam kerja tidak memenuhi waktu minimal: ${hours} Jam ${minutes} minutes`;
18820
+ } else {
18821
+ return `Tepat Waktu: ${hours - 1} Jam ${minutes} minutes`;
18822
+ }
18823
+ } else {
18824
+ return "Sedang Bekerja";
18825
+ }
18826
+ }
18827
+ }
18828
+ }
18259
18829
  })
18260
18830
  },
18261
18831
  fragments: {
@@ -18294,7 +18864,11 @@ const StaffModel$2 = Model.define({
18294
18864
  display: 1,
18295
18865
  flag: 1,
18296
18866
  name: 1
18297
- }
18867
+ },
18868
+ workStatus: 1,
18869
+ workCome: 1,
18870
+ workHome: 1,
18871
+ workNote: 1
18298
18872
  },
18299
18873
  detail: {
18300
18874
  id: 1,
@@ -18335,7 +18909,11 @@ const StaffModel$2 = Model.define({
18335
18909
  branchId: 1,
18336
18910
  branchIds: 1,
18337
18911
  userId: 1,
18338
- virtualRoleIds: 1
18912
+ virtualRoleIds: 1,
18913
+ workStatus: 1,
18914
+ workCome: 1,
18915
+ workHome: 1,
18916
+ workNote: 1
18339
18917
  },
18340
18918
  fluffy: {}
18341
18919
  }
@@ -26064,6 +26642,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
26064
26642
  staffId: (_a2 = staff.value) == null ? void 0 : _a2.id
26065
26643
  });
26066
26644
  await syncOne();
26645
+ window.location.href = `/pengajuan/staff-submission?peek=neu:personalia:submission:${id.value}:single-staff-view:m`;
26067
26646
  };
26068
26647
  return (_ctx, _cache) => {
26069
26648
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
@@ -26307,7 +26886,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
26307
26886
  };
26308
26887
  }
26309
26888
  });
26310
- const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-e39fa184"]]);
26889
+ const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-d0c7c05c"]]);
26311
26890
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
26312
26891
  __name: "SubmissionFollowUp",
26313
26892
  setup(__props) {
@@ -26629,14 +27208,17 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
26629
27208
  const syncResolved = async () => {
26630
27209
  await executeOne("resolvedSubmission", { submissionId: id.value });
26631
27210
  await syncOne();
27211
+ window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`;
26632
27212
  };
26633
27213
  const syncDiscontinued = async () => {
26634
27214
  await executeOne("discontinuedSubmission", { submissionId: id.value });
26635
27215
  await syncOne();
27216
+ window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`;
26636
27217
  };
26637
27218
  const syncMonitored = async () => {
26638
27219
  await executeOne("monitoredSubmission", { submissionId: id.value });
26639
27220
  await syncOne();
27221
+ window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`;
26640
27222
  };
26641
27223
  const syncProcessed = async () => {
26642
27224
  var _a2;
@@ -26645,6 +27227,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
26645
27227
  staffId: (_a2 = staff.value) == null ? void 0 : _a2.id
26646
27228
  });
26647
27229
  await syncOne();
27230
+ window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`;
26648
27231
  };
26649
27232
  const syncLowered = async () => {
26650
27233
  var _a2;
@@ -26653,6 +27236,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
26653
27236
  staffId: (_a2 = staff.value) == null ? void 0 : _a2.id
26654
27237
  });
26655
27238
  await syncOne();
27239
+ window.location.href = `/pengajuan/audit-submission?peek=neu:personalia:submission:${id.value}:single-audit-view:m`;
26656
27240
  };
26657
27241
  return (_ctx, _cache) => {
26658
27242
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
@@ -27019,7 +27603,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
27019
27603
  };
27020
27604
  }
27021
27605
  });
27022
- const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-3ef7852b"]]);
27606
+ const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-d1ec1298"]]);
27023
27607
  const _hoisted_1$4 = { class: "flex flex-wrap" };
27024
27608
  const _hoisted_2$4 = { class: "mt-2" };
27025
27609
  const _hoisted_3$2 = { class: "mt-2" };
@@ -27132,6 +27716,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
27132
27716
  staffId: (_a2 = staff.value) == null ? void 0 : _a2.id
27133
27717
  });
27134
27718
  await syncOne();
27719
+ window.location.href = `/pengajuan/decision-submission?peek=neu:personalia:submission:${id.value}:single-decision-view:m`;
27135
27720
  };
27136
27721
  const syncApproved = async () => {
27137
27722
  var _a2;
@@ -27140,6 +27725,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
27140
27725
  staffId: (_a2 = staff.value) == null ? void 0 : _a2.id
27141
27726
  });
27142
27727
  await syncOne();
27728
+ window.location.href = `/pengajuan/decision-submission?peek=neu:personalia:submission:${id.value}:single-decision-view:m`;
27143
27729
  };
27144
27730
  return (_ctx, _cache) => {
27145
27731
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-submission-single" }, {
@@ -27454,7 +28040,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
27454
28040
  };
27455
28041
  }
27456
28042
  });
27457
- const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-b87a8600"]]);
28043
+ const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-6f8e3ae5"]]);
27458
28044
  const _hoisted_1$3 = { class: "flex flex-wrap" };
27459
28045
  const _hoisted_2$3 = { class: "mt-2" };
27460
28046
  const _hoisted_3$1 = { class: "mt-2" };
@@ -29528,8 +30114,8 @@ function setDefaultFragments(model2) {
29528
30114
  model2.fragments.item = { id: 1, display: 1 };
29529
30115
  }
29530
30116
  }
29531
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
29532
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
30117
+ var commonjsGlobal$1 = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
30118
+ var freeGlobal$1 = typeof commonjsGlobal$1 == "object" && commonjsGlobal$1 && commonjsGlobal$1.Object === Object && commonjsGlobal$1;
29533
30119
  var _freeGlobal = freeGlobal$1;
29534
30120
  var freeGlobal = _freeGlobal;
29535
30121
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -31749,7 +32335,7 @@ var parseLocale2 = function parseLocale22(preset, object, isLocal) {
31749
32335
  L22 = l;
31750
32336
  return l || !isLocal && L22;
31751
32337
  };
31752
- var dayjs2 = function dayjs22(date, c2) {
32338
+ var dayjs$1 = function dayjs3(date, c2) {
31753
32339
  if (isDayjs2(date)) {
31754
32340
  return date.clone();
31755
32341
  }
@@ -31759,7 +32345,7 @@ var dayjs2 = function dayjs22(date, c2) {
31759
32345
  return new Dayjs(cfg);
31760
32346
  };
31761
32347
  var wrapper$1 = function wrapper4(date, instance) {
31762
- return dayjs2(date, {
32348
+ return dayjs$1(date, {
31763
32349
  locale: instance.$L,
31764
32350
  utc: instance.$u,
31765
32351
  x: instance.$x,
@@ -31822,14 +32408,14 @@ var Dayjs = /* @__PURE__ */ function() {
31822
32408
  return !(this.$d.toString() === INVALID_DATE_STRING);
31823
32409
  };
31824
32410
  _proto.isSame = function isSame(that, units) {
31825
- var other = dayjs2(that);
32411
+ var other = dayjs$1(that);
31826
32412
  return this.startOf(units) <= other && other <= this.endOf(units);
31827
32413
  };
31828
32414
  _proto.isAfter = function isAfter(that, units) {
31829
- return dayjs2(that) < this.startOf(units);
32415
+ return dayjs$1(that) < this.startOf(units);
31830
32416
  };
31831
32417
  _proto.isBefore = function isBefore(that, units) {
31832
- return this.endOf(units) < dayjs2(that);
32418
+ return this.endOf(units) < dayjs$1(that);
31833
32419
  };
31834
32420
  _proto.$g = function $g(input2, get2, set2) {
31835
32421
  if (Utils.u(input2))
@@ -31914,7 +32500,7 @@ var Dayjs = /* @__PURE__ */ function() {
31914
32500
  number = Number(number);
31915
32501
  var unit = Utils.p(units);
31916
32502
  var instanceFactorySet = function instanceFactorySet2(n) {
31917
- var d3 = dayjs2(_this2);
32503
+ var d3 = dayjs$1(_this2);
31918
32504
  return Utils.w(d3.date(d3.date() + Math.round(n * number)), _this2);
31919
32505
  };
31920
32506
  if (unit === M32) {
@@ -32018,7 +32604,7 @@ var Dayjs = /* @__PURE__ */ function() {
32018
32604
  _proto.diff = function diff(input2, units, _float) {
32019
32605
  var _this4 = this;
32020
32606
  var unit = Utils.p(units);
32021
- var that = dayjs2(input2);
32607
+ var that = dayjs$1(input2);
32022
32608
  var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
32023
32609
  var diff2 = this - that;
32024
32610
  var getMonth = function getMonth2() {
@@ -32089,28 +32675,28 @@ var Dayjs = /* @__PURE__ */ function() {
32089
32675
  return Dayjs2;
32090
32676
  }();
32091
32677
  var proto = Dayjs.prototype;
32092
- dayjs2.prototype = proto;
32678
+ dayjs$1.prototype = proto;
32093
32679
  [["$ms", MS], ["$s", S32], ["$m", MIN], ["$H", H32], ["$W", D22], ["$M", M32], ["$y", Y22], ["$D", DATE]].forEach(function(g) {
32094
32680
  proto[g[1]] = function(input2) {
32095
32681
  return this.$g(input2, g[0], g[1]);
32096
32682
  };
32097
32683
  });
32098
- dayjs2.extend = function(plugin, option) {
32684
+ dayjs$1.extend = function(plugin, option) {
32099
32685
  if (!plugin.$i) {
32100
- plugin(option, Dayjs, dayjs2);
32686
+ plugin(option, Dayjs, dayjs$1);
32101
32687
  plugin.$i = true;
32102
32688
  }
32103
- return dayjs2;
32689
+ return dayjs$1;
32104
32690
  };
32105
- dayjs2.locale = parseLocale2;
32106
- dayjs2.isDayjs = isDayjs2;
32107
- dayjs2.unix = function(timestamp) {
32108
- return dayjs2(timestamp * 1e3);
32691
+ dayjs$1.locale = parseLocale2;
32692
+ dayjs$1.isDayjs = isDayjs2;
32693
+ dayjs$1.unix = function(timestamp) {
32694
+ return dayjs$1(timestamp * 1e3);
32109
32695
  };
32110
- dayjs2.en = Ls[L22];
32111
- dayjs2.Ls = Ls;
32112
- dayjs2.p = {};
32113
- const dayjs$1 = dayjs2;
32696
+ dayjs$1.en = Ls[L22];
32697
+ dayjs$1.Ls = Ls;
32698
+ dayjs$1.p = {};
32699
+ const dayjs$2 = dayjs$1;
32114
32700
  var locale = {
32115
32701
  name: "id",
32116
32702
  weekdays: "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
@@ -32146,7 +32732,7 @@ var locale = {
32146
32732
  return n + ".";
32147
32733
  }
32148
32734
  };
32149
- dayjs$1.locale(locale, null, true);
32735
+ dayjs$2.locale(locale, null, true);
32150
32736
  const advancedFormat = function(o, c2) {
32151
32737
  var proto2 = c2.prototype;
32152
32738
  var oldFormat = proto2.format;
@@ -32455,16 +33041,16 @@ var Duration = /* @__PURE__ */ function() {
32455
33041
  var manipulateDuration2 = function manipulateDuration22(date, duration, k2) {
32456
33042
  return date.add(duration.years() * k2, "y").add(duration.months() * k2, "M").add(duration.days() * k2, "d").add(duration.hours() * k2, "h").add(duration.minutes() * k2, "m").add(duration.seconds() * k2, "s").add(duration.milliseconds() * k2, "ms");
32457
33043
  };
32458
- const durationPlugin = function(option, Dayjs2, dayjs3) {
32459
- $d = dayjs3;
32460
- $u = dayjs3().$utils();
32461
- dayjs3.duration = function(input2, unit) {
32462
- var $l = dayjs3.locale();
33044
+ const durationPlugin = function(option, Dayjs2, dayjs32) {
33045
+ $d = dayjs32;
33046
+ $u = dayjs32().$utils();
33047
+ dayjs32.duration = function(input2, unit) {
33048
+ var $l = dayjs32.locale();
32463
33049
  return wrapper22(input2, {
32464
33050
  $l
32465
33051
  }, unit);
32466
33052
  };
32467
- dayjs3.isDuration = isDuration2;
33053
+ dayjs32.isDuration = isDuration2;
32468
33054
  var oldAdd = Dayjs2.prototype.add;
32469
33055
  var oldSubtract = Dayjs2.prototype.subtract;
32470
33056
  Dayjs2.prototype.add = function(value, unit) {
@@ -32636,11 +33222,11 @@ const relativeTimePlugin = function(o, c2, d3) {
32636
33222
  return this.from(makeNow(this), withoutSuffix);
32637
33223
  };
32638
33224
  };
32639
- dayjs$1.extend(durationPlugin);
32640
- dayjs$1.extend(relativeTimePlugin);
32641
- dayjs$1.extend(advancedFormat);
32642
- dayjs$1.extend(isoWeek);
32643
- dayjs$1.locale("id");
33225
+ dayjs$2.extend(durationPlugin);
33226
+ dayjs$2.extend(relativeTimePlugin);
33227
+ dayjs$2.extend(advancedFormat);
33228
+ dayjs$2.extend(isoWeek);
33229
+ dayjs$2.locale("id");
32644
33230
  const EntranceStatus = Choice.define({
32645
33231
  handle: "entranceStatus",
32646
33232
  name: "Entrance Status",
@@ -34610,6 +35196,37 @@ const StatusStaff = Choice.define({
34610
35196
  }
34611
35197
  ]
34612
35198
  });
35199
+ const StatusWork = Choice.define({
35200
+ handle: "statusWork",
35201
+ name: "Work Status",
35202
+ items: [
35203
+ {
35204
+ label: "Off",
35205
+ value: "off",
35206
+ color: "danger"
35207
+ },
35208
+ {
35209
+ label: "Kerja",
35210
+ value: "work",
35211
+ color: "success"
35212
+ },
35213
+ {
35214
+ label: "Cuti",
35215
+ value: "leave",
35216
+ color: "warning"
35217
+ },
35218
+ {
35219
+ label: "Libur",
35220
+ value: "holiday",
35221
+ color: "info"
35222
+ },
35223
+ {
35224
+ label: "Pulang",
35225
+ value: "home",
35226
+ color: "info"
35227
+ }
35228
+ ]
35229
+ });
34613
35230
  const PriorityStatus = Choice.define({
34614
35231
  handle: "priorityStatus",
34615
35232
  name: "Priority Status",
@@ -38493,6 +39110,302 @@ const SituationTypeModel = Model.define({
38493
39110
  fluffy: {}
38494
39111
  }
38495
39112
  });
39113
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
39114
+ function getDefaultExportFromCjs(x2) {
39115
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
39116
+ }
39117
+ var dayjs_min = { exports: {} };
39118
+ (function(module, exports) {
39119
+ !function(t2, e3) {
39120
+ module.exports = e3();
39121
+ }(commonjsGlobal, function() {
39122
+ var t2 = 1e3, e3 = 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) {
39123
+ var e4 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
39124
+ return "[" + t3 + (e4[(n2 - 20) % 10] || e4[n2] || e4[0]) + "]";
39125
+ } }, m3 = function(t3, e4, n2) {
39126
+ var r2 = String(t3);
39127
+ return !r2 || r2.length >= e4 ? t3 : "" + Array(e4 + 1 - r2.length).join(n2) + t3;
39128
+ }, v = { s: m3, z: function(t3) {
39129
+ var e4 = -t3.utcOffset(), n2 = Math.abs(e4), r2 = Math.floor(n2 / 60), i3 = n2 % 60;
39130
+ return (e4 <= 0 ? "+" : "-") + m3(r2, 2, "0") + ":" + m3(i3, 2, "0");
39131
+ }, m: function t3(e4, n2) {
39132
+ if (e4.date() < n2.date())
39133
+ return -t3(n2, e4);
39134
+ var r2 = 12 * (n2.year() - e4.year()) + (n2.month() - e4.month()), i3 = e4.clone().add(r2, c2), s4 = n2 - i3 < 0, u3 = e4.clone().add(r2 + (s4 ? -1 : 1), c2);
39135
+ return +(-(r2 + (n2 - i3) / (s4 ? i3 - u3 : u3 - i3)) || 0);
39136
+ }, a: function(t3) {
39137
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
39138
+ }, p: function(t3) {
39139
+ 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$/, "");
39140
+ }, u: function(t3) {
39141
+ return void 0 === t3;
39142
+ } }, g = "en", D3 = {};
39143
+ D3[g] = M4;
39144
+ var p = "$isDayjsObject", S4 = function(t3) {
39145
+ return t3 instanceof _ || !(!t3 || !t3[p]);
39146
+ }, w2 = function t3(e4, n2, r2) {
39147
+ var i3;
39148
+ if (!e4)
39149
+ return g;
39150
+ if ("string" == typeof e4) {
39151
+ var s4 = e4.toLowerCase();
39152
+ D3[s4] && (i3 = s4), n2 && (D3[s4] = n2, i3 = s4);
39153
+ var u3 = e4.split("-");
39154
+ if (!i3 && u3.length > 1)
39155
+ return t3(u3[0]);
39156
+ } else {
39157
+ var a4 = e4.name;
39158
+ D3[a4] = e4, i3 = a4;
39159
+ }
39160
+ return !r2 && i3 && (g = i3), i3 || !r2 && g;
39161
+ }, O2 = function(t3, e4) {
39162
+ if (S4(t3))
39163
+ return t3.clone();
39164
+ var n2 = "object" == typeof e4 ? e4 : {};
39165
+ return n2.date = t3, n2.args = arguments, new _(n2);
39166
+ }, b2 = v;
39167
+ b2.l = w2, b2.i = S4, b2.w = function(t3, e4) {
39168
+ return O2(t3, { locale: e4.$L, utc: e4.$u, x: e4.$x, $offset: e4.$offset });
39169
+ };
39170
+ var _ = function() {
39171
+ function M5(t3) {
39172
+ this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
39173
+ }
39174
+ var m4 = M5.prototype;
39175
+ return m4.parse = function(t3) {
39176
+ this.$d = function(t4) {
39177
+ var e4 = t4.date, n2 = t4.utc;
39178
+ if (null === e4)
39179
+ return /* @__PURE__ */ new Date(NaN);
39180
+ if (b2.u(e4))
39181
+ return /* @__PURE__ */ new Date();
39182
+ if (e4 instanceof Date)
39183
+ return new Date(e4);
39184
+ if ("string" == typeof e4 && !/Z$/i.test(e4)) {
39185
+ var r2 = e4.match($);
39186
+ if (r2) {
39187
+ var i3 = r2[2] - 1 || 0, s4 = (r2[7] || "0").substring(0, 3);
39188
+ 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);
39189
+ }
39190
+ }
39191
+ return new Date(e4);
39192
+ }(t3), this.init();
39193
+ }, m4.init = function() {
39194
+ var t3 = this.$d;
39195
+ 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();
39196
+ }, m4.$utils = function() {
39197
+ return b2;
39198
+ }, m4.isValid = function() {
39199
+ return !(this.$d.toString() === l);
39200
+ }, m4.isSame = function(t3, e4) {
39201
+ var n2 = O2(t3);
39202
+ return this.startOf(e4) <= n2 && n2 <= this.endOf(e4);
39203
+ }, m4.isAfter = function(t3, e4) {
39204
+ return O2(t3) < this.startOf(e4);
39205
+ }, m4.isBefore = function(t3, e4) {
39206
+ return this.endOf(e4) < O2(t3);
39207
+ }, m4.$g = function(t3, e4, n2) {
39208
+ return b2.u(t3) ? this[e4] : this.set(n2, t3);
39209
+ }, m4.unix = function() {
39210
+ return Math.floor(this.valueOf() / 1e3);
39211
+ }, m4.valueOf = function() {
39212
+ return this.$d.getTime();
39213
+ }, m4.startOf = function(t3, e4) {
39214
+ var n2 = this, r2 = !!b2.u(e4) || e4, f2 = b2.p(t3), l2 = function(t4, e5) {
39215
+ var i3 = b2.w(n2.$u ? Date.UTC(n2.$y, e5, t4) : new Date(n2.$y, e5, t4), n2);
39216
+ return r2 ? i3 : i3.endOf(a3);
39217
+ }, $2 = function(t4, e5) {
39218
+ return b2.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e5)), n2);
39219
+ }, y4 = this.$W, M6 = this.$M, m5 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
39220
+ switch (f2) {
39221
+ case h4:
39222
+ return r2 ? l2(1, 0) : l2(31, 11);
39223
+ case c2:
39224
+ return r2 ? l2(1, M6) : l2(0, M6 + 1);
39225
+ case o:
39226
+ var g2 = this.$locale().weekStart || 0, D4 = (y4 < g2 ? y4 + 7 : y4) - g2;
39227
+ return l2(r2 ? m5 - D4 : m5 + (6 - D4), M6);
39228
+ case a3:
39229
+ case d3:
39230
+ return $2(v2 + "Hours", 0);
39231
+ case u2:
39232
+ return $2(v2 + "Minutes", 1);
39233
+ case s3:
39234
+ return $2(v2 + "Seconds", 2);
39235
+ case i2:
39236
+ return $2(v2 + "Milliseconds", 3);
39237
+ default:
39238
+ return this.clone();
39239
+ }
39240
+ }, m4.endOf = function(t3) {
39241
+ return this.startOf(t3, false);
39242
+ }, m4.$set = function(t3, e4) {
39243
+ 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 + (e4 - this.$W) : e4;
39244
+ if (o2 === c2 || o2 === h4) {
39245
+ var y4 = this.clone().set(d3, 1);
39246
+ y4.$d[l2]($2), y4.init(), this.$d = y4.set(d3, Math.min(this.$D, y4.daysInMonth())).$d;
39247
+ } else
39248
+ l2 && this.$d[l2]($2);
39249
+ return this.init(), this;
39250
+ }, m4.set = function(t3, e4) {
39251
+ return this.clone().$set(t3, e4);
39252
+ }, m4.get = function(t3) {
39253
+ return this[b2.p(t3)]();
39254
+ }, m4.add = function(r2, f2) {
39255
+ var d4, l2 = this;
39256
+ r2 = Number(r2);
39257
+ var $2 = b2.p(f2), y4 = function(t3) {
39258
+ var e4 = O2(l2);
39259
+ return b2.w(e4.date(e4.date() + Math.round(t3 * r2)), l2);
39260
+ };
39261
+ if ($2 === c2)
39262
+ return this.set(c2, this.$M + r2);
39263
+ if ($2 === h4)
39264
+ return this.set(h4, this.$y + r2);
39265
+ if ($2 === a3)
39266
+ return y4(1);
39267
+ if ($2 === o)
39268
+ return y4(7);
39269
+ var M6 = (d4 = {}, d4[s3] = e3, d4[u2] = n, d4[i2] = t2, d4)[$2] || 1, m5 = this.$d.getTime() + r2 * M6;
39270
+ return b2.w(m5, this);
39271
+ }, m4.subtract = function(t3, e4) {
39272
+ return this.add(-1 * t3, e4);
39273
+ }, m4.format = function(t3) {
39274
+ var e4 = this, n2 = this.$locale();
39275
+ if (!this.isValid())
39276
+ return n2.invalidDate || l;
39277
+ 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) {
39278
+ return t4 && (t4[n3] || t4(e4, r2)) || i4[n3].slice(0, s5);
39279
+ }, d4 = function(t4) {
39280
+ return b2.s(s4 % 12 || 12, t4, "0");
39281
+ }, $2 = f2 || function(t4, e5, n3) {
39282
+ var r3 = t4 < 12 ? "AM" : "PM";
39283
+ return n3 ? r3.toLowerCase() : r3;
39284
+ };
39285
+ return r2.replace(y3, function(t4, r3) {
39286
+ return r3 || function(t5) {
39287
+ switch (t5) {
39288
+ case "YY":
39289
+ return String(e4.$y).slice(-2);
39290
+ case "YYYY":
39291
+ return b2.s(e4.$y, 4, "0");
39292
+ case "M":
39293
+ return a4 + 1;
39294
+ case "MM":
39295
+ return b2.s(a4 + 1, 2, "0");
39296
+ case "MMM":
39297
+ return h5(n2.monthsShort, a4, c3, 3);
39298
+ case "MMMM":
39299
+ return h5(c3, a4);
39300
+ case "D":
39301
+ return e4.$D;
39302
+ case "DD":
39303
+ return b2.s(e4.$D, 2, "0");
39304
+ case "d":
39305
+ return String(e4.$W);
39306
+ case "dd":
39307
+ return h5(n2.weekdaysMin, e4.$W, o2, 2);
39308
+ case "ddd":
39309
+ return h5(n2.weekdaysShort, e4.$W, o2, 3);
39310
+ case "dddd":
39311
+ return o2[e4.$W];
39312
+ case "H":
39313
+ return String(s4);
39314
+ case "HH":
39315
+ return b2.s(s4, 2, "0");
39316
+ case "h":
39317
+ return d4(1);
39318
+ case "hh":
39319
+ return d4(2);
39320
+ case "a":
39321
+ return $2(s4, u3, true);
39322
+ case "A":
39323
+ return $2(s4, u3, false);
39324
+ case "m":
39325
+ return String(u3);
39326
+ case "mm":
39327
+ return b2.s(u3, 2, "0");
39328
+ case "s":
39329
+ return String(e4.$s);
39330
+ case "ss":
39331
+ return b2.s(e4.$s, 2, "0");
39332
+ case "SSS":
39333
+ return b2.s(e4.$ms, 3, "0");
39334
+ case "Z":
39335
+ return i3;
39336
+ }
39337
+ return null;
39338
+ }(t4) || i3.replace(":", "");
39339
+ });
39340
+ }, m4.utcOffset = function() {
39341
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
39342
+ }, m4.diff = function(r2, d4, l2) {
39343
+ var $2, y4 = this, M6 = b2.p(d4), m5 = O2(r2), v2 = (m5.utcOffset() - this.utcOffset()) * e3, g2 = this - m5, D4 = function() {
39344
+ return b2.m(y4, m5);
39345
+ };
39346
+ switch (M6) {
39347
+ case h4:
39348
+ $2 = D4() / 12;
39349
+ break;
39350
+ case c2:
39351
+ $2 = D4();
39352
+ break;
39353
+ case f:
39354
+ $2 = D4() / 3;
39355
+ break;
39356
+ case o:
39357
+ $2 = (g2 - v2) / 6048e5;
39358
+ break;
39359
+ case a3:
39360
+ $2 = (g2 - v2) / 864e5;
39361
+ break;
39362
+ case u2:
39363
+ $2 = g2 / n;
39364
+ break;
39365
+ case s3:
39366
+ $2 = g2 / e3;
39367
+ break;
39368
+ case i2:
39369
+ $2 = g2 / t2;
39370
+ break;
39371
+ default:
39372
+ $2 = g2;
39373
+ }
39374
+ return l2 ? $2 : b2.a($2);
39375
+ }, m4.daysInMonth = function() {
39376
+ return this.endOf(c2).$D;
39377
+ }, m4.$locale = function() {
39378
+ return D3[this.$L];
39379
+ }, m4.locale = function(t3, e4) {
39380
+ if (!t3)
39381
+ return this.$L;
39382
+ var n2 = this.clone(), r2 = w2(t3, e4, true);
39383
+ return r2 && (n2.$L = r2), n2;
39384
+ }, m4.clone = function() {
39385
+ return b2.w(this.$d, this);
39386
+ }, m4.toDate = function() {
39387
+ return new Date(this.valueOf());
39388
+ }, m4.toJSON = function() {
39389
+ return this.isValid() ? this.toISOString() : null;
39390
+ }, m4.toISOString = function() {
39391
+ return this.$d.toISOString();
39392
+ }, m4.toString = function() {
39393
+ return this.$d.toUTCString();
39394
+ }, M5;
39395
+ }(), k2 = _.prototype;
39396
+ return O2.prototype = k2, [["$ms", r], ["$s", i2], ["$m", s3], ["$H", u2], ["$W", a3], ["$M", c2], ["$y", h4], ["$D", d3]].forEach(function(t3) {
39397
+ k2[t3[1]] = function(e4) {
39398
+ return this.$g(e4, t3[0], t3[1]);
39399
+ };
39400
+ }), O2.extend = function(t3, e4) {
39401
+ return t3.$i || (t3(e4, _, O2), t3.$i = true), O2;
39402
+ }, O2.locale = w2, O2.isDayjs = S4, O2.unix = function(t3) {
39403
+ return O2(1e3 * t3);
39404
+ }, O2.en = D3[g], O2.Ls = D3, O2.p = {}, O2;
39405
+ });
39406
+ })(dayjs_min);
39407
+ var dayjs_minExports = dayjs_min.exports;
39408
+ const dayjs22 = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
38496
39409
  const StaffModel$1 = Model.define({
38497
39410
  name: "Staff",
38498
39411
  definition: "neu:personalia:staff",
@@ -38699,6 +39612,249 @@ const StaffModel$1 = Model.define({
38699
39612
  return roleIds;
38700
39613
  }
38701
39614
  }
39615
+ }),
39616
+ workStatus: Field.define({
39617
+ handle: "workStatus",
39618
+ name: "Status",
39619
+ type: "string",
39620
+ input: "select",
39621
+ options: {
39622
+ note: "Status dari karyawan.",
39623
+ default: "notActive",
39624
+ enums: StatusWork.values,
39625
+ choices: StatusWork.items,
39626
+ isVirtual: true,
39627
+ isPersisted: true
39628
+ },
39629
+ virtual: {
39630
+ dependency: {
39631
+ checkIns: {
39632
+ _id: 1,
39633
+ type: 1,
39634
+ checkInAt: 1
39635
+ },
39636
+ submitStaffAttendances: {
39637
+ _id: 1,
39638
+ type: 1,
39639
+ startedAt: 1,
39640
+ status: 1
39641
+ }
39642
+ },
39643
+ reduce(o) {
39644
+ var _a;
39645
+ if (!o.checkIns.length)
39646
+ return "off";
39647
+ const opts = { pattern: "yyyy-MM-dd" };
39648
+ const todayDate = DateUtil$1.formatTz((/* @__PURE__ */ new Date()).toISOString(), opts);
39649
+ const arrCheckIn = o.checkIns.filter(
39650
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
39651
+ );
39652
+ const arrCheckInReverse = arrCheckIn.reverse();
39653
+ const checkInAtReverse = arrCheckInReverse[0];
39654
+ const lastPresence = DateUtil$1.formatTz(
39655
+ checkInAtReverse == null ? void 0 : checkInAtReverse.checkInAt,
39656
+ opts
39657
+ );
39658
+ const arrCheckInHome = o.checkIns.filter(
39659
+ (field) => field.type == "home"
39660
+ );
39661
+ const arrCheckInHomeReverse = (_a = arrCheckInHome.reverse()[0]) == null ? void 0 : _a.checkInAt;
39662
+ const lastPresenceHome = DateUtil$1.formatTz(
39663
+ arrCheckInHomeReverse,
39664
+ opts
39665
+ );
39666
+ const arrAttendance = o.submitStaffAttendances.filter(
39667
+ (field) => field.type == "leave" && field.status == "approved"
39668
+ ).map((field) => DateUtil$1.formatTz(field.startedAt, opts));
39669
+ if (arrAttendance.includes(todayDate)) {
39670
+ return "leave";
39671
+ } else {
39672
+ if (todayDate == lastPresence) {
39673
+ if (todayDate == lastPresenceHome) {
39674
+ return "home";
39675
+ } else {
39676
+ return "work";
39677
+ }
39678
+ } else {
39679
+ return "off";
39680
+ }
39681
+ }
39682
+ }
39683
+ }
39684
+ }),
39685
+ workCome: Field.define({
39686
+ handle: "workCome",
39687
+ name: "Masuk",
39688
+ type: "date",
39689
+ input: "date2",
39690
+ display: "date",
39691
+ options: {
39692
+ note: "Presensi masuk hari ini.",
39693
+ isVirtual: true,
39694
+ isPersisted: true
39695
+ },
39696
+ virtual: {
39697
+ dependency: {
39698
+ checkIns: {
39699
+ _id: 1,
39700
+ type: 1,
39701
+ checkInAt: 1
39702
+ }
39703
+ },
39704
+ reduce(o) {
39705
+ var _a, _b;
39706
+ if (!o.checkIns.length)
39707
+ return null;
39708
+ const todayDate = dayjs22((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
39709
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
39710
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
39711
+ );
39712
+ const checkInsNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
39713
+ (field) => field.checkInAt != null
39714
+ );
39715
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
39716
+ (field) => dayjs22(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
39717
+ );
39718
+ console.log({ checkInAtCome });
39719
+ if (!checkInAtCome.length) {
39720
+ return null;
39721
+ } else {
39722
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
39723
+ return resultCheckInCome;
39724
+ }
39725
+ }
39726
+ }
39727
+ }),
39728
+ workHome: Field.define({
39729
+ handle: "workHome",
39730
+ name: "Pulang",
39731
+ type: "date",
39732
+ input: "date2",
39733
+ display: "date",
39734
+ options: {
39735
+ note: "Presensi pulang hari ini.",
39736
+ isVirtual: true,
39737
+ isPersisted: true
39738
+ },
39739
+ virtual: {
39740
+ dependency: {
39741
+ checkIns: {
39742
+ _id: 1,
39743
+ type: 1,
39744
+ checkInAt: 1
39745
+ }
39746
+ },
39747
+ reduce(o) {
39748
+ var _a;
39749
+ if (!o.checkIns.length)
39750
+ return null;
39751
+ const lateTodayDate = dayjs22((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
39752
+ const checkInsHome = o.checkIns.filter(
39753
+ (field) => field.type == "home"
39754
+ );
39755
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
39756
+ (field) => field.checkInAt != null
39757
+ );
39758
+ const checkInAtHome = checkInsHomeNotNull.filter(
39759
+ (field) => dayjs22(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
39760
+ ).reverse();
39761
+ if (!checkInAtHome.length) {
39762
+ return null;
39763
+ } else {
39764
+ const resultCheckInHome = (_a = checkInAtHome[0]) == null ? void 0 : _a.checkInAt;
39765
+ const todayDateOnly = dayjs22(lateTodayDate).format("YYYY-MM-DD");
39766
+ const homeDateOnly = dayjs22(resultCheckInHome).format("YYYY-MM-DD");
39767
+ if (todayDateOnly == homeDateOnly) {
39768
+ return resultCheckInHome;
39769
+ } else {
39770
+ return null;
39771
+ }
39772
+ }
39773
+ }
39774
+ }
39775
+ }),
39776
+ workNote: Field.define({
39777
+ handle: "workNote",
39778
+ name: "Keterangan",
39779
+ type: "string",
39780
+ input: "short-text",
39781
+ options: {
39782
+ note: "Keterangan presensi hari ini.",
39783
+ isVirtual: true,
39784
+ isPersisted: true
39785
+ },
39786
+ virtual: {
39787
+ dependency: {
39788
+ workStatus: 1,
39789
+ checkIns: {
39790
+ _id: 1,
39791
+ type: 1,
39792
+ checkInAt: 1
39793
+ }
39794
+ },
39795
+ reduce(o) {
39796
+ var _a, _b, _c, _d, _e, _f;
39797
+ if (!o.checkIns.length)
39798
+ return null;
39799
+ const todayDate = dayjs22((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
39800
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
39801
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
39802
+ );
39803
+ const checkInsComeNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
39804
+ (field) => field.checkInAt != null
39805
+ );
39806
+ const checkInAtCome = checkInsComeNotNull == null ? void 0 : checkInsComeNotNull.filter(
39807
+ (field) => dayjs22(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
39808
+ );
39809
+ const resultCheckInCome = checkInAtCome[0];
39810
+ const lateTodayDate = dayjs22((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
39811
+ const checkInsHome = (_b = o.checkIns) == null ? void 0 : _b.filter(
39812
+ (field) => field.type == "home"
39813
+ );
39814
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
39815
+ (field) => field.checkInAt != null
39816
+ );
39817
+ const checkInAtHome = (_c = checkInsHomeNotNull == null ? void 0 : checkInsHomeNotNull.filter(
39818
+ (field) => dayjs22(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
39819
+ )) == null ? void 0 : _c.reverse();
39820
+ const resultCheckInHome = checkInAtHome[0];
39821
+ const opts = { pattern: "yyyy-MM-dd" };
39822
+ const todayDateOnly = DateUtil$1.formatTz(
39823
+ (/* @__PURE__ */ new Date()).toISOString(),
39824
+ opts
39825
+ );
39826
+ const arrCheckInHome = (_d = o.checkIns) == null ? void 0 : _d.filter(
39827
+ (field) => field.type == "home"
39828
+ );
39829
+ const arrCheckInHomeReverse = (_e = arrCheckInHome == null ? void 0 : arrCheckInHome.reverse()[0]) == null ? void 0 : _e.checkInAt;
39830
+ const lastPresenceHome = DateUtil$1.formatTz(
39831
+ arrCheckInHomeReverse,
39832
+ opts
39833
+ );
39834
+ if (o.workStatus == "leave") {
39835
+ return "Cuti";
39836
+ } else if (o.workStatus == "off") {
39837
+ return "Belum Masuk";
39838
+ } else {
39839
+ if (todayDateOnly == lastPresenceHome) {
39840
+ const workMinutes = ((_f = DateUtil$1) == null ? void 0 : _f.diff(
39841
+ resultCheckInCome == null ? void 0 : resultCheckInCome.checkInAt,
39842
+ resultCheckInHome == null ? void 0 : resultCheckInHome.checkInAt,
39843
+ "minutes"
39844
+ )) || 0;
39845
+ const hours = Math.floor(workMinutes / 60);
39846
+ const minutes = workMinutes % 60;
39847
+ if (workMinutes < 540) {
39848
+ return `Jam kerja tidak memenuhi waktu minimal: ${hours} Jam ${minutes} minutes`;
39849
+ } else {
39850
+ return `Tepat Waktu: ${hours - 1} Jam ${minutes} minutes`;
39851
+ }
39852
+ } else {
39853
+ return "Sedang Bekerja";
39854
+ }
39855
+ }
39856
+ }
39857
+ }
38702
39858
  })
38703
39859
  },
38704
39860
  fragments: {
@@ -38737,7 +39893,11 @@ const StaffModel$1 = Model.define({
38737
39893
  display: 1,
38738
39894
  flag: 1,
38739
39895
  name: 1
38740
- }
39896
+ },
39897
+ workStatus: 1,
39898
+ workCome: 1,
39899
+ workHome: 1,
39900
+ workNote: 1
38741
39901
  },
38742
39902
  detail: {
38743
39903
  id: 1,
@@ -38778,7 +39938,11 @@ const StaffModel$1 = Model.define({
38778
39938
  branchId: 1,
38779
39939
  branchIds: 1,
38780
39940
  userId: 1,
38781
- virtualRoleIds: 1
39941
+ virtualRoleIds: 1,
39942
+ workStatus: 1,
39943
+ workCome: 1,
39944
+ workHome: 1,
39945
+ workNote: 1
38782
39946
  },
38783
39947
  fluffy: {}
38784
39948
  }
@@ -39840,6 +41004,45 @@ const CheckInSingleSupervisorView = ResourceUtil.createSingle({
39840
41004
  },
39841
41005
  path: "/pengawas/checkIns"
39842
41006
  });
41007
+ const CheckInCollectionStaffView = ResourceUtil.createCollection({
41008
+ name: "staff",
41009
+ definition: "neu:tempat:checkIn",
41010
+ title: "Riwayat Presensi",
41011
+ icon: "clock-rotate-left",
41012
+ scope: "staff",
41013
+ path: "/staff/checkIns",
41014
+ single: {
41015
+ view: "external",
41016
+ peeks: ["modal"]
41017
+ },
41018
+ columns: [
41019
+ "statusGPS",
41020
+ "display",
41021
+ "type",
41022
+ "checkInAt",
41023
+ "staff",
41024
+ "building",
41025
+ "note"
41026
+ ],
41027
+ filters: ["type", "building", "checkInAt"],
41028
+ sorts: ["checkInAt"],
41029
+ excludes: ["create", "delete", "duplicate", "click", "destroy"],
41030
+ query: () => {
41031
+ var _a;
41032
+ const { staff } = useOperasional();
41033
+ return Query.define({
41034
+ filter: {
41035
+ staffId: {
41036
+ $eq: (_a = staff.value) == null ? void 0 : _a.id
41037
+ }
41038
+ },
41039
+ sort: {
41040
+ handle: "checkInAt",
41041
+ direction: "descending"
41042
+ }
41043
+ });
41044
+ }
41045
+ });
39843
41046
  const CheckInResource = Resource.define({
39844
41047
  model: CheckInModel$1,
39845
41048
  collection: {
@@ -39880,6 +41083,10 @@ const CheckInResource = Resource.define({
39880
41083
  checkInSupervisorSingle: {
39881
41084
  path: "/pengawas/checkIns/:slug",
39882
41085
  component: CheckInSingleSupervisorView
41086
+ },
41087
+ checkInStaff: {
41088
+ path: "/staff/checkIns",
41089
+ component: CheckInCollectionStaffView
39883
41090
  }
39884
41091
  },
39885
41092
  fragments: CheckInModel$1.fragments,
@@ -40757,7 +41964,17 @@ const StaffCollectionAccessView = ResourceUtil.createCollection({
40757
41964
  view: "access",
40758
41965
  peeks: ["modal"]
40759
41966
  },
40760
- excludes: ["create", "delete", "duplicate", "destroy"]
41967
+ excludes: ["create", "delete", "duplicate", "destroy"],
41968
+ columns: [
41969
+ "workStatus",
41970
+ "name",
41971
+ "nik",
41972
+ "branch",
41973
+ "branches",
41974
+ "workCome",
41975
+ "workHome",
41976
+ "workNote"
41977
+ ]
40761
41978
  });
40762
41979
  const StaffSingleAccessView = ResourceUtil.createSingle({
40763
41980
  name: "access",
@@ -41821,6 +43038,7 @@ const mod = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
41821
43038
  AttendanceSingleSupervisorView,
41822
43039
  AttendanceSingleView,
41823
43040
  CheckInCollectionExternalView,
43041
+ CheckInCollectionStaffView,
41824
43042
  CheckInCollectionSupervisorView,
41825
43043
  CheckInCollectionView,
41826
43044
  CheckInResource,