@neutron.co.id/operasional-interfaces 1.16.0 → 1.16.1-beta.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.
@@ -82,14 +82,17 @@ export function useImportShift() {
82
82
  formData.append("file", upload.file, upload.file.name || "shift.csv");
83
83
  try {
84
84
  isLoading.value = true;
85
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
86
- method: "POST",
87
- headers: {
88
- "X-Neon-Key": "CH7JLKT6MW",
89
- Authorization: `Bearer ${authStore.accessToken}`
90
- },
91
- body: formData
92
- });
85
+ const response = await ofetch(
86
+ `${store.officeApiUrl}/importDataShift`,
87
+ {
88
+ method: "POST",
89
+ headers: {
90
+ "X-Neon-Key": "CH7JLKT6MW",
91
+ Authorization: `Bearer ${authStore.accessToken}`
92
+ },
93
+ body: formData
94
+ }
95
+ );
93
96
  console.log("response:", response);
94
97
  toast.push({
95
98
  content: "Data shifting berhasil diimport.",
@@ -1,6 +1,7 @@
1
1
  import { Query } from '@neon.id/query';
2
2
  export declare function usePeriod(): {
3
3
  query: import("vue").ComputedRef<Query>;
4
+ queryBranch: import("vue").ComputedRef<Query>;
4
5
  isLoading: import("vue").Ref<boolean>;
5
6
  date: import("vue").Ref<Date>;
6
7
  header: import("vue").ComputedRef<string>;
@@ -29,8 +29,23 @@ export function usePeriod() {
29
29
  filter
30
30
  });
31
31
  });
