@neutron.co.id/operasional-interfaces 1.12.1 → 1.12.4
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 +96 -46
- package/build/index.mjs +96 -46
- package/build/mock/index.cjs +96 -46
- package/build/mock/index.mjs +96 -46
- package/build/mock/style.css +6 -6
- package/build/module.json +1 -1
- package/build/nuxt.json +1 -1
- package/build/office/index.cjs +96 -46
- package/build/office/index.mjs +96 -46
- package/build/office/style.css +6 -6
- package/build/style.css +6 -6
- package/package.json +4 -4
package/build/index.mjs
CHANGED
|
@@ -20560,7 +20560,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
20560
20560
|
discardChanges
|
|
20561
20561
|
} = useSingle();
|
|
20562
20562
|
useRoute();
|
|
20563
|
-
|
|
20563
|
+
usePermit();
|
|
20564
20564
|
const { staff } = useOperasional();
|
|
20565
20565
|
const { coords } = useGeolocation();
|
|
20566
20566
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
@@ -20624,11 +20624,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
20624
20624
|
modelValue: unref(values),
|
|
20625
20625
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(values) ? values.value = $event : null),
|
|
20626
20626
|
field: unref(fields).staff,
|
|
20627
|
-
"is-disabled":
|
|
20628
|
-
"neu:cabangOperasional",
|
|
20629
|
-
"neu:admin",
|
|
20630
|
-
"neu:karyawan"
|
|
20631
|
-
])
|
|
20627
|
+
"is-disabled": unref(values).type === "in" || unref(values).type === "out" || unref(values).type === "home" || unref(values).type === "checkpoint"
|
|
20632
20628
|
}, null, 8, ["modelValue", "field", "is-disabled"]),
|
|
20633
20629
|
createVNode(unref(NeonField), mergeProps({
|
|
20634
20630
|
modelValue: unref(values).note,
|
|
@@ -20653,7 +20649,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
20653
20649
|
};
|
|
20654
20650
|
}
|
|
20655
20651
|
});
|
|
20656
|
-
const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$W, [["__scopeId", "data-v-
|
|
20652
|
+
const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$W, [["__scopeId", "data-v-44977e6b"]]);
|
|
20657
20653
|
const _withScopeId$1 = (n) => (pushScopeId("data-v-aaabd996"), n = n(), popScopeId(), n);
|
|
20658
20654
|
const _hoisted_1$h = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode(
|
|
20659
20655
|
"h4",
|
|
@@ -23937,6 +23933,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
23937
23933
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
23938
23934
|
__name: "ResponsibilitySingle",
|
|
23939
23935
|
setup(__props) {
|
|
23936
|
+
var _a, _b;
|
|
23940
23937
|
const {
|
|
23941
23938
|
fields,
|
|
23942
23939
|
id,
|
|
@@ -23963,13 +23960,13 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
23963
23960
|
};
|
|
23964
23961
|
});
|
|
23965
23962
|
const branchOptions = computed(() => {
|
|
23966
|
-
var
|
|
23963
|
+
var _a2;
|
|
23967
23964
|
return {
|
|
23968
23965
|
filter: [
|
|
23969
23966
|
{
|
|
23970
23967
|
handle: "_id",
|
|
23971
23968
|
operator: "in",
|
|
23972
|
-
value: (
|
|
23969
|
+
value: (_a2 = staff.value) == null ? void 0 : _a2.branchIds
|
|
23973
23970
|
}
|
|
23974
23971
|
]
|
|
23975
23972
|
};
|
|
@@ -23985,6 +23982,19 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
23985
23982
|
]
|
|
23986
23983
|
};
|
|
23987
23984
|
});
|
|
23985
|
+
const branchId = ((_a = staff.value) == null ? void 0 : _a.branchIds) || [];
|
|
23986
|
+
const branchDisplay = ((_b = staff.value) == null ? void 0 : _b.branches) || [];
|
|
23987
|
+
watch(isNew, setInitialValues, { immediate: true });
|
|
23988
|
+
async function setInitialValues() {
|
|
23989
|
+
var _a2;
|
|
23990
|
+
if (!isNew.value)
|
|
23991
|
+
return;
|
|
23992
|
+
await PromiseUtil.wait(1e3);
|
|
23993
|
+
if ((_a2 = staff.value) == null ? void 0 : _a2.branchIds) {
|
|
23994
|
+
values.value.branchIds = [branchId[0]];
|
|
23995
|
+
values.value.branches = [branchDisplay[0]];
|
|
23996
|
+
}
|
|
23997
|
+
}
|
|
23988
23998
|
return (_ctx, _cache) => {
|
|
23989
23999
|
return openBlock(), createBlock(unref(NeonSingle), { class: "neu-responsibility-single" }, {
|
|
23990
24000
|
default: withCtx(() => [
|
|
@@ -24110,7 +24120,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
24110
24120
|
title: "Progress"
|
|
24111
24121
|
}, {
|
|
24112
24122
|
default: withCtx(() => {
|
|
24113
|
-
var
|
|
24123
|
+
var _a2;
|
|
24114
24124
|
return [
|
|
24115
24125
|
createVNode(unref(OfficeCollectionRelated), {
|
|
24116
24126
|
definition: "neu:personalia:progress",
|
|
@@ -24140,7 +24150,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
24140
24150
|
"initial-values": {
|
|
24141
24151
|
responsibilityIds: unref(id),
|
|
24142
24152
|
responsibilities: unref(values),
|
|
24143
|
-
staffIds: (
|
|
24153
|
+
staffIds: (_a2 = unref(staff)) == null ? void 0 : _a2.id,
|
|
24144
24154
|
staffs: unref(staff)
|
|
24145
24155
|
}
|
|
24146
24156
|
}, null, 8, ["query", "is-ready", "initial-values"])
|
|
@@ -24160,7 +24170,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
24160
24170
|
};
|
|
24161
24171
|
}
|
|
24162
24172
|
});
|
|
24163
|
-
const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-
|
|
24173
|
+
const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-23c57dc8"]]);
|
|
24164
24174
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
24165
24175
|
...{
|
|
24166
24176
|
name: "ResponsibilityTypeCollection"
|
|
@@ -25553,7 +25563,7 @@ const SubmissionDetailTab = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scop
|
|
|
25553
25563
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
25554
25564
|
__name: "SubmissionStaff",
|
|
25555
25565
|
setup(__props) {
|
|
25556
|
-
var _a;
|
|
25566
|
+
var _a, _b, _c;
|
|
25557
25567
|
const {
|
|
25558
25568
|
fields,
|
|
25559
25569
|
id,
|
|
@@ -25627,20 +25637,30 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
25627
25637
|
};
|
|
25628
25638
|
});
|
|
25629
25639
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
25640
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
25641
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
25630
25642
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
25631
25643
|
async function setDefaultValues() {
|
|
25632
|
-
var _a2;
|
|
25644
|
+
var _a2, _b2, _c2;
|
|
25633
25645
|
if (!isNew.value)
|
|
25634
25646
|
return;
|
|
25635
25647
|
await PromiseUtil.wait(500);
|
|
25636
25648
|
const defaultValues = {
|
|
25637
25649
|
submissionStaffIds: [staffId],
|
|
25638
25650
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
25651
|
+
branchIds: [branchIds[0]],
|
|
25652
|
+
branches: [branchDisplay[0]],
|
|
25639
25653
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
25640
25654
|
};
|
|
25641
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
25642
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
25643
25655
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
25656
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
25657
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
25658
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
25659
|
+
}
|
|
25660
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
25661
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
25662
|
+
values.value.branches = defaultValues.branches;
|
|
25663
|
+
}
|
|
25644
25664
|
}
|
|
25645
25665
|
const syncRaise = async () => {
|
|
25646
25666
|
var _a2;
|
|
@@ -25673,13 +25693,13 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
25673
25693
|
default: withCtx(() => [
|
|
25674
25694
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
25675
25695
|
input: withCtx(() => {
|
|
25676
|
-
var _a2,
|
|
25696
|
+
var _a2, _b2;
|
|
25677
25697
|
return [
|
|
25678
25698
|
createVNode(unref(NeonButton), {
|
|
25679
25699
|
size: "md",
|
|
25680
25700
|
color: "dark",
|
|
25681
25701
|
"icon-left": "arrow-up-from-line",
|
|
25682
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || !unref(values).agreedStaffs || !unref(values).branches || !unref(values).decideStaffs || !unref(values).followUpStaffs || !unref(values).raiseStaffs || !unref(values).submissionStaffs || !unref(values).title || !unref(values).type || ((
|
|
25702
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "raised" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || !unref(values).agreedStaffs || !unref(values).branches || !unref(values).decideStaffs || !unref(values).followUpStaffs || !unref(values).raiseStaffs || !unref(values).submissionStaffs || !unref(values).title || !unref(values).type || ((_b2 = unref(values).hasRaiseStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
25683
25703
|
onClick: syncRaise
|
|
25684
25704
|
}, {
|
|
25685
25705
|
default: withCtx(() => [
|
|
@@ -25892,7 +25912,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
25892
25912
|
};
|
|
25893
25913
|
}
|
|
25894
25914
|
});
|
|
25895
|
-
const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-
|
|
25915
|
+
const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-e39fa184"]]);
|
|
25896
25916
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
25897
25917
|
__name: "SubmissionFollowUp",
|
|
25898
25918
|
setup(__props) {
|
|
@@ -26111,7 +26131,7 @@ const _hoisted_6 = { class: "mt-2" };
|
|
|
26111
26131
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
26112
26132
|
__name: "SubmissionAudit",
|
|
26113
26133
|
setup(__props) {
|
|
26114
|
-
var _a;
|
|
26134
|
+
var _a, _b, _c;
|
|
26115
26135
|
const {
|
|
26116
26136
|
fields,
|
|
26117
26137
|
id,
|
|
@@ -26186,20 +26206,30 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
26186
26206
|
};
|
|
26187
26207
|
});
|
|
26188
26208
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
26209
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
26210
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
26189
26211
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
26190
26212
|
async function setDefaultValues() {
|
|
26191
|
-
var _a2;
|
|
26213
|
+
var _a2, _b2, _c2;
|
|
26192
26214
|
if (!isNew.value)
|
|
26193
26215
|
return;
|
|
26194
26216
|
await PromiseUtil.wait(500);
|
|
26195
26217
|
const defaultValues = {
|
|
26196
26218
|
submissionStaffIds: [staffId],
|
|
26197
26219
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
26220
|
+
branchIds: [branchIds[0]],
|
|
26221
|
+
branches: [branchDisplay[0]],
|
|
26198
26222
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26199
26223
|
};
|
|
26200
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26201
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26202
26224
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
26225
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
26226
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26227
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26228
|
+
}
|
|
26229
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
26230
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
26231
|
+
values.value.branches = defaultValues.branches;
|
|
26232
|
+
}
|
|
26203
26233
|
}
|
|
26204
26234
|
const syncResolved = async () => {
|
|
26205
26235
|
await executeOne("resolvedSubmission", { submissionId: id.value });
|
|
@@ -26320,13 +26350,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
26320
26350
|
createElementVNode("div", _hoisted_5, [
|
|
26321
26351
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
26322
26352
|
input: withCtx(() => {
|
|
26323
|
-
var _a2,
|
|
26353
|
+
var _a2, _b2;
|
|
26324
26354
|
return [
|
|
26325
26355
|
createVNode(unref(NeonButton), {
|
|
26326
26356
|
size: "md",
|
|
26327
26357
|
color: "warning",
|
|
26328
26358
|
"icon-left": "spinner",
|
|
26329
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || unref(values).status !== "delay" && ((
|
|
26359
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || unref(values).status !== "delay" && ((_b2 = unref(values).hasProcessStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26330
26360
|
onClick: syncProcessed
|
|
26331
26361
|
}, {
|
|
26332
26362
|
default: withCtx(() => [
|
|
@@ -26398,7 +26428,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
26398
26428
|
}),
|
|
26399
26429
|
createVNode(unref(NeonFields), { md: "grid-cols-2" }, {
|
|
26400
26430
|
default: withCtx(() => {
|
|
26401
|
-
var _a2,
|
|
26431
|
+
var _a2, _b2;
|
|
26402
26432
|
return [
|
|
26403
26433
|
createVNode(unref(OfficeRelation), {
|
|
26404
26434
|
modelValue: unref(values),
|
|
@@ -26412,7 +26442,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
26412
26442
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(values) ? values.value = $event : null),
|
|
26413
26443
|
field: unref(fields).raiseStaffs,
|
|
26414
26444
|
query: unref(Query).define(roleStaffOptions.value),
|
|
26415
|
-
"is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || ((
|
|
26445
|
+
"is-disabled": unref(values).status === "processed" || unref(values).status === "approved" || unref(values).status === "monitored" || unref(values).status === "discontinued" || unref(values).status === "resolved" || ((_b2 = unref(values).hasProcessStaffIds) == null ? void 0 : _b2.length) ? true : false
|
|
26416
26446
|
}, null, 8, ["modelValue", "field", "query", "is-disabled"])
|
|
26417
26447
|
];
|
|
26418
26448
|
}),
|
|
@@ -26594,14 +26624,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
26594
26624
|
};
|
|
26595
26625
|
}
|
|
26596
26626
|
});
|
|
26597
|
-
const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-
|
|
26627
|
+
const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-3ef7852b"]]);
|
|
26598
26628
|
const _hoisted_1$3 = { class: "flex flex-wrap" };
|
|
26599
26629
|
const _hoisted_2$3 = { class: "mt-2" };
|
|
26600
26630
|
const _hoisted_3$2 = { class: "mt-2" };
|
|
26601
26631
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
26602
26632
|
__name: "SubmissionDecision",
|
|
26603
26633
|
setup(__props) {
|
|
26604
|
-
var _a;
|
|
26634
|
+
var _a, _b, _c;
|
|
26605
26635
|
const {
|
|
26606
26636
|
fields,
|
|
26607
26637
|
id,
|
|
@@ -26675,20 +26705,30 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
26675
26705
|
};
|
|
26676
26706
|
});
|
|
26677
26707
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
26708
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
26709
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
26678
26710
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
26679
26711
|
async function setDefaultValues() {
|
|
26680
|
-
var _a2;
|
|
26712
|
+
var _a2, _b2, _c2;
|
|
26681
26713
|
if (!isNew.value)
|
|
26682
26714
|
return;
|
|
26683
26715
|
await PromiseUtil.wait(500);
|
|
26684
26716
|
const defaultValues = {
|
|
26685
26717
|
submissionStaffIds: [staffId],
|
|
26686
26718
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
26719
|
+
branchIds: [branchIds[0]],
|
|
26720
|
+
branches: [branchDisplay[0]],
|
|
26687
26721
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26688
26722
|
};
|
|
26689
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26690
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26691
26723
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
26724
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
26725
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26726
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26727
|
+
}
|
|
26728
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
26729
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
26730
|
+
values.value.branches = defaultValues.branches;
|
|
26731
|
+
}
|
|
26692
26732
|
}
|
|
26693
26733
|
const syncDelay = async () => {
|
|
26694
26734
|
var _a2;
|
|
@@ -26731,13 +26771,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
26731
26771
|
createElementVNode("div", _hoisted_2$3, [
|
|
26732
26772
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
26733
26773
|
input: withCtx(() => {
|
|
26734
|
-
var _a2,
|
|
26774
|
+
var _a2, _b2;
|
|
26735
26775
|
return [
|
|
26736
26776
|
createVNode(unref(NeonButton), {
|
|
26737
26777
|
size: "md",
|
|
26738
26778
|
color: "danger",
|
|
26739
26779
|
"icon-left": "circle-stop",
|
|
26740
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((
|
|
26780
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26741
26781
|
onClick: syncDelay
|
|
26742
26782
|
}, {
|
|
26743
26783
|
default: withCtx(() => [
|
|
@@ -26756,13 +26796,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
26756
26796
|
createElementVNode("div", _hoisted_3$2, [
|
|
26757
26797
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
26758
26798
|
input: withCtx(() => {
|
|
26759
|
-
var _a2,
|
|
26799
|
+
var _a2, _b2;
|
|
26760
26800
|
return [
|
|
26761
26801
|
createVNode(unref(NeonButton), {
|
|
26762
26802
|
size: "md",
|
|
26763
26803
|
color: "success",
|
|
26764
26804
|
"icon-left": "list-check",
|
|
26765
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((
|
|
26805
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26766
26806
|
onClick: syncApproved
|
|
26767
26807
|
}, {
|
|
26768
26808
|
default: withCtx(() => [
|
|
@@ -27019,14 +27059,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
27019
27059
|
};
|
|
27020
27060
|
}
|
|
27021
27061
|
});
|
|
27022
|
-
const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-
|
|
27062
|
+
const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-b87a8600"]]);
|
|
27023
27063
|
const _hoisted_1$2 = { class: "flex flex-wrap" };
|
|
27024
27064
|
const _hoisted_2$2 = { class: "mt-2" };
|
|
27025
27065
|
const _hoisted_3$1 = { class: "mt-2" };
|
|
27026
27066
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
27027
27067
|
__name: "SubmissionWaitingDecision",
|
|
27028
27068
|
setup(__props) {
|
|
27029
|
-
var _a;
|
|
27069
|
+
var _a, _b, _c;
|
|
27030
27070
|
const {
|
|
27031
27071
|
fields,
|
|
27032
27072
|
id,
|
|
@@ -27100,20 +27140,30 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
27100
27140
|
};
|
|
27101
27141
|
});
|
|
27102
27142
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
27143
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
27144
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
27103
27145
|
watch(isNew, setDefaultValues, { immediate: true });
|
|
27104
27146
|
async function setDefaultValues() {
|
|
27105
|
-
var _a2;
|
|
27147
|
+
var _a2, _b2, _c2;
|
|
27106
27148
|
if (!isNew.value)
|
|
27107
27149
|
return;
|
|
27108
27150
|
await PromiseUtil.wait(500);
|
|
27109
27151
|
const defaultValues = {
|
|
27110
27152
|
submissionStaffIds: [staffId],
|
|
27111
27153
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
27154
|
+
branchIds: [branchIds[0]],
|
|
27155
|
+
branches: [branchDisplay[0]],
|
|
27112
27156
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
27113
27157
|
};
|
|
27114
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
27115
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
27116
27158
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
27159
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
27160
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
27161
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
27162
|
+
}
|
|
27163
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
27164
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
27165
|
+
values.value.branches = defaultValues.branches;
|
|
27166
|
+
}
|
|
27117
27167
|
}
|
|
27118
27168
|
const syncDelay = async () => {
|
|
27119
27169
|
var _a2;
|
|
@@ -27158,13 +27208,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
27158
27208
|
createElementVNode("div", _hoisted_2$2, [
|
|
27159
27209
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
27160
27210
|
input: withCtx(() => {
|
|
27161
|
-
var _a2,
|
|
27211
|
+
var _a2, _b2;
|
|
27162
27212
|
return [
|
|
27163
27213
|
createVNode(unref(NeonButton), {
|
|
27164
27214
|
size: "md",
|
|
27165
27215
|
color: "danger",
|
|
27166
27216
|
"icon-left": "circle-stop",
|
|
27167
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((
|
|
27217
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
27168
27218
|
onClick: syncDelay
|
|
27169
27219
|
}, {
|
|
27170
27220
|
default: withCtx(() => [
|
|
@@ -27183,13 +27233,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
27183
27233
|
createElementVNode("div", _hoisted_3$1, [
|
|
27184
27234
|
unref(isReady) ? (openBlock(), createBlock(unref(NeonField), { key: 0 }, {
|
|
27185
27235
|
input: withCtx(() => {
|
|
27186
|
-
var _a2,
|
|
27236
|
+
var _a2, _b2;
|
|
27187
27237
|
return [
|
|
27188
27238
|
createVNode(unref(NeonButton), {
|
|
27189
27239
|
size: "md",
|
|
27190
27240
|
color: "success",
|
|
27191
27241
|
"icon-left": "list-check",
|
|
27192
|
-
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((
|
|
27242
|
+
"is-disabled": unref(isNew) || unref(isChanged) || unref(values).status === "prepared" || unref(values).status === "raised" || ((_b2 = unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
27193
27243
|
onClick: syncApproved
|
|
27194
27244
|
}, {
|
|
27195
27245
|
default: withCtx(() => [
|
|
@@ -27402,7 +27452,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
27402
27452
|
};
|
|
27403
27453
|
}
|
|
27404
27454
|
});
|
|
27405
|
-
const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-
|
|
27455
|
+
const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-a3b47d86"]]);
|
|
27406
27456
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
27407
27457
|
__name: "SubmissionSupervisor",
|
|
27408
27458
|
setup(__props) {
|