@wisemen/wise-invoicing-web 0.2.0 → 0.3.1
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/dist/{ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-Dub07ybW.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-DgtUB45R.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-BxNfC6yO.js} +90 -90
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-D0j8qqK-.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-Cuhs9sRn.js} +26 -26
- package/dist/DunningCaseDetailViewDataProvider-ou1FfNWQ.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView--zaPD0-c.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js} +5 -4
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-Co4oLFtZ.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Bw-6rkon.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-IyzJ--TJ.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-8G-11W1e.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-B9gul2ei.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-5KgIdhfL.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-5sJ-u_gT.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-BLVXDPv6.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-CnhYazmB.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.js +47 -0
- package/dist/{InvoicingFileUploadProvider-D9Xk4rQM.js → InvoicingFileUploadProvider-Kcq7kSSt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-CGRa8F-2.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +3 -3
- package/dist/{ReminderSettingsViewDataProvider-1ucp3z2T.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +100 -102
- package/dist/{api.util-C_kMGlJN.js → api.util-CkIRZS3h.js} +985 -930
- package/dist/{billingDocumentDetail.transformer-Da6_-Hv9.js → billingDocumentDetail.transformer-Bfd8geNo.js} +5 -7
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +2 -1
- package/dist/client/types.gen.d.ts +114 -31
- package/dist/client/zod.gen.d.ts +343 -78
- package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
- package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
- package/dist/{creditNoteDetail.query-DLR7L0Ep.js → creditNoteDetail.query-tLnfqsEB.js} +27 -27
- package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
- package/dist/{dist-Cxdm09Lp.js → dist-BQbaoN5W.js} +144 -96
- package/dist/{dist-CoztMdYH.js → dist-CGZBUnWK.js} +62 -62
- package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
- package/dist/{documentTitle.composable-DsBbzhXN.js → documentTitle.composable-CRJjS6p-.js} +19 -17
- package/dist/{i18n.lib-Cvr8pcDw.js → i18n.lib--mzprLMR.js} +88 -54
- package/dist/index.d.ts +56 -22
- package/dist/index.js +193 -201
- package/dist/{invoice.service-DEEA9mal.js → invoice.service-B1w16_Md.js} +184 -172
- package/dist/{invoiceApproval.service-DvL3LliM.js → invoiceApproval.service-BHAJmFkU.js} +8 -8
- package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js} +42 -38
- package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
- package/dist/{invoiceDetail.query-CRoH_SgM.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
- package/dist/{invoiceDeliveryStatus.util-nCsqDypY.js → invoiceIndexCache.util-BDLs7W9m.js} +128 -51
- package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
- package/dist/{issuerSettings.query-Dc5gsaEm.js → issuerSettings.query-CDFk2GiP.js} +3 -2
- package/dist/libs/i18n.lib.d.ts +56 -22
- package/dist/locales/en-US.json.d.ts +44 -27
- package/dist/locales/nl-BE.json.d.ts +44 -27
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
- package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
- package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
- package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
- package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +8 -0
- package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +8 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +2 -3
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +2 -9
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
- package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +2 -3
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +2 -2
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +3 -1
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +7 -4
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +2 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +5 -6
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +0 -5
- package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
- package/dist/{reminderConfig.query-snaHQmrY.js → reminderConfig.query-DSO0ekC_.js} +112 -105
- package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
- package/package.json +3 -3
- package/dist/DunningCaseDetailViewDataProvider-DC-ziMoO.js +0 -409
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +0 -870
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +0 -161
- package/dist/InvoiceApproveDialog-2LXneG2r.js +0 -308
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +0 -318
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +0 -1620
- package/dist/customerUuid.model-GUFYq3O2.js +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +0 -1
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { X as e, Y as t, t as n } from "./api.util-C_kMGlJN.js";
|
|
2
|
-
import { a as r } from "./documentTitle.composable-DsBbzhXN.js";
|
|
3
|
-
import { o as i } from "./invoice.service-DEEA9mal.js";
|
|
4
|
-
import { g as a, z as o } from "./dist-Cxdm09Lp.js";
|
|
5
|
-
import { n as s } from "./dist-boJIIxnT.js";
|
|
6
|
-
import { n as c, t as l } from "./invoiceApprovalStatus.util-3Zh10Pj8.js";
|
|
7
|
-
import { useI18n as u } from "vue-i18n";
|
|
8
|
-
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, renderList as x, unref as S, withCtx as C } from "vue";
|
|
9
|
-
import { UIBadge as w, UIText as T, UITooltip as E, UITooltipContent as D } from "@wisemen/vue-core-design-system";
|
|
10
|
-
//#region src/models/customer/customerDetail.transformer.ts
|
|
11
|
-
var O = class {
|
|
12
|
-
static fromDto(e) {
|
|
13
|
-
return {
|
|
14
|
-
uuid: e.uuid,
|
|
15
|
-
defaultPaymentTermDays: e.defaultPaymentTerm.value
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}, k = class {
|
|
19
|
-
static fromDto(e) {
|
|
20
|
-
return {
|
|
21
|
-
uuid: e.uuid,
|
|
22
|
-
name: e.name,
|
|
23
|
-
type: e.type
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
}, A = class {
|
|
27
|
-
static toDto(e) {
|
|
28
|
-
return {
|
|
29
|
-
filter: { isDeactivated: !1 },
|
|
30
|
-
pagination: e.pagination,
|
|
31
|
-
search: i.toDto(e.search)
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}, j = class {
|
|
35
|
-
static async getAll(t) {
|
|
36
|
-
return (await n.fromPromise(e({ query: A.toDto(t) }))).map((e) => ({
|
|
37
|
-
data: e.data.items.map(k.fromDto),
|
|
38
|
-
meta: e.data.meta
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
static async getByUuid(e) {
|
|
42
|
-
return (await n.fromPromise(t({ path: { uuid: e } }))).map((e) => O.fromDto(e.data));
|
|
43
|
-
}
|
|
44
|
-
}, M = {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "flex min-w-0 items-center gap-xs rounded-sm border border-secondary bg-primary px-sm py-xxs"
|
|
47
|
-
}, N = {
|
|
48
|
-
class: "flex shrink-0 gap-xxs",
|
|
49
|
-
"aria-hidden": "true"
|
|
50
|
-
}, P = 2, F = /* @__PURE__ */ v({
|
|
51
|
-
__name: "InvoiceApprovalStatusChip",
|
|
52
|
-
props: {
|
|
53
|
-
icon: {},
|
|
54
|
-
label: {},
|
|
55
|
-
level: {},
|
|
56
|
-
size: {},
|
|
57
|
-
tone: {}
|
|
58
|
-
},
|
|
59
|
-
setup(e) {
|
|
60
|
-
let t = e, n = f(() => t.level === r._2);
|
|
61
|
-
return (e, r) => t.level === null ? (b(), p(S(w), {
|
|
62
|
-
key: 1,
|
|
63
|
-
label: t.label,
|
|
64
|
-
color: t.tone,
|
|
65
|
-
left: t.icon,
|
|
66
|
-
size: t.size,
|
|
67
|
-
variant: "translucent"
|
|
68
|
-
}, null, 8, [
|
|
69
|
-
"label",
|
|
70
|
-
"color",
|
|
71
|
-
"left",
|
|
72
|
-
"size"
|
|
73
|
-
])) : (b(), h("span", M, [g("span", N, [(b(), h(d, null, x(P, (e) => g("span", {
|
|
74
|
-
key: e,
|
|
75
|
-
class: y([[e <= t.level ? {
|
|
76
|
-
"border-error bg-error-solid": n.value,
|
|
77
|
-
"border-warning-500 bg-warning-solid": !n.value
|
|
78
|
-
} : {
|
|
79
|
-
"border-error": n.value,
|
|
80
|
-
"border-warning-500": !n.value
|
|
81
|
-
}], "h-(--spacing-sm) w-(--spacing-md) rounded-full border"])
|
|
82
|
-
}, null, 2)), 64))]), _(S(T), {
|
|
83
|
-
text: t.label,
|
|
84
|
-
class: "text-xs text-primary"
|
|
85
|
-
}, null, 8, ["text"])]));
|
|
86
|
-
}
|
|
87
|
-
}), I = /* @__PURE__ */ v({
|
|
88
|
-
__name: "InvoiceApprovalStatusBadge",
|
|
89
|
-
props: {
|
|
90
|
-
approval: {},
|
|
91
|
-
rejection: { default: null },
|
|
92
|
-
requiresPriorApproval: { type: Boolean },
|
|
93
|
-
size: { default: "sm" }
|
|
94
|
-
},
|
|
95
|
-
setup(e) {
|
|
96
|
-
let t = e, n = u(), r = s(), i = f(() => l.getDisplayStatus({
|
|
97
|
-
approval: t.approval,
|
|
98
|
-
requiresPriorApproval: t.requiresPriorApproval
|
|
99
|
-
})), g = f(() => i.value === null ? null : l.getMetadata(i.value)), v = f(() => g.value === null ? "" : n.t(g.value.translationKey)), y = f(() => i.value === c.R1 || i.value === c.R2 ? t.approval?.level ?? null : null), x = {
|
|
100
|
-
[c.AWAITING_APPROVAL]: a,
|
|
101
|
-
[c.REJECTED]: o
|
|
102
|
-
}, w = f(() => {
|
|
103
|
-
let e = i.value === null ? void 0 : x[i.value];
|
|
104
|
-
return e === void 0 ? void 0 : {
|
|
105
|
-
icon: e,
|
|
106
|
-
type: "icon"
|
|
107
|
-
};
|
|
108
|
-
}), O = f(() => {
|
|
109
|
-
if (i.value === c.REJECTED && t.rejection !== null) {
|
|
110
|
-
let e = n.t(l.getRejectionReasonTranslationKey(t.rejection.reason));
|
|
111
|
-
return t.rejection.remark === null ? e : `${e} — ${t.rejection.remark}`;
|
|
112
|
-
}
|
|
113
|
-
if (y.value === null) return null;
|
|
114
|
-
let e = t.approval?.reminderSentAt ?? t.approval?.sentAt ?? null;
|
|
115
|
-
return e === null ? null : n.t("wise_invoicing.invoice.approval_status.last_request_sent_on", { date: r.toDate(e) });
|
|
116
|
-
});
|
|
117
|
-
return (e, n) => g.value === null ? m("", !0) : (b(), h(d, { key: 0 }, [O.value === null ? (b(), p(F, {
|
|
118
|
-
key: 1,
|
|
119
|
-
icon: w.value,
|
|
120
|
-
label: v.value,
|
|
121
|
-
level: y.value,
|
|
122
|
-
size: t.size,
|
|
123
|
-
tone: g.value.tone
|
|
124
|
-
}, null, 8, [
|
|
125
|
-
"icon",
|
|
126
|
-
"label",
|
|
127
|
-
"level",
|
|
128
|
-
"size",
|
|
129
|
-
"tone"
|
|
130
|
-
])) : (b(), p(S(E), {
|
|
131
|
-
key: 0,
|
|
132
|
-
"popover-side-offset": 8,
|
|
133
|
-
"popover-align": "center",
|
|
134
|
-
"popover-side": "bottom"
|
|
135
|
-
}, {
|
|
136
|
-
trigger: C(() => [_(F, {
|
|
137
|
-
icon: w.value,
|
|
138
|
-
label: v.value,
|
|
139
|
-
level: y.value,
|
|
140
|
-
size: t.size,
|
|
141
|
-
tone: g.value.tone
|
|
142
|
-
}, null, 8, [
|
|
143
|
-
"icon",
|
|
144
|
-
"label",
|
|
145
|
-
"level",
|
|
146
|
-
"size",
|
|
147
|
-
"tone"
|
|
148
|
-
])]),
|
|
149
|
-
content: C(() => [_(S(D), null, {
|
|
150
|
-
default: C(() => [_(S(T), {
|
|
151
|
-
text: O.value,
|
|
152
|
-
class: "text-sm text-primary"
|
|
153
|
-
}, null, 8, ["text"])]),
|
|
154
|
-
_: 1
|
|
155
|
-
})]),
|
|
156
|
-
_: 1
|
|
157
|
-
}))], 64));
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
//#endregion
|
|
161
|
-
export { F as n, j as r, I as t };
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-Cvr8pcDw.js";
|
|
2
|
-
import "./api.util-C_kMGlJN.js";
|
|
3
|
-
import { h as t } from "./documentTitle.composable-DsBbzhXN.js";
|
|
4
|
-
import { t as n } from "./invoice.service-DEEA9mal.js";
|
|
5
|
-
import { N as r, Q as i, at as a } from "./dist-Cxdm09Lp.js";
|
|
6
|
-
import { t as o } from "./formango.util-D5c2ql--.js";
|
|
7
|
-
import { t as s } from "./invoiceApprovalStatus.util-3Zh10Pj8.js";
|
|
8
|
-
import { n as c, r as l, t as u } from "./InvoicingFileUploadProvider-D9Xk4rQM.js";
|
|
9
|
-
import { z as d } from "zod";
|
|
10
|
-
import { useI18n as f } from "vue-i18n";
|
|
11
|
-
import { computed as p, createBlock as m, createVNode as h, defineComponent as g, mergeProps as _, openBlock as v, unref as y, withCtx as b } from "vue";
|
|
12
|
-
import { useMutation as x } from "@wisemen/vue-core-api-utils";
|
|
13
|
-
import { UIDialogBody as S, UIDialogFooter as C, UIDialogFooterCancel as w, UIDialogFooterSubmit as T, UIDialogHeader as E, UIFormDialog as D, UIFormFieldGroup as O, UIFormFileUpload as k, UIFormSubmitButton as A, UISelect as j, UITextareaField as M, createSelectOptions as N, useToast as P } from "@wisemen/vue-core-design-system";
|
|
14
|
-
import { useForm as F } from "formango";
|
|
15
|
-
//#region src/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.ts
|
|
16
|
-
function I() {
|
|
17
|
-
return x({
|
|
18
|
-
queryFn: (e) => n.archiveApproval(e.params.approvalUuid),
|
|
19
|
-
queryKeysToInvalidate: {
|
|
20
|
-
invoiceApprovalIndex: {},
|
|
21
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
22
|
-
invoiceIndex: {}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue
|
|
28
|
-
var L = /* @__PURE__ */ g({
|
|
29
|
-
__name: "InvoiceApprovalArchiveDialog",
|
|
30
|
-
props: {
|
|
31
|
-
approvalUuid: {},
|
|
32
|
-
invoiceUuid: {}
|
|
33
|
-
},
|
|
34
|
-
emits: ["close"],
|
|
35
|
-
setup(e, { emit: t }) {
|
|
36
|
-
let n = e, i = t, a = f(), o = P(), s = I(), c = F({
|
|
37
|
-
initialState: {},
|
|
38
|
-
schema: d.object({}),
|
|
39
|
-
onSubmit: async () => {
|
|
40
|
-
let e = await s.execute({ params: {
|
|
41
|
-
approvalUuid: n.approvalUuid,
|
|
42
|
-
invoiceUuid: n.invoiceUuid
|
|
43
|
-
} });
|
|
44
|
-
if (e.isErr()) {
|
|
45
|
-
o.apiError(e.error);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
o.show({ message: a.t("wise_invoicing.invoice.approval_archive.success") }), i("close");
|
|
49
|
-
},
|
|
50
|
-
onSubmitError: () => {
|
|
51
|
-
o.unableToSave();
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
return (e, t) => (v(), m(y(D), {
|
|
55
|
-
form: y(c),
|
|
56
|
-
size: "sm",
|
|
57
|
-
onClose: t[0] ||= (e) => i("close")
|
|
58
|
-
}, {
|
|
59
|
-
default: b(() => [h(y(E), {
|
|
60
|
-
title: y(a).t("wise_invoicing.invoice.approval_archive.title"),
|
|
61
|
-
description: y(a).t("wise_invoicing.invoice.approval_archive.description"),
|
|
62
|
-
icon: y(r),
|
|
63
|
-
"icon-variant": "error"
|
|
64
|
-
}, null, 8, [
|
|
65
|
-
"title",
|
|
66
|
-
"description",
|
|
67
|
-
"icon"
|
|
68
|
-
]), h(y(C), null, {
|
|
69
|
-
default: b(() => [h(y(w)), h(y(T), { label: y(a).t("wise_invoicing.invoice.approval_archive.submit") }, null, 8, ["label"])]),
|
|
70
|
-
_: 1
|
|
71
|
-
})]),
|
|
72
|
-
_: 1
|
|
73
|
-
}, 8, ["form"]));
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/modules/invoice/api/mutations/invoiceRejectApproval.mutation.ts
|
|
78
|
-
function R() {
|
|
79
|
-
return x({
|
|
80
|
-
queryFn: (e) => n.rejectApproval(e.params.approvalUuid, e.body),
|
|
81
|
-
queryKeysToInvalidate: {
|
|
82
|
-
invoiceApprovalIndex: {},
|
|
83
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
84
|
-
invoiceIndex: {}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
var z = d.object({
|
|
89
|
-
reason: d.enum(t).nullable(),
|
|
90
|
-
remarks: d.string().trim().max(500).nullable()
|
|
91
|
-
}).superRefine((n, r) => {
|
|
92
|
-
if (n.reason === null) {
|
|
93
|
-
r.addIssue({
|
|
94
|
-
code: "custom",
|
|
95
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
96
|
-
path: ["reason"]
|
|
97
|
-
});
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
n.reason === t.OTHER && (n.remarks ?? "") === "" && r.addIssue({
|
|
101
|
-
code: "custom",
|
|
102
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
103
|
-
path: ["remarks"]
|
|
104
|
-
});
|
|
105
|
-
}), B = /* @__PURE__ */ g({
|
|
106
|
-
__name: "InvoiceRejectDialog",
|
|
107
|
-
props: {
|
|
108
|
-
approvalUuid: {},
|
|
109
|
-
invoiceUuid: {}
|
|
110
|
-
},
|
|
111
|
-
emits: ["close"],
|
|
112
|
-
setup(e, { emit: n }) {
|
|
113
|
-
let r = e, a = n, c = f(), l = P(), u = R(), d = F({
|
|
114
|
-
initialState: {
|
|
115
|
-
reason: null,
|
|
116
|
-
remarks: null
|
|
117
|
-
},
|
|
118
|
-
schema: z,
|
|
119
|
-
onSubmit: async (e) => {
|
|
120
|
-
let t = await u.execute({
|
|
121
|
-
body: e,
|
|
122
|
-
params: {
|
|
123
|
-
approvalUuid: r.approvalUuid,
|
|
124
|
-
invoiceUuid: r.invoiceUuid
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
if (t.isErr()) {
|
|
128
|
-
l.apiError(t.error);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
l.show({ message: c.t("wise_invoicing.invoice.reject.success") }), a("close");
|
|
132
|
-
},
|
|
133
|
-
onSubmitError: () => {
|
|
134
|
-
l.unableToSave();
|
|
135
|
-
}
|
|
136
|
-
}), g = d.register("reason"), x = d.register("remarks"), T = p(() => N([...Object.values(t).filter((e) => e !== t.OTHER), t.OTHER]));
|
|
137
|
-
function k(e) {
|
|
138
|
-
return c.t(s.getRejectionReasonTranslationKey(e));
|
|
139
|
-
}
|
|
140
|
-
let I = p(() => g.modelValue.value === t.OTHER);
|
|
141
|
-
return (e, t) => (v(), m(y(D), {
|
|
142
|
-
form: y(d),
|
|
143
|
-
size: "sm",
|
|
144
|
-
onClose: t[0] ||= (e) => a("close")
|
|
145
|
-
}, {
|
|
146
|
-
default: b(() => [
|
|
147
|
-
h(y(E), {
|
|
148
|
-
title: y(c).t("wise_invoicing.invoice.reject.title"),
|
|
149
|
-
description: y(c).t("wise_invoicing.invoice.reject.description"),
|
|
150
|
-
icon: y(i),
|
|
151
|
-
"icon-variant": "warning"
|
|
152
|
-
}, null, 8, [
|
|
153
|
-
"title",
|
|
154
|
-
"description",
|
|
155
|
-
"icon"
|
|
156
|
-
]),
|
|
157
|
-
h(y(S), null, {
|
|
158
|
-
default: b(() => [h(y(O), null, {
|
|
159
|
-
default: b(() => [h(y(j), _(y(o)(y(g)), {
|
|
160
|
-
"display-fn": k,
|
|
161
|
-
"is-required": !0,
|
|
162
|
-
items: T.value,
|
|
163
|
-
label: y(c).t("wise_invoicing.invoice.reject.fields.reason")
|
|
164
|
-
}), null, 16, ["items", "label"]), h(y(M), _(y(o)(y(x)), {
|
|
165
|
-
"is-required": I.value,
|
|
166
|
-
label: y(c).t("wise_invoicing.invoice.reject.fields.remark"),
|
|
167
|
-
placeholder: y(c).t("wise_invoicing.invoice.reject.fields.remark_placeholder")
|
|
168
|
-
}), null, 16, [
|
|
169
|
-
"is-required",
|
|
170
|
-
"label",
|
|
171
|
-
"placeholder"
|
|
172
|
-
])]),
|
|
173
|
-
_: 1
|
|
174
|
-
})]),
|
|
175
|
-
_: 1
|
|
176
|
-
}),
|
|
177
|
-
h(y(C), null, {
|
|
178
|
-
default: b(() => [h(y(w)), h(y(A), { label: y(c).t("wise_invoicing.invoice.reject.submit") }, null, 8, ["label"])]),
|
|
179
|
-
_: 1
|
|
180
|
-
})
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["form"]));
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region src/modules/invoice/api/mutations/invoiceSendApproval.mutation.ts
|
|
188
|
-
function V() {
|
|
189
|
-
return x({
|
|
190
|
-
queryFn: (e) => e.params.hasActiveApproval ? n.restartApproval(e.params.invoiceUuid) : n.sendApproval(e.params.invoiceUuid),
|
|
191
|
-
queryKeysToInvalidate: {
|
|
192
|
-
invoiceApprovalIndex: {},
|
|
193
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
194
|
-
invoiceIndex: {}
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.ts
|
|
200
|
-
function H() {
|
|
201
|
-
return x({
|
|
202
|
-
queryFn: (e) => n.unmarkAsPriorApprovalRequired(e.params.invoiceUuid),
|
|
203
|
-
queryKeysToInvalidate: {
|
|
204
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
205
|
-
invoiceIndex: {}
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/modules/invoice/api/mutations/invoiceApproveApproval.mutation.ts
|
|
211
|
-
function U() {
|
|
212
|
-
return x({
|
|
213
|
-
queryFn: (e) => n.approveApproval(e.params.approvalUuid, e.body),
|
|
214
|
-
queryKeysToInvalidate: {
|
|
215
|
-
invoiceApprovalIndex: {},
|
|
216
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
217
|
-
invoiceIndex: {}
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
var W = d.object({
|
|
222
|
-
proofOfApproval: c.array().max(1),
|
|
223
|
-
remarks: d.string().trim().max(500).nullable()
|
|
224
|
-
}), G = 10485760, K = /* @__PURE__ */ g({
|
|
225
|
-
__name: "InvoiceApproveDialog",
|
|
226
|
-
props: {
|
|
227
|
-
approvalUuid: {},
|
|
228
|
-
invoiceUuid: {}
|
|
229
|
-
},
|
|
230
|
-
emits: ["close"],
|
|
231
|
-
setup(e, { emit: t }) {
|
|
232
|
-
let n = e, r = t, i = f(), s = P(), c = U(), d = F({
|
|
233
|
-
initialState: {
|
|
234
|
-
proofOfApproval: [],
|
|
235
|
-
remarks: null
|
|
236
|
-
},
|
|
237
|
-
schema: W,
|
|
238
|
-
onSubmit: async (e) => {
|
|
239
|
-
let t = await c.execute({
|
|
240
|
-
body: e,
|
|
241
|
-
params: {
|
|
242
|
-
approvalUuid: n.approvalUuid,
|
|
243
|
-
invoiceUuid: n.invoiceUuid
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
if (t.isErr()) {
|
|
247
|
-
s.apiError(t.error);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
s.show({ message: i.t("wise_invoicing.invoice.approve.success") }), r("close");
|
|
251
|
-
},
|
|
252
|
-
onSubmitError: () => {
|
|
253
|
-
s.unableToSave();
|
|
254
|
-
}
|
|
255
|
-
}), p = d.register("proofOfApproval"), g = d.register("remarks");
|
|
256
|
-
function x(e) {
|
|
257
|
-
return e.size > G ? i.t("wise_invoicing.invoice.approve.proof_too_large") : !0;
|
|
258
|
-
}
|
|
259
|
-
return (e, t) => (v(), m(y(D), {
|
|
260
|
-
form: y(d),
|
|
261
|
-
size: "sm",
|
|
262
|
-
onClose: t[0] ||= (e) => r("close")
|
|
263
|
-
}, {
|
|
264
|
-
default: b(() => [
|
|
265
|
-
h(y(E), {
|
|
266
|
-
title: y(i).t("wise_invoicing.invoice.approve.title"),
|
|
267
|
-
description: y(i).t("wise_invoicing.invoice.approve.description"),
|
|
268
|
-
icon: y(a),
|
|
269
|
-
"icon-variant": "success"
|
|
270
|
-
}, null, 8, [
|
|
271
|
-
"title",
|
|
272
|
-
"description",
|
|
273
|
-
"icon"
|
|
274
|
-
]),
|
|
275
|
-
h(y(S), null, {
|
|
276
|
-
default: b(() => [h(y(O), null, {
|
|
277
|
-
default: b(() => [h(u, null, {
|
|
278
|
-
default: b(() => [h(y(k), _(y(o)(y(p)), {
|
|
279
|
-
accept: [
|
|
280
|
-
"application/pdf",
|
|
281
|
-
"image/png",
|
|
282
|
-
"image/jpeg"
|
|
283
|
-
],
|
|
284
|
-
"is-valid-file": x,
|
|
285
|
-
max: 1,
|
|
286
|
-
preprocess: y(l).preprocess,
|
|
287
|
-
class: "w-full"
|
|
288
|
-
}), null, 16, ["preprocess"])]),
|
|
289
|
-
_: 1
|
|
290
|
-
}), h(y(M), _(y(o)(y(g)), {
|
|
291
|
-
label: y(i).t("wise_invoicing.invoice.approve.fields.note"),
|
|
292
|
-
placeholder: y(i).t("wise_invoicing.invoice.approve.fields.note_placeholder")
|
|
293
|
-
}), null, 16, ["label", "placeholder"])]),
|
|
294
|
-
_: 1
|
|
295
|
-
})]),
|
|
296
|
-
_: 1
|
|
297
|
-
}),
|
|
298
|
-
h(y(C), null, {
|
|
299
|
-
default: b(() => [h(y(w)), h(y(A), { label: y(i).t("wise_invoicing.invoice.approve.submit") }, null, 8, ["label"])]),
|
|
300
|
-
_: 1
|
|
301
|
-
})
|
|
302
|
-
]),
|
|
303
|
-
_: 1
|
|
304
|
-
}, 8, ["form"]));
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
//#endregion
|
|
308
|
-
export { L as a, B as i, H as n, V as r, K as t };
|