32
+ const queryBranch = computed(() => {
33
+ const period = PeriodUtil.period(
34
+ "startedAt",
35
+ startedAt.value,
36
+ endedAt.value
37
+ );
38
+ const filter = {
39
+ ...period,
40
+ branchIds: { $in: staff.value?.branchIds }
41
+ };
42
+ return Query.define({
43
+ filter
44
+ });
45
+ });
32
46
  return {
33
47
  query,
48
+ queryBranch,
34
49
  isLoading,
35
50
  date,
36
51
  header,
@@ -5,7 +5,7 @@ import { usePeriod } from '../../../common/providers/period'
5
5
 
6
6
  defineOptions({ name: 'ShiftStaffCollectionBranch' })
7
7
 
8
- const { isLoading, date, query } = usePeriod()
8
+ const { isLoading, date, queryBranch } = usePeriod()
9
9
 
10
10
  async function onPeriodUpdate(period: any) {
11
11
  date.value = period.startedAt
@@ -22,7 +22,7 @@ async function onPeriodUpdate(period: any) {
22
22
  view="single-branchs-view"
23
23
  :displays="['table', 'calendar', 'timeline']"
24
24
  :is-loading="isLoading"
25
- :query="query"
25
+ :query="queryBranch"
26
26
  @update:date="onPeriodUpdate"
27
27
  @update:period="onPeriodUpdate"
28
28
  ></ShiftStaffWrapper>
@@ -20,7 +20,7 @@ async function onPeriodUpdate(period: any) {
20
20
  scope="staff"
21
21
  path="/jadwal/period"
22
22
  :displays="['table', 'calendar', 'timeline']"
23
- :excludes="['create']"
23
+ :excludes="['create', 'click']"
24
24
  :is-loading="isLoading"
25
25
  :query="query"
26
26
  @update:date="onPeriodUpdate"
@@ -125,6 +125,11 @@ const { refresh } = withCollection({
125
125
  endedTime: 1, //jam pulang shift karyawan
126
126
  startedTime: 1, //jam masuk shift karyawan
127
127
 
128
+ hourStartedTime: 1,
129
+ hourEndedTime: 1,
130
+ hourAttendShift: 1,
131
+ hourBackHome: 1,
132
+
128
133
  typeShift: {
129
134
  //tipe dari shift
130
135
  id: 1,
@@ -140,6 +145,14 @@ const { refresh } = withCollection({
140
145
  workCheckInAt: 1,
141
146
  workCheckIn: 1,
142
147
  },
148
+
149
+ branches: {
150
+ id: 1,
151
+ display: 1,
152
+ name: 1,
153
+ },
154
+
155
+ branchIds: 1,
143
156
  // shiftingStaffId: 1,
144
157
  // typeShiftId: 1,
145
158
  } as Fragment<Schema.ShiftStaff>,
@@ -1,6 +1,7 @@
1
1
  import { Query } from '@neon.id/query';
2
2
  export declare function usePeriod(): {
3
3
  query: import("vue").ComputedRef<Query>;
4
+ queryBranch: import("vue").ComputedRef<Query>;
4
5
  isLoading: import("vue").Ref<boolean>;
5
6
  date: import("vue").Ref<Date>;
6
7
  header: import("vue").ComputedRef<string>;
@@ -12860,14 +12860,17 @@ function useImportShift() {
12860
12860
  formData.append("file", upload.file, upload.file.name || "shift.csv");
12861
12861
  try {
12862
12862
  isLoading.value = true;
12863
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
12864
- method: "POST",
12865
- headers: {
12866
- "X-Neon-Key": "CH7JLKT6MW",
12867
- Authorization: `Bearer ${authStore.accessToken}`
12868
- },
12869
- body: formData
12870
- });
12863
+ const response = await ofetch(
12864
+ `${store.officeApiUrl}/importDataShift`,
12865
+ {
12866
+ method: "POST",
12867
+ headers: {
12868
+ "X-Neon-Key": "CH7JLKT6MW",
12869
+ Authorization: `Bearer ${authStore.accessToken}`
12870
+ },
12871
+ body: formData
12872
+ }
12873
+ );
12871
12874
  console.log("response:", response);
12872
12875
  toast.push({
12873
12876
  content: "Data shifting berhasil diimport.",
@@ -12923,8 +12926,24 @@ function usePeriod() {
12923
12926
  filter
12924
12927
  });
12925
12928
  });
12929
+ const queryBranch = vue.computed(() => {
12930
+ var _a;
12931
+ const period$1 = period.PeriodUtil.period(
12932
+ "startedAt",
12933
+ startedAt.value,
12934
+ endedAt.value
12935
+ );
12936
+ const filter = {
12937
+ ...period$1,
12938
+ branchIds: { $in: (_a = staff.value) == null ? void 0 : _a.branchIds }
12939
+ };
12940
+ return query.Query.define({
12941
+ filter
12942
+ });
12943
+ });
12926
12944
  return {
12927
12945
  query: query$1,
12946
+ queryBranch,
12928
12947
  isLoading,
12929
12948
  date: date$1,
12930
12949
  header,
@@ -26033,6 +26052,10 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
26033
26052
  //jam pulang shift karyawan
26034
26053
  startedTime: 1,
26035
26054
  //jam masuk shift karyawan
26055
+ hourStartedTime: 1,
26056
+ hourEndedTime: 1,
26057
+ hourAttendShift: 1,
26058
+ hourBackHome: 1,
26036
26059
  typeShift: {
26037
26060
  //tipe dari shift
26038
26061
  id: 1,
@@ -26047,7 +26070,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
26047
26070
  display: 1,
26048
26071
  workCheckInAt: 1,
26049
26072
  workCheckIn: 1
26050
- }
26073
+ },
26074
+ branches: {
26075
+ id: 1,
26076
+ display: 1,
26077
+ name: 1
26078
+ },
26079
+ branchIds: 1
26051
26080
  // shiftingStaffId: 1,
26052
26081
  // typeShiftId: 1,
26053
26082
  }
@@ -26128,7 +26157,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
26128
26157
  };
26129
26158
  }
26130
26159
  });
26131
- const ShiftStaffWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-2004177b"]]);
26160
+ const ShiftStaffWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-1ddd2145"]]);
26132
26161
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
26133
26162
  ...{ name: "ShiftStaffCollectionStaff" },
26134
26163
  __name: "ShiftStaffCollectionStaff",
@@ -26145,7 +26174,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
26145
26174
  scope: "staff",
26146
26175
  path: "/jadwal/period",
26147
26176
  displays: ["table", "calendar", "timeline"],
26148
- excludes: ["create"],
26177
+ excludes: ["create", "click"],
26149
26178
  "is-loading": vue.unref(isLoading),
26150
26179
  query: vue.unref(query2),
26151
26180
  "onUpdate:date": onPeriodUpdate,
@@ -26158,7 +26187,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
26158
26187
  ...{ name: "ShiftStaffCollectionBranch" },
26159
26188
  __name: "ShiftStaffCollectionBranch",
26160
26189
  setup(__props) {
26161
- const { isLoading, date: date2, query: query2 } = usePeriod();
26190
+ const { isLoading, date: date2, queryBranch } = usePeriod();
26162
26191
  async function onPeriodUpdate(period2) {
26163
26192
  date2.value = period2.startedAt;
26164
26193
  await vue.nextTick();
@@ -26172,7 +26201,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
26172
26201
  view: "single-branchs-view",
26173
26202
  displays: ["table", "calendar", "timeline"],
26174
26203
  "is-loading": vue.unref(isLoading),
26175
- query: vue.unref(query2),
26204
+ query: vue.unref(queryBranch),
26176
26205
  "onUpdate:date": onPeriodUpdate,
26177
26206
  "onUpdate:period": onPeriodUpdate
26178
26207
  }, null, 8, ["is-loading", "query"]);
@@ -12841,14 +12841,17 @@ function useImportShift() {
12841
12841
  formData.append("file", upload.file, upload.file.name || "shift.csv");
12842
12842
  try {
12843
12843
  isLoading.value = true;
12844
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
12845
- method: "POST",
12846
- headers: {
12847
- "X-Neon-Key": "CH7JLKT6MW",
12848
- Authorization: `Bearer ${authStore.accessToken}`
12849
- },
12850
- body: formData
12851
- });
12844
+ const response = await ofetch(
12845
+ `${store.officeApiUrl}/importDataShift`,
12846
+ {
12847
+ method: "POST",
12848
+ headers: {
12849
+ "X-Neon-Key": "CH7JLKT6MW",
12850
+ Authorization: `Bearer ${authStore.accessToken}`
12851
+ },
12852
+ body: formData
12853
+ }
12854
+ );
12852
12855
  console.log("response:", response);
12853
12856
  toast.push({
12854
12857
  content: "Data shifting berhasil diimport.",
@@ -12904,8 +12907,24 @@ function usePeriod() {
12904
12907
  filter
12905
12908
  });
12906
12909
  });
12910
+ const queryBranch = computed(() => {
12911
+ var _a;
12912
+ const period = PeriodUtil.period(
12913
+ "startedAt",
12914
+ startedAt.value,
12915
+ endedAt.value
12916
+ );
12917
+ const filter = {
12918
+ ...period,
12919
+ branchIds: { $in: (_a = staff.value) == null ? void 0 : _a.branchIds }
12920
+ };
12921
+ return Query.define({
12922
+ filter
12923
+ });
12924
+ });
12907
12925
  return {
12908
12926
  query,
12927
+ queryBranch,
12909
12928
  isLoading,
12910
12929
  date,
12911
12930
  header,
@@ -26014,6 +26033,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26014
26033
  //jam pulang shift karyawan
26015
26034
  startedTime: 1,
26016
26035
  //jam masuk shift karyawan
26036
+ hourStartedTime: 1,
26037
+ hourEndedTime: 1,
26038
+ hourAttendShift: 1,
26039
+ hourBackHome: 1,
26017
26040
  typeShift: {
26018
26041
  //tipe dari shift
26019
26042
  id: 1,
@@ -26028,7 +26051,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26028
26051
  display: 1,
26029
26052
  workCheckInAt: 1,
26030
26053
  workCheckIn: 1
26031
- }
26054
+ },
26055
+ branches: {
26056
+ id: 1,
26057
+ display: 1,
26058
+ name: 1
26059
+ },
26060
+ branchIds: 1
26032
26061
  // shiftingStaffId: 1,
26033
26062
  // typeShiftId: 1,
26034
26063
  }
