@wisemen/wise-invoicing-web 0.18.0 → 0.20.0
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-BZBuz6EF.js → ApprovalReminderSettingsViewDataProvider-DMWLX53_.js} +11 -11
- package/dist/{BillingDocumentDetailViewDataProvider-BCADHPFR.js → BillingDocumentDetailViewDataProvider-jpp-QwPi.js} +1474 -1454
- package/dist/{BillingDocumentPdf-ddBlGdIN.js → BillingDocumentPdf-Zw3GXZVE.js} +82 -82
- package/dist/{DunningCaseSendDialog-fgL9OsV8.js → DunningCaseSendDialog-CA-nzjzV.js} +23 -23
- package/dist/{InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js → InvoiceApprovalOutOfSyncIndicator-Dnw03isr.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-BIiJ6gen.js → InvoiceApprovalOverviewView-CoJXggOy.js} +140 -140
- package/dist/{InvoiceApprovalStatusBadge-CaVSCtI0.js → InvoiceApprovalStatusBadge-BWx3Fhuy.js} +3 -3
- package/dist/{InvoicePdfView-BRJaAErd.js → InvoicePdfView-Bv5aMLh6.js} +2 -2
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js → InvoicePublicProFormaPdfViewDataProvider-Ca7-AmAH.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-C9NhZX-D.js → InvoiceRejectDialog-Ca-4nz4U.js} +178 -178
- package/dist/{invoiceDeliveryStatus.util-Dp9hD1Tj.js → InvoiceStatusBadge-uXAh9ypU.js} +83 -83
- package/dist/{InvoicingFileUploadProvider-rU9APFrt.js → InvoicingFileUploadProvider-C3cyIUhL.js} +2 -2
- package/dist/IssuerSettingsViewDataProvider-C-CRF9sK.js +544 -0
- package/dist/{PeppolSettingsViewDataProvider-DymLdaRM.js → PeppolSettingsViewDataProvider-COQEInsh.js} +32 -32
- package/dist/{api.util-sW4gNny-.js → api.util-DSerLsgA.js} +666 -648
- package/dist/billingDocumentDetail.transformer-ClWwi8h4.js +310 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +5 -5
- package/dist/client/types.gen.d.ts +81 -46
- package/dist/client/zod.gen.d.ts +1304 -96
- package/dist/{creditNoteDetail.query-DiS_-xFz.js → creditNoteDetail.query-q1b6nzu0.js} +5 -5
- package/dist/{InvoiceDeliverySendDialog-BICcd6Cf.js → customFieldDefinitionIndex.query-DQxer9Je.js} +236 -239
- package/dist/{deliveryReason.util-KBh3q_-P.js → deliveryReason.util-BlxvUaz0.js} +2 -2
- package/dist/{dist-C99_-gWv.js → dist-47-1LAzT.js} +6 -6
- package/dist/{documentTitle.composable-Dl8Cm3v3.js → documentTitle.composable-D5uPh3uG.js} +37 -35
- package/dist/{i18n.lib-DckceEsg.js → i18n.lib-DB15VQsH.js} +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6021 -3054
- package/dist/{invoice.service-2QiktTs9.js → invoice.service-BKgP2p8z.js} +199 -198
- package/dist/{invoiceApproval.service-DXIKgCI_.js → invoiceApproval.service-oT1fvhsW.js} +5 -4
- package/dist/{invoiceApprovalStatus.util-CB5pi_hm.js → invoiceApprovalStatus.util-D17DWEh1.js} +29 -29
- package/dist/{invoiceCustomer.service-BNQJt1KV.js → invoiceCustomer.service-CLYUR6vc.js} +2 -2
- package/dist/{invoiceDetail.query-MIrBYgNS.js → invoiceDetail.query-CzyZqT82.js} +1 -1
- package/dist/{invoicingConfig.composable-D-hxnEnh.js → invoicingConfig.composable-CzgTMtog.js} +2 -2
- package/dist/{issuerSettings.query-CR7EtvNm.js → issuerSettings.query-D8T34N7f.js} +27 -27
- package/dist/libs/i18n.lib.d.ts +2 -0
- package/dist/locales/en-US.json.d.ts +1 -0
- package/dist/locales/nl-BE.json.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +2 -2
- package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -3
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +2 -1
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +2 -2
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -1
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +2 -1
- package/dist/{reminderConfig.query-DJmhJp6W.js → reminderConfig.query-CFmCWWlO.js} +7 -7
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/CreditNoteDetailViewDataProvider-Donn5pVv.js +0 -816
- package/dist/CreditNotePdfViewDataProvider-c-apCeCW.js +0 -22
- package/dist/InvoiceDetailViewDataProvider-BppXFT6D.js +0 -2176
- package/dist/InvoicePdfViewDataProvider-J7NP1Dhh.js +0 -22
- package/dist/IssuerSettingsViewDataProvider-D13f6rvi.js +0 -544
- package/dist/billingDocumentDetail.transformer-DcNMzl46.js +0 -310
- package/dist/download.util-LyRpGWKA.js +0 -25
package/dist/{InvoiceApprovalStatusBadge-CaVSCtI0.js → InvoiceApprovalStatusBadge-BWx3Fhuy.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { a as e,
|
|
1
|
+
import "./api.util-DSerLsgA.js";
|
|
2
|
+
import { a as e, s as t } from "./documentTitle.composable-D5uPh3uG.js";
|
|
3
3
|
import { $ as n, S as r } from "./dist-B33lNwLw.js";
|
|
4
4
|
import { r as i } from "./dist-CyUNvdkD.js";
|
|
5
|
-
import { t as a } from "./invoiceApprovalStatus.util-
|
|
5
|
+
import { t as a } from "./invoiceApprovalStatus.util-D17DWEh1.js";
|
|
6
6
|
import { useI18n as o } from "vue-i18n";
|
|
7
7
|
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, unref as v, withCtx as y } from "vue";
|
|
8
8
|
import { UIBadge as b, UIText as x, UITooltip as S, UITooltipContent as C } from "@wisemen/vue-core-design-system";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./documentTitle.composable-
|
|
2
|
-
import { t } from "./BillingDocumentPdf-
|
|
1
|
+
import { t as e } from "./documentTitle.composable-D5uPh3uG.js";
|
|
2
|
+
import { t } from "./BillingDocumentPdf-Zw3GXZVE.js";
|
|
3
3
|
import { useI18n as n } from "vue-i18n";
|
|
4
4
|
import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s } from "vue";
|
|
5
5
|
//#region src/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e } from "./invoicingConfig.composable-
|
|
2
|
-
import { t } from "./invoice.service-
|
|
1
|
+
import { n as e } from "./invoicingConfig.composable-CzgTMtog.js";
|
|
2
|
+
import { t } from "./invoice.service-BKgP2p8z.js";
|
|
3
3
|
import { t as n } from "./DataProvider-BtnD-BzI.js";
|
|
4
|
-
import { t as r } from "./InvoicePdfView-
|
|
4
|
+
import { t as r } from "./InvoicePdfView-Bv5aMLh6.js";
|
|
5
5
|
import { useI18n as i } from "vue-i18n";
|
|
6
6
|
import { computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, resolveDynamicComponent as f, unref as p, watch as m, withCtx as h } from "vue";
|
|
7
7
|
import { useQuery as g } from "@wisemen/vue-core-api-utils";
|
package/dist/{InvoiceApproveDialogDataProvider-C9NhZX-D.js → InvoiceRejectDialog-Ca-4nz4U.js}
RENAMED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import {
|
|
4
|
-
import { t as n } from "./invoice.service-
|
|
1
|
+
import { t as e } from "./i18n.lib-DB15VQsH.js";
|
|
2
|
+
import "./api.util-DSerLsgA.js";
|
|
3
|
+
import { y as t } from "./documentTitle.composable-D5uPh3uG.js";
|
|
4
|
+
import { t as n } from "./invoice.service-BKgP2p8z.js";
|
|
5
5
|
import { G as r, ft as i, xt as a } from "./dist-B33lNwLw.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
6
|
+
import { n as o, r as s, t as c } from "./InvoicingFileUploadProvider-C3cyIUhL.js";
|
|
7
|
+
import { t as l } from "./formango.util-D5c2ql--.js";
|
|
8
|
+
import { t as u } from "./invoiceApprovalStatus.util-D17DWEh1.js";
|
|
9
|
+
import { t as d } from "./DataProvider-BtnD-BzI.js";
|
|
10
|
+
import { t as f } from "./issuerSettings.query-D8T34N7f.js";
|
|
11
11
|
import { z as p } from "zod";
|
|
12
12
|
import { useI18n as m } from "vue-i18n";
|
|
13
13
|
import { computed as h, createBlock as g, createVNode as _, defineComponent as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
|
|
14
14
|
import { useMutation as C } from "@wisemen/vue-core-api-utils";
|
|
15
15
|
import { UIDialogBody as w, UIDialogFooter as T, UIDialogFooterCancel as E, UIDialogFooterSubmit as D, UIDialogHeader as O, UIFormDialog as k, UIFormFieldGroup as A, UIFormFileUpload as j, UIFormSubmitButton as M, UISelect as N, UITextareaField as P, createSelectOptions as F, useToast as I } from "@wisemen/vue-core-design-system";
|
|
16
16
|
import { useForm as L } from "formango";
|
|
17
|
-
//#region src/modules/invoice/api/mutations/
|
|
17
|
+
//#region src/modules/invoice/api/mutations/invoiceSendApproval.mutation.ts
|
|
18
18
|
function R() {
|
|
19
|
+
return C({
|
|
20
|
+
queryFn: (e) => e.params.hasActiveApproval ? n.restartApproval(e.params.invoiceUuid) : n.sendApproval(e.params.invoiceUuid),
|
|
21
|
+
queryKeysToInvalidate: {
|
|
22
|
+
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
23
|
+
invoiceApprovalIndex: {},
|
|
24
|
+
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
25
|
+
invoiceIndex: {}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.ts
|
|
31
|
+
function z() {
|
|
19
32
|
return C({
|
|
20
33
|
queryFn: (e) => n.archiveApproval(e.params.approvalUuid),
|
|
21
34
|
queryKeysToInvalidate: {
|
|
@@ -28,7 +41,7 @@ function R() {
|
|
|
28
41
|
}
|
|
29
42
|
//#endregion
|
|
30
43
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue
|
|
31
|
-
var
|
|
44
|
+
var B = /* @__PURE__ */ v({
|
|
32
45
|
__name: "InvoiceApprovalArchiveDialog",
|
|
33
46
|
props: {
|
|
34
47
|
approvalUuid: {},
|
|
@@ -36,7 +49,7 @@ var z = /* @__PURE__ */ v({
|
|
|
36
49
|
},
|
|
37
50
|
emits: ["close"],
|
|
38
51
|
setup(e, { emit: t }) {
|
|
39
|
-
let n = e, i = t, a = m(), o = I(), s =
|
|
52
|
+
let n = e, i = t, a = m(), o = I(), s = z(), c = L({
|
|
40
53
|
initialState: {},
|
|
41
54
|
schema: p.object({}),
|
|
42
55
|
onSubmit: async () => {
|
|
@@ -73,151 +86,8 @@ var z = /* @__PURE__ */ v({
|
|
|
73
86
|
}
|
|
74
87
|
});
|
|
75
88
|
//#endregion
|
|
76
|
-
//#region src/modules/invoice/api/mutations/invoiceRejectApproval.mutation.ts
|
|
77
|
-
function B() {
|
|
78
|
-
return C({
|
|
79
|
-
queryFn: (e) => n.rejectApproval(e.params.approvalUuid, e.body),
|
|
80
|
-
queryKeysToInvalidate: {
|
|
81
|
-
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
82
|
-
invoiceApprovalIndex: {},
|
|
83
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
84
|
-
invoiceIndex: {}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
var V = p.object({
|
|
89
|
-
attachments: u.array(),
|
|
90
|
-
reason: p.enum(t).nullable(),
|
|
91
|
-
remarks: p.string().trim().max(500).nullable()
|
|
92
|
-
}).superRefine((n, r) => {
|
|
93
|
-
n.reason === null ? r.addIssue({
|
|
94
|
-
code: "custom",
|
|
95
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
96
|
-
path: ["reason"]
|
|
97
|
-
}) : n.reason === t.OTHER && (n.remarks ?? "") === "" && r.addIssue({
|
|
98
|
-
code: "custom",
|
|
99
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
100
|
-
path: ["remarks"]
|
|
101
|
-
});
|
|
102
|
-
}), H = 10485760, U = /* @__PURE__ */ v({
|
|
103
|
-
__name: "InvoiceRejectDialog",
|
|
104
|
-
props: {
|
|
105
|
-
approvalUuid: {},
|
|
106
|
-
invoiceUuid: {}
|
|
107
|
-
},
|
|
108
|
-
emits: ["close"],
|
|
109
|
-
setup(e, { emit: n }) {
|
|
110
|
-
let r = e, a = n, o = m(), l = I(), u = B(), p = L({
|
|
111
|
-
initialState: {
|
|
112
|
-
attachments: [],
|
|
113
|
-
reason: null,
|
|
114
|
-
remarks: null
|
|
115
|
-
},
|
|
116
|
-
schema: V,
|
|
117
|
-
onSubmit: async (e) => {
|
|
118
|
-
let t = await u.execute({
|
|
119
|
-
body: e,
|
|
120
|
-
params: {
|
|
121
|
-
approvalUuid: r.approvalUuid,
|
|
122
|
-
invoiceUuid: r.invoiceUuid
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
t.isErr() ? l.apiError(t.error) : (l.show({ message: o.t("wise_invoicing.invoice.reject.success") }), a("close"));
|
|
126
|
-
},
|
|
127
|
-
onSubmitError: () => {
|
|
128
|
-
l.unableToSave();
|
|
129
|
-
}
|
|
130
|
-
}), v = p.register("attachments"), C = p.register("reason"), D = p.register("remarks"), R = h(() => F([...Object.values(t).filter((e) => e !== t.OTHER), t.OTHER]));
|
|
131
|
-
function z(e) {
|
|
132
|
-
return o.t(c.getRejectionReasonTranslationKey(e));
|
|
133
|
-
}
|
|
134
|
-
let U = h(() => C.modelValue.value === t.OTHER);
|
|
135
|
-
function W(e) {
|
|
136
|
-
return e.size > H ? o.t("wise_invoicing.invoice.reject.attachment_too_large") : !0;
|
|
137
|
-
}
|
|
138
|
-
return (e, t) => (b(), g(x(k), {
|
|
139
|
-
form: x(p),
|
|
140
|
-
size: "sm",
|
|
141
|
-
onClose: t[0] ||= (e) => a("close")
|
|
142
|
-
}, {
|
|
143
|
-
default: S(() => [
|
|
144
|
-
_(x(O), {
|
|
145
|
-
title: x(o).t("wise_invoicing.invoice.reject.title"),
|
|
146
|
-
description: x(o).t("wise_invoicing.invoice.reject.description"),
|
|
147
|
-
icon: x(i),
|
|
148
|
-
"icon-variant": "warning"
|
|
149
|
-
}, null, 8, [
|
|
150
|
-
"title",
|
|
151
|
-
"description",
|
|
152
|
-
"icon"
|
|
153
|
-
]),
|
|
154
|
-
_(x(w), null, {
|
|
155
|
-
default: S(() => [_(x(A), null, {
|
|
156
|
-
default: S(() => [
|
|
157
|
-
_(x(N), y(x(s)(x(C)), {
|
|
158
|
-
"display-fn": z,
|
|
159
|
-
"is-required": !0,
|
|
160
|
-
items: R.value,
|
|
161
|
-
label: x(o).t("wise_invoicing.invoice.reject.fields.reason")
|
|
162
|
-
}), null, 16, ["items", "label"]),
|
|
163
|
-
_(x(P), y(x(s)(x(D)), {
|
|
164
|
-
"is-required": U.value,
|
|
165
|
-
label: x(o).t("wise_invoicing.invoice.reject.fields.remark"),
|
|
166
|
-
placeholder: x(o).t("wise_invoicing.invoice.reject.fields.remark_placeholder")
|
|
167
|
-
}), null, 16, [
|
|
168
|
-
"is-required",
|
|
169
|
-
"label",
|
|
170
|
-
"placeholder"
|
|
171
|
-
]),
|
|
172
|
-
_(f, null, {
|
|
173
|
-
default: S(() => [_(x(j), y(x(s)(x(v)), {
|
|
174
|
-
accept: [
|
|
175
|
-
"application/pdf",
|
|
176
|
-
"image/png",
|
|
177
|
-
"image/jpeg"
|
|
178
|
-
],
|
|
179
|
-
description: x(o).t("wise_invoicing.invoice.reject.fields.attachment_description"),
|
|
180
|
-
hint: x(o).t("wise_invoicing.invoice.reject.fields.attachment_hint"),
|
|
181
|
-
"is-valid-file": W,
|
|
182
|
-
preprocess: x(d).preprocess,
|
|
183
|
-
class: "w-full"
|
|
184
|
-
}), null, 16, [
|
|
185
|
-
"description",
|
|
186
|
-
"hint",
|
|
187
|
-
"preprocess"
|
|
188
|
-
])]),
|
|
189
|
-
_: 1
|
|
190
|
-
})
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
})]),
|
|
194
|
-
_: 1
|
|
195
|
-
}),
|
|
196
|
-
_(x(T), null, {
|
|
197
|
-
default: S(() => [_(x(E)), _(x(M), { label: x(o).t("wise_invoicing.invoice.reject.submit") }, null, 8, ["label"])]),
|
|
198
|
-
_: 1
|
|
199
|
-
})
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["form"]));
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region src/modules/invoice/api/mutations/invoiceSendApproval.mutation.ts
|
|
207
|
-
function W() {
|
|
208
|
-
return C({
|
|
209
|
-
queryFn: (e) => e.params.hasActiveApproval ? n.restartApproval(e.params.invoiceUuid) : n.sendApproval(e.params.invoiceUuid),
|
|
210
|
-
queryKeysToInvalidate: {
|
|
211
|
-
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
212
|
-
invoiceApprovalIndex: {},
|
|
213
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
214
|
-
invoiceIndex: {}
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
//#endregion
|
|
219
89
|
//#region src/modules/invoice/api/mutations/invoiceApproveApproval.mutation.ts
|
|
220
|
-
function
|
|
90
|
+
function V() {
|
|
221
91
|
return C({
|
|
222
92
|
queryFn: (e) => n.approveApproval(e.params.approvalUuid, e.body),
|
|
223
93
|
queryKeysToInvalidate: {
|
|
@@ -230,12 +100,12 @@ function G() {
|
|
|
230
100
|
}
|
|
231
101
|
//#endregion
|
|
232
102
|
//#region src/modules/invoice/models/invoice/approval/invoiceApproveForm.model.ts
|
|
233
|
-
var
|
|
234
|
-
proofOfApproval:
|
|
103
|
+
var H = p.object({
|
|
104
|
+
proofOfApproval: o.array(),
|
|
235
105
|
remarks: p.string().trim().nullable()
|
|
236
106
|
});
|
|
237
|
-
function
|
|
238
|
-
return
|
|
107
|
+
function U(t) {
|
|
108
|
+
return H.superRefine((n, r) => {
|
|
239
109
|
t && n.proofOfApproval.length === 0 && r.addIssue({
|
|
240
110
|
code: "custom",
|
|
241
111
|
message: e.global.t("wise_invoicing.invoice.approve.proof_required"),
|
|
@@ -245,7 +115,7 @@ function q(t) {
|
|
|
245
115
|
}
|
|
246
116
|
//#endregion
|
|
247
117
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue?vue&type=script&setup=true&lang.ts
|
|
248
|
-
var
|
|
118
|
+
var W = 26214400, G = /* @__PURE__ */ v({
|
|
249
119
|
__name: "InvoiceApproveDialog",
|
|
250
120
|
props: {
|
|
251
121
|
approvalUuid: {},
|
|
@@ -258,31 +128,31 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
258
128
|
"application/pdf",
|
|
259
129
|
"image/png",
|
|
260
130
|
"image/jpeg"
|
|
261
|
-
]), o = m(),
|
|
131
|
+
]), o = m(), u = I(), d = V(), f = L({
|
|
262
132
|
initialState: {
|
|
263
133
|
proofOfApproval: [],
|
|
264
134
|
remarks: null
|
|
265
135
|
},
|
|
266
|
-
schema:
|
|
136
|
+
schema: U(n.isProofOfApprovalRequired),
|
|
267
137
|
onSubmit: async (e) => {
|
|
268
|
-
let t = await
|
|
138
|
+
let t = await d.execute({
|
|
269
139
|
body: e,
|
|
270
140
|
params: {
|
|
271
141
|
approvalUuid: n.approvalUuid,
|
|
272
142
|
invoiceUuid: n.invoiceUuid
|
|
273
143
|
}
|
|
274
144
|
});
|
|
275
|
-
t.isErr() ?
|
|
145
|
+
t.isErr() ? u.apiError(t.error) : (u.show({ message: o.t("wise_invoicing.invoice.approve.success") }), r("close"));
|
|
276
146
|
},
|
|
277
147
|
onSubmitError: () => {
|
|
278
|
-
|
|
148
|
+
u.unableToSave();
|
|
279
149
|
}
|
|
280
|
-
}), p =
|
|
150
|
+
}), p = f.register("proofOfApproval"), h = f.register("remarks");
|
|
281
151
|
function v(e) {
|
|
282
|
-
return i.has(e.type) ? e.size >
|
|
152
|
+
return i.has(e.type) ? e.size > W ? o.t("wise_invoicing.invoice.approve.proof_too_large") : !0 : o.t("wise_invoicing.invoice.approve.proof_invalid_type");
|
|
283
153
|
}
|
|
284
154
|
return (e, t) => (b(), g(x(k), {
|
|
285
|
-
form: x(
|
|
155
|
+
form: x(f),
|
|
286
156
|
size: "sm",
|
|
287
157
|
onClose: t[0] ||= (e) => r("close")
|
|
288
158
|
}, {
|
|
@@ -299,14 +169,14 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
299
169
|
]),
|
|
300
170
|
_(x(w), null, {
|
|
301
171
|
default: S(() => [_(x(A), null, {
|
|
302
|
-
default: S(() => [_(
|
|
303
|
-
default: S(() => [_(x(j), y(x(
|
|
172
|
+
default: S(() => [_(c, null, {
|
|
173
|
+
default: S(() => [_(x(j), y(x(l)(x(p)), {
|
|
304
174
|
accept: Array.from(x(i)),
|
|
305
175
|
description: x(o).t("wise_invoicing.invoice.approve.fields.proof_description"),
|
|
306
176
|
hint: x(o).t("wise_invoicing.invoice.approve.fields.proof_hint"),
|
|
307
177
|
"is-required": n.isProofOfApprovalRequired,
|
|
308
178
|
"is-valid-file": v,
|
|
309
|
-
preprocess: x(
|
|
179
|
+
preprocess: x(s).preprocess,
|
|
310
180
|
class: "w-full"
|
|
311
181
|
}), null, 16, [
|
|
312
182
|
"accept",
|
|
@@ -316,7 +186,7 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
316
186
|
"preprocess"
|
|
317
187
|
])]),
|
|
318
188
|
_: 1
|
|
319
|
-
}), _(x(P), y(x(
|
|
189
|
+
}), _(x(P), y(x(l)(x(h)), {
|
|
320
190
|
label: x(o).t("wise_invoicing.invoice.approve.fields.note"),
|
|
321
191
|
placeholder: x(o).t("wise_invoicing.invoice.approve.fields.note_placeholder")
|
|
322
192
|
}), null, 16, ["label", "placeholder"])]),
|
|
@@ -332,7 +202,7 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
332
202
|
_: 1
|
|
333
203
|
}, 8, ["form"]));
|
|
334
204
|
}
|
|
335
|
-
}),
|
|
205
|
+
}), K = /* @__PURE__ */ v({
|
|
336
206
|
inheritAttrs: !1,
|
|
337
207
|
__name: "InvoiceApproveDialogDataProvider",
|
|
338
208
|
props: {
|
|
@@ -341,9 +211,9 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
341
211
|
},
|
|
342
212
|
emits: ["close"],
|
|
343
213
|
setup(e, { emit: t }) {
|
|
344
|
-
let n = e, r = t, i =
|
|
345
|
-
return (e, t) => (b(), g(
|
|
346
|
-
default: S(({ data: i }) => [_(
|
|
214
|
+
let n = e, r = t, i = f();
|
|
215
|
+
return (e, t) => (b(), g(d, { queries: { issuerSettings: x(i) } }, {
|
|
216
|
+
default: S(({ data: i }) => [_(G, y(e.$attrs, {
|
|
347
217
|
"approval-uuid": n.approvalUuid,
|
|
348
218
|
"invoice-uuid": n.invoiceUuid,
|
|
349
219
|
"is-proof-of-approval-required": i.issuerSettings.requiresInvoiceApprovalFile,
|
|
@@ -358,4 +228,134 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
358
228
|
}
|
|
359
229
|
});
|
|
360
230
|
//#endregion
|
|
361
|
-
|
|
231
|
+
//#region src/modules/invoice/api/mutations/invoiceRejectApproval.mutation.ts
|
|
232
|
+
function q() {
|
|
233
|
+
return C({
|
|
234
|
+
queryFn: (e) => n.rejectApproval(e.params.approvalUuid, e.body),
|
|
235
|
+
queryKeysToInvalidate: {
|
|
236
|
+
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
237
|
+
invoiceApprovalIndex: {},
|
|
238
|
+
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
239
|
+
invoiceIndex: {}
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
var J = p.object({
|
|
244
|
+
attachments: o.array(),
|
|
245
|
+
reason: p.enum(t).nullable(),
|
|
246
|
+
remarks: p.string().trim().max(500).nullable()
|
|
247
|
+
}).superRefine((n, r) => {
|
|
248
|
+
n.reason === null ? r.addIssue({
|
|
249
|
+
code: "custom",
|
|
250
|
+
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
251
|
+
path: ["reason"]
|
|
252
|
+
}) : n.reason === t.OTHER && (n.remarks ?? "") === "" && r.addIssue({
|
|
253
|
+
code: "custom",
|
|
254
|
+
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
255
|
+
path: ["remarks"]
|
|
256
|
+
});
|
|
257
|
+
}), Y = 10485760, X = /* @__PURE__ */ v({
|
|
258
|
+
__name: "InvoiceRejectDialog",
|
|
259
|
+
props: {
|
|
260
|
+
approvalUuid: {},
|
|
261
|
+
invoiceUuid: {}
|
|
262
|
+
},
|
|
263
|
+
emits: ["close"],
|
|
264
|
+
setup(e, { emit: n }) {
|
|
265
|
+
let r = e, a = n, o = m(), d = I(), f = q(), p = L({
|
|
266
|
+
initialState: {
|
|
267
|
+
attachments: [],
|
|
268
|
+
reason: null,
|
|
269
|
+
remarks: null
|
|
270
|
+
},
|
|
271
|
+
schema: J,
|
|
272
|
+
onSubmit: async (e) => {
|
|
273
|
+
let t = await f.execute({
|
|
274
|
+
body: e,
|
|
275
|
+
params: {
|
|
276
|
+
approvalUuid: r.approvalUuid,
|
|
277
|
+
invoiceUuid: r.invoiceUuid
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
t.isErr() ? d.apiError(t.error) : (d.show({ message: o.t("wise_invoicing.invoice.reject.success") }), a("close"));
|
|
281
|
+
},
|
|
282
|
+
onSubmitError: () => {
|
|
283
|
+
d.unableToSave();
|
|
284
|
+
}
|
|
285
|
+
}), v = p.register("attachments"), C = p.register("reason"), D = p.register("remarks"), R = h(() => F([...Object.values(t).filter((e) => e !== t.OTHER), t.OTHER]));
|
|
286
|
+
function z(e) {
|
|
287
|
+
return o.t(u.getRejectionReasonTranslationKey(e));
|
|
288
|
+
}
|
|
289
|
+
let B = h(() => C.modelValue.value === t.OTHER);
|
|
290
|
+
function V(e) {
|
|
291
|
+
return e.size > Y ? o.t("wise_invoicing.invoice.reject.attachment_too_large") : !0;
|
|
292
|
+
}
|
|
293
|
+
return (e, t) => (b(), g(x(k), {
|
|
294
|
+
form: x(p),
|
|
295
|
+
size: "sm",
|
|
296
|
+
onClose: t[0] ||= (e) => a("close")
|
|
297
|
+
}, {
|
|
298
|
+
default: S(() => [
|
|
299
|
+
_(x(O), {
|
|
300
|
+
title: x(o).t("wise_invoicing.invoice.reject.title"),
|
|
301
|
+
description: x(o).t("wise_invoicing.invoice.reject.description"),
|
|
302
|
+
icon: x(i),
|
|
303
|
+
"icon-variant": "warning"
|
|
304
|
+
}, null, 8, [
|
|
305
|
+
"title",
|
|
306
|
+
"description",
|
|
307
|
+
"icon"
|
|
308
|
+
]),
|
|
309
|
+
_(x(w), null, {
|
|
310
|
+
default: S(() => [_(x(A), null, {
|
|
311
|
+
default: S(() => [
|
|
312
|
+
_(x(N), y(x(l)(x(C)), {
|
|
313
|
+
"display-fn": z,
|
|
314
|
+
"is-required": !0,
|
|
315
|
+
items: R.value,
|
|
316
|
+
label: x(o).t("wise_invoicing.invoice.reject.fields.reason")
|
|
317
|
+
}), null, 16, ["items", "label"]),
|
|
318
|
+
_(x(P), y(x(l)(x(D)), {
|
|
319
|
+
"is-required": B.value,
|
|
320
|
+
label: x(o).t("wise_invoicing.invoice.reject.fields.remark"),
|
|
321
|
+
placeholder: x(o).t("wise_invoicing.invoice.reject.fields.remark_placeholder")
|
|
322
|
+
}), null, 16, [
|
|
323
|
+
"is-required",
|
|
324
|
+
"label",
|
|
325
|
+
"placeholder"
|
|
326
|
+
]),
|
|
327
|
+
_(c, null, {
|
|
328
|
+
default: S(() => [_(x(j), y(x(l)(x(v)), {
|
|
329
|
+
accept: [
|
|
330
|
+
"application/pdf",
|
|
331
|
+
"image/png",
|
|
332
|
+
"image/jpeg"
|
|
333
|
+
],
|
|
334
|
+
description: x(o).t("wise_invoicing.invoice.reject.fields.attachment_description"),
|
|
335
|
+
hint: x(o).t("wise_invoicing.invoice.reject.fields.attachment_hint"),
|
|
336
|
+
"is-valid-file": V,
|
|
337
|
+
preprocess: x(s).preprocess,
|
|
338
|
+
class: "w-full"
|
|
339
|
+
}), null, 16, [
|
|
340
|
+
"description",
|
|
341
|
+
"hint",
|
|
342
|
+
"preprocess"
|
|
343
|
+
])]),
|
|
344
|
+
_: 1
|
|
345
|
+
})
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
})]),
|
|
349
|
+
_: 1
|
|
350
|
+
}),
|
|
351
|
+
_(x(T), null, {
|
|
352
|
+
default: S(() => [_(x(E)), _(x(M), { label: x(o).t("wise_invoicing.invoice.reject.submit") }, null, 8, ["label"])]),
|
|
353
|
+
_: 1
|
|
354
|
+
})
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["form"]));
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
//#endregion
|
|
361
|
+
export { R as i, K as n, B as r, X as t };
|