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

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.
@@ -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
  }
@@ -13896,6 +13928,22 @@ const StatusWork = model$1.Choice.define({
13896
13928
  }
13897
13929
  ]
13898
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
+ });
13899
13947
  const PriorityStatus = model$1.Choice.define({
13900
13948
  handle: "priorityStatus",
13901
13949
  name: "Priority Status",
@@ -18289,7 +18337,7 @@ const StaffModel$1 = model$1.Model.define({
18289
18337
  input: "select",
18290
18338
  options: {
18291
18339
  note: "Status dari karyawan.",
18292
- default: "notActive",
18340
+ default: "off",
18293
18341
  enums: StatusWork.values,
18294
18342
  choices: StatusWork.items,
18295
18343
  isVirtual: true,
@@ -18384,7 +18432,6 @@ const StaffModel$1 = model$1.Model.define({
18384
18432
  const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18385
18433
  (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18386
18434
  );
18387
- console.log({ checkInAtCome });
18388
18435
  if (!checkInAtCome.length) {
18389
18436
  return null;
18390
18437
  } else {
@@ -18524,6 +18571,100 @@ const StaffModel$1 = model$1.Model.define({
18524
18571
  }
18525
18572
  }
18526
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
+ }
18527
18668
  })
18528
18669
  },
18529
18670
  fragments: {
@@ -18566,7 +18707,9 @@ const StaffModel$1 = model$1.Model.define({
18566
18707
  workStatus: 1,
18567
18708
  workCome: 1,
18568
18709
  workHome: 1,
18569
- workNote: 1
18710
+ workNote: 1,
18711
+ kubikStatus: 1,
18712
+ kubikAt: 1
18570
18713
  },
18571
18714
  detail: {
18572
18715
  id: 1,
@@ -18611,7 +18754,9 @@ const StaffModel$1 = model$1.Model.define({
18611
18754
  workStatus: 1,
18612
18755
  workCome: 1,
18613
18756
  workHome: 1,
18614
- workNote: 1
18757
+ workNote: 1,
18758
+ kubikStatus: 1,
18759
+ kubikAt: 1
18615
18760
  },
18616
18761
  fluffy: {}
18617
18762
  }
@@ -12745,7 +12745,7 @@ const CheckInModel = Model.define({
12745
12745
  // 'neu:internalStudent',
12746
12746
  // 'neu:teacher',
12747
12747
  // ],
12748
- search: [],
12748
+ search: ["nameStaff"],
12749
12749
  cover: {
12750
12750
  title: "",
12751
12751
  fragment: {
@@ -12783,6 +12783,7 @@ const CheckInModel = Model.define({
12783
12783
  "student",
12784
12784
  "staff",
12785
12785
  "teacher",
12786
+ "branch",
12786
12787
  "building",
12787
12788
  "type",
12788
12789
  "checkInAt",
@@ -12792,6 +12793,7 @@ const CheckInModel = Model.define({
12792
12793
  "student",
12793
12794
  "staff",
12794
12795
  "teacher",
12796
+ "branch",
12795
12797
  "building",
12796
12798
  "type",
12797
12799
  "checkInAt",
@@ -12863,12 +12865,12 @@ const CheckInModel = Model.define({
12863
12865
  }),
12864
12866
  branch: Field.define({
12865
12867
  handle: "branch",
12866
- name: "Branch",
12868
+ name: "Cabang Utama",
12867
12869
  type: "relation",
12868
12870
  input: "relation",
12869
12871
  options: {
12870
- note: "Branch dari karyawan.",
12871
- placeholder: "Branch...",
12872
+ note: "Cabang utama dari karyawan.",
12873
+ placeholder: "Cabang utama...",
12872
12874
  isQuery: true,
12873
12875
  isPersisted: true
12874
12876
  },
@@ -13066,6 +13068,31 @@ const CheckInModel = Model.define({
13066
13068
  }
13067
13069
  }
13068
13070
  }
13071
+ }),
13072
+ nameStaff: Field.define({
13073
+ handle: "nameStaff",
13074
+ name: "Nama Karyawan",
13075
+ type: "string",
13076
+ input: "short-text",
13077
+ options: {
13078
+ note: "Nama Karyawan.",
13079
+ isQuery: true,
13080
+ isPersisted: true
13081
+ },
13082
+ query: {
13083
+ dependency: {
13084
+ staff: {
13085
+ _id: 1,
13086
+ name: 1
13087
+ }
13088
+ },
13089
+ reduce: async (o) => {
13090
+ var _a;
13091
+ if (!(o == null ? void 0 : o.staff))
13092
+ return "";
13093
+ return (_a = o.staff) == null ? void 0 : _a.name.toString().toLowerCase();
13094
+ }
13095
+ }
13069
13096
  })
13070
13097
  },
13071
13098
  fragments: {
@@ -13087,7 +13114,9 @@ const CheckInModel = Model.define({
13087
13114
  statusGPS: 1,
13088
13115
  createdAt: 1,
13089
13116
  updatedAt: 1,
13090
- syncedAt: 1
13117
+ syncedAt: 1,
13118
+ branch: { id: 1, name: 1 },
13119
+ nameStaff: 1
13091
13120
  },
13092
13121
  detail: {
13093
13122
  id: 1,
@@ -13111,7 +13140,10 @@ const CheckInModel = Model.define({
13111
13140
  studentId: 1,
13112
13141
  teacherId: 1,
13113
13142
  staffId: 1,
13114
- buildingId: 1
13143
+ buildingId: 1,
13144
+ branch: { id: 1, name: 1 },
13145
+ branchId: 1,
13146
+ nameStaff: 1
13115
13147
  },
13116
13148
  fluffy: {}
13117
13149
  }
@@ -13894,6 +13926,22 @@ const StatusWork = Choice.define({
13894
13926
  }
13895
13927
  ]
13896
13928
  });
13929
+ const StatusKubik = Choice.define({
13930
+ handle: "statusKubik",
13931
+ name: "Kubik Status",
13932
+ items: [
13933
+ {
13934
+ label: "Belum Hadir",
13935
+ value: "notYetAttend",
13936
+ color: "danger"
13937
+ },
13938
+ {
13939
+ label: "Hadir",
13940
+ value: "attend",
13941
+ color: "success"
13942
+ }
13943
+ ]
13944
+ });
13897
13945
  const PriorityStatus = Choice.define({
13898
13946
  handle: "priorityStatus",
13899
13947
  name: "Priority Status",
@@ -18287,7 +18335,7 @@ const StaffModel$1 = Model.define({
18287
18335
  input: "select",
18288
18336
  options: {
18289
18337
  note: "Status dari karyawan.",
18290
- default: "notActive",
18338
+ default: "off",
18291
18339
  enums: StatusWork.values,
18292
18340
  choices: StatusWork.items,
18293
18341
  isVirtual: true,
@@ -18382,7 +18430,6 @@ const StaffModel$1 = Model.define({
18382
18430
  const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18383
18431
  (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > todayDate
18384
18432
  );
18385
- console.log({ checkInAtCome });
18386
18433
  if (!checkInAtCome.length) {
18387
18434
  return null;
18388
18435
  } else {
@@ -18522,6 +18569,100 @@ const StaffModel$1 = Model.define({
18522
18569
  }
18523
18570
  }
18524
18571
  }
18572
+ }),
18573
+ /* EVENT KUBIK */
18574
+ kubikStatus: Field.define({
18575
+ handle: "kubikStatus",
18576
+ name: "Status Kehadiran",
18577
+ type: "string",
18578
+ input: "select",
18579
+ options: {
18580
+ note: "Status kehadiran acara.",
18581
+ default: "notYetAttend",
18582
+ enums: StatusKubik.values,
18583
+ choices: StatusKubik.items,
18584
+ isVirtual: true,
18585
+ isPersisted: true
18586
+ },
18587
+ virtual: {
18588
+ dependency: {
18589
+ checkIns: {
18590
+ _id: 1,
18591
+ type: 1,
18592
+ checkInAt: 1,
18593
+ buildingId: 1
18594
+ }
18595
+ },
18596
+ reduce(o) {
18597
+ var _a;
18598
+ if (!o.checkIns.length)
18599
+ return "notYetAttend";
18600
+ const sekarang = dayjs2("2024-02-22T00:00:00.000Z").hour(0).minute(0).second(0).millisecond(0).toISOString();
18601
+ const arrCheckIn = (_a = o.checkIns) == null ? void 0 : _a.filter(
18602
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18603
+ );
18604
+ const arrKubikCheckIn = arrCheckIn == null ? void 0 : arrCheckIn.filter(
18605
+ (field) => field.buildingId == "65d2c2281feb875328d716ce"
18606
+ );
18607
+ const checkInsNotNull = arrKubikCheckIn == null ? void 0 : arrKubikCheckIn.filter(
18608
+ (field) => field.checkInAt != null
18609
+ );
18610
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18611
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > sekarang
18612
+ );
18613
+ if (!checkInAtCome.length) {
18614
+ return "notYetAttend";
18615
+ } else {
18616
+ return "attend";
18617
+ }
18618
+ }
18619
+ }
18620
+ }),
18621
+ kubikAt: Field.define({
18622
+ handle: "kubikAt",
18623
+ name: "Waktu Kehadiran",
18624
+ type: "date",
18625
+ input: "date2",
18626
+ display: "date",
18627
+ options: {
18628
+ note: "Presensi masuk acara.",
18629
+ isVirtual: true,
18630
+ isPersisted: true
18631
+ },
18632
+ virtual: {
18633
+ dependency: {
18634
+ checkIns: {
18635
+ _id: 1,
18636
+ type: 1,
18637
+ checkInAt: 1,
18638
+ buildingId: 1
18639
+ }
18640
+ },
18641
+ reduce(o) {
18642
+ var _a, _b;
18643
+ if (!o.checkIns.length)
18644
+ return null;
18645
+ const sekarang = dayjs2("2024-02-22T00:00:00.000Z").hour(0).minute(0).second(0).millisecond(0).toISOString();
18646
+ const arrCheckIn = (_a = o.checkIns) == null ? void 0 : _a.filter(
18647
+ (field) => field.type == "in" || field.type == "checkpoint" || field.type == "checkin"
18648
+ );
18649
+ const arrKubikCheckIn = arrCheckIn == null ? void 0 : arrCheckIn.filter(
18650
+ (field) => field.buildingId == "65d2c2281feb875328d716ce"
18651
+ );
18652
+ const checkInsNotNull = arrKubikCheckIn == null ? void 0 : arrKubikCheckIn.filter(
18653
+ (field) => field.checkInAt != null
18654
+ );
18655
+ const checkInAtCome = checkInsNotNull == null ? void 0 : checkInsNotNull.filter(
18656
+ (field) => dayjs2(field == null ? void 0 : field.checkInAt).add(7, "hour").toISOString() > sekarang
18657
+ );
18658
+ if (!checkInAtCome.length) {
18659
+ return null;
18660
+ } else {
18661
+ const resultCheckInCome = (_b = checkInAtCome[0]) == null ? void 0 : _b.checkInAt;
18662
+ return resultCheckInCome;
18663
+ }
18664
+ }
18665
+ }
18525
18666
  })
18526
18667
  },
18527
18668
  fragments: {
@@ -18564,7 +18705,9 @@ const StaffModel$1 = Model.define({
18564
18705
  workStatus: 1,
18565
18706
  workCome: 1,
18566
18707
  workHome: 1,
18567
- workNote: 1
18708
+ workNote: 1,
18709
+ kubikStatus: 1,
18710
+ kubikAt: 1
18568
18711
  },
18569
18712
  detail: {
18570
18713
  id: 1,
@@ -18609,7 +18752,9 @@ const StaffModel$1 = Model.define({
18609
18752
  workStatus: 1,
18610
18753
  workCome: 1,
18611
18754
  workHome: 1,
18612
- workNote: 1
18755
+ workNote: 1,
18756
+ kubikStatus: 1,
18757
+ kubikAt: 1
18613
18758
  },
18614
18759
  fluffy: {}
18615
18760
  }