@neutron.co.id/operasional-interfaces 1.12.6 → 1.12.8-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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);
@@ -12747,7 +12747,7 @@ const CheckInModel = model$1.Model.define({
12747
12747
  // 'neu:internalStudent',
12748
12748
  // 'neu:teacher',
12749
12749
  // ],
12750
- search: [],
12750
+ search: ["nameStaff"],
12751
12751
  cover: {
12752
12752
  title: "",
12753
12753
  fragment: {
@@ -12785,6 +12785,7 @@ const CheckInModel = model$1.Model.define({
12785
12785
  "student",
12786
12786
  "staff",
12787
12787
  "teacher",
12788
+ "branch",
12788
12789
  "building",
12789
12790
  "type",
12790
12791
  "checkInAt",
@@ -12794,6 +12795,7 @@ const CheckInModel = model$1.Model.define({
12794
12795
  "student",
12795
12796
  "staff",
12796
12797
  "teacher",
12798
+ "branch",
12797
12799
  "building",
12798
12800
  "type",
12799
12801
  "checkInAt",
@@ -12865,12 +12867,12 @@ const CheckInModel = model$1.Model.define({
12865
12867
  }),
12866
12868
  branch: model$1.Field.define({
12867
12869
  handle: "branch",
12868
- name: "Branch",
12870
+ name: "Cabang Utama",
12869
12871
  type: "relation",
12870
12872
  input: "relation",
12871
12873
  options: {
12872
- note: "Branch dari karyawan.",
12873
- placeholder: "Branch...",
12874
+ note: "Cabang utama dari karyawan.",
12875
+ placeholder: "Cabang utama...",
12874
12876
  isQuery: true,
12875
12877
  isPersisted: true
12876
12878
  },
@@ -13068,6 +13070,31 @@ const CheckInModel = model$1.Model.define({
13068
13070
  }
13069
13071
  }
13070
13072
  }
13073
+ }),
13074
+ nameStaff: model$1.Field.define({
13075
+ handle: "nameStaff",
13076
+ name: "Nama Karyawan",
13077
+ type: "string",
13078
+ input: "short-text",
13079
+ options: {
13080
+ note: "Nama Karyawan.",
13081
+ isQuery: true,
13082
+ isPersisted: true
13083
+ },
13084
+ query: {
13085
+ dependency: {
13086
+ staff: {
13087
+ _id: 1,
13088
+ name: 1
13089
+ }
13090
+ },
13091
+ reduce: async (o) => {
13092
+ var _a;
13093
+ if (!(o == null ? void 0 : o.staff))
13094
+ return "";
13095
+ return (_a = o.staff) == null ? void 0 : _a.name.toString().toLowerCase();
13096
+ }
13097
+ }
13071
13098
  })
13072
13099
  },
13073
13100
  fragments: {
@@ -13089,7 +13116,9 @@ const CheckInModel = model$1.Model.define({
13089
13116
  statusGPS: 1,
13090
13117
  createdAt: 1,
13091
13118
  updatedAt: 1,
13092
- syncedAt: 1
13119
+ syncedAt: 1,
13120
+ branch: { id: 1, name: 1 },
13121
+ nameStaff: 1
13093
13122
  },
13094
13123
  detail: {
13095
13124
  id: 1,
@@ -13113,7 +13142,10 @@ const CheckInModel = model$1.Model.define({
13113
13142
  studentId: 1,
13114
13143
  teacherId: 1,
13115
13144
  staffId: 1,
13116
- buildingId: 1
13145
+ buildingId: 1,
13146
+ branch: { id: 1, name: 1 },
13147
+ branchId: 1,
13148
+ nameStaff: 1
13117
13149
  },
13118
13150
  fluffy: {}
13119
13151
  }
@@ -13865,6 +13897,53 @@ const StatusStaff = model$1.Choice.define({
13865
13897
  }
13866
13898
  ]
13867
13899
  });
13900
+ const StatusWork = model$1.Choice.define({
13901
+ handle: "statusWork",
13902
+ name: "Work Status",
13903
+ items: [
13904
+ {
13905
+ label: "Off",
13906
+ value: "off",
13907
+ color: "danger"
13908
+ },
13909
+ {
13910
+ label: "Kerja",
13911
+ value: "work",
13912
+ color: "success"
13913
+ },
13914
+ {
13915
+ label: "Cuti",
13916
+ value: "leave",
13917
+ color: "warning"
13918
+ },
13919
+ {
13920
+ label: "Libur",
13921
+ value: "holiday",
13922
+ color: "info"
13923
+ },
13924
+ {
13925
+ label: "Pulang",
13926
+ value: "home",
13927
+ color: "info"
13928
+ }
13929
+ ]
13930
+ });
13931
+ const StatusKubik = model$1.Choice.define({
13932
+ handle: "statusKubik",
13933
+ name: "Kubik Status",
13934
+ items: [
13935
+ {
13936
+ label: "Belum Hadir",
13937
+ value: "notYetAttend",
13938
+ color: "danger"
13939
+ },
13940
+ {
13941
+ label: "Hadir",
13942
+ value: "attend",
13943
+ color: "success"
13944
+ }
13945
+ ]
13946
+ });
13868
13947
  const PriorityStatus = model$1.Choice.define({
13869
13948
  handle: "priorityStatus",
13870
13949
  name: "Priority Status",
@@ -17748,6 +17827,302 @@ const SituationTypeModel = model$1.Model.define({
17748
17827
  fluffy: {}
17749
17828
  }
17750
17829
  });
17830
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
17831
+ function getDefaultExportFromCjs(x2) {
17832
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
17833
+ }
17834
+ var dayjs_min = { exports: {} };
17835
+ (function(module2, exports2) {
17836
+ !function(t2, e2) {
17837
+ module2.exports = e2();
17838
+ }(commonjsGlobal, function() {
17839
+ 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) {
17840
+ var e3 = ["th", "st", "nd", "rd"], n2 = t3 % 100;
17841
+ return "[" + t3 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]";
17842
+ } }, m3 = function(t3, e3, n2) {
17843
+ var r2 = String(t3);
17844
+ return !r2 || r2.length >= e3 ? t3 : "" + Array(e3 + 1 - r2.length).join(n2) + t3;
17845
+ }, v = { s: m3, z: function(t3) {
17846
+ var e3 = -t3.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i3 = n2 % 60;
17847
+ return (e3 <= 0 ? "+" : "-") + m3(r2, 2, "0") + ":" + m3(i3, 2, "0");
17848
+ }, m: function t3(e3, n2) {
17849
+ if (e3.date() < n2.date())
17850
+ return -t3(n2, e3);
17851
+ 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);
17852
+ return +(-(r2 + (n2 - i3) / (s4 ? i3 - u3 : u3 - i3)) || 0);
17853
+ }, a: function(t3) {
17854
+ return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
17855
+ }, p: function(t3) {
17856
+ 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$/, "");
17857
+ }, u: function(t3) {
17858
+ return void 0 === t3;
17859
+ } }, g = "en", D3 = {};
17860
+ D3[g] = M4;
17861
+ var p = "$isDayjsObject", S4 = function(t3) {
17862
+ return t3 instanceof _ || !(!t3 || !t3[p]);
17863
+ }, w2 = function t3(e3, n2, r2) {
17864
+ var i3;
17865
+ if (!e3)
17866
+ return g;
17867
+ if ("string" == typeof e3) {
17868
+ var s4 = e3.toLowerCase();
17869
+ D3[s4] && (i3 = s4), n2 && (D3[s4] = n2, i3 = s4);
17870
+ var u3 = e3.split("-");
17871
+ if (!i3 && u3.length > 1)
17872
+ return t3(u3[0]);
17873
+ } else {
17874
+ var a4 = e3.name;
17875
+ D3[a4] = e3, i3 = a4;
17876
+ }
17877
+ return !r2 && i3 && (g = i3), i3 || !r2 && g;
17878
+ }, O2 = function(t3, e3) {
17879
+ if (S4(t3))
17880
+ return t3.clone();
17881
+ var n2 = "object" == typeof e3 ? e3 : {};
17882
+ return n2.date = t3, n2.args = arguments, new _(n2);
17883
+ }, b2 = v;
17884
+ b2.l = w2, b2.i = S4, b2.w = function(t3, e3) {
17885
+ return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
17886
+ };
17887
+ var _ = function() {
17888
+ function M5(t3) {
17889
+ this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p] = true;
17890
+ }
17891
+ var m4 = M5.prototype;
17892
+ return m4.parse = function(t3) {
17893
+ this.$d = function(t4) {
17894
+ var e3 = t4.date, n2 = t4.utc;
17895
+ if (null === e3)
17896
+ return /* @__PURE__ */ new Date(NaN);
17897
+ if (b2.u(e3))
17898
+ return /* @__PURE__ */ new Date();
17899
+ if (e3 instanceof Date)
17900
+ return new Date(e3);
17901
+ if ("string" == typeof e3 && !/Z$/i.test(e3)) {
17902
+ var r2 = e3.match($);
17903
+ if (r2) {
17904
+ var i3 = r2[2] - 1 || 0, s4 = (r2[7] || "0").substring(0, 3);
17905
+ 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);
17906
+ }
17907
+ }
17908
+ return new Date(e3);
17909
+ }(t3), this.init();
17910
+ }, m4.init = function() {
17911
+ var t3 = this.$d;
17912
+ 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();
17913
+ }, m4.$utils = function() {
17914
+ return b2;
17915
+ }, m4.isValid = function() {
17916
+ return !(this.$d.toString() === l);
17917
+ }, m4.isSame = function(t3, e3) {
17918
+ var n2 = O2(t3);
17919
+ return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
17920
+ }, m4.isAfter = function(t3, e3) {
17921
+ return O2(t3) < this.startOf(e3);
17922
+ }, m4.isBefore = function(t3, e3) {
17923
+ return this.endOf(e3) < O2(t3);
17924
+ }, m4.$g = function(t3, e3, n2) {
17925
+ return b2.u(t3) ? this[e3] : this.set(n2, t3);
17926
+ }, m4.unix = function() {
17927
+ return Math.floor(this.valueOf() / 1e3);
17928
+ }, m4.valueOf = function() {
17929
+ return this.$d.getTime();
17930
+ }, m4.startOf = function(t3, e3) {
17931
+ var n2 = this, r2 = !!b2.u(e3) || e3, f2 = b2.p(t3), l2 = function(t4, e4) {
17932
+ var i3 = b2.w(n2.$u ? Date.UTC(n2.$y, e4, t4) : new Date(n2.$y, e4, t4), n2);
17933
+ return r2 ? i3 : i3.endOf(a3);
17934
+ }, $2 = function(t4, e4) {
17935
+ return b2.w(n2.toDate()[t4].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
17936
+ }, y4 = this.$W, M6 = this.$M, m5 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
17937
+ switch (f2) {
17938
+ case h3:
17939
+ return r2 ? l2(1, 0) : l2(31, 11);
17940
+ case c2:
17941
+ return r2 ? l2(1, M6) : l2(0, M6 + 1);
17942
+ case o:
17943
+ var g2 = this.$locale().weekStart || 0, D4 = (y4 < g2 ? y4 + 7 : y4) - g2;
17944
+ return l2(r2 ? m5 - D4 : m5 + (6 - D4), M6);
17945
+ case a3:
17946
+ case d3:
17947
+ return $2(v2 + "Hours", 0);
17948
+ case u2:
17949
+ return $2(v2 + "Minutes", 1);
17950
+ case s3:
17951
+ return $2(v2 + "Seconds", 2);
17952
+ case i2:
17953
+ return $2(v2 + "Milliseconds", 3);
17954
+ default:
17955
+ return this.clone();
17956
+ }
17957
+ }, m4.endOf = function(t3) {
17958
+ return this.startOf(t3, false);
17959
+ }, m4.$set = function(t3, e3) {
17960
+ 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;
17961
+ if (o2 === c2 || o2 === h3) {
17962
+ var y4 = this.clone().set(d3, 1);
17963
+ y4.$d[l2]($2), y4.init(), this.$d = y4.set(d3, Math.min(this.$D, y4.daysInMonth())).$d;
17964
+ } else
17965
+ l2 && this.$d[l2]($2);
17966
+ return this.init(), this;
17967
+ }, m4.set = function(t3, e3) {
17968
+ return this.clone().$set(t3, e3);
17969
+ }, m4.get = function(t3) {
17970
+ return this[b2.p(t3)]();
17971
+ }, m4.add = function(r2, f2) {
17972
+ var d4, l2 = this;
17973
+ r2 = Number(r2);
17974
+ var $2 = b2.p(f2), y4 = function(t3) {
17975
+ var e3 = O2(l2);
17976
+ return b2.w(e3.date(e3.date() + Math.round(t3 * r2)), l2);
17977
+ };
17978
+ if ($2 === c2)
17979
+ return this.set(c2, this.$M + r2);
17980
+ if ($2 === h3)
17981
+ return this.set(h3, this.$y + r2);
17982
+ if ($2 === a3)
17983
+ return y4(1);
17984
+ if ($2 === o)
17985
+ return y4(7);
17986
+ var M6 = (d4 = {}, d4[s3] = e2, d4[u2] = n, d4[i2] = t2, d4)[$2] || 1, m5 = this.$d.getTime() + r2 * M6;
17987
+ return b2.w(m5, this);
17988
+ }, m4.subtract = function(t3, e3) {
17989
+ return this.add(-1 * t3, e3);
17990
+ }, m4.format = function(t3) {
17991
+ var e3 = this, n2 = this.$locale();
17992
+ if (!this.isValid())
17993
+ return n2.invalidDate || l;
17994
+ 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) {
17995
+ return t4 && (t4[n3] || t4(e3, r2)) || i4[n3].slice(0, s5);
17996
+ }, d4 = function(t4) {
17997
+ return b2.s(s4 % 12 || 12, t4, "0");
17998
+ }, $2 = f2 || function(t4, e4, n3) {
17999
+ var r3 = t4 < 12 ? "AM" : "PM";
18000
+ return n3 ? r3.toLowerCase() : r3;
18001
+ };
18002
+ return r2.replace(y3, function(t4, r3) {
18003
+ return r3 || function(t5) {
18004
+ switch (t5) {
18005
+ case "YY":
18006
+ return String(e3.$y).slice(-2);
18007
+ case "YYYY":
18008
+ return b2.s(e3.$y, 4, "0");
18009
+ case "M":
18010
+ return a4 + 1;
18011
+ case "MM":
18012
+ return b2.s(a4 + 1, 2, "0");
18013
+ case "MMM":
18014
+ return h4(n2.monthsShort, a4, c3, 3);
18015
+ case "MMMM":
18016
+ return h4(c3, a4);
18017
+ case "D":
18018
+ return e3.$D;
18019
+ case "DD":
18020
+ return b2.s(e3.$D, 2, "0");
18021
+ case "d":
18022
+ return String(e3.$W);
18023
+ case "dd":
18024
+ return h4(n2.weekdaysMin, e3.$W, o2, 2);
18025
+ case "ddd":
18026
+ return h4(n2.weekdaysShort, e3.$W, o2, 3);
18027
+ case "dddd":
18028
+ return o2[e3.$W];
18029
+ case "H":
18030
+ return String(s4);
18031
+ case "HH":
18032
+ return b2.s(s4, 2, "0");
18033
+ case "h":
18034
+ return d4(1);
18035
+ case "hh":
18036
+ return d4(2);
18037
+ case "a":
18038
+ return $2(s4, u3, true);
18039
+ case "A":
18040
+ return $2(s4, u3, false);
18041
+ case "m":
18042
+ return String(u3);
18043
+ case "mm":
18044
+ return b2.s(u3, 2, "0");
18045
+ case "s":
18046
+ return String(e3.$s);
18047
+ case "ss":
18048
+ return b2.s(e3.$s, 2, "0");
18049
+ case "SSS":
18050
+ return b2.s(e3.$ms, 3, "0");
18051
+ case "Z":
18052
+ return i3;
18053
+ }
18054
+ return null;
18055
+ }(t4) || i3.replace(":", "");
18056
+ });
18057
+ }, m4.utcOffset = function() {
18058
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
18059
+ }, m4.diff = function(r2, d4, l2) {
18060
+ var $2, y4 = this, M6 = b2.p(d4), m5 = O2(r2), v2 = (m5.utcOffset() - this.utcOffset()) * e2, g2 = this - m5, D4 = function() {
18061
+ return b2.m(y4, m5);
18062
+ };
18063
+ switch (M6) {
18064
+ case h3:
18065
+ $2 = D4() / 12;
18066
+ break;
18067
+ case c2:
18068
+ $2 = D4();
18069
+ break;
18070
+ case f:
18071
+ $2 = D4() / 3;
18072
+ break;
18073
+ case o:
18074
+ $2 = (g2 - v2) / 6048e5;
18075
+ break;
18076
+ case a3:
18077
+ $2 = (g2 - v2) / 864e5;
18078
+ break;
18079
+ case u2:
18080
+ $2 = g2 / n;
18081
+ break;
18082
+ case s3:
18083
+ $2 = g2 / e2;
18084
+ break;
18085
+ case i2:
18086
+ $2 = g2 / t2;
18087
+ break;
18088
+ default:
18089
+ $2 = g2;
18090
+ }
18091
+ return l2 ? $2 : b2.a($2);
18092
+ }, m4.daysInMonth = function() {
18093
+ return this.endOf(c2).$D;
18094
+ }, m4.$locale = function() {
18095
+ return D3[this.$L];
18096
+ }, m4.locale = function(t3, e3) {
18097
+ if (!t3)
18098
+ return this.$L;
18099
+ var n2 = this.clone(), r2 = w2(t3, e3, true);
18100
+ return r2 && (n2.$L = r2), n2;
18101
+ }, m4.clone = function() {
18102
+ return b2.w(this.$d, this);
18103
+ }, m4.toDate = function() {
18104
+ return new Date(this.valueOf());
18105
+ }, m4.toJSON = function() {
18106
+ return this.isValid() ? this.toISOString() : null;
18107
+ }, m4.toISOString = function() {
18108
+ return this.$d.toISOString();
18109
+ }, m4.toString = function() {
18110
+ return this.$d.toUTCString();
18111
+ }, M5;
18112
+ }(), k2 = _.prototype;
18113
+ return O2.prototype = k2, [["$ms", r], ["$s", i2], ["$m", s3], ["$H", u2], ["$W", a3], ["$M", c2], ["$y", h3], ["$D", d3]].forEach(function(t3) {
18114
+ k2[t3[1]] = function(e3) {
18115
+ return this.$g(e3, t3[0], t3[1]);
18116
+ };
18117
+ }), O2.extend = function(t3, e3) {
18118
+ return t3.$i || (t3(e3, _, O2), t3.$i = true), O2;
18119
+ }, O2.locale = w2, O2.isDayjs = S4, O2.unix = function(t3) {
18120
+ return O2(1e3 * t3);
18121
+ }, O2.en = D3[g], O2.Ls = D3, O2.p = {}, O2;
18122
+ });
18123
+ })(dayjs_min);
18124
+ var dayjs_minExports = dayjs_min.exports;
18125
+ const dayjs2 = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
17751
18126
  const StaffModel$1 = model$1.Model.define({
17752
18127
  name: "Staff",
17753
18128
  definition: "neu:personalia:staff",
@@ -17954,6 +18329,342 @@ const StaffModel$1 = model$1.Model.define({
17954
18329
  return roleIds;
17955
18330
  }
17956
18331
  }
18332
+ }),
18333
+ workStatus: model$1.Field.define({
18334
+ handle: "workStatus",
18335
+ name: "Status",
18336
+ type: "string",
18337
+ input: "select",
18338
+ options: {
18339
+ note: "Status dari karyawan.",
18340
+ default: "off",
18341
+ enums: StatusWork.values,
18342
+ choices: StatusWork.items,
18343
+ isVirtual: true,
18344
+ isPersisted: true
18345
+ },
18346
+ virtual: {
18347
+ dependency: {
18348
+ checkIns: {
18349
+ _id: 1,
18350
+ type: 1,
18351
+ checkInAt: 1
18352
+ },
18353
+ submitStaffAttendances: {
18354
+ _id: 1,
18355
+ type: 1,
18356
+ startedAt: 1,
18357
+ status: 1
18358
+ }
18359
+ },
18360
+ reduce(o) {
18361
+ var _a;
18362
+ if (!o.checkIns.length)
18363
+ return "off";
18364
+ const opts = { pattern: "yyyy-MM-dd" };
18365
+ const todayDate = date.DateUtil.formatTz((/* @__PURE__ */ new Date()).toISOString(), opts);
18366
+ const arrCheckIn = o.checkIns.filter(
18367
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18368
+ );
18369
+ const arrCheckInReverse = arrCheckIn.reverse();
18370
+ const checkInAtReverse = arrCheckInReverse[0];
18371
+ const lastPresence = date.DateUtil.formatTz(
18372
+ checkInAtReverse == null ? void 0 : checkInAtReverse.checkInAt,
18373
+ opts
18374
+ );
18375
+ const arrCheckInHome = o.checkIns.filter(
18376
+ (field) => field.type == "home"
18377
+ );
18378
+ const arrCheckInHomeReverse = (_a = arrCheckInHome.reverse()[0]) == null ? void 0 : _a.checkInAt;
18379
+ const lastPresenceHome = date.DateUtil.formatTz(
18380
+ arrCheckInHomeReverse,
18381
+ opts
18382
+ );
18383
+ const arrAttendance = o.submitStaffAttendances.filter(
18384
+ (field) => field.type == "leave" && field.status == "approved"
18385
+ ).map((field) => date.DateUtil.formatTz(field.startedAt, opts));
18386
+ if (arrAttendance.includes(todayDate)) {
18387
+ return "leave";
18388
+ } else {
18389
+ if (todayDate == lastPresence) {
18390
+ if (todayDate == lastPresenceHome) {
18391
+ return "home";
18392
+ } else {
18393
+ return "work";
18394
+ }
18395
+ } else {
18396
+ return "off";
18397
+ }
18398
+ }
18399
+ }
18400
+ }
18401
+ }),
18402
+ workCome: model$1.Field.define({
18403
+ handle: "workCome",
18404
+ name: "Masuk",
18405
+ type: "date",
18406
+ input: "date2",
18407
+ display: "date",
18408
+ options: {
18409
+ note: "Presensi masuk hari ini.",
18410
+ isVirtual: true,
18411
+ isPersisted: true
18412
+ },
18413
+ virtual: {
18414
+ dependency: {
18415
+ checkIns: {
18416
+ _id: 1,
18417
+ type: 1,
18418
+ checkInAt: 1
18419
+ }
18420
+ },
18421
+ reduce(o) {
18422
+ var _a, _b;
18423
+ if (!o.checkIns.length)
18424
+ return null;
18425
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18426
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18427
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18428
+ );
18429
+ const checkInsNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18430
+ (field) => field.checkInAt != null
18431
+ );
18432
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18433
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18434
+ );
18435
+ if (!checkInAtCome.length) {
18436
+ return null;
18437
+ } else {
18438
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
18439
+ return resultCheckInCome;
18440
+ }
18441
+ }
18442
+ }
18443
+ }),
18444
+ workHome: model$1.Field.define({
18445
+ handle: "workHome",
18446
+ name: "Pulang",
18447
+ type: "date",
18448
+ input: "date2",
18449
+ display: "date",
18450
+ options: {
18451
+ note: "Presensi pulang hari ini.",
18452
+ isVirtual: true,
18453
+ isPersisted: true
18454
+ },
18455
+ virtual: {
18456
+ dependency: {
18457
+ checkIns: {
18458
+ _id: 1,
18459
+ type: 1,
18460
+ checkInAt: 1
18461
+ }
18462
+ },
18463
+ reduce(o) {
18464
+ var _a;
18465
+ if (!o.checkIns.length)
18466
+ return null;
18467
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18468
+ const checkInsHome = o.checkIns.filter(
18469
+ (field) => field.type == "home"
18470
+ );
18471
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18472
+ (field) => field.checkInAt != null
18473
+ );
18474
+ const checkInAtHome = checkInsHomeNotNull.filter(
18475
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18476
+ ).reverse();
18477
+ if (!checkInAtHome.length) {
18478
+ return null;
18479
+ } else {
18480
+ const resultCheckInHome = (_a = checkInAtHome[0]) == null ? void 0 : _a.checkInAt;
18481
+ const todayDateOnly = dayjs2(lateTodayDate).format("YYYY-MM-DD");
18482
+ const homeDateOnly = dayjs2(resultCheckInHome).format("YYYY-MM-DD");
18483
+ if (todayDateOnly == homeDateOnly) {
18484
+ return resultCheckInHome;
18485
+ } else {
18486
+ return null;
18487
+ }
18488
+ }
18489
+ }
18490
+ }
18491
+ }),
18492
+ workNote: model$1.Field.define({
18493
+ handle: "workNote",
18494
+ name: "Keterangan",
18495
+ type: "string",
18496
+ input: "short-text",
18497
+ options: {
18498
+ note: "Keterangan presensi hari ini.",
18499
+ isVirtual: true,
18500
+ isPersisted: true
18501
+ },
18502
+ virtual: {
18503
+ dependency: {
18504
+ workStatus: 1,
18505
+ checkIns: {
18506
+ _id: 1,
18507
+ type: 1,
18508
+ checkInAt: 1
18509
+ }
18510
+ },
18511
+ reduce(o) {
18512
+ var _a, _b, _c, _d, _e, _f;
18513
+ if (!o.checkIns.length)
18514
+ return null;
18515
+ const todayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(0).minute(0).second(0).millisecond(0).toISOString();
18516
+ const checkInsCome = (_a = o.checkIns) == null ? void 0 : _a.filter(
18517
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18518
+ );
18519
+ const checkInsComeNotNull = checkInsCome == null ? void 0 : checkInsCome.filter(
18520
+ (field) => field.checkInAt != null
18521
+ );
18522
+ const checkInAtCome = checkInsComeNotNull == null ? void 0 : checkInsComeNotNull.filter(
18523
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18524
+ );
18525
+ const resultCheckInCome = checkInAtCome[0];
18526
+ const lateTodayDate = dayjs2((/* @__PURE__ */ new Date()).toISOString()).hour(23).minute(0).second(0).millisecond(0).toISOString();
18527
+ const checkInsHome = (_b = o.checkIns) == null ? void 0 : _b.filter(
18528
+ (field) => field.type == "home"
18529
+ );
18530
+ const checkInsHomeNotNull = checkInsHome == null ? void 0 : checkInsHome.filter(
18531
+ (field) => field.checkInAt != null
18532
+ );
18533
+ const checkInAtHome = (_c = checkInsHomeNotNull == null ? void 0 : checkInsHomeNotNull.filter(
18534
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() < lateTodayDate
18535
+ )) == null ? void 0 : _c.reverse();
18536
+ const resultCheckInHome = checkInAtHome[0];
18537
+ const opts = { pattern: "yyyy-MM-dd" };
18538
+ const todayDateOnly = date.DateUtil.formatTz(
18539
+ (/* @__PURE__ */ new Date()).toISOString(),
18540
+ opts
18541
+ );
18542
+ const arrCheckInHome = (_d = o.checkIns) == null ? void 0 : _d.filter(
18543
+ (field) => field.type == "home"
18544
+ );
18545
+ const arrCheckInHomeReverse = (_e = arrCheckInHome == null ? void 0 : arrCheckInHome.reverse()[0]) == null ? void 0 : _e.checkInAt;
18546
+ const lastPresenceHome = date.DateUtil.formatTz(
18547
+ arrCheckInHomeReverse,
18548
+ opts
18549
+ );
18550
+ if (o.workStatus == "leave") {
18551
+ return "Cuti";
18552
+ } else if (o.workStatus == "off") {
18553
+ return "Belum Masuk";
18554
+ } else {
18555
+ if (todayDateOnly == lastPresenceHome) {
18556
+ const workMinutes = ((_f = date.DateUtil) == null ? void 0 : _f.diff(
18557
+ resultCheckInCome == null ? void 0 : resultCheckInCome.checkInAt,
18558
+ resultCheckInHome == null ? void 0 : resultCheckInHome.checkInAt,
18559
+ "minutes"
18560
+ )) || 0;
18561
+ const hours = Math.floor(workMinutes / 60);
18562
+ const minutes = workMinutes % 60;
18563
+ if (workMinutes < 540) {
18564
+ return `Jam kerja tidak memenuhi waktu minimal: ${hours} Jam ${minutes} minutes`;
18565
+ } else {
18566
+ return `Tepat Waktu: ${hours - 1} Jam ${minutes} minutes`;
18567
+ }
18568
+ } else {
18569
+ return "Sedang Bekerja";
18570
+ }
18571
+ }
18572
+ }
18573
+ }
18574
+ }),
18575
+ /* EVENT KUBIK */
18576
+ kubikStatus: model$1.Field.define({
18577
+ handle: "kubikStatus",
18578
+ name: "Status Kehadiran",
18579
+ type: "string",
18580
+ input: "select",
18581
+ options: {
18582
+ note: "Status kehadiran acara.",
18583
+ default: "notYetAttend",
18584
+ enums: StatusKubik.values,
18585
+ choices: StatusKubik.items,
18586
+ isVirtual: true,
18587
+ isPersisted: true
18588
+ },
18589
+ virtual: {
18590
+ dependency: {
18591
+ checkIns: {
18592
+ _id: 1,
18593
+ type: 1,
18594
+ checkInAt: 1,
18595
+ buildingId: 1
18596
+ }
18597
+ },
18598
+ reduce(o) {
18599
+ var _a;
18600
+ if (!o.checkIns.length)
18601
+ return "notYetAttend";
18602
+ const sekarang = dayjs2("2024-02-22T00:00:00.000Z").hour(0).minute(0).second(0).millisecond(0).toISOString();
18603
+ const arrCheckIn = (_a = o.checkIns) == null ? void 0 : _a.filter(
18604
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18605
+ );
18606
+ const arrKubikCheckIn = arrCheckIn == null ? void 0 : arrCheckIn.filter(
18607
+ (field) => field.buildingId == "65d2c2281feb875328d716ce"
18608
+ );
18609
+ const checkInsNotNull = arrKubikCheckIn == null ? void 0 : arrKubikCheckIn.filter(
18610
+ (field) => field.checkInAt != null
18611
+ );
18612
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18613
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > sekarang
18614
+ );
18615
+ if (!checkInAtCome.length) {
18616
+ return "notYetAttend";
18617
+ } else {
18618
+ return "attend";
18619
+ }
18620
+ }
18621
+ }
18622
+ }),
18623
+ kubikAt: model$1.Field.define({
18624
+ handle: "kubikAt",
18625
+ name: "Waktu Kehadiran",
18626
+ type: "date",
18627
+ input: "date2",
18628
+ display: "date",
18629
+ options: {
18630
+ note: "Presensi masuk acara.",
18631
+ isVirtual: true,
18632
+ isPersisted: true
18633
+ },
18634
+ virtual: {
18635
+ dependency: {
18636
+ checkIns: {
18637
+ _id: 1,
18638
+ type: 1,
18639
+ checkInAt: 1,
18640
+ buildingId: 1
18641
+ }
18642
+ },
18643
+ reduce(o) {
18644
+ var _a, _b;
18645
+ if (!o.checkIns.length)
18646
+ return null;
18647
+ const sekarang = dayjs2("2024-02-22T00:00:00.000Z").hour(0).minute(0).second(0).millisecond(0).toISOString();
18648
+ const arrCheckIn = (_a = o.checkIns) == null ? void 0 : _a.filter(
18649
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18650
+ );
18651
+ const arrKubikCheckIn = arrCheckIn == null ? void 0 : arrCheckIn.filter(
18652
+ (field) => field.buildingId == "65d2c2281feb875328d716ce"
18653
+ );
18654
+ const checkInsNotNull = arrKubikCheckIn == null ? void 0 : arrKubikCheckIn.filter(
18655
+ (field) => field.checkInAt != null
18656
+ );
18657
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18658
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > sekarang
18659
+ );
18660
+ if (!checkInAtCome.length) {
18661
+ return null;
18662
+ } else {
18663
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
18664
+ return resultCheckInCome;
18665
+ }
18666
+ }
18667
+ }
17957
18668
  })
17958
18669
  },
17959
18670
  fragments: {
@@ -17992,7 +18703,13 @@ const StaffModel$1 = model$1.Model.define({
17992
18703
  display: 1,
17993
18704
  flag: 1,
17994
18705
  name: 1
17995
- }
18706
+ },
18707
+ workStatus: 1,
18708
+ workCome: 1,
18709
+ workHome: 1,
18710
+ workNote: 1,
18711
+ kubikStatus: 1,
18712
+ kubikAt: 1
17996
18713
  },
17997
18714
  detail: {
17998
18715
  id: 1,
@@ -18033,7 +18750,13 @@ const StaffModel$1 = model$1.Model.define({
18033
18750
  branchId: 1,
18034
18751
  branchIds: 1,
18035
18752
  userId: 1,
18036
- virtualRoleIds: 1
18753
+ virtualRoleIds: 1,
18754
+ workStatus: 1,
18755
+ workCome: 1,
18756
+ workHome: 1,
18757
+ workNote: 1,
18758
+ kubikStatus: 1,
18759
+ kubikAt: 1
18037
18760
  },
18038
18761
  fluffy: {}
18039
18762
  }