@@ -26109,7 +26138,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26109
26138
  };
26110
26139
  }
26111
26140
  });
26112
- const ShiftStaffWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-2004177b"]]);
26141
+ const ShiftStaffWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-1ddd2145"]]);
26113
26142
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
26114
26143
  ...{ name: "ShiftStaffCollectionStaff" },
26115
26144
  __name: "ShiftStaffCollectionStaff",
@@ -26126,7 +26155,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
26126
26155
  scope: "staff",
26127
26156
  path: "/jadwal/period",
26128
26157
  displays: ["table", "calendar", "timeline"],
26129
- excludes: ["create"],
26158
+ excludes: ["create", "click"],
26130
26159
  "is-loading": unref(isLoading),
26131
26160
  query: unref(query),
26132
26161
  "onUpdate:date": onPeriodUpdate,
@@ -26139,7 +26168,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
26139
26168
  ...{ name: "ShiftStaffCollectionBranch" },
26140
26169
  __name: "ShiftStaffCollectionBranch",
26141
26170
  setup(__props) {
26142
- const { isLoading, date, query } = usePeriod();
26171
+ const { isLoading, date, queryBranch } = usePeriod();
26143
26172
  async function onPeriodUpdate(period) {
26144
26173
  date.value = period.startedAt;
26145
26174
  await nextTick();
@@ -26153,7 +26182,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
26153
26182
  view: "single-branchs-view",
26154
26183
  displays: ["table", "calendar", "timeline"],
26155
26184
  "is-loading": unref(isLoading),
26156
- query: unref(query),
26185
+ query: unref(queryBranch),
26157
26186
  "onUpdate:date": onPeriodUpdate,
26158
26187
  "onUpdate:period": onPeriodUpdate
26159
26188
  }, null, 8, ["is-loading", "query"]);
