@neutron.co.id/operasional-interfaces 1.14.1 → 1.14.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/@office/common/providers/operasional/operasional.store.mjs +19 -2
- package/build/@office/config.mjs +1 -1
- package/build/@office/models/personalia/attendance/AttendanceCollection/AttendanceCollection.vue +7 -15
- package/build/@office/models/personalia/attendance/AttendanceStaff.vue +93 -7
- package/build/@office/models/personalia/attendance/AttendanceSupervisor.vue +80 -6
- package/build/@office/models/personalia/progressAccess/ProgressAccessSupervisor.vue +2 -10
- package/build/mock/index.cjs +202 -43
- package/build/mock/index.mjs +204 -45
- package/build/mock/style.css +3 -3
- package/build/module.json +1 -1
- package/build/nuxt.json +1 -1
- package/build/nuxt.mjs +1 -1
- package/package.json +2 -2
package/build/mock/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NeonEditorPlugin } from "@neon.id/editor";
|
|
2
2
|
import { NeonFieldPlugin } from "@neon.id/field";
|
|
3
3
|
import { NeonField, NeonForm, NeonFields, NeonCheck, NeonFormWrapper, NeonFormPlugin } from "@neon.id/form";
|
|
4
|
-
import { NeonAvatar, NeonDivider, NeonModal, NeonSheet, NeonButton,
|
|
4
|
+
import { NeonAvatar, NeonDivider, NeonModal, NeonSheet, NeonButton, useToastStore, NeonAlert, NeonSlider, NeonSlide, NeonStat, NeonInfo, NeonCopy, registerDirectives, registerIconComponents } from "@neon.id/interfaces";
|
|
5
5
|
import { OfficeCollectionTable, OfficeCollectionCalendar, OfficeTabs, OfficeTab, OfficeRelation, OfficeContent, OfficePeekSingle, OfficeCollectionQuery, OfficeCollectionOperation, OfficeCollectionRelated, NeonOfficePlugin } from "@neon.id/office";
|
|
6
6
|
import { withRelation, NeonRelationSheet, NeonRelationPlugin } from "@neon.id/relation";
|
|
7
7
|
import { defineComponent, ref, computed, h, watch, openBlock, createElementBlock, createBlock, unref, withCtx, createVNode, mergeProps, createCommentVNode, reactive, onMounted, onUnmounted, toRefs, inject, watchEffect, provide, nextTick, resolveDynamicComponent, normalizeProps, renderSlot, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, normalizeStyle, withKeys, withDirectives, toRef, guardReactiveProps, createTextVNode, isRef, resolveComponent, Transition, resolveDirective, toHandlers, withModifiers, pushScopeId, popScopeId, onBeforeUnmount, vShow } from "vue";
|
|
@@ -28,7 +28,7 @@ import { useRouter, useRoute } from "vue-router";
|
|
|
28
28
|
import { Query } from "@neon.id/query";
|
|
29
29
|
import { useAuthStore } from "@neon.id/identitas-interfaces";
|
|
30
30
|
import { PromiseUtil } from "@neon.id/utils/promise";
|
|
31
|
-
import { models as models$3 } from "@neutron.co.id/personalia-models";
|
|
31
|
+
import { models as models$3, AttendanceModel } from "@neutron.co.id/personalia-models";
|
|
32
32
|
import { RowUtil } from "@neon.id/display";
|
|
33
33
|
import { IdentitasConnect, IdentitasAssistRegistration, IdentitasDelegate } from "@neon.id/identitas-interfaces/office";
|
|
34
34
|
import { models as models$1 } from "@neon.id/identitas-models";
|
|
@@ -11575,10 +11575,22 @@ const useOperasionalStore = defineStore("neu:operasional", () => {
|
|
|
11575
11575
|
const isLoading = ref(false);
|
|
11576
11576
|
const staff = ref(null);
|
|
11577
11577
|
const accesses = ref([]);
|
|
11578
|
+
const supervisedStaffIds = computed(() => {
|
|
11579
|
+
if (Array.isArray(accesses.value)) {
|
|
11580
|
+
return accesses.value.reduce(
|
|
11581
|
+
(ids, access) => {
|
|
11582
|
+
return ids.concat(access.supervisedStaffIds || []);
|
|
11583
|
+
},
|
|
11584
|
+
[]
|
|
11585
|
+
);
|
|
11586
|
+
}
|
|
11587
|
+
return [];
|
|
11588
|
+
});
|
|
11578
11589
|
return {
|
|
11579
11590
|
isLoading,
|
|
11580
11591
|
staff,
|
|
11581
11592
|
accesses,
|
|
11593
|
+
supervisedStaffIds,
|
|
11582
11594
|
setStaff,
|
|
11583
11595
|
getStaff,
|
|
11584
11596
|
getAllStoreValue
|
|
@@ -11589,9 +11601,14 @@ const useOperasionalStore = defineStore("neu:operasional", () => {
|
|
|
11589
11601
|
function getStaff() {
|
|
11590
11602
|
return staff.value;
|
|
11591
11603
|
}
|
|
11604
|
+
function getAccesses() {
|
|
11605
|
+
return accesses.value;
|
|
11606
|
+
}
|
|
11592
11607
|
function getAllStoreValue() {
|
|
11593
11608
|
return {
|
|
11594
|
-
staff: getStaff()
|
|
11609
|
+
staff: getStaff(),
|
|
11610
|
+
supervisedStaffIds: getAccesses(),
|
|
11611
|
+
accesses: getAccesses()
|
|
11595
11612
|
};
|
|
11596
11613
|
}
|
|
11597
11614
|
});
|
|
@@ -11697,7 +11714,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
11697
11714
|
function transformItem(item) {
|
|
11698
11715
|
return {
|
|
11699
11716
|
...item,
|
|
11700
|
-
eventColor: item.
|
|
11717
|
+
eventColor: item.status === "rejected" ? "danger" : item.status === "notApproved" ? "warning" : item.status === "approved" ? "success" : "base"
|
|
11701
11718
|
};
|
|
11702
11719
|
}
|
|
11703
11720
|
function onCalendarPeriodUpdate(period) {
|
|
@@ -12324,6 +12341,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12324
12341
|
executeOne
|
|
12325
12342
|
} = useSingle();
|
|
12326
12343
|
const key = ref(0);
|
|
12344
|
+
const responseState = ref();
|
|
12345
|
+
const toast = useToastStore();
|
|
12327
12346
|
const diff = computed(() => {
|
|
12328
12347
|
return DateUtil.day(values.value.endedAt).diff(values.value.startedAt);
|
|
12329
12348
|
});
|
|
@@ -12396,7 +12415,44 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12396
12415
|
]
|
|
12397
12416
|
};
|
|
12398
12417
|
});
|
|
12418
|
+
const { client } = useClientHandle();
|
|
12419
|
+
function getNotified() {
|
|
12420
|
+
if (responseState.value === "attendanceGenerated") {
|
|
12421
|
+
toast.push({
|
|
12422
|
+
id: "generate:attendance",
|
|
12423
|
+
content: "Successfully generated attendance.",
|
|
12424
|
+
color: "success"
|
|
12425
|
+
});
|
|
12426
|
+
}
|
|
12427
|
+
}
|
|
12428
|
+
async function generateAttendance() {
|
|
12429
|
+
var _a2, _b;
|
|
12430
|
+
const responseGenerateAttendance = await client.mutation(GraphUtil.executeOne(AttendanceModel, {}), {
|
|
12431
|
+
action: "generateAttendance",
|
|
12432
|
+
input: {
|
|
12433
|
+
attendanceId: values.value.id,
|
|
12434
|
+
// Attendance input.
|
|
12435
|
+
status: values.value.status,
|
|
12436
|
+
submitStaffId: values.value.submitStaffId,
|
|
12437
|
+
type: values.value.type,
|
|
12438
|
+
decideStaffId: values.value.decideStaffId,
|
|
12439
|
+
notes: values.value.notes,
|
|
12440
|
+
submittedAt: values.value.submittedAt,
|
|
12441
|
+
startedAt: values.value.startedAt,
|
|
12442
|
+
endedAt: values.value.endedAt
|
|
12443
|
+
}
|
|
12444
|
+
}).toPromise();
|
|
12445
|
+
const wrapper = (_a2 = responseGenerateAttendance.data) == null ? void 0 : _a2.executeAttendance;
|
|
12446
|
+
responseState.value = (_b = wrapper == null ? void 0 : wrapper.info) == null ? void 0 : _b.state;
|
|
12447
|
+
}
|
|
12448
|
+
console.log("decideStaffId", values.value.decideStaffId);
|
|
12449
|
+
async function generate() {
|
|
12450
|
+
await generateAttendance();
|
|
12451
|
+
await getNotified();
|
|
12452
|
+
await syncOne();
|
|
12453
|
+
}
|
|
12399
12454
|
return (_ctx, _cache) => {
|
|
12455
|
+
const _component_NeonFields = resolveComponent("NeonFields");
|
|
12400
12456
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-attendance-single" }, {
|
|
12401
12457
|
default: withCtx(() => [
|
|
12402
12458
|
createVNode(unref(OfficeTabs), { "use-url": unref(isMain) }, {
|
|
@@ -12490,15 +12546,49 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12490
12546
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected",
|
|
12491
12547
|
"onUpdate:modelValue": onStartedAtUpdate
|
|
12492
12548
|
}), null, 16, ["model-value", "is-disabled"])),
|
|
12549
|
+
createVNode(unref(NeonDivider), {
|
|
12550
|
+
"is-dashed": "",
|
|
12551
|
+
label: "Tanggal ini digunakan hanya untuk Generate Absensi",
|
|
12552
|
+
class: "divider"
|
|
12553
|
+
}),
|
|
12554
|
+
createVNode(_component_NeonFields, { md: "grid-cols-3" }, {
|
|
12555
|
+
default: withCtx(() => [
|
|
12556
|
+
createVNode(unref(NeonField), mergeProps({
|
|
12557
|
+
modelValue: unref(values).startedAt,
|
|
12558
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).startedAt = $event)
|
|
12559
|
+
}, unref(fields).startedAt, {
|
|
12560
|
+
"is-disabled": unref(values).status == "approved" || unref(values).isGenerate === true
|
|
12561
|
+
}), null, 16, ["modelValue", "is-disabled"]),
|
|
12562
|
+
createVNode(unref(NeonField), mergeProps({
|
|
12563
|
+
modelValue: unref(values).endedAt,
|
|
12564
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).endedAt = $event)
|
|
12565
|
+
}, unref(fields).endedAt, {
|
|
12566
|
+
"is-disabled": unref(values).status == "approved" || unref(values).isGenerate === true
|
|
12567
|
+
}), null, 16, ["modelValue", "is-disabled"]),
|
|
12568
|
+
createVNode(unref(NeonButton), {
|
|
12569
|
+
"icon-left": "bolt",
|
|
12570
|
+
label: "Generate",
|
|
12571
|
+
color: "success",
|
|
12572
|
+
class: "mt-12",
|
|
12573
|
+
size: "xs",
|
|
12574
|
+
"is-loading": unref(isLoading),
|
|
12575
|
+
"is-disabled": unref(values).status !== "approved" || unref(values).isGenerate === true,
|
|
12576
|
+
"is-rounded": "",
|
|
12577
|
+
onClick: generate
|
|
12578
|
+
}, null, 8, ["is-loading", "is-disabled"])
|
|
12579
|
+
]),
|
|
12580
|
+
_: 1
|
|
12581
|
+
/* STABLE */
|
|
12582
|
+
}),
|
|
12493
12583
|
createVNode(unref(NeonField), mergeProps({
|
|
12494
12584
|
modelValue: unref(values).type,
|
|
12495
|
-
"onUpdate:modelValue": _cache[
|
|
12585
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).type = $event)
|
|
12496
12586
|
}, unref(fields).type, {
|
|
12497
12587
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
12498
12588
|
}), null, 16, ["modelValue", "is-disabled"]),
|
|
12499
12589
|
createVNode(unref(OfficeRelation), {
|
|
12500
12590
|
modelValue: unref(values),
|
|
12501
|
-
"onUpdate:modelValue": _cache[
|
|
12591
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(values) ? values.value = $event : null),
|
|
12502
12592
|
field: unref(fields).decideStaff,
|
|
12503
12593
|
query: unref(Query).define(staffOptions.value),
|
|
12504
12594
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12506,14 +12596,14 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12506
12596
|
unref(values).type == "leave" ? (openBlock(), createBlock(unref(OfficeRelation), {
|
|
12507
12597
|
key: 2,
|
|
12508
12598
|
modelValue: unref(values),
|
|
12509
|
-
"onUpdate:modelValue": _cache[
|
|
12599
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
|
|
12510
12600
|
field: unref(fields).delegateStaffs,
|
|
12511
12601
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
12512
12602
|
}, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("v-if", true),
|
|
12513
12603
|
unref(isNew) || unref(isReady) ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
12514
12604
|
key: 3,
|
|
12515
12605
|
modelValue: unref(values).notes,
|
|
12516
|
-
"onUpdate:modelValue": _cache[
|
|
12606
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).notes = $event)
|
|
12517
12607
|
}, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
12518
12608
|
unref(values).type ? (openBlock(), createBlock(unref(NeonDivider), {
|
|
12519
12609
|
key: 4,
|
|
@@ -12523,13 +12613,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12523
12613
|
unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
12524
12614
|
key: 5,
|
|
12525
12615
|
modelValue: unref(values).submittedAt,
|
|
12526
|
-
"onUpdate:modelValue": _cache[
|
|
12616
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).submittedAt = $event)
|
|
12527
12617
|
}, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
12528
12618
|
createCommentVNode(" EARLY GO HOME "),
|
|
12529
12619
|
unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_4$a, [
|
|
12530
12620
|
createVNode(unref(NeonField), mergeProps({
|
|
12531
12621
|
modelValue: unref(values).startedAt,
|
|
12532
|
-
"onUpdate:modelValue": _cache[
|
|
12622
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).startedAt = $event)
|
|
12533
12623
|
}, {
|
|
12534
12624
|
handle: "startedAt",
|
|
12535
12625
|
name: "Jam Pulang Kerja",
|
|
@@ -12540,7 +12630,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12540
12630
|
input: withCtx(() => [
|
|
12541
12631
|
createVNode(unref(NeonTime), {
|
|
12542
12632
|
modelValue: unref(values).startedAt,
|
|
12543
|
-
"onUpdate:modelValue": _cache[
|
|
12633
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).startedAt = $event),
|
|
12544
12634
|
"is-loading": unref(isLoading),
|
|
12545
12635
|
class: "mt-2",
|
|
12546
12636
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12551,7 +12641,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12551
12641
|
}, 16, ["modelValue"]),
|
|
12552
12642
|
createVNode(unref(NeonField), mergeProps({
|
|
12553
12643
|
modelValue: unref(values).endedAt,
|
|
12554
|
-
"onUpdate:modelValue": _cache[
|
|
12644
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).endedAt = $event)
|
|
12555
12645
|
}, {
|
|
12556
12646
|
handle: "endedAt",
|
|
12557
12647
|
name: "Jam Pulang Lebih Awal",
|
|
@@ -12562,7 +12652,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12562
12652
|
input: withCtx(() => [
|
|
12563
12653
|
createVNode(unref(NeonTime), {
|
|
12564
12654
|
modelValue: unref(values).endedAt,
|
|
12565
|
-
"onUpdate:modelValue": _cache[
|
|
12655
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).endedAt = $event),
|
|
12566
12656
|
"is-loading": unref(isLoading),
|
|
12567
12657
|
class: "mt-2",
|
|
12568
12658
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12583,7 +12673,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12583
12673
|
unref(values).type == "comeLate" ? (openBlock(), createElementBlock("div", _hoisted_6$9, [
|
|
12584
12674
|
createVNode(unref(NeonField), mergeProps({
|
|
12585
12675
|
modelValue: unref(values).startedAt,
|
|
12586
|
-
"onUpdate:modelValue": _cache[
|
|
12676
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).startedAt = $event)
|
|
12587
12677
|
}, {
|
|
12588
12678
|
handle: "startedAt",
|
|
12589
12679
|
name: "Jam Datang",
|
|
@@ -12594,7 +12684,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12594
12684
|
input: withCtx(() => [
|
|
12595
12685
|
createVNode(unref(NeonTime), {
|
|
12596
12686
|
modelValue: unref(values).startedAt,
|
|
12597
|
-
"onUpdate:modelValue": _cache[
|
|
12687
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).startedAt = $event),
|
|
12598
12688
|
"is-loading": unref(isLoading),
|
|
12599
12689
|
class: "mt-2",
|
|
12600
12690
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12605,7 +12695,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12605
12695
|
}, 16, ["modelValue"]),
|
|
12606
12696
|
createVNode(unref(NeonField), mergeProps({
|
|
12607
12697
|
modelValue: unref(values).endedAt,
|
|
12608
|
-
"onUpdate:modelValue": _cache[
|
|
12698
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).endedAt = $event)
|
|
12609
12699
|
}, {
|
|
12610
12700
|
handle: "endedAt",
|
|
12611
12701
|
name: "Jam Datang Terlambat",
|
|
@@ -12616,7 +12706,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12616
12706
|
input: withCtx(() => [
|
|
12617
12707
|
createVNode(unref(NeonTime), {
|
|
12618
12708
|
modelValue: unref(values).endedAt,
|
|
12619
|
-
"onUpdate:modelValue": _cache[
|
|
12709
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).endedAt = $event),
|
|
12620
12710
|
"is-loading": unref(isLoading),
|
|
12621
12711
|
class: "mt-2",
|
|
12622
12712
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12637,7 +12727,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12637
12727
|
unref(values).type == "timeout" ? (openBlock(), createElementBlock("div", _hoisted_8$8, [
|
|
12638
12728
|
createVNode(unref(NeonField), mergeProps({
|
|
12639
12729
|
modelValue: unref(values).startedAt,
|
|
12640
|
-
"onUpdate:modelValue": _cache[
|
|
12730
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).startedAt = $event)
|
|
12641
12731
|
}, {
|
|
12642
12732
|
handle: "startedAt",
|
|
12643
12733
|
name: "Mulai",
|
|
@@ -12648,7 +12738,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12648
12738
|
input: withCtx(() => [
|
|
12649
12739
|
createVNode(unref(NeonTime), {
|
|
12650
12740
|
modelValue: unref(values).startedAt,
|
|
12651
|
-
"onUpdate:modelValue": _cache[
|
|
12741
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).startedAt = $event),
|
|
12652
12742
|
"is-loading": unref(isLoading),
|
|
12653
12743
|
class: "mt-2",
|
|
12654
12744
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12659,7 +12749,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12659
12749
|
}, 16, ["modelValue"]),
|
|
12660
12750
|
createVNode(unref(NeonField), mergeProps({
|
|
12661
12751
|
modelValue: unref(values).endedAt,
|
|
12662
|
-
"onUpdate:modelValue": _cache[
|
|
12752
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => unref(values).endedAt = $event)
|
|
12663
12753
|
}, {
|
|
12664
12754
|
handle: "endedAt",
|
|
12665
12755
|
name: "Selesai",
|
|
@@ -12670,7 +12760,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12670
12760
|
input: withCtx(() => [
|
|
12671
12761
|
createVNode(unref(NeonTime), {
|
|
12672
12762
|
modelValue: unref(values).endedAt,
|
|
12673
|
-
"onUpdate:modelValue": _cache[
|
|
12763
|
+
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(values).endedAt = $event),
|
|
12674
12764
|
"is-loading": unref(isLoading),
|
|
12675
12765
|
class: "mt-2",
|
|
12676
12766
|
"is-disabled": unref(values).status == "notApproved" || unref(values).status == "approved" || unref(values).status == "rejected"
|
|
@@ -12706,7 +12796,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
12706
12796
|
};
|
|
12707
12797
|
}
|
|
12708
12798
|
});
|
|
12709
|
-
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$_, [["__scopeId", "data-v-
|
|
12799
|
+
const AttendanceStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$_, [["__scopeId", "data-v-7951838f"]]);
|
|
12710
12800
|
const _hoisted_1$p = { class: "flex flex-wrap" };
|
|
12711
12801
|
const _hoisted_2$i = { class: "mt-2" };
|
|
12712
12802
|
const _hoisted_3$a = { class: "mt-2" };
|
|
@@ -12772,6 +12862,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12772
12862
|
values.value.startedAt = startedAt.toISOString();
|
|
12773
12863
|
values.value.endedAt = endedAt.toISOString();
|
|
12774
12864
|
}
|
|
12865
|
+
const responseState = ref();
|
|
12866
|
+
const toast = useToastStore();
|
|
12775
12867
|
const { staff } = useOperasional();
|
|
12776
12868
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
12777
12869
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
@@ -12798,7 +12890,43 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12798
12890
|
await executeOne("rejectedAttendance", { attendanceId: id.value });
|
|
12799
12891
|
await syncOne();
|
|
12800
12892
|
};
|
|
12893
|
+
const { client } = useClientHandle();
|
|
12894
|
+
function getNotified() {
|
|
12895
|
+
if (responseState.value === "attendanceGenerated") {
|
|
12896
|
+
toast.push({
|
|
12897
|
+
id: "generate:attendance",
|
|
12898
|
+
content: "Successfully generated attendance.",
|
|
12899
|
+
color: "success"
|
|
12900
|
+
});
|
|
12901
|
+
}
|
|
12902
|
+
}
|
|
12903
|
+
async function generateAttendance() {
|
|
12904
|
+
var _a2, _b;
|
|
12905
|
+
const responseGenerateAttendance = await client.mutation(GraphUtil.executeOne(AttendanceModel, {}), {
|
|
12906
|
+
action: "generateAttendance",
|
|
12907
|
+
input: {
|
|
12908
|
+
attendanceId: values.value.id,
|
|
12909
|
+
// Attendance input.
|
|
12910
|
+
status: values.value.status,
|
|
12911
|
+
submitStaffId: values.value.submitStaffId,
|
|
12912
|
+
type: values.value.type,
|
|
12913
|
+
decideStaffId: values.value.decideStaffId,
|
|
12914
|
+
notes: values.value.notes,
|
|
12915
|
+
submittedAt: values.value.submittedAt,
|
|
12916
|
+
startedAt: values.value.startedAt,
|
|
12917
|
+
endedAt: values.value.endedAt
|
|
12918
|
+
}
|
|
12919
|
+
}).toPromise();
|
|
12920
|
+
const wrapper = (_a2 = responseGenerateAttendance.data) == null ? void 0 : _a2.executeAttendance;
|
|
12921
|
+
responseState.value = (_b = wrapper == null ? void 0 : wrapper.info) == null ? void 0 : _b.state;
|
|
12922
|
+
}
|
|
12923
|
+
async function generate() {
|
|
12924
|
+
await generateAttendance();
|
|
12925
|
+
await getNotified();
|
|
12926
|
+
await syncOne();
|
|
12927
|
+
}
|
|
12801
12928
|
return (_ctx, _cache) => {
|
|
12929
|
+
const _component_NeonFields = resolveComponent("NeonFields");
|
|
12802
12930
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-attendance-single" }, {
|
|
12803
12931
|
default: withCtx(() => [
|
|
12804
12932
|
createVNode(unref(OfficeTabs), { "use-url": unref(isMain) }, {
|
|
@@ -12906,9 +13034,42 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12906
13034
|
"is-disabled": unref(values).status == "approved" || unref(values).status == "rejected",
|
|
12907
13035
|
"onUpdate:modelValue": onStartedAtUpdate
|
|
12908
13036
|
}), null, 16, ["model-value", "is-disabled"])),
|
|
13037
|
+
createVNode(unref(NeonDivider), {
|
|
13038
|
+
label: "Tanggal ini digunakan hanya untuk Generate Absensi",
|
|
13039
|
+
class: "divider"
|
|
13040
|
+
}),
|
|
13041
|
+
createVNode(_component_NeonFields, { md: "grid-cols-3" }, {
|
|
13042
|
+
default: withCtx(() => [
|
|
13043
|
+
createVNode(unref(NeonField), mergeProps({
|
|
13044
|
+
modelValue: unref(values).startedAt,
|
|
13045
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(values).startedAt = $event)
|
|
13046
|
+
}, unref(fields).startedAt, {
|
|
13047
|
+
"is-disabled": unref(values).isGenerate === true
|
|
13048
|
+
}), null, 16, ["modelValue", "is-disabled"]),
|
|
13049
|
+
createVNode(unref(NeonField), mergeProps({
|
|
13050
|
+
modelValue: unref(values).endedAt,
|
|
13051
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(values).endedAt = $event)
|
|
13052
|
+
}, unref(fields).endedAt, {
|
|
13053
|
+
"is-disabled": unref(values).isGenerate === true
|
|
13054
|
+
}), null, 16, ["modelValue", "is-disabled"]),
|
|
13055
|
+
createVNode(unref(NeonButton), {
|
|
13056
|
+
"icon-left": "bolt",
|
|
13057
|
+
label: "Generate",
|
|
13058
|
+
color: "success",
|
|
13059
|
+
class: "mt-12",
|
|
13060
|
+
size: "xs",
|
|
13061
|
+
"is-loading": unref(isLoading),
|
|
13062
|
+
"is-disabled": unref(values).status !== "approved" || unref(values).isGenerate === true,
|
|
13063
|
+
"is-rounded": "",
|
|
13064
|
+
onClick: generate
|
|
13065
|
+
}, null, 8, ["is-loading", "is-disabled"])
|
|
13066
|
+
]),
|
|
13067
|
+
_: 1
|
|
13068
|
+
/* STABLE */
|
|
13069
|
+
}),
|
|
12909
13070
|
createVNode(unref(NeonField), mergeProps({
|
|
12910
13071
|
modelValue: unref(values).type,
|
|
12911
|
-
"onUpdate:modelValue": _cache[
|
|
13072
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => unref(values).type = $event)
|
|
12912
13073
|
}, unref(fields).type, {
|
|
12913
13074
|
"is-disabled": unref(values).status == "approved" || unref(values).status == "rejected"
|
|
12914
13075
|
}), null, 16, ["modelValue", "is-disabled"]),
|
|
@@ -12922,14 +13083,14 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12922
13083
|
unref(values).type == "leave" ? (openBlock(), createBlock(unref(OfficeRelation), {
|
|
12923
13084
|
key: 0,
|
|
12924
13085
|
modelValue: unref(values),
|
|
12925
|
-
"onUpdate:modelValue": _cache[
|
|
13086
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(values) ? values.value = $event : null),
|
|
12926
13087
|
field: unref(fields).delegateStaffs,
|
|
12927
13088
|
"is-disabled": unref(values).status == "approved" || unref(values).status == "rejected"
|
|
12928
13089
|
}, null, 8, ["modelValue", "field", "is-disabled"])) : createCommentVNode("v-if", true),
|
|
12929
13090
|
unref(isNew) || unref(isReady) ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
12930
13091
|
key: 1,
|
|
12931
13092
|
modelValue: unref(values).notes,
|
|
12932
|
-
"onUpdate:modelValue": _cache[
|
|
13093
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(values).notes = $event)
|
|
12933
13094
|
}, unref(fields).notes), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
12934
13095
|
unref(values).type ? (openBlock(), createBlock(unref(NeonDivider), {
|
|
12935
13096
|
key: 2,
|
|
@@ -12939,13 +13100,13 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12939
13100
|
unref(values).type == "dayOff" || unref(values).type == "sick" || unref(values).type == "permission" || unref(values).type == "leave" ? (openBlock(), createBlock(unref(NeonField), mergeProps({
|
|
12940
13101
|
key: 3,
|
|
12941
13102
|
modelValue: unref(values).submittedAt,
|
|
12942
|
-
"onUpdate:modelValue": _cache[
|
|
13103
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => unref(values).submittedAt = $event)
|
|
12943
13104
|
}, unref(fields).submittedAt, { "is-disabled": "" }), null, 16, ["modelValue"])) : createCommentVNode("v-if", true),
|
|
12944
13105
|
createCommentVNode(" EARLY GO HOME "),
|
|
12945
13106
|
unref(values).type == "homeEarly" ? (openBlock(), createElementBlock("div", _hoisted_5$8, [
|
|
12946
13107
|
createVNode(unref(NeonField), mergeProps({
|
|
12947
13108
|
modelValue: unref(values).startedAt,
|
|
12948
|
-
"onUpdate:modelValue": _cache[
|
|
13109
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unref(values).startedAt = $event)
|
|
12949
13110
|
}, {
|
|
12950
13111
|
handle: "startedAt",
|
|
12951
13112
|
name: "Jam Pulang Kerja",
|
|
@@ -12956,7 +13117,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12956
13117
|
input: withCtx(() => [
|
|
12957
13118
|
createVNode(unref(NeonTime), {
|
|
12958
13119
|
modelValue: unref(values).startedAt,
|
|
12959
|
-
"onUpdate:modelValue": _cache[
|
|
13120
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => unref(values).startedAt = $event),
|
|
12960
13121
|
"is-loading": unref(isLoading),
|
|
12961
13122
|
class: "mt-2"
|
|
12962
13123
|
}, null, 8, ["modelValue", "is-loading"])
|
|
@@ -12966,7 +13127,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12966
13127
|
}, 16, ["modelValue"]),
|
|
12967
13128
|
createVNode(unref(NeonField), mergeProps({
|
|
12968
13129
|
modelValue: unref(values).endedAt,
|
|
12969
|
-
"onUpdate:modelValue": _cache[
|
|
13130
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => unref(values).endedAt = $event)
|
|
12970
13131
|
}, {
|
|
12971
13132
|
handle: "endedAt",
|
|
12972
13133
|
name: "Jam Pulang Lebih Awal",
|
|
@@ -12977,7 +13138,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12977
13138
|
input: withCtx(() => [
|
|
12978
13139
|
createVNode(unref(NeonTime), {
|
|
12979
13140
|
modelValue: unref(values).endedAt,
|
|
12980
|
-
"onUpdate:modelValue": _cache[
|
|
13141
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => unref(values).endedAt = $event),
|
|
12981
13142
|
"is-loading": unref(isLoading),
|
|
12982
13143
|
class: "mt-2"
|
|
12983
13144
|
}, null, 8, ["modelValue", "is-loading"]),
|
|
@@ -12997,7 +13158,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
12997
13158
|
unref(values).type == "comeLate" ? (openBlock(), createElementBlock("div", _hoisted_7$7, [
|
|
12998
13159
|
createVNode(unref(NeonField), mergeProps({
|
|
12999
13160
|
modelValue: unref(values).startedAt,
|
|
13000
|
-
"onUpdate:modelValue": _cache[
|
|
13161
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => unref(values).startedAt = $event)
|
|
13001
13162
|
}, {
|
|
13002
13163
|
handle: "startedAt",
|
|
13003
13164
|
name: "Jam Datang",
|
|
@@ -13008,7 +13169,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13008
13169
|
input: withCtx(() => [
|
|
13009
13170
|
createVNode(unref(NeonTime), {
|
|
13010
13171
|
modelValue: unref(values).startedAt,
|
|
13011
|
-
"onUpdate:modelValue": _cache[
|
|
13172
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => unref(values).startedAt = $event),
|
|
13012
13173
|
"is-loading": unref(isLoading),
|
|
13013
13174
|
class: "mt-2"
|
|
13014
13175
|
}, null, 8, ["modelValue", "is-loading"])
|
|
@@ -13018,7 +13179,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13018
13179
|
}, 16, ["modelValue"]),
|
|
13019
13180
|
createVNode(unref(NeonField), mergeProps({
|
|
13020
13181
|
modelValue: unref(values).endedAt,
|
|
13021
|
-
"onUpdate:modelValue": _cache[
|
|
13182
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(values).endedAt = $event)
|
|
13022
13183
|
}, {
|
|
13023
13184
|
handle: "endedAt",
|
|
13024
13185
|
name: "Jam Datang Terlambat",
|
|
@@ -13029,7 +13190,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13029
13190
|
input: withCtx(() => [
|
|
13030
13191
|
createVNode(unref(NeonTime), {
|
|
13031
13192
|
modelValue: unref(values).endedAt,
|
|
13032
|
-
"onUpdate:modelValue": _cache[
|
|
13193
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => unref(values).endedAt = $event),
|
|
13033
13194
|
"is-loading": unref(isLoading),
|
|
13034
13195
|
class: "mt-2"
|
|
13035
13196
|
}, null, 8, ["modelValue", "is-loading"]),
|
|
@@ -13049,7 +13210,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13049
13210
|
unref(values).type == "timeout" ? (openBlock(), createElementBlock("div", _hoisted_9$7, [
|
|
13050
13211
|
createVNode(unref(NeonField), mergeProps({
|
|
13051
13212
|
modelValue: unref(values).startedAt,
|
|
13052
|
-
"onUpdate:modelValue": _cache[
|
|
13213
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => unref(values).startedAt = $event)
|
|
13053
13214
|
}, {
|
|
13054
13215
|
handle: "startedAt",
|
|
13055
13216
|
name: "Mulai",
|
|
@@ -13060,7 +13221,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13060
13221
|
input: withCtx(() => [
|
|
13061
13222
|
createVNode(unref(NeonTime), {
|
|
13062
13223
|
modelValue: unref(values).startedAt,
|
|
13063
|
-
"onUpdate:modelValue": _cache[
|
|
13224
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => unref(values).startedAt = $event),
|
|
13064
13225
|
"is-loading": unref(isLoading),
|
|
13065
13226
|
class: "mt-2"
|
|
13066
13227
|
}, null, 8, ["modelValue", "is-loading"])
|
|
@@ -13070,7 +13231,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13070
13231
|
}, 16, ["modelValue"]),
|
|
13071
13232
|
createVNode(unref(NeonField), mergeProps({
|
|
13072
13233
|
modelValue: unref(values).endedAt,
|
|
13073
|
-
"onUpdate:modelValue": _cache[
|
|
13234
|
+
"onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => unref(values).endedAt = $event)
|
|
13074
13235
|
}, {
|
|
13075
13236
|
handle: "endedAt",
|
|
13076
13237
|
name: "Selesai",
|
|
@@ -13081,7 +13242,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13081
13242
|
input: withCtx(() => [
|
|
13082
13243
|
createVNode(unref(NeonTime), {
|
|
13083
13244
|
modelValue: unref(values).endedAt,
|
|
13084
|
-
"onUpdate:modelValue": _cache[
|
|
13245
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => unref(values).endedAt = $event),
|
|
13085
13246
|
"is-loading": unref(isLoading),
|
|
13086
13247
|
class: "mt-2"
|
|
13087
13248
|
}, null, 8, ["modelValue", "is-loading"]),
|
|
@@ -13116,7 +13277,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
13116
13277
|
};
|
|
13117
13278
|
}
|
|
13118
13279
|
});
|
|
13119
|
-
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$Z, [["__scopeId", "data-v-
|
|
13280
|
+
const AttendanceSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$Z, [["__scopeId", "data-v-ff0ad0fa"]]);
|
|
13120
13281
|
const _withScopeId$2 = (n) => (pushScopeId("data-v-c329f979"), n = n(), popScopeId(), n);
|
|
13121
13282
|
const _hoisted_1$o = { id: "view-checkIns" };
|
|
13122
13283
|
const _hoisted_2$h = { class: "summary" };
|
|
@@ -16372,14 +16533,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
16372
16533
|
createVNode(unref(OfficeRelation), {
|
|
16373
16534
|
modelValue: unref(values),
|
|
16374
16535
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(values) ? values.value = $event : null),
|
|
16375
|
-
field: unref(fields).superviseStaff
|
|
16376
|
-
"is-disabled": ""
|
|
16536
|
+
field: unref(fields).superviseStaff
|
|
16377
16537
|
}, null, 8, ["modelValue", "field"]),
|
|
16378
16538
|
createVNode(unref(OfficeRelation), {
|
|
16379
16539
|
modelValue: unref(values),
|
|
16380
16540
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(values) ? values.value = $event : null),
|
|
16381
|
-
field: unref(fields).supervisedStaffs
|
|
16382
|
-
"is-disabled": ""
|
|
16541
|
+
field: unref(fields).supervisedStaffs
|
|
16383
16542
|
}, null, 8, ["modelValue", "field"])
|
|
16384
16543
|
]),
|
|
16385
16544
|
_: 1
|
|
@@ -16400,7 +16559,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
16400
16559
|
};
|
|
16401
16560
|
}
|
|
16402
16561
|
});
|
|
16403
|
-
const ProgressAccessSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["__scopeId", "data-v-
|
|
16562
|
+
const ProgressAccessSupervisor = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["__scopeId", "data-v-2ca10028"]]);
|
|
16404
16563
|
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
16405
16564
|
...{
|
|
16406
16565
|
name: "ProgressAccessCollection"
|
|
@@ -23063,7 +23222,7 @@ const config = OfficeInterfaces.define({
|
|
|
23063
23222
|
// Progress Access
|
|
23064
23223
|
"ProgressAccessCollection",
|
|
23065
23224
|
"ProgressAccessSingle",
|
|
23066
|
-
"
|
|
23225
|
+
"ProgressAccessSupervisor",
|
|
23067
23226
|
// Responsibility
|
|
23068
23227
|
"ResponsibilityCollection",
|
|
23069
23228
|
"ResponsibilitySingle",
|
package/build/mock/style.css
CHANGED
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
display: block
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.neu-attendance-single[data-v-
|
|
80
|
+
.neu-attendance-single[data-v-7951838f] {
|
|
81
81
|
display: block
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.neu-attendance-single[data-v-
|
|
84
|
+
.neu-attendance-single[data-v-ff0ad0fa] {
|
|
85
85
|
display: block
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
background-color: rgb(250 250 250 / var(--tw-bg-opacity))
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.neu-progress-access-single[data-v-
|
|
300
|
+
.neu-progress-access-single[data-v-2ca10028] {
|
|
301
301
|
display: block
|
|
302
302
|
}
|
|
303
303
|
|
package/build/module.json
CHANGED
package/build/nuxt.json
CHANGED
package/build/nuxt.mjs
CHANGED