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

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.
package/build/index.cjs CHANGED
@@ -3594,19 +3594,6 @@ function toDate(argument) {
3594
3594
  return new Date(NaN);
3595
3595
  }
3596
3596
  }
3597
- function addDays(dirtyDate, dirtyAmount) {
3598
- requiredArgs(2, arguments);
3599
- var date = toDate(dirtyDate);
3600
- var amount = toInteger(dirtyAmount);
3601
- if (isNaN(amount)) {
3602
- return new Date(NaN);
3603
- }
3604
- if (!amount) {
3605
- return date;
3606
- }
3607
- date.setDate(date.getDate() + amount);
3608
- return date;
3609
- }
3610
3597
  function addMilliseconds(dirtyDate, dirtyAmount) {
3611
3598
  requiredArgs(2, arguments);
3612
3599
  var timestamp = toDate(dirtyDate).getTime();
@@ -5619,7 +5606,7 @@ function mitt(n) {
5619
5606
  } };
5620
5607
  }
5621
5608
  const bus = mitt();
5622
- const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-79e7e9e5"), n = n(), vue.popScopeId(), n);
5609
+ const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-d5ce5adb"), n = n(), vue.popScopeId(), n);
5623
5610
  const _hoisted_1$7 = { id: "view-checkIns" };
5624
5611
  const _hoisted_2$4 = { class: "summary" };
5625
5612
  const _hoisted_3$1 = { class: "wrapper" };
@@ -5692,7 +5679,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5692
5679
  // $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
5693
5680
  $and: [
5694
5681
  { staffId: (_a = staff.value) == null ? void 0 : _a.id },
5695
- { checkInAt: { $gte: addDays(startOfToday(), 1) } },
5682
+ { checkInAt: { $gte: startOfToday() } },
5696
5683
  { checkInAt: { $lte: endOfToday() } }
5697
5684
  ]
5698
5685
  }
@@ -5939,8 +5926,8 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5939
5926
  };
5940
5927
  }
5941
5928
  });
5942
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_79e7e9e5_lang = "";
5943
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-79e7e9e5"]]);
5929
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_d5ce5adb_lang = "";
5930
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-d5ce5adb"]]);
5944
5931
  const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
5945
5932
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
5946
5933
  __name: "CheckInSingle",
package/build/index.mjs CHANGED
@@ -3592,19 +3592,6 @@ function toDate(argument) {
3592
3592
  return new Date(NaN);
3593
3593
  }
3594
3594
  }
3595
- function addDays(dirtyDate, dirtyAmount) {
3596
- requiredArgs(2, arguments);
3597
- var date = toDate(dirtyDate);
3598
- var amount = toInteger(dirtyAmount);
3599
- if (isNaN(amount)) {
3600
- return new Date(NaN);
3601
- }
3602
- if (!amount) {
3603
- return date;
3604
- }
3605
- date.setDate(date.getDate() + amount);
3606
- return date;
3607
- }
3608
3595
  function addMilliseconds(dirtyDate, dirtyAmount) {
3609
3596
  requiredArgs(2, arguments);
3610
3597
  var timestamp = toDate(dirtyDate).getTime();
@@ -5617,7 +5604,7 @@ function mitt(n) {
5617
5604
  } };
5618
5605
  }
5619
5606
  const bus = mitt();
5620
- const _withScopeId$2 = (n) => (pushScopeId("data-v-79e7e9e5"), n = n(), popScopeId(), n);
5607
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-d5ce5adb"), n = n(), popScopeId(), n);
5621
5608
  const _hoisted_1$7 = { id: "view-checkIns" };
5622
5609
  const _hoisted_2$4 = { class: "summary" };
5623
5610
  const _hoisted_3$1 = { class: "wrapper" };
@@ -5690,7 +5677,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5690
5677
  // $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
5691
5678
  $and: [
5692
5679
  { staffId: (_a = staff.value) == null ? void 0 : _a.id },
5693
- { checkInAt: { $gte: addDays(startOfToday(), 1) } },
5680
+ { checkInAt: { $gte: startOfToday() } },
5694
5681
  { checkInAt: { $lte: endOfToday() } }
5695
5682
  ]
5696
5683
  }
@@ -5937,8 +5924,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
5937
5924
  };
5938
5925
  }
5939
5926
  });
5940
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_79e7e9e5_lang = "";
5941
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-79e7e9e5"]]);
5927
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_d5ce5adb_lang = "";
5928
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-d5ce5adb"]]);
5942
5929
  const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