@@ -470,19 +470,19 @@
470
470
  color: rgb(161 161 170 / var(--tw-text-opacity))
471
471
  }
472
472
 
473
- .shift-staff-wrapper .buttons[data-v-2004177b] {
473
+ .shift-staff-wrapper .buttons[data-v-1ddd2145] {
474
474
  display: flex;
475
475
  align-items: center
476
476
  }
477
- .shift-staff-wrapper .buttons[data-v-2004177b] > :not([hidden]) ~ :not([hidden]) {
477
+ .shift-staff-wrapper .buttons[data-v-1ddd2145] > :not([hidden]) ~ :not([hidden]) {
478
478
  --tw-space-x-reverse: 0;
479
479
  margin-right: calc(0.25rem * var(--tw-space-x-reverse));
480
480
  margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))
481
481
  }
482
- .shift-staff-wrapper .buttons[data-v-2004177b] {
482
+ .shift-staff-wrapper .buttons[data-v-1ddd2145] {
483
483
  padding-right: 0.25rem
484
484
  }
485
- .shift-staff-wrapper .summary[data-v-2004177b] {
485
+ .shift-staff-wrapper .summary[data-v-1ddd2145] {
486
486
  padding-bottom: 0.5rem
487
487
  }
488
488
 
package/build/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.16.0",
7
+ "version": "1.16.1-beta.2",
8
8
  "builder": {
9
9
  "@neon.id/module-builder": "1.8.0",
10
10
  "unbuild": "2.0.0"
package/build/nuxt.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.16.0",
7
+ "version": "1.16.1-beta.2",
8
8
  "builder": {
9
9
  "@neon.id/module-builder": "1.8.0",
10
10
  "unbuild": "2.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/operasional-interfaces",
3
- "version": "1.16.0",
3
+ "version": "1.16.1-beta.2",
4
4
  "description": "Interface library of Neutron Operasional.",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -78,8 +78,8 @@
78
78
  "@neon.id/nuxt": "^1.5.0",
79
79
  "@neon.id/office": "1.46.0",
80
80
  "@neon.id/utils": "^1.51.0",
81
- "@neutron.co.id/operasional-modules": "1.12.10",
82
- "@neutron.co.id/personalia-models": "1.13.6",
81
+ "@neutron.co.id/operasional-modules": "1.12.13-beta.1",
82
+ "@neutron.co.id/personalia-models": "1.13.8-beta.1",
83
83
  "@nuxt/kit": "^3.12.3",
84
84
  "file-saver": "^2.0.5",
85
85
  "papaparse": "5.4.1",
@@ -153,8 +153,8 @@
153
153
  "@neon.id/nuxt": "^1.5.0",
154
154
  "@neon.id/office": "1.46.0",
155
155
  "@neon.id/utils": "^1.51.0",
156
- "@neutron.co.id/operasional-modules": "1.12.10",
157
- "@neutron.co.id/personalia-models": "1.13.6",
156
+ "@neutron.co.id/operasional-modules": "1.12.13-beta.1",
157
+ "@neutron.co.id/personalia-models": "1.13.8-beta.1",
158
158
  "@nuxt/kit": "^3.12.3",
159
159
  "file-saver": "^2.0.5",
160
160
  "qr-scanner": "^1.4.2",
@@ -164,5 +164,5 @@
164
164
  "publishConfig": {
165
165
  "access": "public"
166
166
  },
167
- "build": 170
167
+ "build": 172
168
168
  }