@neutron.co.id/operasional-interfaces 1.17.12 → 1.17.13
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/@office/common/providers/api/apiUrl.mjs +3 -0
- package/build/@office/models/personalia/attendance/AttendanceDelegate.vue +5 -5
- package/build/@office/models/personalia/attendance/AttendanceStaff.vue +15 -3
- package/build/@office/models/personalia/attendance/AttendanceSupervisor.vue +24 -8
- package/build/mock/index.cjs +34 -21
- package/build/mock/index.mjs +34 -21
- package/build/mock/style.css +3 -3
- package/build/module.json +1 -1
- package/build/nuxt.json +1 -1
- package/package.json +6 -6
|
@@ -226,9 +226,9 @@ function checkDurationLeave() {
|
|
|
226
226
|
watch(
|
|
227
227
|
() => values.value,
|
|
228
228
|
async (newType) => {
|
|
229
|
-
console.log('new', newType)
|
|
230
|
-
console.log('new val', values.value)
|
|
231
|
-
console.log('type', values.value.type)
|
|
229
|
+
// console.log('new', newType)
|
|
230
|
+
// console.log('new val', values.value)
|
|
231
|
+
// console.log('type', values.value.type)
|
|
232
232
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
233
233
|
method: 'POST',
|
|
234
234
|
headers: {
|
|
@@ -238,7 +238,7 @@ watch(
|
|
|
238
238
|
id: values.value.attendanceTypeId,
|
|
239
239
|
},
|
|
240
240
|
})
|
|
241
|
-
console.log(response)
|
|
241
|
+
// console.log(response)
|
|
242
242
|
type.value = response.data[0].code
|
|
243
243
|
showLeaveQuota.value = response.data[0].showLeaveQuota
|
|
244
244
|
quota.value = response.data[0].leaveQuota
|
|
@@ -351,7 +351,7 @@ async function saveData() {
|
|
|
351
351
|
v-if="
|
|
352
352
|
type == 'cuti' ||
|
|
353
353
|
type == 'dayOff' ||
|
|
354
|
-
type == '
|
|
354
|
+
type == 'sakit' ||
|
|
355
355
|
type == 'izin'
|
|
356
356
|
"
|
|
357
357
|
v-model="values.delegateNotes"
|
|
@@ -45,8 +45,8 @@ const appStore = useAppStore()
|
|
|
45
45
|
|
|
46
46
|
const officeAppUrl = computed(() => {
|
|
47
47
|
const url = apiUrl()
|
|
48
|
-
|
|
49
48
|
return url.action
|
|
49
|
+
// return 'http://127.0.0.1:7020'
|
|
50
50
|
})
|
|
51
51
|
|
|
52
52
|
const key = ref(0)
|
|
@@ -167,6 +167,10 @@ function getNotified() {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
async function generateAttendance() {
|
|
170
|
+
// console.log('show', showLeaveQuota.value)
|
|
171
|
+
// console.log('initial values', initialValues.value)
|
|
172
|
+
// console.log('values', values.value)
|
|
173
|
+
// console.log('leaveStffId', leaveStaffId.value)
|
|
170
174
|
const responseGenerateAttendance = await client
|
|
171
175
|
.mutation(GraphUtil.executeOne(AttendanceModel, {}), {
|
|
172
176
|
action: 'generateAttendance',
|
|
@@ -185,6 +189,8 @@ async function generateAttendance() {
|
|
|
185
189
|
endedAt: values.value.endedAt,
|
|
186
190
|
delegateNotes: values.value.delegateNotes,
|
|
187
191
|
leaveQuota: quotaTaken.value,
|
|
192
|
+
isQuota: showLeaveQuota.value,
|
|
193
|
+
leaveStaffId: leaveStaffId.value,
|
|
188
194
|
},
|
|
189
195
|
})
|
|
190
196
|
.toPromise()
|
|
@@ -199,6 +205,7 @@ const createdBy = authStore.userId
|
|
|
199
205
|
const quota = ref(0)
|
|
200
206
|
const maxDuration = ref(0)
|
|
201
207
|
const quotaTaken = ref(0)
|
|
208
|
+
const leaveStaffId = ref('')
|
|
202
209
|
|
|
203
210
|
function checkDurationLeave() {
|
|
204
211
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
@@ -234,10 +241,11 @@ watch(
|
|
|
234
241
|
})
|
|
235
242
|
type.value = response.data[0].code
|
|
236
243
|
showLeaveQuota.value = response.data[0].showLeaveQuota
|
|
237
|
-
quota.value = response.data[0].leaveQuota
|
|
244
|
+
// quota.value = response.data[0].leaveQuota
|
|
238
245
|
maxDuration.value = response.data[0].maxDurationDays
|
|
239
246
|
}
|
|
240
247
|
},
|
|
248
|
+
{ immediate: true },
|
|
241
249
|
)
|
|
242
250
|
|
|
243
251
|
const isLeaveStaff = ref(false)
|
|
@@ -260,12 +268,15 @@ watch(
|
|
|
260
268
|
})
|
|
261
269
|
|
|
262
270
|
if (leaveStaff.code !== 200) {
|
|
271
|
+
quota.value = 0
|
|
263
272
|
isLeaveStaff.value = false
|
|
264
273
|
return
|
|
265
274
|
}
|
|
275
|
+
// console.log('leaveStaff', leaveStaff)
|
|
266
276
|
|
|
267
277
|
quota.value = leaveStaff.data.quota
|
|
268
278
|
maxDuration.value = leaveStaff.data.quota
|
|
279
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id
|
|
269
280
|
|
|
270
281
|
if (leaveStaff?.code === 200 && leaveStaff?.data?.quota > 0) {
|
|
271
282
|
isLeaveStaff.value = true
|
|
@@ -285,10 +296,11 @@ async function generate() {
|
|
|
285
296
|
const showDurationAlert = ref(false)
|
|
286
297
|
async function saveData() {
|
|
287
298
|
const result = await checkDurationLeave()
|
|
299
|
+
// console.log('showLeaveQuota', showLeaveQuota.value)
|
|
288
300
|
|
|
289
301
|
if (
|
|
290
302
|
(result === true && isLeaveStaff.value === true) ||
|
|
291
|
-
|
|
303
|
+
showLeaveQuota.value === false
|
|
292
304
|
) {
|
|
293
305
|
showDurationAlert.value = false
|
|
294
306
|
console.log('save')
|
|
@@ -147,6 +147,8 @@ async function generateAttendance() {
|
|
|
147
147
|
endedAt: values.value.endedAt,
|
|
148
148
|
delegateNotes: values.value.delegateNotes,
|
|
149
149
|
leaveQuota: quotaTaken.value,
|
|
150
|
+
isQuota: showLeaveQuota.value,
|
|
151
|
+
leaveStaffId: leaveStaffId.value,
|
|
150
152
|
},
|
|
151
153
|
})
|
|
152
154
|
.toPromise()
|
|
@@ -159,12 +161,14 @@ const appStore = useAppStore()
|
|
|
159
161
|
const officeAppUrl = computed(() => {
|
|
160
162
|
const url = apiUrl()
|
|
161
163
|
return url.action
|
|
164
|
+
// return 'http://127.0.0.1:7020'
|
|
162
165
|
})
|
|
163
166
|
|
|
164
167
|
const type = ref('')
|
|
165
168
|
const showLeaveQuota = ref(true)
|
|
166
169
|
const quota = ref(0)
|
|
167
170
|
const maxDuration = ref(0)
|
|
171
|
+
const leaveStaffId = ref('')
|
|
168
172
|
|
|
169
173
|
function checkDurationLeave() {
|
|
170
174
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
@@ -187,6 +191,8 @@ function checkDurationLeave() {
|
|
|
187
191
|
watch(
|
|
188
192
|
() => values.value,
|
|
189
193
|
async (newType) => {
|
|
194
|
+
// console.log('values', values.value)
|
|
195
|
+
// console.log('initial values', initialValues.value)
|
|
190
196
|
checkDurationLeave()
|
|
191
197
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
192
198
|
method: 'POST',
|
|
@@ -197,10 +203,12 @@ watch(
|
|
|
197
203
|
id: values.value.attendanceTypeId,
|
|
198
204
|
},
|
|
199
205
|
})
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
206
|
+
|
|
207
|
+
// console.log(response)
|
|
208
|
+
type.value = response.data[0]?.code
|
|
209
|
+
showLeaveQuota.value = response.data[0]?.showLeaveQuota
|
|
210
|
+
// quota.value = response.data[0]?.leaveQuota
|
|
211
|
+
maxDuration.value = response.data[0]?.maxDurationDays
|
|
204
212
|
},
|
|
205
213
|
)
|
|
206
214
|
|
|
@@ -222,8 +230,16 @@ watch(
|
|
|
222
230
|
endedAt: values.value.endedAt,
|
|
223
231
|
},
|
|
224
232
|
})
|
|
233
|
+
|
|
234
|
+
if (leaveStaff.code !== 200) {
|
|
235
|
+
quota.value = 0
|
|
236
|
+
isLeaveStaff.value = false
|
|
237
|
+
return
|
|
238
|
+
}
|
|
239
|
+
|
|
225
240
|
quota.value = leaveStaff.data.quota
|
|
226
241
|
maxDuration.value = leaveStaff.data.quota
|
|
242
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id
|
|
227
243
|
|
|
228
244
|
if (leaveStaff.code === 200 && leaveStaff.data.quota > 0) {
|
|
229
245
|
isLeaveStaff.value = true
|
|
@@ -248,7 +264,7 @@ async function saveData() {
|
|
|
248
264
|
|
|
249
265
|
if (
|
|
250
266
|
(result === true && isLeaveStaff.value === true) ||
|
|
251
|
-
|
|
267
|
+
showLeaveQuota.value === false
|
|
252
268
|
) {
|
|
253
269
|
showDurationAlert.value = false
|
|
254
270
|
console.log('save')
|
|
@@ -431,7 +447,7 @@ async function saveData() {
|
|
|
431
447
|
v-if="
|
|
432
448
|
type == 'cuti' ||
|
|
433
449
|
type == 'dayOff' ||
|
|
434
|
-
type == '
|
|
450
|
+
type == 'sakit' ||
|
|
435
451
|
type == 'izin'
|
|
436
452
|
"
|
|
437
453
|
v-model="values.delegateNotes"
|
|
@@ -448,7 +464,7 @@ async function saveData() {
|
|
|
448
464
|
v-if="
|
|
449
465
|
type == 'cuti' ||
|
|
450
466
|
type == 'dayOff' ||
|
|
451
|
-
type == '
|
|
467
|
+
type == 'sakit' ||
|
|
452
468
|
type == 'izin'
|
|
453
469
|
"
|
|
454
470
|
v-model="values.submittedAt"
|
|
@@ -456,7 +472,7 @@ async function saveData() {
|
|
|
456
472
|
is-disabled
|
|
457
473
|
/>
|
|
458
474
|
|
|
459
|
-
<div v-if="type == 'cuti' || type == '
|
|
475
|
+
<div v-if="type == 'cuti' || type == 'sakit' || type == 'izin'">
|
|
460
476
|
<NeonDivider
|
|
461
477
|
is-dashed
|
|
462
478
|
label="Tanggal ini digunakan hanya untuk Generate Absensi"
|
package/build/mock/index.cjs
CHANGED
|
@@ -12991,6 +12991,9 @@ function switchUrl(subdomain, isDev) {
|
|
|
12991
12991
|
case "holding":
|
|
12992
12992
|
action = "api.office.holding.neutron.neon.id";
|
|
12993
12993
|
break;
|
|
12994
|
+
case "operasional":
|
|
12995
|
+
action = "api.office.operasional.neutron.neon.id";
|
|
12996
|
+
break;
|
|
12994
12997
|
default:
|
|
12995
12998
|
action = "127.0.0.1:7020";
|
|
12996
12999
|
}
|
|
@@ -13999,7 +14002,9 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
13999
14002
|
startedAt: values.value.startedAt,
|
|
14000
14003
|
endedAt: values.value.endedAt,
|
|
14001
14004
|
delegateNotes: values.value.delegateNotes,
|
|
14002
|
-
leaveQuota: quotaTaken.value
|
|
14005
|
+
leaveQuota: quotaTaken.value,
|
|
14006
|
+
isQuota: showLeaveQuota.value,
|
|
14007
|
+
leaveStaffId: leaveStaffId.value
|
|
14003
14008
|
}
|
|
14004
14009
|
}).toPromise();
|
|
14005
14010
|
const wrapper = (_b = responseGenerateAttendance.data) == null ? void 0 : _b.executeAttendance;
|
|
@@ -14012,6 +14017,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
14012
14017
|
const quota = vue.ref(0);
|
|
14013
14018
|
const maxDuration = vue.ref(0);
|
|
14014
14019
|
const quotaTaken = vue.ref(0);
|
|
14020
|
+
const leaveStaffId = vue.ref("");
|
|
14015
14021
|
function checkDurationLeave() {
|
|
14016
14022
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
14017
14023
|
return true;
|
|
@@ -14040,10 +14046,10 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
14040
14046
|
});
|
|
14041
14047
|
type.value = response.data[0].code;
|
|
14042
14048
|
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
14043
|
-
quota.value = response.data[0].leaveQuota;
|
|
14044
14049
|
maxDuration.value = response.data[0].maxDurationDays;
|
|
14045
14050
|
}
|
|
14046
|
-
}
|
|
14051
|
+
},
|
|
14052
|
+
{ immediate: true }
|
|
14047
14053
|
);
|
|
14048
14054
|
const isLeaveStaff = vue.ref(false);
|
|
14049
14055
|
vue.watch(
|
|
@@ -14064,11 +14070,13 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
14064
14070
|
}
|
|
14065
14071
|
});
|
|
14066
14072
|
if (leaveStaff.code !== 200) {
|
|
14073
|
+
quota.value = 0;
|
|
14067
14074
|
isLeaveStaff.value = false;
|
|
14068
14075
|
return;
|
|
14069
14076
|
}
|
|
14070
14077
|
quota.value = leaveStaff.data.quota;
|
|
14071
14078
|
maxDuration.value = leaveStaff.data.quota;
|
|
14079
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id;
|
|
14072
14080
|
if ((leaveStaff == null ? void 0 : leaveStaff.code) === 200 && ((_a2 = leaveStaff == null ? void 0 : leaveStaff.data) == null ? void 0 : _a2.quota) > 0) {
|
|
14073
14081
|
isLeaveStaff.value = true;
|
|
14074
14082
|
} else {
|
|
@@ -14085,7 +14093,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
14085
14093
|
const showDurationAlert = vue.ref(false);
|
|
14086
14094
|
async function saveData() {
|
|
14087
14095
|
const result = await checkDurationLeave();
|
|
14088
|
-
if (result === true && isLeaveStaff.value === true ||
|
|
14096
|
+
if (result === true && isLeaveStaff.value === true || showLeaveQuota.value === false) {
|
|
14089
14097
|
showDurationAlert.value = false;
|
|
14090
14098
|
console.log("save");
|
|
14091
14099
|
await saveOne();
|
|
@@ -14529,7 +14537,7 @@ const _sfc_main$1l = /* @__PURE__ */ vue.defineComponent({
|
|
|
14529
14537
|
};
|
|
14530
14538
|
}
|
|
14531
14539
|
});
|
|
14532
|
-
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$1l, [["__scopeId", "data-v-
|
|
14540
|
+
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$1l, [["__scopeId", "data-v-01cc2c2b"]]);
|
|
14533
14541
|
const _hoisted_1$t = { class: "flex flex-wrap" };
|
|
14534
14542
|
const _hoisted_2$k = { class: "mt-2" };
|
|
14535
14543
|
const _hoisted_3$c = { class: "mt-2" };
|
|
@@ -14653,7 +14661,9 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14653
14661
|
startedAt: values.value.startedAt,
|
|
14654
14662
|
endedAt: values.value.endedAt,
|
|
14655
14663
|
delegateNotes: values.value.delegateNotes,
|
|
14656
|
-
leaveQuota: quotaTaken.value
|
|
14664
|
+
leaveQuota: quotaTaken.value,
|
|
14665
|
+
isQuota: showLeaveQuota.value,
|
|
14666
|
+
leaveStaffId: leaveStaffId.value
|
|
14657
14667
|
}
|
|
14658
14668
|
}).toPromise();
|
|
14659
14669
|
const wrapper = (_b = responseGenerateAttendance.data) == null ? void 0 : _b.executeAttendance;
|
|
@@ -14668,6 +14678,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14668
14678
|
const showLeaveQuota = vue.ref(true);
|
|
14669
14679
|
const quota = vue.ref(0);
|
|
14670
14680
|
const maxDuration = vue.ref(0);
|
|
14681
|
+
const leaveStaffId = vue.ref("");
|
|
14671
14682
|
function checkDurationLeave() {
|
|
14672
14683
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
14673
14684
|
return true;
|
|
@@ -14683,6 +14694,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14683
14694
|
vue.watch(
|
|
14684
14695
|
() => values.value,
|
|
14685
14696
|
async (newType) => {
|
|
14697
|
+
var _a2, _b, _c;
|
|
14686
14698
|
checkDurationLeave();
|
|
14687
14699
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
14688
14700
|
method: "POST",
|
|
@@ -14693,10 +14705,9 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14693
14705
|
id: values.value.attendanceTypeId
|
|
14694
14706
|
}
|
|
14695
14707
|
});
|
|
14696
|
-
type.value = response.data[0].code;
|
|
14697
|
-
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
14698
|
-
|
|
14699
|
-
maxDuration.value = response.data[0].maxDurationDays;
|
|
14708
|
+
type.value = (_a2 = response.data[0]) == null ? void 0 : _a2.code;
|
|
14709
|
+
showLeaveQuota.value = (_b = response.data[0]) == null ? void 0 : _b.showLeaveQuota;
|
|
14710
|
+
maxDuration.value = (_c = response.data[0]) == null ? void 0 : _c.maxDurationDays;
|
|
14700
14711
|
}
|
|
14701
14712
|
);
|
|
14702
14713
|
const isLeaveStaff = vue.ref(false);
|
|
@@ -14716,8 +14727,14 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14716
14727
|
endedAt: values.value.endedAt
|
|
14717
14728
|
}
|
|
14718
14729
|
});
|
|
14730
|
+
if (leaveStaff.code !== 200) {
|
|
14731
|
+
quota.value = 0;
|
|
14732
|
+
isLeaveStaff.value = false;
|
|
14733
|
+
return;
|
|
14734
|
+
}
|
|
14719
14735
|
quota.value = leaveStaff.data.quota;
|
|
14720
14736
|
maxDuration.value = leaveStaff.data.quota;
|
|
14737
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id;
|
|
14721
14738
|
if (leaveStaff.code === 200 && leaveStaff.data.quota > 0) {
|
|
14722
14739
|
isLeaveStaff.value = true;
|
|
14723
14740
|
} else {
|
|
@@ -14734,7 +14751,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14734
14751
|
const showDurationAlert = vue.ref(false);
|
|
14735
14752
|
async function saveData() {
|
|
14736
14753
|
const result = await checkDurationLeave();
|
|
14737
|
-
if (result === true && isLeaveStaff.value === true ||
|
|
14754
|
+
if (result === true && isLeaveStaff.value === true || showLeaveQuota.value === false) {
|
|
14738
14755
|
showDurationAlert.value = false;
|
|
14739
14756
|
console.log("save");
|
|
14740
14757
|
await saveOne();
|
|
@@ -14931,7 +14948,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14931
14948
|
modelValue: vue.unref(values).notes,
|
|
14932
14949
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.unref(values).notes = $event)
|
|
14933
14950
|
}, vue.unref(fields).notes), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
|
|
14934
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
14951
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), vue.mergeProps({
|
|
14935
14952
|
key: 4,
|
|
14936
14953
|
modelValue: vue.unref(values).delegateNotes,
|
|
14937
14954
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vue.unref(values).delegateNotes = $event)
|
|
@@ -14941,12 +14958,12 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
14941
14958
|
"is-dashed": "",
|
|
14942
14959
|
label: "Keterangan"
|
|
14943
14960
|
})) : vue.createCommentVNode("v-if", true),
|
|
14944
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
14961
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), vue.mergeProps({
|
|
14945
14962
|
key: 6,
|
|
14946
14963
|
modelValue: vue.unref(values).submittedAt,
|
|
14947
14964
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vue.unref(values).submittedAt = $event)
|
|
14948
14965
|
}, vue.unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
|
|
14949
|
-
type.value == "cuti" || type.value == "
|
|
14966
|
+
type.value == "cuti" || type.value == "sakit" || type.value == "izin" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$a, [
|
|
14950
14967
|
vue.createVNode(vue.unref(interfaces.NeonDivider), {
|
|
14951
14968
|
"is-dashed": "",
|
|
14952
14969
|
label: "Tanggal ini digunakan hanya untuk Generate Absensi",
|
|
@@ -15157,7 +15174,7 @@ const _sfc_main$1k = /* @__PURE__ */ vue.defineComponent({
|
|
|
15157
15174
|
};
|
|
15158
15175
|
}
|
|
15159
15176
|
});
|
|
15160
|
-
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-
|
|
15177
|
+
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-85059efb"]]);
|
|
15161
15178
|
const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
15162
15179
|
__name: "AttendanceDelegate",
|
|
15163
15180
|
setup(__props) {
|
|
@@ -15253,9 +15270,6 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
|
15253
15270
|
vue.watch(
|
|
15254
15271
|
() => values.value,
|
|
15255
15272
|
async (newType) => {
|
|
15256
|
-
console.log("new", newType);
|
|
15257
|
-
console.log("new val", values.value);
|
|
15258
|
-
console.log("type", values.value.type);
|
|
15259
15273
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
15260
15274
|
method: "POST",
|
|
15261
15275
|
headers: {
|
|
@@ -15265,7 +15279,6 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
|
15265
15279
|
id: values.value.attendanceTypeId
|
|
15266
15280
|
}
|
|
15267
15281
|
});
|
|
15268
|
-
console.log(response);
|
|
15269
15282
|
type.value = response.data[0].code;
|
|
15270
15283
|
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
15271
15284
|
quota.value = response.data[0].leaveQuota;
|
|
@@ -15364,7 +15377,7 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
|
15364
15377
|
values.status == 'approved' || values.status == 'rejected'
|
|
15365
15378
|
"
|
|
15366
15379
|
/> `),
|
|
15367
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
15380
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (vue.openBlock(), vue.createBlock(vue.unref(form.NeonField), vue.mergeProps({
|
|
15368
15381
|
key: 2,
|
|
15369
15382
|
modelValue: vue.unref(values).delegateNotes,
|
|
15370
15383
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.unref(values).delegateNotes = $event)
|
|
@@ -15390,7 +15403,7 @@ const _sfc_main$1j = /* @__PURE__ */ vue.defineComponent({
|
|
|
15390
15403
|
};
|
|
15391
15404
|
}
|
|
15392
15405
|
});
|
|
15393
|
-
const AttendanceDelegate = /* @__PURE__ */ _export_sfc$1(_sfc_main$1j, [["__scopeId", "data-v-
|
|
15406
|
+
const AttendanceDelegate = /* @__PURE__ */ _export_sfc$1(_sfc_main$1j, [["__scopeId", "data-v-cec43057"]]);
|
|
15394
15407
|
const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
|
|
15395
15408
|
...{ name: "AttendanceTypeCollection" },
|
|
15396
15409
|
__name: "AttendanceTypeCollection",
|
package/build/mock/index.mjs
CHANGED
|
@@ -12972,6 +12972,9 @@ function switchUrl(subdomain, isDev) {
|
|
|
12972
12972
|
case "holding":
|
|
12973
12973
|
action = "api.office.holding.neutron.neon.id";
|
|
12974
12974
|
break;
|
|
12975
|
+
case "operasional":
|
|
12976
|
+
action = "api.office.operasional.neutron.neon.id";
|
|
12977
|
+
break;
|
|
12975
12978
|
default:
|
|
12976
12979
|
action = "127.0.0.1:7020";
|
|
12977
12980
|
}
|
|
@@ -13980,7 +13983,9 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
13980
13983
|
startedAt: values.value.startedAt,
|
|
13981
13984
|
endedAt: values.value.endedAt,
|
|
13982
13985
|
delegateNotes: values.value.delegateNotes,
|
|
13983
|
-
leaveQuota: quotaTaken.value
|
|
13986
|
+
leaveQuota: quotaTaken.value,
|
|
13987
|
+
isQuota: showLeaveQuota.value,
|
|
13988
|
+
leaveStaffId: leaveStaffId.value
|
|
13984
13989
|
}
|
|
13985
13990
|
}).toPromise();
|
|
13986
13991
|
const wrapper = (_b = responseGenerateAttendance.data) == null ? void 0 : _b.executeAttendance;
|
|
@@ -13993,6 +13998,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
13993
13998
|
const quota = ref(0);
|
|
13994
13999
|
const maxDuration = ref(0);
|
|
13995
14000
|
const quotaTaken = ref(0);
|
|
14001
|
+
const leaveStaffId = ref("");
|
|
13996
14002
|
function checkDurationLeave() {
|
|
13997
14003
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
13998
14004
|
return true;
|
|
@@ -14021,10 +14027,10 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
14021
14027
|
});
|
|
14022
14028
|
type.value = response.data[0].code;
|
|
14023
14029
|
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
14024
|
-
quota.value = response.data[0].leaveQuota;
|
|
14025
14030
|
maxDuration.value = response.data[0].maxDurationDays;
|
|
14026
14031
|
}
|
|
14027
|
-
}
|
|
14032
|
+
},
|
|
14033
|
+
{ immediate: true }
|
|
14028
14034
|
);
|
|
14029
14035
|
const isLeaveStaff = ref(false);
|
|
14030
14036
|
watch(
|
|
@@ -14045,11 +14051,13 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
14045
14051
|
}
|
|
14046
14052
|
});
|
|
14047
14053
|
if (leaveStaff.code !== 200) {
|
|
14054
|
+
quota.value = 0;
|
|
14048
14055
|
isLeaveStaff.value = false;
|
|
14049
14056
|
return;
|
|
14050
14057
|
}
|
|
14051
14058
|
quota.value = leaveStaff.data.quota;
|
|
14052
14059
|
maxDuration.value = leaveStaff.data.quota;
|
|
14060
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id;
|
|
14053
14061
|
if ((leaveStaff == null ? void 0 : leaveStaff.code) === 200 && ((_a2 = leaveStaff == null ? void 0 : leaveStaff.data) == null ? void 0 : _a2.quota) > 0) {
|
|
14054
14062
|
isLeaveStaff.value = true;
|
|
14055
14063
|
} else {
|
|
@@ -14066,7 +14074,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
14066
14074
|
const showDurationAlert = ref(false);
|
|
14067
14075
|
async function saveData() {
|
|
14068
14076
|
const result = await checkDurationLeave();
|
|
14069
|
-
if (result === true && isLeaveStaff.value === true ||
|
|
14077
|
+
if (result === true && isLeaveStaff.value === true || showLeaveQuota.value === false) {
|
|
14070
14078
|
showDurationAlert.value = false;
|
|
14071
14079
|
console.log("save");
|
|
14072
14080
|
await saveOne();
|
|
@@ -14510,7 +14518,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
14510
14518
|
};
|
|
14511
14519
|
}
|
|
14512
14520
|
});
|
|
14513
|
-
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$1l, [["__scopeId", "data-v-
|
|
14521
|
+
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$1l, [["__scopeId", "data-v-01cc2c2b"]]);
|
|
14514
14522
|
const _hoisted_1$t = { class: "flex flex-wrap" };
|
|
14515
14523
|
const _hoisted_2$k = { class: "mt-2" };
|
|
14516
14524
|
const _hoisted_3$c = { class: "mt-2" };
|
|
@@ -14634,7 +14642,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14634
14642
|
startedAt: values.value.startedAt,
|
|
14635
14643
|
endedAt: values.value.endedAt,
|
|
14636
14644
|
delegateNotes: values.value.delegateNotes,
|
|
14637
|
-
leaveQuota: quotaTaken.value
|
|
14645
|
+
leaveQuota: quotaTaken.value,
|
|
14646
|
+
isQuota: showLeaveQuota.value,
|
|
14647
|
+
leaveStaffId: leaveStaffId.value
|
|
14638
14648
|
}
|
|
14639
14649
|
}).toPromise();
|
|
14640
14650
|
const wrapper = (_b = responseGenerateAttendance.data) == null ? void 0 : _b.executeAttendance;
|
|
@@ -14649,6 +14659,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14649
14659
|
const showLeaveQuota = ref(true);
|
|
14650
14660
|
const quota = ref(0);
|
|
14651
14661
|
const maxDuration = ref(0);
|
|
14662
|
+
const leaveStaffId = ref("");
|
|
14652
14663
|
function checkDurationLeave() {
|
|
14653
14664
|
if (!values.value.startedAt || !values.value.endedAt) {
|
|
14654
14665
|
return true;
|
|
@@ -14664,6 +14675,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14664
14675
|
watch(
|
|
14665
14676
|
() => values.value,
|
|
14666
14677
|
async (newType) => {
|
|
14678
|
+
var _a2, _b, _c;
|
|
14667
14679
|
checkDurationLeave();
|
|
14668
14680
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
14669
14681
|
method: "POST",
|
|
@@ -14674,10 +14686,9 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14674
14686
|
id: values.value.attendanceTypeId
|
|
14675
14687
|
}
|
|
14676
14688
|
});
|
|
14677
|
-
type.value = response.data[0].code;
|
|
14678
|
-
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
14679
|
-
|
|
14680
|
-
maxDuration.value = response.data[0].maxDurationDays;
|
|
14689
|
+
type.value = (_a2 = response.data[0]) == null ? void 0 : _a2.code;
|
|
14690
|
+
showLeaveQuota.value = (_b = response.data[0]) == null ? void 0 : _b.showLeaveQuota;
|
|
14691
|
+
maxDuration.value = (_c = response.data[0]) == null ? void 0 : _c.maxDurationDays;
|
|
14681
14692
|
}
|
|
14682
14693
|
);
|
|
14683
14694
|
const isLeaveStaff = ref(false);
|
|
@@ -14697,8 +14708,14 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14697
14708
|
endedAt: values.value.endedAt
|
|
14698
14709
|
}
|
|
14699
14710
|
});
|
|
14711
|
+
if (leaveStaff.code !== 200) {
|
|
14712
|
+
quota.value = 0;
|
|
14713
|
+
isLeaveStaff.value = false;
|
|
14714
|
+
return;
|
|
14715
|
+
}
|
|
14700
14716
|
quota.value = leaveStaff.data.quota;
|
|
14701
14717
|
maxDuration.value = leaveStaff.data.quota;
|
|
14718
|
+
leaveStaffId.value = leaveStaff.data.leaveStaff.id;
|
|
14702
14719
|
if (leaveStaff.code === 200 && leaveStaff.data.quota > 0) {
|
|
14703
14720
|
isLeaveStaff.value = true;
|
|
14704
14721
|
} else {
|
|
@@ -14715,7 +14732,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14715
14732
|
const showDurationAlert = ref(false);
|
|
14716
14733
|
async function saveData() {
|
|
14717
14734
|
const result = await checkDurationLeave();
|
|
14718
|
-
if (result === true && isLeaveStaff.value === true ||
|
|
14735
|
+
if (result === true && isLeaveStaff.value === true || showLeaveQuota.value === false) {
|
|
14719
14736
|
showDurationAlert.value = false;
|
|
14720
14737
|
console.log("save");
|
|
14721
14738
|
await saveOne();
|
|
@@ -14912,7 +14929,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14912
14929
|
modelValue: unref(values).notes,
|
|
14913
14930
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).notes = $event)
|
|
14914
14931
|
}, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
14915
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
14932
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
14916
14933
|
key: 4,
|
|
14917
14934
|
modelValue: unref(values).delegateNotes,
|
|
14918
14935
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).delegateNotes = $event)
|
|
@@ -14922,12 +14939,12 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
14922
14939
|
"is-dashed": "",
|
|
14923
14940
|
label: "Keterangan"
|
|
14924
14941
|
})) : createCommentVNode("v-if", true),
|
|
14925
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
14942
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
14926
14943
|
key: 6,
|
|
14927
14944
|
modelValue: unref(values).submittedAt,
|
|
14928
14945
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).submittedAt = $event)
|
|
14929
14946
|
}, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
14930
|
-
type.value == "cuti" || type.value == "
|
|
14947
|
+
type.value == "cuti" || type.value == "sakit" || type.value == "izin" ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
|
|
14931
14948
|
createVNode(unref(NeonDivider), {
|
|
14932
14949
|
"is-dashed": "",
|
|
14933
14950
|
label: "Tanggal ini digunakan hanya untuk Generate Absensi",
|
|
@@ -15138,7 +15155,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
15138
15155
|
};
|
|
15139
15156
|
}
|
|
15140
15157
|
});
|
|
15141
|
-
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-
|
|
15158
|
+
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1k, [["__scopeId", "data-v-85059efb"]]);
|
|
15142
15159
|
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
15143
15160
|
__name: "AttendanceDelegate",
|
|
15144
15161
|
setup(__props) {
|
|
@@ -15234,9 +15251,6 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15234
15251
|
watch(
|
|
15235
15252
|
() => values.value,
|
|
15236
15253
|
async (newType) => {
|
|
15237
|
-
console.log("new", newType);
|
|
15238
|
-
console.log("new val", values.value);
|
|
15239
|
-
console.log("type", values.value.type);
|
|
15240
15254
|
const response = await ofetch(`${officeAppUrl.value}/getAttendanceType`, {
|
|
15241
15255
|
method: "POST",
|
|
15242
15256
|
headers: {
|
|
@@ -15246,7 +15260,6 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15246
15260
|
id: values.value.attendanceTypeId
|
|
15247
15261
|
}
|
|
15248
15262
|
});
|
|
15249
|
-
console.log(response);
|
|
15250
15263
|
type.value = response.data[0].code;
|
|
15251
15264
|
showLeaveQuota.value = response.data[0].showLeaveQuota;
|
|
15252
15265
|
quota.value = response.data[0].leaveQuota;
|
|
@@ -15345,7 +15358,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15345
15358
|
values.status == 'approved' || values.status == 'rejected'
|
|
15346
15359
|
"
|
|
15347
15360
|
/> `),
|
|
15348
|
-
type.value == "cuti" || type.value == "dayOff" || type.value == "
|
|
15361
|
+
type.value == "cuti" || type.value == "dayOff" || type.value == "sakit" || type.value == "izin" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
15349
15362
|
key: 2,
|
|
15350
15363
|
modelValue: unref(values).delegateNotes,
|
|
15351
15364
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).delegateNotes = $event)
|
|
@@ -15371,7 +15384,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15371
15384
|
};
|
|
15372
15385
|
}
|
|
15373
15386
|
});
|
|
15374
|
-
const AttendanceDelegate = /* @__PURE__ */ _export_sfc$1(_sfc_main$1j, [["__scopeId", "data-v-
|
|
15387
|
+
const AttendanceDelegate = /* @__PURE__ */ _export_sfc$1(_sfc_main$1j, [["__scopeId", "data-v-cec43057"]]);
|
|
15375
15388
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
15376
15389
|
...{ name: "AttendanceTypeCollection" },
|
|
15377
15390
|
__name: "AttendanceTypeCollection",
|
package/build/mock/style.css
CHANGED
|
@@ -105,15 +105,15 @@
|
|
|
105
105
|
display: block
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.neu-attendance-single[data-v-
|
|
108
|
+
.neu-attendance-single[data-v-01cc2c2b] {
|
|
109
109
|
display: block
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.neu-attendance-single[data-v-
|
|
112
|
+
.neu-attendance-single[data-v-85059efb] {
|
|
113
113
|
display: block
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.neu-attendance-single[data-v-
|
|
116
|
+
.neu-attendance-single[data-v-cec43057] {
|
|
117
117
|
display: block
|
|
118
118
|
}
|
|
119
119
|
|
package/build/module.json
CHANGED
package/build/nuxt.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-interfaces",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.13",
|
|
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.
|
|
82
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
81
|
+
"@neutron.co.id/operasional-modules": "1.12.18",
|
|
82
|
+
"@neutron.co.id/personalia-models": "1.13.16",
|
|
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.
|
|
157
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
156
|
+
"@neutron.co.id/operasional-modules": "1.12.18",
|
|
157
|
+
"@neutron.co.id/personalia-models": "1.13.16",
|
|
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":
|
|
167
|
+
"build": 195
|
|
168
168
|
}
|