5943
5930
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
5944
5931
  __name: "CheckInSingle",
package/build/style.css CHANGED
@@ -3,15 +3,15 @@
3
3
  margin-bottom: 1rem
4
4
  }
5
5
 
6
- #view-checkIns[data-v-79e7e9e5] {
6
+ #view-checkIns[data-v-d5ce5adb] {
7
7
 
8
8
  height: 100%
9
9
  }
10
- #view-checkIns .wrapper[data-v-79e7e9e5] {
10
+ #view-checkIns .wrapper[data-v-d5ce5adb] {
11
11
 
12
12
  height: 100%
13
13
  }
14
- #view-checkIns .header[data-v-79e7e9e5] {
14
+ #view-checkIns .header[data-v-d5ce5adb] {
15
15
 
16
16
  display: flex;
17
17
 
@@ -27,15 +27,15 @@
27
27
 
28
28
  padding-bottom: 0.5rem
29
29
  }
30
- #view-checkIns .header .start[data-v-79e7e9e5] {
30
+ #view-checkIns .header .start[data-v-d5ce5adb] {
31
31
 
32
32
  line-height: 1.25
33
33
  }
34
- #view-checkIns .header .title[data-v-79e7e9e5] {
34
+ #view-checkIns .header .title[data-v-d5ce5adb] {
35
35
 
36
36
  font-weight: 700
37
37
  }
38
- #view-checkIns .header .description[data-v-79e7e9e5] {
38
+ #view-checkIns .header .description[data-v-d5ce5adb] {
39
39
 
40
40
  font-size: 0.875rem;
41
41
 
@@ -43,13 +43,13 @@
43
43
 
44
44
  color: rgb(161 161 170 / var(--tw-text-opacity))
45
45
  }
46
- #view-checkIns .buttons[data-v-79e7e9e5] {
46
+ #view-checkIns .buttons[data-v-d5ce5adb] {
47
47
 
48
48
  display: flex;
49
49
 
50
50
  align-items: center
51
51
  }
52
- #view-checkIns .buttons[data-v-79e7e9e5] > :not([hidden]) ~ :not([hidden]) {
52
+ #view-checkIns .buttons[data-v-d5ce5adb] > :not([hidden]) ~ :not([hidden]) {
53
53
 
54
54
  --tw-space-x-reverse: 0;
55
55
 
@@ -57,11 +57,11 @@
57
57
 
58
58
  margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))
59
59
  }
60
- #view-checkIns .buttons[data-v-79e7e9e5] {
60
+ #view-checkIns .buttons[data-v-d5ce5adb] {
61
61
 
62
62
  padding-right: 0.25rem
63
63
  }
64
- #view-checkIns .summary[data-v-79e7e9e5] {
64
+ #view-checkIns .summary[data-v-d5ce5adb] {
65
65
 
66
66
  padding-bottom: 0.5rem
67
67
  }
@@ -0,0 +1,11 @@
1
+ import 'dayjs/locale/en';
2
+ export declare class DateUtil {
3
+ static format(date?: string | Date, dateFormat?: string, locale?: string): string | undefined;
4
+ static formatRange({ startedAt, endedAt, locale, useTime, }: {
5
+ startedAt?: Date | null;
6
+ endedAt?: Date | null;
7
+ locale?: 'en' | 'id';
8
+ useTime?: boolean;
9
+ }): any;
10
+ }
11
+ export * from './util.date';
@@ -0,0 +1,20 @@
1
+ import 'dayjs/locale/id';
2
+ export declare function formatDate(date: string | Date, dateFormat?: string): string | undefined;
3
+ export declare class PeriodUtil {
4
+ static getStartOfDay(date: string): Date;
5
+ static getEndOfDay(date: string): Date;
6
+ static getPeriodFilter(keyStart: string, startedAt: string, keyEnd?: string, endedAt?: string): ({
7
+ [x: string]: {
8
+ $gte: Date;
9
+ };
10
+ } | {
11
+ [x: string]: {
12
+ $lte: Date;
13
+ };
14
+ })[];
15
+ static getPastPeriodFilter(key: string, startedAt: string): {
16
+ [x: string]: {
17
+ $lt: Date;
18
+ };
19
+ }[];
20
+ }
@@ -0,0 +1 @@
1
+ export * from './date';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/operasional-interfaces",
3
- "version": "1.4.2-beta.1",
3
+ "version": "1.4.2",
4
4
  "description": "Interface library of Neutron.",
5
5
  "sideEffects": [
6
6
  "*.css"