@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/mock/index.cjs
CHANGED
|
@@ -20648,7 +20648,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
20648
20648
|
discardChanges
|
|
20649
20649
|
} = context.useSingle();
|
|
20650
20650
|
vueRouter.useRoute();
|
|
20651
|
-
|
|
20651
|
+
context.usePermit();
|
|
20652
20652
|
const { staff } = useOperasional$1();
|
|
20653
20653
|
const { coords } = core.useGeolocation();
|
|
20654
20654
|
vue$1.watch(isNew, setDefaultValues, { immediate: true });
|
|
@@ -20712,11 +20712,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
20712
20712
|
modelValue: vue$1.unref(values),
|
|
20713
20713
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue$1.isRef(values) ? values.value = $event : null),
|
|
20714
20714
|
field: vue$1.unref(fields).staff,
|
|
20715
|
-
"is-disabled":
|
|
20716
|
-
"neu:cabangOperasional",
|
|
20717
|
-
"neu:admin",
|
|
20718
|
-
"neu:karyawan"
|
|
20719
|
-
])
|
|
20715
|
+
"is-disabled": vue$1.unref(values).type === "in" || vue$1.unref(values).type === "out" || vue$1.unref(values).type === "home" || vue$1.unref(values).type === "checkpoint"
|
|
20720
20716
|
}, null, 8, ["modelValue", "field", "is-disabled"]),
|
|
20721
20717
|
vue$1.createVNode(vue$1.unref(form.NeonField), vue$1.mergeProps({
|
|
20722
20718
|
modelValue: vue$1.unref(values).note,
|
|
@@ -20741,7 +20737,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
20741
20737
|
};
|
|
20742
20738
|
}
|
|
20743
20739
|
});
|
|
20744
|
-
const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$Y, [["__scopeId", "data-v-
|
|
20740
|
+
const CheckInExternal = /* @__PURE__ */ _export_sfc$1(_sfc_main$Y, [["__scopeId", "data-v-44977e6b"]]);
|
|
20745
20741
|
const _withScopeId$1 = (n) => (vue$1.pushScopeId("data-v-aaabd996"), n = n(), vue$1.popScopeId(), n);
|
|
20746
20742
|
const _hoisted_1$j = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue$1.createElementVNode(
|
|
20747
20743
|
"h4",
|
|
@@ -24025,6 +24021,7 @@ const _sfc_main$x = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24025
24021
|
const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
24026
24022
|
__name: "ResponsibilitySingle",
|
|
24027
24023
|
setup(__props) {
|
|
24024
|
+
var _a, _b;
|
|
24028
24025
|
const {
|
|
24029
24026
|
fields,
|
|
24030
24027
|
id,
|
|
@@ -24051,13 +24048,13 @@ const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24051
24048
|
};
|
|
24052
24049
|
});
|
|
24053
24050
|
const branchOptions = vue$1.computed(() => {
|
|
24054
|
-
var
|
|
24051
|
+
var _a2;
|
|
24055
24052
|
return {
|
|
24056
24053
|
filter: [
|
|
24057
24054
|
{
|
|
24058
24055
|
handle: "_id",
|
|
24059
24056
|
operator: "in",
|
|
24060
|
-
value: (
|
|
24057
|
+
value: (_a2 = staff.value) == null ? void 0 : _a2.branchIds
|
|
24061
24058
|
}
|
|
24062
24059
|
]
|
|
24063
24060
|
};
|
|
@@ -24073,6 +24070,19 @@ const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24073
24070
|
]
|
|
24074
24071
|
};
|
|
24075
24072
|
});
|
|
24073
|
+
const branchId = ((_a = staff.value) == null ? void 0 : _a.branchIds) || [];
|
|
24074
|
+
const branchDisplay = ((_b = staff.value) == null ? void 0 : _b.branches) || [];
|
|
24075
|
+
vue$1.watch(isNew, setInitialValues, { immediate: true });
|
|
24076
|
+
async function setInitialValues() {
|
|
24077
|
+
var _a2;
|
|
24078
|
+
if (!isNew.value)
|
|
24079
|
+
return;
|
|
24080
|
+
await promise.PromiseUtil.wait(1e3);
|
|
24081
|
+
if ((_a2 = staff.value) == null ? void 0 : _a2.branchIds) {
|
|
24082
|
+
values.value.branchIds = [branchId[0]];
|
|
24083
|
+
values.value.branches = [branchDisplay[0]];
|
|
24084
|
+
}
|
|
24085
|
+
}
|
|
24076
24086
|
return (_ctx, _cache) => {
|
|
24077
24087
|
return vue$1.openBlock(), vue$1.createBlock(vue$1.unref(context.NeonSingle), { class: "neu-responsibility-single" }, {
|
|
24078
24088
|
default: vue$1.withCtx(() => [
|
|
@@ -24198,7 +24208,7 @@ const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24198
24208
|
title: "Progress"
|
|
24199
24209
|
}, {
|
|
24200
24210
|
default: vue$1.withCtx(() => {
|
|
24201
|
-
var
|
|
24211
|
+
var _a2;
|
|
24202
24212
|
return [
|
|
24203
24213
|
vue$1.createVNode(vue$1.unref(office$1.OfficeCollectionRelated), {
|
|
24204
24214
|
definition: "neu:personalia:progress",
|
|
@@ -24228,7 +24238,7 @@ const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24228
24238
|
"initial-values": {
|
|
24229
24239
|
responsibilityIds: vue$1.unref(id),
|
|
24230
24240
|
responsibilities: vue$1.unref(values),
|
|
24231
|
-
staffIds: (
|
|
24241
|
+
staffIds: (_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id,
|
|
24232
24242
|
staffs: vue$1.unref(staff)
|
|
24233
24243
|
}
|
|
24234
24244
|
}, null, 8, ["query", "is-ready", "initial-values"])
|
|
@@ -24248,7 +24258,7 @@ const _sfc_main$w = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
24248
24258
|
};
|
|
24249
24259
|
}
|
|
24250
24260
|
});
|
|
24251
|
-
const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["__scopeId", "data-v-
|
|
24261
|
+
const ResponsibilitySingle = /* @__PURE__ */ _export_sfc$1(_sfc_main$w, [["__scopeId", "data-v-23c57dc8"]]);
|
|
24252
24262
|
const _sfc_main$v = /* @__PURE__ */ vue$1.defineComponent({
|
|
24253
24263
|
...{
|
|
24254
24264
|
name: "ResponsibilityTypeCollection"
|
|
@@ -25641,7 +25651,7 @@ const SubmissionDetailTab = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scop
|
|
|
25641
25651
|
const _sfc_main$h = /* @__PURE__ */ vue$1.defineComponent({
|
|
25642
25652
|
__name: "SubmissionStaff",
|
|
25643
25653
|
setup(__props) {
|
|
25644
|
-
var _a;
|
|
25654
|
+
var _a, _b, _c;
|
|
25645
25655
|
const {
|
|
25646
25656
|
fields,
|
|
25647
25657
|
id,
|
|
@@ -25715,20 +25725,30 @@ const _sfc_main$h = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
25715
25725
|
};
|
|
25716
25726
|
});
|
|
25717
25727
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
25728
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
25729
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
25718
25730
|
vue$1.watch(isNew, setDefaultValues, { immediate: true });
|
|
25719
25731
|
async function setDefaultValues() {
|
|
25720
|
-
var _a2;
|
|
25732
|
+
var _a2, _b2, _c2;
|
|
25721
25733
|
if (!isNew.value)
|
|
25722
25734
|
return;
|
|
25723
25735
|
await promise.PromiseUtil.wait(500);
|
|
25724
25736
|
const defaultValues = {
|
|
25725
25737
|
submissionStaffIds: [staffId],
|
|
25726
25738
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
25739
|
+
branchIds: [branchIds[0]],
|
|
25740
|
+
branches: [branchDisplay[0]],
|
|
25727
25741
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
25728
25742
|
};
|
|
25729
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
25730
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
25731
25743
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
25744
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
25745
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
25746
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
25747
|
+
}
|
|
25748
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
25749
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
25750
|
+
values.value.branches = defaultValues.branches;
|
|
25751
|
+
}
|
|
25732
25752
|
}
|
|
25733
25753
|
const syncRaise = async () => {
|
|
25734
25754
|
var _a2;
|
|
@@ -25761,13 +25781,13 @@ const _sfc_main$h = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
25761
25781
|
default: vue$1.withCtx(() => [
|
|
25762
25782
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
25763
25783
|
input: vue$1.withCtx(() => {
|
|
25764
|
-
var _a2,
|
|
25784
|
+
var _a2, _b2;
|
|
25765
25785
|
return [
|
|
25766
25786
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
25767
25787
|
size: "md",
|
|
25768
25788
|
color: "dark",
|
|
25769
25789
|
"icon-left": "arrow-up-from-line",
|
|
25770
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "raised" || vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || !vue$1.unref(values).agreedStaffs || !vue$1.unref(values).branches || !vue$1.unref(values).decideStaffs || !vue$1.unref(values).followUpStaffs || !vue$1.unref(values).raiseStaffs || !vue$1.unref(values).submissionStaffs || !vue$1.unref(values).title || !vue$1.unref(values).type || ((
|
|
25790
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "raised" || vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || !vue$1.unref(values).agreedStaffs || !vue$1.unref(values).branches || !vue$1.unref(values).decideStaffs || !vue$1.unref(values).followUpStaffs || !vue$1.unref(values).raiseStaffs || !vue$1.unref(values).submissionStaffs || !vue$1.unref(values).title || !vue$1.unref(values).type || ((_b2 = vue$1.unref(values).hasRaiseStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
25771
25791
|
onClick: syncRaise
|
|
25772
25792
|
}, {
|
|
25773
25793
|
default: vue$1.withCtx(() => [
|
|
@@ -25980,7 +26000,7 @@ const _sfc_main$h = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
25980
26000
|
};
|
|
25981
26001
|
}
|
|
25982
26002
|
});
|
|
25983
|
-
const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-
|
|
26003
|
+
const SubmissionStaff = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-e39fa184"]]);
|
|
25984
26004
|
const _sfc_main$g = /* @__PURE__ */ vue$1.defineComponent({
|
|
25985
26005
|
__name: "SubmissionFollowUp",
|
|
25986
26006
|
setup(__props) {
|
|
@@ -26199,7 +26219,7 @@ const _hoisted_6 = { class: "mt-2" };
|
|
|
26199
26219
|
const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
26200
26220
|
__name: "SubmissionAudit",
|
|
26201
26221
|
setup(__props) {
|
|
26202
|
-
var _a;
|
|
26222
|
+
var _a, _b, _c;
|
|
26203
26223
|
const {
|
|
26204
26224
|
fields,
|
|
26205
26225
|
id,
|
|
@@ -26274,20 +26294,30 @@ const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26274
26294
|
};
|
|
26275
26295
|
});
|
|
26276
26296
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
26297
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
26298
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
26277
26299
|
vue$1.watch(isNew, setDefaultValues, { immediate: true });
|
|
26278
26300
|
async function setDefaultValues() {
|
|
26279
|
-
var _a2;
|
|
26301
|
+
var _a2, _b2, _c2;
|
|
26280
26302
|
if (!isNew.value)
|
|
26281
26303
|
return;
|
|
26282
26304
|
await promise.PromiseUtil.wait(500);
|
|
26283
26305
|
const defaultValues = {
|
|
26284
26306
|
submissionStaffIds: [staffId],
|
|
26285
26307
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
26308
|
+
branchIds: [branchIds[0]],
|
|
26309
|
+
branches: [branchDisplay[0]],
|
|
26286
26310
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26287
26311
|
};
|
|
26288
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26289
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26290
26312
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
26313
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
26314
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26315
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26316
|
+
}
|
|
26317
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
26318
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
26319
|
+
values.value.branches = defaultValues.branches;
|
|
26320
|
+
}
|
|
26291
26321
|
}
|
|
26292
26322
|
const syncResolved = async () => {
|
|
26293
26323
|
await executeOne("resolvedSubmission", { submissionId: id.value });
|
|
@@ -26408,13 +26438,13 @@ const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26408
26438
|
vue$1.createElementVNode("div", _hoisted_5, [
|
|
26409
26439
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
26410
26440
|
input: vue$1.withCtx(() => {
|
|
26411
|
-
var _a2,
|
|
26441
|
+
var _a2, _b2;
|
|
26412
26442
|
return [
|
|
26413
26443
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
26414
26444
|
size: "md",
|
|
26415
26445
|
color: "warning",
|
|
26416
26446
|
"icon-left": "spinner",
|
|
26417
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || vue$1.unref(values).status !== "delay" && ((
|
|
26447
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || vue$1.unref(values).status !== "delay" && ((_b2 = vue$1.unref(values).hasProcessStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26418
26448
|
onClick: syncProcessed
|
|
26419
26449
|
}, {
|
|
26420
26450
|
default: vue$1.withCtx(() => [
|
|
@@ -26486,7 +26516,7 @@ const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26486
26516
|
}),
|
|
26487
26517
|
vue$1.createVNode(vue$1.unref(form.NeonFields), { md: "grid-cols-2" }, {
|
|
26488
26518
|
default: vue$1.withCtx(() => {
|
|
26489
|
-
var _a2,
|
|
26519
|
+
var _a2, _b2;
|
|
26490
26520
|
return [
|
|
26491
26521
|
vue$1.createVNode(vue$1.unref(office$1.OfficeRelation), {
|
|
26492
26522
|
modelValue: vue$1.unref(values),
|
|
@@ -26500,7 +26530,7 @@ const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26500
26530
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue$1.isRef(values) ? values.value = $event : null),
|
|
26501
26531
|
field: vue$1.unref(fields).raiseStaffs,
|
|
26502
26532
|
query: vue$1.unref(query.Query).define(roleStaffOptions.value),
|
|
26503
|
-
"is-disabled": vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || ((
|
|
26533
|
+
"is-disabled": vue$1.unref(values).status === "processed" || vue$1.unref(values).status === "approved" || vue$1.unref(values).status === "monitored" || vue$1.unref(values).status === "discontinued" || vue$1.unref(values).status === "resolved" || ((_b2 = vue$1.unref(values).hasProcessStaffIds) == null ? void 0 : _b2.length) ? true : false
|
|
26504
26534
|
}, null, 8, ["modelValue", "field", "query", "is-disabled"])
|
|
26505
26535
|
];
|
|
26506
26536
|
}),
|
|
@@ -26682,14 +26712,14 @@ const _sfc_main$f = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26682
26712
|
};
|
|
26683
26713
|
}
|
|
26684
26714
|
});
|
|
26685
|
-
const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-
|
|
26715
|
+
const SubmissionAudit = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__scopeId", "data-v-3ef7852b"]]);
|
|
26686
26716
|
const _hoisted_1$4 = { class: "flex flex-wrap" };
|
|
26687
26717
|
const _hoisted_2$4 = { class: "mt-2" };
|
|
26688
26718
|
const _hoisted_3$2 = { class: "mt-2" };
|
|
26689
26719
|
const _sfc_main$e = /* @__PURE__ */ vue$1.defineComponent({
|
|
26690
26720
|
__name: "SubmissionDecision",
|
|
26691
26721
|
setup(__props) {
|
|
26692
|
-
var _a;
|
|
26722
|
+
var _a, _b, _c;
|
|
26693
26723
|
const {
|
|
26694
26724
|
fields,
|
|
26695
26725
|
id,
|
|
@@ -26763,20 +26793,30 @@ const _sfc_main$e = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26763
26793
|
};
|
|
26764
26794
|
});
|
|
26765
26795
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
26796
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
26797
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
26766
26798
|
vue$1.watch(isNew, setDefaultValues, { immediate: true });
|
|
26767
26799
|
async function setDefaultValues() {
|
|
26768
|
-
var _a2;
|
|
26800
|
+
var _a2, _b2, _c2;
|
|
26769
26801
|
if (!isNew.value)
|
|
26770
26802
|
return;
|
|
26771
26803
|
await promise.PromiseUtil.wait(500);
|
|
26772
26804
|
const defaultValues = {
|
|
26773
26805
|
submissionStaffIds: [staffId],
|
|
26774
26806
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
26807
|
+
branchIds: [branchIds[0]],
|
|
26808
|
+
branches: [branchDisplay[0]],
|
|
26775
26809
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26776
26810
|
};
|
|
26777
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26778
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26779
26811
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
26812
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
26813
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
26814
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
26815
|
+
}
|
|
26816
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
26817
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
26818
|
+
values.value.branches = defaultValues.branches;
|
|
26819
|
+
}
|
|
26780
26820
|
}
|
|
26781
26821
|
const syncDelay = async () => {
|
|
26782
26822
|
var _a2;
|
|
@@ -26819,13 +26859,13 @@ const _sfc_main$e = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26819
26859
|
vue$1.createElementVNode("div", _hoisted_2$4, [
|
|
26820
26860
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
26821
26861
|
input: vue$1.withCtx(() => {
|
|
26822
|
-
var _a2,
|
|
26862
|
+
var _a2, _b2;
|
|
26823
26863
|
return [
|
|
26824
26864
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
26825
26865
|
size: "md",
|
|
26826
26866
|
color: "danger",
|
|
26827
26867
|
"icon-left": "circle-stop",
|
|
26828
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((
|
|
26868
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((_b2 = vue$1.unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26829
26869
|
onClick: syncDelay
|
|
26830
26870
|
}, {
|
|
26831
26871
|
default: vue$1.withCtx(() => [
|
|
@@ -26844,13 +26884,13 @@ const _sfc_main$e = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
26844
26884
|
vue$1.createElementVNode("div", _hoisted_3$2, [
|
|
26845
26885
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
26846
26886
|
input: vue$1.withCtx(() => {
|
|
26847
|
-
var _a2,
|
|
26887
|
+
var _a2, _b2;
|
|
26848
26888
|
return [
|
|
26849
26889
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
26850
26890
|
size: "md",
|
|
26851
26891
|
color: "success",
|
|
26852
26892
|
"icon-left": "list-check",
|
|
26853
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((
|
|
26893
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((_b2 = vue$1.unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
26854
26894
|
onClick: syncApproved
|
|
26855
26895
|
}, {
|
|
26856
26896
|
default: vue$1.withCtx(() => [
|
|
@@ -27107,14 +27147,14 @@ const _sfc_main$e = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
27107
27147
|
};
|
|
27108
27148
|
}
|
|
27109
27149
|
});
|
|
27110
|
-
const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-
|
|
27150
|
+
const SubmissionDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-b87a8600"]]);
|
|
27111
27151
|
const _hoisted_1$3 = { class: "flex flex-wrap" };
|
|
27112
27152
|
const _hoisted_2$3 = { class: "mt-2" };
|
|
27113
27153
|
const _hoisted_3$1 = { class: "mt-2" };
|
|
27114
27154
|
const _sfc_main$d = /* @__PURE__ */ vue$1.defineComponent({
|
|
27115
27155
|
__name: "SubmissionWaitingDecision",
|
|
27116
27156
|
setup(__props) {
|
|
27117
|
-
var _a;
|
|
27157
|
+
var _a, _b, _c;
|
|
27118
27158
|
const {
|
|
27119
27159
|
fields,
|
|
27120
27160
|
id,
|
|
@@ -27188,20 +27228,30 @@ const _sfc_main$d = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
27188
27228
|
};
|
|
27189
27229
|
});
|
|
27190
27230
|
const staffId = ((_a = staff.value) == null ? void 0 : _a.id) || "";
|
|
27231
|
+
const branchIds = ((_b = staff.value) == null ? void 0 : _b.branchIds) || [];
|
|
27232
|
+
const branchDisplay = ((_c = staff.value) == null ? void 0 : _c.branches) || [];
|
|
27191
27233
|
vue$1.watch(isNew, setDefaultValues, { immediate: true });
|
|
27192
27234
|
async function setDefaultValues() {
|
|
27193
|
-
var _a2;
|
|
27235
|
+
var _a2, _b2, _c2;
|
|
27194
27236
|
if (!isNew.value)
|
|
27195
27237
|
return;
|
|
27196
27238
|
await promise.PromiseUtil.wait(500);
|
|
27197
27239
|
const defaultValues = {
|
|
27198
27240
|
submissionStaffIds: [staffId],
|
|
27199
27241
|
submissionStaffs: [{ id: staffId, flag: (_a2 = staff.value) == null ? void 0 : _a2.flag }],
|
|
27242
|
+
branchIds: [branchIds[0]],
|
|
27243
|
+
branches: [branchDisplay[0]],
|
|
27200
27244
|
preparedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
27201
27245
|
};
|
|
27202
|
-
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
27203
|
-
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
27204
27246
|
values.value.preparedAt = defaultValues.preparedAt;
|
|
27247
|
+
if ((_b2 = staff == null ? void 0 : staff.value) == null ? void 0 : _b2.id) {
|
|
27248
|
+
values.value.submissionStaffIds = defaultValues.submissionStaffIds;
|
|
27249
|
+
values.value.submissionStaffs = defaultValues.submissionStaffs;
|
|
27250
|
+
}
|
|
27251
|
+
if ((_c2 = staff == null ? void 0 : staff.value) == null ? void 0 : _c2.branchIds) {
|
|
27252
|
+
values.value.branchIds = defaultValues.branchIds;
|
|
27253
|
+
values.value.branches = defaultValues.branches;
|
|
27254
|
+
}
|
|
27205
27255
|
}
|
|
27206
27256
|
const syncDelay = async () => {
|
|
27207
27257
|
var _a2;
|
|
@@ -27246,13 +27296,13 @@ const _sfc_main$d = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
27246
27296
|
vue$1.createElementVNode("div", _hoisted_2$3, [
|
|
27247
27297
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
27248
27298
|
input: vue$1.withCtx(() => {
|
|
27249
|
-
var _a2,
|
|
27299
|
+
var _a2, _b2;
|
|
27250
27300
|
return [
|
|
27251
27301
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
27252
27302
|
size: "md",
|
|
27253
27303
|
color: "danger",
|
|
27254
27304
|
"icon-left": "circle-stop",
|
|
27255
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((
|
|
27305
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((_b2 = vue$1.unref(values).delayStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
27256
27306
|
onClick: syncDelay
|
|
27257
27307
|
}, {
|
|
27258
27308
|
default: vue$1.withCtx(() => [
|
|
@@ -27271,13 +27321,13 @@ const _sfc_main$d = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
27271
27321
|
vue$1.createElementVNode("div", _hoisted_3$1, [
|
|
27272
27322
|
vue$1.unref(isReady) ? (vue$1.openBlock(), vue$1.createBlock(vue$1.unref(form.NeonField), { key: 0 }, {
|
|
27273
27323
|
input: vue$1.withCtx(() => {
|
|
27274
|
-
var _a2,
|
|
27324
|
+
var _a2, _b2;
|
|
27275
27325
|
return [
|
|
27276
27326
|
vue$1.createVNode(vue$1.unref(interfaces.NeonButton), {
|
|
27277
27327
|
size: "md",
|
|
27278
27328
|
color: "success",
|
|
27279
27329
|
"icon-left": "list-check",
|
|
27280
|
-
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((
|
|
27330
|
+
"is-disabled": vue$1.unref(isNew) || vue$1.unref(isChanged) || vue$1.unref(values).status === "prepared" || vue$1.unref(values).status === "raised" || ((_b2 = vue$1.unref(values).agreedStaffIds) == null ? void 0 : _b2.includes(((_a2 = vue$1.unref(staff)) == null ? void 0 : _a2.id) || "")) ? true : false,
|
|
27281
27331
|
onClick: syncApproved
|
|
27282
27332
|
}, {
|
|
27283
27333
|
default: vue$1.withCtx(() => [
|
|
@@ -27490,7 +27540,7 @@ const _sfc_main$d = /* @__PURE__ */ vue$1.defineComponent({
|
|
|
27490
27540
|
};
|
|
27491
27541
|
}
|
|
27492
27542
|
});
|
|
27493
|
-
const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-
|
|
27543
|
+
const SubmissionWaitingDecision = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-a3b47d86"]]);
|
|
27494
27544
|
const _sfc_main$c = /* @__PURE__ */ vue$1.defineComponent({
|
|
27495
27545
|
__name: "SubmissionSupervisor",
|
|
27496
27546
|
setup(__props) {
|