@wisemen/wise-invoicing-web 0.17.0 → 0.18.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-CSvHKx35.js → ApprovalReminderSettingsViewDataProvider-BZBuz6EF.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-BSZiFFDZ.js → BillingDocumentDetailViewDataProvider-BCADHPFR.js} +1080 -1079
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-DQWebrh4.js → BillingDocumentPdf-ddBlGdIN.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-Bs8kadYX.js → CreditNoteDetailViewDataProvider-Donn5pVv.js} +222 -205
- package/dist/{CreditNotePdfViewDataProvider-DxojGCdS.js → CreditNotePdfViewDataProvider-c-apCeCW.js} +3 -3
- package/dist/{DunningCaseSendDialog-MJ8KSI2s.js → DunningCaseSendDialog-fgL9OsV8.js} +3 -3
- package/dist/{InvoiceApprovalOutOfSyncIndicator-BNlaBokg.js → InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-2zmnNJJM.js → InvoiceApprovalOverviewView-BIiJ6gen.js} +9 -9
- package/dist/{InvoiceApprovalStatusBadge-C7-CrTtD.js → InvoiceApprovalStatusBadge-CaVSCtI0.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-CclSNBDj.js → InvoiceApproveDialogDataProvider-C9NhZX-D.js} +7 -7
- package/dist/{InvoiceDeliverySendDialog-BjFaLTOg.js → InvoiceDeliverySendDialog-BICcd6Cf.js} +186 -114
- package/dist/{InvoiceDetailViewDataProvider-DK5Tandr.js → InvoiceDetailViewDataProvider-BppXFT6D.js} +609 -600
- package/dist/{InvoicePdfView-DA34o3C4.js → InvoicePdfView-BRJaAErd.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-Bl7a578G.js → InvoicePdfViewDataProvider-J7NP1Dhh.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-DljBWIFb.js → InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-B3ZzLMR8.js → InvoicingFileUploadProvider-rU9APFrt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BgpoLQZL.js → IssuerSettingsViewDataProvider-D13f6rvi.js} +4 -4
- package/dist/{PeppolSettingsViewDataProvider-BD2CGw2K.js → PeppolSettingsViewDataProvider-DymLdaRM.js} +3 -3
- package/dist/{api.util-BMza-ojm.js → api.util-sW4gNny-.js} +1 -0
- package/dist/{billingDocumentDetail.transformer-D8lwLPds.js → billingDocumentDetail.transformer-DcNMzl46.js} +3 -2
- package/dist/client/types.gen.d.ts +1 -0
- package/dist/client/zod.gen.d.ts +35 -0
- package/dist/{creditNoteDetail.query-8g2bZ21Y.js → creditNoteDetail.query-DiS_-xFz.js} +5 -3
- package/dist/{deliveryReason.util-B9ZPSt7J.js → deliveryReason.util-KBh3q_-P.js} +2 -2
- package/dist/{dist-Ck8ZEByl.js → dist-C99_-gWv.js} +2 -2
- package/dist/{dist-ByzJNujV.js → dist-CyUNvdkD.js} +1 -1
- package/dist/{documentTitle.composable-QdSLs6eT.js → documentTitle.composable-Dl8Cm3v3.js} +1 -1
- package/dist/{i18n.lib-Bs40rct-.js → i18n.lib-DckceEsg.js} +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +320 -392
- package/dist/{invoice.service-Dqj-rXA5.js → invoice.service-2QiktTs9.js} +5 -3
- package/dist/{invoiceApproval.service-C4ZxwGB8.js → invoiceApproval.service-DXIKgCI_.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-B6IhZXLq.js → invoiceApprovalStatus.util-CB5pi_hm.js} +2 -2
- package/dist/{invoiceCustomer.service-BNekA43U.js → invoiceCustomer.service-BNQJt1KV.js} +2 -2
- package/dist/{invoiceDeliveryStatus.util-CJGCDiFf.js → invoiceDeliveryStatus.util-Dp9hD1Tj.js} +3 -3
- package/dist/{invoiceDetail.query-xl08jVB3.js → invoiceDetail.query-MIrBYgNS.js} +1 -1
- package/dist/{invoicingConfig.composable-B0Kj9ini.js → invoicingConfig.composable-D-hxnEnh.js} +2 -2
- package/dist/{issuerSettings.query-Cmt5oUiJ.js → issuerSettings.query-CR7EtvNm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +4 -0
- package/dist/locales/en-US.json.d.ts +2 -0
- package/dist/locales/nl-BE.json.d.ts +2 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/credit-note/api/mutations/creditNoteUpdate.mutation.d.ts +1 -0
- package/dist/modules/credit-note/models/update/creditNoteUpdateForm.model.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceUpdate.mutation.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.d.ts +1 -1
- package/dist/modules/invoice/models/invoice/update/invoiceUpdateForm.model.d.ts +1 -0
- package/dist/{reminderConfig.query-DDLxE3no.js → reminderConfig.query-DJmhJp6W.js} +2 -2
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import { S as t, b as n, r, x as i } from "./documentTitle.composable-
|
|
1
|
+
import { t as e } from "./i18n.lib-DckceEsg.js";
|
|
2
|
+
import "./api.util-sW4gNny-.js";
|
|
3
|
+
import { S as t, b as n, r, x as i } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
4
4
|
import { n as a } from "./address.transformer-jGddczLV.js";
|
|
5
|
-
import { a as o,
|
|
6
|
-
import { n as
|
|
7
|
-
import { L as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { C as
|
|
12
|
-
import { r as
|
|
13
|
-
import
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useKeysetInfiniteQuery as
|
|
17
|
-
import { useRouter as
|
|
18
|
-
import { UIAnimateHeight as
|
|
5
|
+
import { a as o, c as s, i as c, o as l, r as u, s as d, t as f } from "./InvoiceDeliverySendDialog-BICcd6Cf.js";
|
|
6
|
+
import { n as p, t as m } from "./download.util-LyRpGWKA.js";
|
|
7
|
+
import { L as h, T as g, Tt as ee, U as te, V as ne, _ as re, b as _, dt as v, i as ie, it as ae, nt as y, q as b, u as x } from "./dist-B33lNwLw.js";
|
|
8
|
+
import { n as S, r as C } from "./dist-CyUNvdkD.js";
|
|
9
|
+
import { t as w } from "./formango.util-D5c2ql--.js";
|
|
10
|
+
import { n as T, r as E, t as D } from "./creditNoteDetail.query-DiS_-xFz.js";
|
|
11
|
+
import { C as oe, E as O, S as se, T as ce, _ as le, a as ue, b as de, c as fe, d as pe, f as k, g as me, h as he, i as ge, l as _e, m as ve, n as ye, o as be, p as xe, r as Se, s as Ce, t as we, v as Te, w as Ee, x as De, y as Oe } from "./BillingDocumentDetailViewDataProvider-BCADHPFR.js";
|
|
12
|
+
import { r as ke } from "./InvoicingFileUploadProvider-rU9APFrt.js";
|
|
13
|
+
import Ae, { z as A } from "zod";
|
|
14
|
+
import { useI18n as j } from "vue-i18n";
|
|
15
|
+
import { Fragment as M, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as je, createVNode as L, defineComponent as R, mergeProps as z, normalizeClass as B, openBlock as V, ref as Me, renderList as Ne, renderSlot as Pe, resolveDynamicComponent as Fe, unref as H, withCtx as U } from "vue";
|
|
16
|
+
import { useKeysetInfiniteQuery as Ie, useMutation as W } from "@wisemen/vue-core-api-utils";
|
|
17
|
+
import { useRouter as Le } from "vue-router";
|
|
18
|
+
import { UIAnimateHeight as Re, UIBadge as ze, UIClickableElement as Be, UIColumnLayout as G, UIDateField as Ve, UIDialogFooter as He, UIDialogFooterCancel as Ue, UIDialogFooterSubmit as We, UIDialogHeader as Ge, UIForm as K, UIFormDialog as Ke, UIRowLayout as q, UISeparator as qe, UIText as J, UITextField as Je, useOverlay as Ye, useToast as Y } from "@wisemen/vue-core-design-system";
|
|
19
19
|
import { useForm as X } from "formango";
|
|
20
20
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdate.mutation.ts
|
|
21
21
|
function Z() {
|
|
22
22
|
return W({
|
|
23
|
-
queryFn: (e) =>
|
|
23
|
+
queryFn: (e) => T.update(e.params.creditNoteUuid, e.body),
|
|
24
24
|
queryKeysToInvalidate: {
|
|
25
25
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
26
26
|
invoiceIndex: {}
|
|
@@ -29,23 +29,24 @@ function Z() {
|
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/modules/credit-note/models/update/creditNoteUpdateForm.model.ts
|
|
32
|
-
var
|
|
33
|
-
issuedOn:
|
|
34
|
-
externalRemarks:
|
|
35
|
-
poNumber:
|
|
36
|
-
|
|
32
|
+
var Xe = A.object({
|
|
33
|
+
issuedOn: S,
|
|
34
|
+
externalRemarks: A.string().nullable(),
|
|
35
|
+
poNumber: A.string().nullable(),
|
|
36
|
+
reference: A.string().nullable(),
|
|
37
|
+
subject: A.string().nullable()
|
|
37
38
|
}).superRefine((t, n) => {
|
|
38
39
|
t.externalRemarks?.trim() === "" && n.addIssue({
|
|
39
40
|
code: "custom",
|
|
40
41
|
message: e.global.t("wise_invoicing.credit_note.finalize.validation.external_remarks_required"),
|
|
41
42
|
path: ["externalRemarks"]
|
|
42
43
|
});
|
|
43
|
-
}),
|
|
44
|
+
}), Ze = A.object({ subject: A.string().nullable() });
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region src/modules/credit-note/api/mutations/creditNoteCopyToInvoice.mutation.ts
|
|
46
|
-
function
|
|
47
|
+
function Qe() {
|
|
47
48
|
return W({
|
|
48
|
-
queryFn: (e) =>
|
|
49
|
+
queryFn: (e) => T.copyToInvoice(e.params.creditNoteUuid),
|
|
49
50
|
queryKeysToInvalidate: {
|
|
50
51
|
creditNoteActivityLogIndex: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
51
52
|
invoiceIndex: {}
|
|
@@ -54,9 +55,9 @@ function Ze() {
|
|
|
54
55
|
}
|
|
55
56
|
//#endregion
|
|
56
57
|
//#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
|
|
57
|
-
function
|
|
58
|
+
function $e() {
|
|
58
59
|
return W({
|
|
59
|
-
queryFn: (e) =>
|
|
60
|
+
queryFn: (e) => T.finalize(e.params.creditNoteUuid),
|
|
60
61
|
queryKeysToInvalidate: {
|
|
61
62
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
62
63
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -66,9 +67,9 @@ function Qe() {
|
|
|
66
67
|
}
|
|
67
68
|
//#endregion
|
|
68
69
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
|
|
69
|
-
function
|
|
70
|
+
function et() {
|
|
70
71
|
return W({
|
|
71
|
-
queryFn: (e) =>
|
|
72
|
+
queryFn: (e) => T.markAsDraft(e.params.creditNoteUuid),
|
|
72
73
|
queryKeysToInvalidate: {
|
|
73
74
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
74
75
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -78,9 +79,9 @@ function $e() {
|
|
|
78
79
|
}
|
|
79
80
|
//#endregion
|
|
80
81
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
|
|
81
|
-
function
|
|
82
|
+
function tt() {
|
|
82
83
|
return W({
|
|
83
|
-
queryFn: (e) =>
|
|
84
|
+
queryFn: (e) => T.markAsReady(e.params.creditNoteUuid),
|
|
84
85
|
queryKeysToInvalidate: {
|
|
85
86
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
86
87
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -90,36 +91,36 @@ function et() {
|
|
|
90
91
|
}
|
|
91
92
|
//#endregion
|
|
92
93
|
//#region src/modules/credit-note/api/mutations/creditNoteDelete.mutation.ts
|
|
93
|
-
function
|
|
94
|
+
function nt() {
|
|
94
95
|
return W({
|
|
95
|
-
queryFn: (e) =>
|
|
96
|
+
queryFn: (e) => T.delete(e.params.creditNoteUuid),
|
|
96
97
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
97
98
|
});
|
|
98
99
|
}
|
|
99
100
|
//#endregion
|
|
100
101
|
//#region src/modules/credit-note/use-cases/detail/dialogs/CreditNoteDeleteDialog.vue
|
|
101
|
-
var
|
|
102
|
+
var rt = /* @__PURE__ */ R({
|
|
102
103
|
__name: "CreditNoteDeleteDialog",
|
|
103
104
|
props: { creditNote: {} },
|
|
104
105
|
emits: ["close", "deleted"],
|
|
105
106
|
setup(e, { emit: t }) {
|
|
106
|
-
let n = e, r = t, i =
|
|
107
|
-
schema:
|
|
107
|
+
let n = e, r = t, i = j(), a = Le(), o = Y(), s = nt(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
|
|
108
|
+
schema: Ae.object({}),
|
|
108
109
|
onSubmit: async () => {
|
|
109
110
|
let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
|
|
110
111
|
e.isErr() ? o.apiError(e.error) : (o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" }));
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
|
-
return (e, t) => (V(),
|
|
114
|
+
return (e, t) => (V(), P(H(Ke), {
|
|
114
115
|
form: H(l),
|
|
115
116
|
size: "xs",
|
|
116
117
|
onClose: t[0] ||= (e) => r("close")
|
|
117
118
|
}, {
|
|
118
|
-
default: U(() => [
|
|
119
|
+
default: U(() => [L(H(Ge), {
|
|
119
120
|
title: H(i).t("wise_invoicing.credit_note.delete.title"),
|
|
120
121
|
description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
|
|
121
|
-
}, null, 8, ["title", "description"]),
|
|
122
|
-
right: U(() => [
|
|
122
|
+
}, null, 8, ["title", "description"]), L(H(He), null, {
|
|
123
|
+
right: U(() => [L(H(Ue)), L(H(We), {
|
|
123
124
|
"is-destructive": !0,
|
|
124
125
|
label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
125
126
|
}, null, 8, ["label"])]),
|
|
@@ -131,37 +132,37 @@ var nt = /* @__PURE__ */ z({
|
|
|
131
132
|
});
|
|
132
133
|
//#endregion
|
|
133
134
|
//#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
|
|
134
|
-
function
|
|
135
|
-
let r =
|
|
135
|
+
function it(e) {
|
|
136
|
+
let r = j(), a = Y(), s = Le(), c = Ye(), l = c.create(rt), u = c.create(De), d = Qe(), p = $e(), _ = et(), v = tt(), ae = c.create(f), y = oe(), { shouldSkipConfirmation: b } = se(), x = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), S = N(() => Ee.getSummary(e.value)?.isExceeded ?? !1), C = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
|
|
136
137
|
async function w() {
|
|
137
|
-
let t = await
|
|
138
|
+
let t = await v.execute({ params: {
|
|
138
139
|
creditNoteUuid: e.value.uuid,
|
|
139
|
-
invoiceUuid:
|
|
140
|
+
invoiceUuid: x.value
|
|
140
141
|
} });
|
|
141
142
|
t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.credit_note.mark_as_ready.success") });
|
|
142
143
|
}
|
|
143
|
-
async function
|
|
144
|
-
let t = await
|
|
144
|
+
async function E() {
|
|
145
|
+
let t = await p.execute({ params: {
|
|
145
146
|
creditNoteUuid: e.value.uuid,
|
|
146
|
-
invoiceUuid:
|
|
147
|
+
invoiceUuid: x.value
|
|
147
148
|
} });
|
|
148
149
|
return t.isErr() ? (a.apiError(t.error), !1) : (a.show({ message: r.t("wise_invoicing.credit_note.finalize.success") }), !0);
|
|
149
150
|
}
|
|
150
|
-
async function
|
|
151
|
-
|
|
151
|
+
async function D() {
|
|
152
|
+
b.value ? await E() : await u.open({
|
|
152
153
|
billingDocumentType: "credit_note",
|
|
153
|
-
onConfirm:
|
|
154
|
+
onConfirm: E
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
|
-
async function
|
|
157
|
-
let t = await
|
|
157
|
+
async function O() {
|
|
158
|
+
let t = await _.execute({ params: {
|
|
158
159
|
creditNoteUuid: e.value.uuid,
|
|
159
|
-
invoiceUuid:
|
|
160
|
+
invoiceUuid: x.value
|
|
160
161
|
} });
|
|
161
162
|
t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.credit_note.mark_as_draft.success") });
|
|
162
163
|
}
|
|
163
|
-
async function
|
|
164
|
-
await
|
|
164
|
+
async function ce() {
|
|
165
|
+
await ae.open({
|
|
165
166
|
invoiceUuid: e.value.uuid,
|
|
166
167
|
documents: [{
|
|
167
168
|
uuid: e.value.uuid,
|
|
@@ -169,18 +170,18 @@ function rt(e) {
|
|
|
169
170
|
}]
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
|
-
async function
|
|
173
|
+
async function le() {
|
|
173
174
|
if (y.isLoading.value) return;
|
|
174
175
|
let t = await y.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
175
176
|
t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.delivery.reminder.sent") });
|
|
176
177
|
}
|
|
177
|
-
async function
|
|
178
|
-
let t = await
|
|
178
|
+
async function ue() {
|
|
179
|
+
let t = await d.execute({ params: { creditNoteUuid: e.value.uuid } });
|
|
179
180
|
t.isErr() ? a.apiError(t.error) : a.show({
|
|
180
181
|
button: {
|
|
181
182
|
label: r.t("wise_invoicing.credit_note.copy_to_invoice.view_action"),
|
|
182
183
|
onClick: () => {
|
|
183
|
-
|
|
184
|
+
s.push({
|
|
184
185
|
name: "invoicing-invoice-detail",
|
|
185
186
|
params: { invoiceUuid: t.value }
|
|
186
187
|
});
|
|
@@ -189,11 +190,11 @@ function rt(e) {
|
|
|
189
190
|
message: r.t("wise_invoicing.credit_note.copy_to_invoice.success")
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
|
-
async function
|
|
193
|
+
async function de() {
|
|
193
194
|
await l.open({ creditNote: e.value });
|
|
194
195
|
}
|
|
195
|
-
async function
|
|
196
|
-
let t = await
|
|
196
|
+
async function fe() {
|
|
197
|
+
let t = await T.getByUuid(e.value.uuid);
|
|
197
198
|
if (t.isErr()) {
|
|
198
199
|
a.apiError(t.error);
|
|
199
200
|
return;
|
|
@@ -203,10 +204,10 @@ function rt(e) {
|
|
|
203
204
|
a.show({ message: r.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
204
205
|
return;
|
|
205
206
|
}
|
|
206
|
-
let i = await
|
|
207
|
-
i !== null &&
|
|
207
|
+
let i = await ke.getDownloadUrl(n.uuid);
|
|
208
|
+
i !== null && m.downloadUrl(i, n.name);
|
|
208
209
|
}
|
|
209
|
-
let
|
|
210
|
+
let pe = N(() => [
|
|
210
211
|
{
|
|
211
212
|
isLoading: !1,
|
|
212
213
|
iconLeft: ee,
|
|
@@ -214,80 +215,80 @@ function rt(e) {
|
|
|
214
215
|
label: r.t("wise_invoicing.invoice.detail.actions.send"),
|
|
215
216
|
variant: "primary",
|
|
216
217
|
visible: e.value.lifecycleStatus === i.FINALIZED,
|
|
217
|
-
onClick:
|
|
218
|
+
onClick: ce
|
|
218
219
|
},
|
|
219
220
|
{
|
|
220
|
-
isLoading:
|
|
221
|
-
iconRight:
|
|
221
|
+
isLoading: v.isLoading.value,
|
|
222
|
+
iconRight: ie,
|
|
222
223
|
key: "markAsReady",
|
|
223
224
|
label: r.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
224
225
|
visible: e.value.status === t.DRAFT,
|
|
225
226
|
onClick: w
|
|
226
227
|
},
|
|
227
228
|
{
|
|
228
|
-
isDisabled:
|
|
229
|
-
isLoading:
|
|
230
|
-
disabledReason:
|
|
231
|
-
iconRight:
|
|
229
|
+
isDisabled: S.value,
|
|
230
|
+
isLoading: p.isLoading.value,
|
|
231
|
+
disabledReason: S.value ? r.t("wise_invoicing.credit_note.finalize.exceeds_creditable_amount") : null,
|
|
232
|
+
iconRight: h,
|
|
232
233
|
key: "finalize",
|
|
233
234
|
label: r.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
234
235
|
visible: e.value.status === t.READY,
|
|
235
|
-
onClick:
|
|
236
|
+
onClick: D
|
|
236
237
|
}
|
|
237
|
-
].filter((e) => e.visible)),
|
|
238
|
+
].filter((e) => e.visible)), k = N(() => {
|
|
238
239
|
let a = [
|
|
239
240
|
{
|
|
240
241
|
icon: ee,
|
|
241
242
|
key: "sendReminder",
|
|
242
243
|
label: r.t("wise_invoicing.delivery.reminder.action"),
|
|
243
244
|
visible: e.value.lifecycleStatus === i.FINALIZED && [n.SENT, n.VIEWED].includes(e.value.deliveryStatus),
|
|
244
|
-
onSelect:
|
|
245
|
+
onSelect: le
|
|
245
246
|
},
|
|
246
247
|
{
|
|
247
|
-
icon:
|
|
248
|
+
icon: g,
|
|
248
249
|
key: "downloadPdf",
|
|
249
250
|
label: r.t("wise_invoicing.common.download_pdf"),
|
|
250
|
-
visible:
|
|
251
|
-
onSelect:
|
|
251
|
+
visible: C.value,
|
|
252
|
+
onSelect: fe
|
|
252
253
|
},
|
|
253
254
|
{
|
|
254
255
|
icon: te,
|
|
255
256
|
key: "backToDraft",
|
|
256
257
|
label: r.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
257
258
|
visible: e.value.status === t.READY,
|
|
258
|
-
onSelect:
|
|
259
|
+
onSelect: O
|
|
259
260
|
},
|
|
260
261
|
{
|
|
261
262
|
icon: re,
|
|
262
263
|
key: "copyToInvoice",
|
|
263
264
|
label: r.t("wise_invoicing.credit_note.detail.actions.copy_to_invoice"),
|
|
264
265
|
visible: !0,
|
|
265
|
-
onSelect:
|
|
266
|
+
onSelect: ue
|
|
266
267
|
}
|
|
267
|
-
],
|
|
268
|
+
], s = [{
|
|
268
269
|
icon: ne,
|
|
269
270
|
key: "delete",
|
|
270
271
|
label: r.t("wise_invoicing.credit_note.detail.actions.delete"),
|
|
271
|
-
visible:
|
|
272
|
-
onSelect:
|
|
272
|
+
visible: o.isEditable(e.value.status),
|
|
273
|
+
onSelect: de
|
|
273
274
|
}];
|
|
274
275
|
return [{
|
|
275
276
|
items: a.filter((e) => e.visible),
|
|
276
277
|
key: "secondary"
|
|
277
278
|
}, {
|
|
278
|
-
items:
|
|
279
|
+
items: s.filter((e) => e.visible),
|
|
279
280
|
key: "destructive"
|
|
280
281
|
}].filter((e) => e.items.length > 0);
|
|
281
282
|
});
|
|
282
283
|
return {
|
|
283
|
-
isActionMenuVisible:
|
|
284
|
-
menuGroups:
|
|
285
|
-
primaryButtons:
|
|
284
|
+
isActionMenuVisible: N(() => k.value.length > 0),
|
|
285
|
+
menuGroups: k,
|
|
286
|
+
primaryButtons: pe
|
|
286
287
|
};
|
|
287
288
|
}
|
|
288
289
|
//#endregion
|
|
289
290
|
//#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
|
|
290
|
-
var
|
|
291
|
+
var at = /* @__PURE__ */ R({
|
|
291
292
|
__name: "CreditNoteDetailHeaderSection",
|
|
292
293
|
props: {
|
|
293
294
|
isPdfViewActive: { type: Boolean },
|
|
@@ -295,35 +296,35 @@ var it = /* @__PURE__ */ z({
|
|
|
295
296
|
},
|
|
296
297
|
emits: ["togglePdfView"],
|
|
297
298
|
setup(e, { emit: n }) {
|
|
298
|
-
let r = e, i = n, a =
|
|
299
|
+
let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = it(N(() => r.creditNote)), d = N(() => new ce(r.creditNote.status)), f = N(() => d.value.color), p = N(() => a.t(d.value.translationKey)), m = N(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), h = X({
|
|
299
300
|
initialState: { subject: r.creditNote.subject },
|
|
300
|
-
schema:
|
|
301
|
+
schema: Ze,
|
|
301
302
|
onSubmit: async (e) => {
|
|
302
303
|
let t = await s.execute({
|
|
303
304
|
body: {
|
|
304
|
-
...
|
|
305
|
+
...E.toForm(r.creditNote),
|
|
305
306
|
subject: e.subject
|
|
306
307
|
},
|
|
307
308
|
params: { creditNoteUuid: r.creditNote.uuid }
|
|
308
309
|
});
|
|
309
|
-
t.isErr()
|
|
310
|
+
t.isErr() ? o.apiError(t.error) : u.reflectBulkAction([r.creditNote.uuid], { subject: e.subject });
|
|
310
311
|
}
|
|
311
|
-
}),
|
|
312
|
-
return
|
|
313
|
-
form: H(
|
|
312
|
+
}), g = h.register("subject");
|
|
313
|
+
return O({ form: h }), (e, t) => (V(), P(H(K), {
|
|
314
|
+
form: H(h),
|
|
314
315
|
"prompt-on-unsaved-changes": !1
|
|
315
316
|
}, {
|
|
316
|
-
default: U(() => [
|
|
317
|
+
default: U(() => [L(Oe, {
|
|
317
318
|
"fallback-title": H(a).t("wise_invoicing.credit_note.detail.fallback_title"),
|
|
318
|
-
"is-disabled":
|
|
319
|
+
"is-disabled": m.value,
|
|
319
320
|
sequence: r.creditNote.sequence,
|
|
320
|
-
"status-color":
|
|
321
|
-
"status-label":
|
|
322
|
-
icon: H(
|
|
323
|
-
"subject-field": H(
|
|
321
|
+
"status-color": f.value,
|
|
322
|
+
"status-label": p.value,
|
|
323
|
+
icon: H(v),
|
|
324
|
+
"subject-field": H(g),
|
|
324
325
|
"subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
325
326
|
}, {
|
|
326
|
-
actions: U(() => [
|
|
327
|
+
actions: U(() => [L(Te, {
|
|
327
328
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
328
329
|
"menu-groups": H(c),
|
|
329
330
|
"primary-buttons": H(l),
|
|
@@ -333,11 +334,11 @@ var it = /* @__PURE__ */ z({
|
|
|
333
334
|
"menu-groups",
|
|
334
335
|
"primary-buttons"
|
|
335
336
|
])]),
|
|
336
|
-
status: U(() => [
|
|
337
|
+
status: U(() => [L(H(q), {
|
|
337
338
|
gap: "xs",
|
|
338
339
|
class: "flex-wrap items-start"
|
|
339
340
|
}, {
|
|
340
|
-
default: U(() => [r.creditNote.isOverdue ? (V(),
|
|
341
|
+
default: U(() => [r.creditNote.isOverdue ? (V(), P(de, { key: 0 })) : F("", !0)]),
|
|
341
342
|
_: 1
|
|
342
343
|
})]),
|
|
343
344
|
_: 1
|
|
@@ -354,13 +355,13 @@ var it = /* @__PURE__ */ z({
|
|
|
354
355
|
_: 1
|
|
355
356
|
}, 8, ["form"]));
|
|
356
357
|
}
|
|
357
|
-
}),
|
|
358
|
+
}), ot = /* @__PURE__ */ R({
|
|
358
359
|
__name: "CreditNoteDetailRemarksSection",
|
|
359
360
|
props: { creditNote: {} },
|
|
360
361
|
setup(e) {
|
|
361
|
-
let n = e, r =
|
|
362
|
-
initialState:
|
|
363
|
-
schema:
|
|
362
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
363
|
+
initialState: N(() => E.toForm(n.creditNote)),
|
|
364
|
+
schema: Xe,
|
|
364
365
|
onSubmit: async (e) => {
|
|
365
366
|
let t = await a.execute({
|
|
366
367
|
body: e,
|
|
@@ -368,12 +369,12 @@ var it = /* @__PURE__ */ z({
|
|
|
368
369
|
});
|
|
369
370
|
t.isErr() && i.apiError(t.error);
|
|
370
371
|
}
|
|
371
|
-
}), s = o.register("externalRemarks"), c =
|
|
372
|
-
return
|
|
372
|
+
}), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
373
|
+
return O({ form: o }), (e, t) => (V(), P(H(K), {
|
|
373
374
|
form: H(o),
|
|
374
375
|
"prompt-on-unsaved-changes": !1
|
|
375
376
|
}, {
|
|
376
|
-
default: U(() => [
|
|
377
|
+
default: U(() => [L(le, {
|
|
377
378
|
"is-disabled": c.value,
|
|
378
379
|
placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
379
380
|
"remarks-field": H(s),
|
|
@@ -390,23 +391,23 @@ var it = /* @__PURE__ */ z({
|
|
|
390
391
|
});
|
|
391
392
|
//#endregion
|
|
392
393
|
//#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
|
|
393
|
-
function
|
|
394
|
-
return
|
|
394
|
+
function st(e) {
|
|
395
|
+
return Ie("creditNoteActivityLogIndex", {
|
|
395
396
|
params: { creditNoteUuid: e },
|
|
396
|
-
queryFn: (t) =>
|
|
397
|
+
queryFn: (t) => T.getActivityLogs(e.value, { pagination: t })
|
|
397
398
|
});
|
|
398
399
|
}
|
|
399
400
|
//#endregion
|
|
400
401
|
//#region src/modules/credit-note/use-cases/detail/components/sidebar/CreditNoteDetailSidebarActivityTab.vue
|
|
401
|
-
var
|
|
402
|
+
var ct = /* @__PURE__ */ R({
|
|
402
403
|
__name: "CreditNoteDetailSidebarActivityTab",
|
|
403
404
|
props: { creditNote: {} },
|
|
404
405
|
setup(e) {
|
|
405
|
-
let t = e, n =
|
|
406
|
+
let t = e, n = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = st(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
|
|
406
407
|
data: [],
|
|
407
408
|
meta: { next: null }
|
|
408
409
|
}).data);
|
|
409
|
-
return (e, c) => (V(),
|
|
410
|
+
return (e, c) => (V(), P(me, {
|
|
410
411
|
"current-billing-document": {
|
|
411
412
|
role: H(r).CREDIT_NOTE,
|
|
412
413
|
uuid: t.creditNote.uuid
|
|
@@ -427,7 +428,7 @@ var st = /* @__PURE__ */ z({
|
|
|
427
428
|
"is-loading"
|
|
428
429
|
]));
|
|
429
430
|
}
|
|
430
|
-
}), Q = /* @__PURE__ */
|
|
431
|
+
}), Q = /* @__PURE__ */ R({
|
|
431
432
|
__name: "BillingDocumentDetailSidebarInfoItem",
|
|
432
433
|
props: {
|
|
433
434
|
hasError: {
|
|
@@ -439,25 +440,25 @@ var st = /* @__PURE__ */ z({
|
|
|
439
440
|
},
|
|
440
441
|
setup(e) {
|
|
441
442
|
let t = e;
|
|
442
|
-
return (e, n) => (V(),
|
|
443
|
+
return (e, n) => (V(), P(H(q), null, {
|
|
443
444
|
default: U(() => [
|
|
444
|
-
(V(),
|
|
445
|
+
(V(), P(Fe(t.icon), { class: B([{
|
|
445
446
|
"text-error-primary": t.hasError,
|
|
446
447
|
"text-tertiary": !t.hasError
|
|
447
448
|
}, "size-3.5 shrink-0"]) }, null, 8, ["class"])),
|
|
448
|
-
|
|
449
|
+
L(H(J), {
|
|
449
450
|
text: t.label,
|
|
450
451
|
class: B([{
|
|
451
452
|
"text-error-primary": t.hasError,
|
|
452
453
|
"text-tertiary": !t.hasError
|
|
453
454
|
}, "w-24 shrink-0 text-xs"])
|
|
454
455
|
}, null, 8, ["text", "class"]),
|
|
455
|
-
|
|
456
|
+
Pe(e.$slots, "default")
|
|
456
457
|
]),
|
|
457
458
|
_: 3
|
|
458
459
|
}));
|
|
459
460
|
}
|
|
460
|
-
}), $ = /* @__PURE__ */
|
|
461
|
+
}), $ = /* @__PURE__ */ R({
|
|
461
462
|
__name: "BillingDocumentDetailSidebarPartySection",
|
|
462
463
|
props: {
|
|
463
464
|
title: {},
|
|
@@ -470,71 +471,71 @@ var st = /* @__PURE__ */ z({
|
|
|
470
471
|
email: { default: null }
|
|
471
472
|
},
|
|
472
473
|
setup(e) {
|
|
473
|
-
let t = e, n =
|
|
474
|
+
let t = e, n = Me(t.isDefaultOpen);
|
|
474
475
|
function r() {
|
|
475
476
|
n.value = !n.value;
|
|
476
477
|
}
|
|
477
|
-
return (e, i) => (V(),
|
|
478
|
-
default: U(() => [
|
|
479
|
-
default: U(() => [
|
|
480
|
-
default: U(() => [
|
|
478
|
+
return (e, i) => (V(), P(H(G), { class: "w-full" }, {
|
|
479
|
+
default: U(() => [L(H(q), { justify: "between" }, {
|
|
480
|
+
default: U(() => [L(H(Be), { class: "rounded-sm" }, {
|
|
481
|
+
default: U(() => [je("button", {
|
|
481
482
|
type: "button",
|
|
482
483
|
class: "flex w-full items-center gap-sm",
|
|
483
484
|
onClick: r
|
|
484
485
|
}, [
|
|
485
|
-
|
|
486
|
+
L(H(J), {
|
|
486
487
|
text: t.title,
|
|
487
488
|
class: "text-xs font-semibold text-primary"
|
|
488
489
|
}, null, 8, ["text"]),
|
|
489
|
-
|
|
490
|
+
L(H(ze), {
|
|
490
491
|
label: t.name,
|
|
491
492
|
color: "gray",
|
|
492
493
|
variant: "outline"
|
|
493
494
|
}, null, 8, ["label"]),
|
|
494
|
-
|
|
495
|
+
L(H(ae), { class: B([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
|
|
495
496
|
])]),
|
|
496
497
|
_: 1
|
|
497
498
|
})]),
|
|
498
499
|
_: 1
|
|
499
|
-
}),
|
|
500
|
-
default: U(() => [n.value ? (V(),
|
|
500
|
+
}), L(H(Re), null, {
|
|
501
|
+
default: U(() => [n.value ? (V(), P(H(G), {
|
|
501
502
|
key: 0,
|
|
502
503
|
gap: "xs"
|
|
503
504
|
}, {
|
|
504
505
|
default: U(() => [
|
|
505
|
-
|
|
506
|
+
L(H(J), {
|
|
506
507
|
text: t.name,
|
|
507
508
|
class: "text-xs font-medium text-primary"
|
|
508
509
|
}, null, 8, ["text"]),
|
|
509
|
-
t.address ? (V(),
|
|
510
|
+
t.address ? (V(), P(H(J), {
|
|
510
511
|
key: 0,
|
|
511
512
|
truncate: !1,
|
|
512
513
|
text: H(a).format(t.address),
|
|
513
514
|
class: "text-xs text-primary"
|
|
514
|
-
}, null, 8, ["text"])) :
|
|
515
|
-
t.email ? (V(),
|
|
515
|
+
}, null, 8, ["text"])) : F("", !0),
|
|
516
|
+
t.email ? (V(), P(H(J), {
|
|
516
517
|
key: 1,
|
|
517
518
|
text: t.email,
|
|
518
519
|
class: "text-xs text-primary"
|
|
519
|
-
}, null, 8, ["text"])) :
|
|
520
|
+
}, null, 8, ["text"])) : F("", !0)
|
|
520
521
|
]),
|
|
521
522
|
_: 1
|
|
522
|
-
})) :
|
|
523
|
+
})) : F("", !0)]),
|
|
523
524
|
_: 1
|
|
524
525
|
})]),
|
|
525
526
|
_: 1
|
|
526
527
|
}));
|
|
527
528
|
}
|
|
528
|
-
}),
|
|
529
|
+
}), lt = /* @__PURE__ */ R({
|
|
529
530
|
__name: "CreditNoteDetailSidebarInfoTab",
|
|
530
531
|
props: {
|
|
531
532
|
creditNote: {},
|
|
532
533
|
customFieldDefinitions: {}
|
|
533
534
|
},
|
|
534
535
|
setup(e) {
|
|
535
|
-
let n = e, r =
|
|
536
|
-
initialState:
|
|
537
|
-
schema:
|
|
536
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
537
|
+
initialState: N(() => E.toForm(n.creditNote)),
|
|
538
|
+
schema: Xe,
|
|
538
539
|
onSubmit: async (e) => {
|
|
539
540
|
let t = await a.execute({
|
|
540
541
|
body: e,
|
|
@@ -542,39 +543,55 @@ var st = /* @__PURE__ */ z({
|
|
|
542
543
|
});
|
|
543
544
|
t.isErr() && i.apiError(t.error);
|
|
544
545
|
}
|
|
545
|
-
}),
|
|
546
|
-
return
|
|
547
|
-
form: H(
|
|
546
|
+
}), s = N(() => p.listByDefinitions(n.customFieldDefinitions, n.creditNote.customFields)), u = o.register("issuedOn"), d = o.register("poNumber"), f = o.register("reference"), m = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
547
|
+
return O({ form: o }), (e, t) => (V(), P(H(K), {
|
|
548
|
+
form: H(o),
|
|
548
549
|
"prompt-on-unsaved-changes": !1
|
|
549
550
|
}, {
|
|
550
|
-
default: U(() => [
|
|
551
|
+
default: U(() => [L(H(G), {
|
|
551
552
|
gap: "lg",
|
|
552
553
|
class: "px-2xl py-xl"
|
|
553
554
|
}, {
|
|
554
555
|
default: U(() => [
|
|
555
|
-
|
|
556
|
-
default: U(() => [
|
|
556
|
+
L(H(G), null, {
|
|
557
|
+
default: U(() => [L(H(J), {
|
|
557
558
|
text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
|
|
558
559
|
class: "text-xs font-semibold text-primary"
|
|
559
|
-
}, null, 8, ["text"]),
|
|
560
|
+
}, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
|
|
560
561
|
default: U(() => [
|
|
561
|
-
|
|
562
|
-
icon: H(
|
|
562
|
+
L(Q, {
|
|
563
|
+
icon: H(_),
|
|
563
564
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
564
565
|
}, {
|
|
565
|
-
default: U(() => [
|
|
566
|
+
default: U(() => [L(H(J), {
|
|
566
567
|
text: n.creditNote.sequence ?? "-",
|
|
567
568
|
class: "text-xs text-primary"
|
|
568
569
|
}, null, 8, ["text"])]),
|
|
569
570
|
_: 1
|
|
570
571
|
}, 8, ["icon", "label"]),
|
|
571
|
-
|
|
572
|
-
icon: H(
|
|
572
|
+
L(Q, {
|
|
573
|
+
icon: H(b),
|
|
573
574
|
"has-error": H(d).errors.value.length > 0,
|
|
574
575
|
label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
575
576
|
}, {
|
|
576
|
-
default: U(() => [
|
|
577
|
-
"is-disabled":
|
|
577
|
+
default: U(() => [L(H(Je), z(H(w)(H(d)), {
|
|
578
|
+
"is-disabled": m.value,
|
|
579
|
+
label: null,
|
|
580
|
+
class: "w-full"
|
|
581
|
+
}), null, 16, ["is-disabled"])]),
|
|
582
|
+
_: 1
|
|
583
|
+
}, 8, [
|
|
584
|
+
"icon",
|
|
585
|
+
"has-error",
|
|
586
|
+
"label"
|
|
587
|
+
]),
|
|
588
|
+
L(Q, {
|
|
589
|
+
icon: H(b),
|
|
590
|
+
"has-error": H(f).errors.value.length > 0,
|
|
591
|
+
label: H(r).t("wise_invoicing.invoice.detail.header.reference")
|
|
592
|
+
}, {
|
|
593
|
+
default: U(() => [L(H(Je), z(H(w)(H(f)), {
|
|
594
|
+
"is-disabled": m.value,
|
|
578
595
|
label: null,
|
|
579
596
|
class: "w-full"
|
|
580
597
|
}), null, 16, ["is-disabled"])]),
|
|
@@ -584,34 +601,34 @@ var st = /* @__PURE__ */ z({
|
|
|
584
601
|
"has-error",
|
|
585
602
|
"label"
|
|
586
603
|
]),
|
|
587
|
-
|
|
588
|
-
icon: H(
|
|
604
|
+
L(Q, {
|
|
605
|
+
icon: H(x),
|
|
589
606
|
label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
590
607
|
}, {
|
|
591
|
-
default: U(() => [
|
|
608
|
+
default: U(() => [L(H(J), {
|
|
592
609
|
text: n.creditNote.issuer.name ?? "-",
|
|
593
610
|
class: "text-xs text-primary"
|
|
594
611
|
}, null, 8, ["text"])]),
|
|
595
612
|
_: 1
|
|
596
613
|
}, 8, ["icon", "label"]),
|
|
597
|
-
|
|
598
|
-
icon: H(
|
|
614
|
+
L(Q, {
|
|
615
|
+
icon: H(y),
|
|
599
616
|
"has-error": H(u).errors.value.length > 0,
|
|
600
617
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
601
618
|
}, {
|
|
602
|
-
default: U(() => [
|
|
619
|
+
default: U(() => [L(H(Ve), z({ "is-disabled": m.value }, H(w)(H(u))), null, 16, ["is-disabled"])]),
|
|
603
620
|
_: 1
|
|
604
621
|
}, 8, [
|
|
605
622
|
"icon",
|
|
606
623
|
"has-error",
|
|
607
624
|
"label"
|
|
608
625
|
]),
|
|
609
|
-
(V(!0),
|
|
626
|
+
(V(!0), I(M, null, Ne(s.value, (e) => (V(), P(Q, {
|
|
610
627
|
key: e.definition.uuid,
|
|
611
|
-
icon: H(
|
|
612
|
-
label: H(
|
|
628
|
+
icon: H(he)[e.definition.type],
|
|
629
|
+
label: H(l).getLabel(e.definition, H(r).locale.value)
|
|
613
630
|
}, {
|
|
614
|
-
default: U(() => [
|
|
631
|
+
default: U(() => [L(c, {
|
|
615
632
|
definition: e.definition,
|
|
616
633
|
value: e.value
|
|
617
634
|
}, null, 8, ["definition", "value"])]),
|
|
@@ -622,9 +639,9 @@ var st = /* @__PURE__ */ z({
|
|
|
622
639
|
})]),
|
|
623
640
|
_: 1
|
|
624
641
|
}),
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
642
|
+
L(H(qe)),
|
|
643
|
+
L(ve, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
|
|
644
|
+
L($, {
|
|
628
645
|
"is-default-open": !0,
|
|
629
646
|
name: n.creditNote.customer.name ?? "-",
|
|
630
647
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
@@ -636,8 +653,8 @@ var st = /* @__PURE__ */ z({
|
|
|
636
653
|
"address",
|
|
637
654
|
"email"
|
|
638
655
|
]),
|
|
639
|
-
|
|
640
|
-
|
|
656
|
+
L(H(qe)),
|
|
657
|
+
L($, {
|
|
641
658
|
name: n.creditNote.issuer.email ?? "-",
|
|
642
659
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
643
660
|
address: n.creditNote.issuer.address
|
|
@@ -652,20 +669,20 @@ var st = /* @__PURE__ */ z({
|
|
|
652
669
|
_: 1
|
|
653
670
|
}, 8, ["form"]));
|
|
654
671
|
}
|
|
655
|
-
}),
|
|
672
|
+
}), ut = /* @__PURE__ */ R({
|
|
656
673
|
__name: "CreditNoteDetailSidebar",
|
|
657
674
|
props: {
|
|
658
675
|
creditNote: {},
|
|
659
676
|
customFieldDefinitions: {}
|
|
660
677
|
},
|
|
661
678
|
setup(e) {
|
|
662
|
-
let t = e, n =
|
|
663
|
-
return (e, n) => (V(),
|
|
679
|
+
let t = e, n = j(), r = C(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
|
|
680
|
+
return (e, n) => (V(), P(xe, {
|
|
664
681
|
"billing-document": t.creditNote,
|
|
665
682
|
"updated-footer": i.value
|
|
666
683
|
}, {
|
|
667
|
-
activity: U(() => [
|
|
668
|
-
info: U(() => [
|
|
684
|
+
activity: U(() => [L(ct, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
|
|
685
|
+
info: U(() => [L(lt, {
|
|
669
686
|
"credit-note": t.creditNote,
|
|
670
687
|
"custom-field-definitions": t.customFieldDefinitions
|
|
671
688
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -675,9 +692,9 @@ var st = /* @__PURE__ */ z({
|
|
|
675
692
|
});
|
|
676
693
|
//#endregion
|
|
677
694
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
|
|
678
|
-
function
|
|
695
|
+
function dt() {
|
|
679
696
|
return W({
|
|
680
|
-
queryFn: (e) =>
|
|
697
|
+
queryFn: (e) => T.updateLines(e.params.creditNoteUuid, e.body),
|
|
681
698
|
queryKeysToInvalidate: {
|
|
682
699
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
683
700
|
invoiceIndex: {}
|
|
@@ -686,15 +703,15 @@ function ut() {
|
|
|
686
703
|
}
|
|
687
704
|
//#endregion
|
|
688
705
|
//#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
|
|
689
|
-
var
|
|
706
|
+
var ft = /* @__PURE__ */ R({
|
|
690
707
|
__name: "CreditNoteLineItemsTableSection",
|
|
691
708
|
props: {
|
|
692
709
|
creditNote: {},
|
|
693
710
|
customFieldDefinitions: {}
|
|
694
711
|
},
|
|
695
712
|
setup(e) {
|
|
696
|
-
let t = e, n =
|
|
697
|
-
isSaving:
|
|
713
|
+
let t = e, n = N(() => t.creditNote), r = dt(), i = ue({
|
|
714
|
+
isSaving: N(() => r.isLoading.value),
|
|
698
715
|
billingDocument: () => n.value,
|
|
699
716
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
700
717
|
updateLines: (e) => r.execute({
|
|
@@ -702,24 +719,24 @@ var dt = /* @__PURE__ */ z({
|
|
|
702
719
|
params: { creditNoteUuid: t.creditNote.uuid }
|
|
703
720
|
})
|
|
704
721
|
});
|
|
705
|
-
return
|
|
722
|
+
return k(i), (e, n) => (V(), P(Ce, null, {
|
|
706
723
|
default: U(() => [
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
724
|
+
L(fe, { "show-apply-discount": !1 }),
|
|
725
|
+
L(_e),
|
|
726
|
+
L(be, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
|
|
727
|
+
L(pe)
|
|
711
728
|
]),
|
|
712
729
|
_: 1
|
|
713
730
|
}));
|
|
714
731
|
}
|
|
715
|
-
}),
|
|
732
|
+
}), pt = /* @__PURE__ */ R({
|
|
716
733
|
__name: "CreditNoteDetailView",
|
|
717
734
|
props: {
|
|
718
735
|
creditNote: {},
|
|
719
736
|
customFieldDefinitions: {}
|
|
720
737
|
},
|
|
721
738
|
setup(e) {
|
|
722
|
-
let t = e, n =
|
|
739
|
+
let t = e, n = j(), r = Me(!1), a = N(() => l.filterByView(t.customFieldDefinitions, s.CREDIT_NOTE_DETAIL)), o = N(() => [
|
|
723
740
|
{
|
|
724
741
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
725
742
|
to: { name: "invoicing-invoice-overview" }
|
|
@@ -734,32 +751,32 @@ var dt = /* @__PURE__ */ z({
|
|
|
734
751
|
{ label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
|
|
735
752
|
{ label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
|
|
736
753
|
]);
|
|
737
|
-
return (e,
|
|
754
|
+
return (e, s) => (V(), P(Se, {
|
|
738
755
|
"billing-document": t.creditNote,
|
|
739
|
-
breadcrumbs:
|
|
756
|
+
breadcrumbs: o.value,
|
|
740
757
|
title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
|
|
741
758
|
}, {
|
|
742
|
-
header: U(() => [
|
|
759
|
+
header: U(() => [L(at, {
|
|
743
760
|
"credit-note": t.creditNote,
|
|
744
761
|
"is-pdf-view-active": r.value,
|
|
745
762
|
class: "w-full",
|
|
746
|
-
onTogglePdfView:
|
|
763
|
+
onTogglePdfView: s[0] ||= (e) => r.value = !r.value
|
|
747
764
|
}, null, 8, ["credit-note", "is-pdf-view-active"])]),
|
|
748
|
-
default: U(() => [t.creditNote.lifecycleStatus === H(i).FINALIZED ? (V(),
|
|
765
|
+
default: U(() => [t.creditNote.lifecycleStatus === H(i).FINALIZED ? (V(), P(ge, {
|
|
749
766
|
key: 0,
|
|
750
767
|
"invoice-uuid": t.creditNote.uuid
|
|
751
|
-
}, null, 8, ["invoice-uuid"])) :
|
|
768
|
+
}, null, 8, ["invoice-uuid"])) : F("", !0), r.value ? (V(), P(ye, {
|
|
752
769
|
key: 1,
|
|
753
770
|
"billing-document": t.creditNote,
|
|
754
771
|
class: "w-full"
|
|
755
|
-
}, null, 8, ["billing-document"])) : (V(),
|
|
772
|
+
}, null, 8, ["billing-document"])) : (V(), I(M, { key: 2 }, [L(ft, {
|
|
756
773
|
"credit-note": t.creditNote,
|
|
757
774
|
"custom-field-definitions": a.value
|
|
758
|
-
}, null, 8, ["credit-note", "custom-field-definitions"]),
|
|
775
|
+
}, null, 8, ["credit-note", "custom-field-definitions"]), L(ot, {
|
|
759
776
|
"credit-note": t.creditNote,
|
|
760
777
|
class: "w-full"
|
|
761
778
|
}, null, 8, ["credit-note"])], 64))]),
|
|
762
|
-
sidebar: U(() => [
|
|
779
|
+
sidebar: U(() => [L(ut, {
|
|
763
780
|
"credit-note": t.creditNote,
|
|
764
781
|
"custom-field-definitions": a.value
|
|
765
782
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -770,20 +787,20 @@ var dt = /* @__PURE__ */ z({
|
|
|
770
787
|
"title"
|
|
771
788
|
]));
|
|
772
789
|
}
|
|
773
|
-
}),
|
|
790
|
+
}), mt = /* @__PURE__ */ R({
|
|
774
791
|
__name: "CreditNoteDetailViewDataProvider",
|
|
775
792
|
props: { creditNoteUuid: {} },
|
|
776
793
|
setup(e) {
|
|
777
|
-
let t = e, n =
|
|
794
|
+
let t = e, n = j(), r = N(() => [{
|
|
778
795
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
779
796
|
to: { name: "invoicing-invoice-overview" }
|
|
780
|
-
}]), i =
|
|
781
|
-
return (e, t) => (V(),
|
|
797
|
+
}]), i = D(N(() => t.creditNoteUuid)), a = d();
|
|
798
|
+
return (e, t) => (V(), P(we, {
|
|
782
799
|
"custom-field-definitions-query": H(a),
|
|
783
800
|
query: H(i),
|
|
784
801
|
"loading-breadcrumbs": r.value
|
|
785
802
|
}, {
|
|
786
|
-
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [
|
|
803
|
+
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [L(pt, {
|
|
787
804
|
"credit-note": e,
|
|
788
805
|
"custom-field-definitions": t
|
|
789
806
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -796,4 +813,4 @@ var dt = /* @__PURE__ */ z({
|
|
|
796
813
|
}
|
|
797
814
|
});
|
|
798
815
|
//#endregion
|
|
799
|
-
export {
|
|
816
|
+
export { mt as default };
|