@wisemen/wise-invoicing-web 0.13.0 → 0.14.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-HANaeRzK.js → ApprovalReminderSettingsViewDataProvider-DlsyA-ZR.js} +3 -3
- package/dist/{BillingDocumentDetailViewDataProvider-BVrmLEP5.js → BillingDocumentDetailViewDataProvider-D3-X20WR.js} +8 -8
- package/dist/{BillingDocumentPdf-BLlJw5Wp.js → BillingDocumentPdf-CcmP3N34.js} +3 -3
- package/dist/{CreditNoteDetailViewDataProvider-CnmNQyXq.js → CreditNoteDetailViewDataProvider-X-m10Sqr.js} +232 -196
- package/dist/{CreditNotePdfViewDataProvider-Bu8lNWSx.js → CreditNotePdfViewDataProvider-jWh6REbj.js} +3 -3
- package/dist/{CustomFieldValueText-DX_7bMFM.js → CustomFieldValueText-C9yV_CrJ.js} +2 -2
- package/dist/{DunningCaseSendDialog-D5_uNt0g.js → DunningCaseSendDialog-DUyOH14Q.js} +12 -12
- package/dist/{InvoiceApprovalOutOfSyncIndicator-CX7hLBIC.js → InvoiceApprovalOutOfSyncIndicator-DzY8gqnD.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-1pLrgcIU.js → InvoiceApprovalOverviewView-CoIGxCMN.js} +6 -6
- package/dist/{InvoiceApprovalStatusBadge-DqsSuo4M.js → InvoiceApprovalStatusBadge-C9O_mb1l.js} +2 -2
- package/dist/{InvoiceApproveDialogDataProvider-D22o3mIC.js → InvoiceApproveDialogDataProvider-hVuyszuo.js} +6 -6
- package/dist/{InvoiceDetailViewDataProvider-DoqOGDZb.js → InvoiceDetailViewDataProvider-DBlmJs3o.js} +14 -14
- package/dist/{InvoicePdfView-Df9masUV.js → InvoicePdfView-DBVwRo3q.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-CKCp0TJ7.js → InvoicePdfViewDataProvider-CHLE3XdC.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CqAP9Ckj.js → InvoicePublicProFormaPdfViewDataProvider-DECBZhaP.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-Da_JGESE.js → InvoicingFileUploadProvider-BZRLmEsv.js} +1 -1
- package/dist/{IssuerSettingsViewDataProvider-xXQEED2s.js → IssuerSettingsViewDataProvider-DrXmGKtc.js} +3 -3
- package/dist/{PeppolSettingsViewDataProvider-B4Hu1RQk.js → PeppolSettingsViewDataProvider-BesduXML.js} +4 -4
- package/dist/{api.util-DpWaDY5y.js → api.util-BxDrxtn6.js} +400 -391
- package/dist/{billingDocumentDetail.transformer-BJQFbO87.js → billingDocumentDetail.transformer-I1L4zrOM.js} +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +2 -1
- package/dist/client/types.gen.d.ts +33 -0
- package/dist/client/zod.gen.d.ts +9 -0
- package/dist/{creditNoteDetail.query-BVXYLSMf.js → creditNoteDetail.query-BurujY-Y.js} +50 -47
- package/dist/{i18n.lib-Be2_Gg1d.js → i18n.lib-7EI865En.js} +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +94 -81
- package/dist/{invoice.service-Dugf3vP3.js → invoice.service-DfMS-JGk.js} +44 -44
- package/dist/{invoiceApproval.service-TTtH_nbV.js → invoiceApproval.service-CvvAZxJH.js} +5 -5
- package/dist/{invoiceApprovalStatus.util-BebJpPKg.js → invoiceApprovalStatus.util-QhwQpmWI.js} +1 -1
- package/dist/{invoiceCustomer.service-BgaMvr34.js → invoiceCustomer.service-DSAI1dGB.js} +6 -6
- package/dist/{invoiceDetail.query-DaY-Dwp4.js → invoiceDetail.query-qPz6hTNU.js} +1 -1
- package/dist/{invoiceIndexCache.util-8JQCyWbl.js → invoiceIndexCache.util-DduYusET.js} +2 -2
- package/dist/{invoicingConfig.composable-DQTYsGa7.js → invoicingConfig.composable-DT17tqnm.js} +2 -2
- package/dist/{issuerSettings.query-mMH2f5g6.js → issuerSettings.query-DYmr_dfw.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +6 -0
- package/dist/locales/en-US.json.d.ts +3 -0
- package/dist/locales/nl-BE.json.d.ts +3 -0
- package/dist/modules/credit-note/api/mutations/creditNoteCopyToInvoice.mutation.d.ts +4 -0
- package/dist/modules/credit-note/api/services/creditNote.service.d.ts +2 -0
- package/dist/{reminderConfig.query-Dn0_h7xY.js → reminderConfig.query-BoNWAhZP.js} +11 -11
- package/dist/ui/customer-invoice-list/CustomerInvoiceTable.vue.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import "./api.util-
|
|
1
|
+
import { t as e } from "./i18n.lib-7EI865En.js";
|
|
2
|
+
import "./api.util-BxDrxtn6.js";
|
|
3
3
|
import { b as t, r as n } from "./documentTitle.composable-BqZWKGw1.js";
|
|
4
4
|
import { n as r } from "./address.transformer-jGddczLV.js";
|
|
5
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-
|
|
5
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-C9yV_CrJ.js";
|
|
6
6
|
import { n as l, t as u } from "./download.util-LyRpGWKA.js";
|
|
7
|
-
import { L as d, T as f, Tt as p, U as m, V 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
|
|
7
|
+
import { L as d, T as f, Tt as p, U as m, V as ee, _ as te, b as h, dt as g, i as ne, it as _, nt as v, q as y, u as b } from "./dist-BMzyJZTx.js";
|
|
8
|
+
import { n as x, t as re } from "./dist-Cdbpkd3Y.js";
|
|
9
|
+
import { t as S } from "./formango.util-D5c2ql--.js";
|
|
10
|
+
import { n as C, r as w, t as T } from "./creditNoteDetail.query-BurujY-Y.js";
|
|
11
|
+
import { C as E, S as ie, _ as D, a as ae, b as oe, c as se, d as ce, f as le, g as O, h as ue, i as de, m as fe, n as pe, o as me, p as he, r as ge, s as _e, t as ve, u as ye, v as be, w as k, x as xe, y as Se } from "./BillingDocumentDetailViewDataProvider-D3-X20WR.js";
|
|
12
|
+
import { r as Ce } from "./InvoicingFileUploadProvider-BZRLmEsv.js";
|
|
13
|
+
import we, { 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 Te, createVNode as L, defineComponent as R, mergeProps as Ee, normalizeClass as z, openBlock as B, ref as V, renderList as De, renderSlot as Oe, resolveDynamicComponent as ke, unref as H, withCtx as U } from "vue";
|
|
16
|
+
import { useKeysetInfiniteQuery as Ae, useMutation as W } from "@wisemen/vue-core-api-utils";
|
|
17
|
+
import { useRouter as je } from "vue-router";
|
|
18
|
+
import { UIAnimateHeight as Me, UIBadge as Ne, UIClickableElement as Pe, UIColumnLayout as G, UIDateField as Fe, UIDialogFooter as Ie, UIDialogFooterCancel as Le, UIDialogFooterSubmit as Re, UIDialogHeader as ze, UIForm as K, UIFormDialog as Be, UIRowLayout as q, UISeparator as Ve, UIText as J, UITextField as He, useOverlay as Ue, 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) => C.update(e.params.creditNoteUuid, e.body),
|
|
24
24
|
queryKeysToInvalidate: {
|
|
25
25
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
26
26
|
invoiceIndex: {}
|
|
@@ -29,23 +29,34 @@ 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
|
-
subject:
|
|
32
|
+
var We = A.object({
|
|
33
|
+
issuedOn: re,
|
|
34
|
+
externalRemarks: A.string().nullable(),
|
|
35
|
+
poNumber: A.string().nullable(),
|
|
36
|
+
subject: A.string().nullable()
|
|
37
37
|
}).superRefine((t, n) => {
|
|
38
38
|
t.externalRemarks?.trim() === "" && n.addIssue({
|
|
39
39
|
code: "custom",
|
|
40
40
|
message: e.global.t("wise_invoicing.credit_note.finalize.validation.external_remarks_required"),
|
|
41
41
|
path: ["externalRemarks"]
|
|
42
42
|
});
|
|
43
|
-
}),
|
|
43
|
+
}), Ge = A.object({ subject: A.string().nullable() });
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/modules/credit-note/api/mutations/creditNoteCopyToInvoice.mutation.ts
|
|
46
|
+
function Ke() {
|
|
47
|
+
return W({
|
|
48
|
+
queryFn: (e) => C.copyToInvoice(e.params.creditNoteUuid),
|
|
49
|
+
queryKeysToInvalidate: {
|
|
50
|
+
creditNoteActivityLogIndex: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
51
|
+
invoiceIndex: {}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
44
55
|
//#endregion
|
|
45
56
|
//#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
|
|
46
|
-
function
|
|
57
|
+
function qe() {
|
|
47
58
|
return W({
|
|
48
|
-
queryFn: (e) =>
|
|
59
|
+
queryFn: (e) => C.finalize(e.params.creditNoteUuid),
|
|
49
60
|
queryKeysToInvalidate: {
|
|
50
61
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
51
62
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -55,9 +66,9 @@ function Ge() {
|
|
|
55
66
|
}
|
|
56
67
|
//#endregion
|
|
57
68
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
|
|
58
|
-
function
|
|
69
|
+
function Je() {
|
|
59
70
|
return W({
|
|
60
|
-
queryFn: (e) =>
|
|
71
|
+
queryFn: (e) => C.markAsDraft(e.params.creditNoteUuid),
|
|
61
72
|
queryKeysToInvalidate: {
|
|
62
73
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
63
74
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -67,9 +78,9 @@ function Ke() {
|
|
|
67
78
|
}
|
|
68
79
|
//#endregion
|
|
69
80
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
|
|
70
|
-
function
|
|
81
|
+
function Ye() {
|
|
71
82
|
return W({
|
|
72
|
-
queryFn: (e) =>
|
|
83
|
+
queryFn: (e) => C.markAsReady(e.params.creditNoteUuid),
|
|
73
84
|
queryKeysToInvalidate: {
|
|
74
85
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
75
86
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -79,44 +90,44 @@ function qe() {
|
|
|
79
90
|
}
|
|
80
91
|
//#endregion
|
|
81
92
|
//#region src/modules/credit-note/api/mutations/creditNoteSend.mutation.ts
|
|
82
|
-
function
|
|
93
|
+
function Xe() {
|
|
83
94
|
return W({
|
|
84
|
-
queryFn: (e) =>
|
|
95
|
+
queryFn: (e) => C.send(e.params.creditNoteUuid),
|
|
85
96
|
queryKeysToInvalidate: { creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid } }
|
|
86
97
|
});
|
|
87
98
|
}
|
|
88
99
|
//#endregion
|
|
89
100
|
//#region src/modules/credit-note/api/mutations/creditNoteDelete.mutation.ts
|
|
90
|
-
function
|
|
101
|
+
function Ze() {
|
|
91
102
|
return W({
|
|
92
|
-
queryFn: (e) =>
|
|
103
|
+
queryFn: (e) => C.delete(e.params.creditNoteUuid),
|
|
93
104
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
94
105
|
});
|
|
95
106
|
}
|
|
96
107
|
//#endregion
|
|
97
108
|
//#region src/modules/credit-note/use-cases/detail/dialogs/CreditNoteDeleteDialog.vue
|
|
98
|
-
var
|
|
109
|
+
var Qe = /* @__PURE__ */ R({
|
|
99
110
|
__name: "CreditNoteDeleteDialog",
|
|
100
111
|
props: { creditNote: {} },
|
|
101
112
|
emits: ["close", "deleted"],
|
|
102
113
|
setup(e, { emit: t }) {
|
|
103
|
-
let n = e, r = t, i =
|
|
104
|
-
schema:
|
|
114
|
+
let n = e, r = t, i = j(), a = je(), o = Y(), s = Ze(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
|
|
115
|
+
schema: we.object({}),
|
|
105
116
|
onSubmit: async () => {
|
|
106
117
|
let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
|
|
107
118
|
e.isErr() ? o.apiError(e.error) : (o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" }));
|
|
108
119
|
}
|
|
109
120
|
});
|
|
110
|
-
return (e, t) => (
|
|
121
|
+
return (e, t) => (B(), P(H(Be), {
|
|
111
122
|
form: H(l),
|
|
112
123
|
size: "xs",
|
|
113
124
|
onClose: t[0] ||= (e) => r("close")
|
|
114
125
|
}, {
|
|
115
|
-
default: U(() => [
|
|
126
|
+
default: U(() => [L(H(ze), {
|
|
116
127
|
title: H(i).t("wise_invoicing.credit_note.delete.title"),
|
|
117
128
|
description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
|
|
118
|
-
}, null, 8, ["title", "description"]),
|
|
119
|
-
right: U(() => [
|
|
129
|
+
}, null, 8, ["title", "description"]), L(H(Ie), null, {
|
|
130
|
+
right: U(() => [L(H(Le)), L(H(Re), {
|
|
120
131
|
"is-destructive": !0,
|
|
121
132
|
label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
122
133
|
}, null, 8, ["label"])]),
|
|
@@ -128,44 +139,59 @@ var Xe = /* @__PURE__ */ z({
|
|
|
128
139
|
});
|
|
129
140
|
//#endregion
|
|
130
141
|
//#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
|
|
131
|
-
function
|
|
132
|
-
let n =
|
|
133
|
-
async function
|
|
134
|
-
let t = await
|
|
142
|
+
function $e(e) {
|
|
143
|
+
let n = j(), r = Y(), i = je(), a = Ue(), s = a.create(Qe), c = a.create(oe), l = Ke(), h = qe(), g = Je(), _ = Ye(), v = Xe(), { shouldSkipConfirmation: y } = xe(), b = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), x = N(() => ie.getSummary(e.value)?.isExceeded ?? !1), re = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
|
|
144
|
+
async function S() {
|
|
145
|
+
let t = await _.execute({ params: {
|
|
135
146
|
creditNoteUuid: e.value.uuid,
|
|
136
|
-
invoiceUuid:
|
|
147
|
+
invoiceUuid: b.value
|
|
137
148
|
} });
|
|
138
149
|
t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
|
|
139
150
|
}
|
|
140
|
-
async function
|
|
141
|
-
let t = await
|
|
151
|
+
async function w() {
|
|
152
|
+
let t = await h.execute({ params: {
|
|
142
153
|
creditNoteUuid: e.value.uuid,
|
|
143
|
-
invoiceUuid:
|
|
154
|
+
invoiceUuid: b.value
|
|
144
155
|
} });
|
|
145
156
|
return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
|
|
146
157
|
}
|
|
147
|
-
async function
|
|
148
|
-
|
|
158
|
+
async function T() {
|
|
159
|
+
y.value ? await w() : await c.open({
|
|
149
160
|
billingDocumentType: "credit_note",
|
|
150
|
-
onConfirm:
|
|
161
|
+
onConfirm: w
|
|
151
162
|
});
|
|
152
163
|
}
|
|
153
|
-
async function
|
|
154
|
-
let t = await
|
|
164
|
+
async function E() {
|
|
165
|
+
let t = await g.execute({ params: {
|
|
155
166
|
creditNoteUuid: e.value.uuid,
|
|
156
|
-
invoiceUuid:
|
|
167
|
+
invoiceUuid: b.value
|
|
157
168
|
} });
|
|
158
169
|
t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
|
|
159
170
|
}
|
|
160
|
-
async function
|
|
161
|
-
let t = await
|
|
171
|
+
async function D() {
|
|
172
|
+
let t = await v.execute({ params: { creditNoteUuid: e.value.uuid } });
|
|
162
173
|
t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
|
|
163
174
|
}
|
|
164
|
-
async function
|
|
165
|
-
await
|
|
175
|
+
async function ae() {
|
|
176
|
+
let t = await l.execute({ params: { creditNoteUuid: e.value.uuid } });
|
|
177
|
+
t.isErr() ? r.apiError(t.error) : r.show({
|
|
178
|
+
button: {
|
|
179
|
+
label: n.t("wise_invoicing.credit_note.copy_to_invoice.view_action"),
|
|
180
|
+
onClick: () => {
|
|
181
|
+
i.push({
|
|
182
|
+
name: "invoicing-invoice-detail",
|
|
183
|
+
params: { invoiceUuid: t.value }
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
message: n.t("wise_invoicing.credit_note.copy_to_invoice.success")
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
async function se() {
|
|
191
|
+
await s.open({ creditNote: e.value });
|
|
166
192
|
}
|
|
167
|
-
async function
|
|
168
|
-
let t = await
|
|
193
|
+
async function ce() {
|
|
194
|
+
let t = await C.getByUuid(e.value.uuid);
|
|
169
195
|
if (t.isErr()) {
|
|
170
196
|
r.apiError(t.error);
|
|
171
197
|
return;
|
|
@@ -175,56 +201,66 @@ function Ze(e) {
|
|
|
175
201
|
r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
176
202
|
return;
|
|
177
203
|
}
|
|
178
|
-
let a = await
|
|
204
|
+
let a = await Ce.getDownloadUrl(i.uuid);
|
|
179
205
|
a !== null && u.downloadUrl(a, i.name);
|
|
180
206
|
}
|
|
181
|
-
let
|
|
207
|
+
let le = N(() => [
|
|
182
208
|
{
|
|
183
|
-
isLoading:
|
|
209
|
+
isLoading: v.isLoading.value,
|
|
184
210
|
iconLeft: p,
|
|
185
211
|
key: "send",
|
|
186
212
|
label: n.t("wise_invoicing.invoice.detail.actions.send"),
|
|
187
213
|
variant: "primary",
|
|
188
214
|
visible: e.value.status === t.FINALIZED,
|
|
189
|
-
onClick:
|
|
215
|
+
onClick: D
|
|
190
216
|
},
|
|
191
217
|
{
|
|
192
|
-
isLoading:
|
|
193
|
-
iconRight:
|
|
218
|
+
isLoading: _.isLoading.value,
|
|
219
|
+
iconRight: ne,
|
|
194
220
|
key: "markAsReady",
|
|
195
221
|
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
196
222
|
visible: e.value.status === t.DRAFT,
|
|
197
|
-
onClick:
|
|
223
|
+
onClick: S
|
|
198
224
|
},
|
|
199
225
|
{
|
|
200
|
-
isDisabled:
|
|
201
|
-
isLoading:
|
|
202
|
-
disabledReason:
|
|
226
|
+
isDisabled: x.value,
|
|
227
|
+
isLoading: h.isLoading.value,
|
|
228
|
+
disabledReason: x.value ? n.t("wise_invoicing.credit_note.finalize.exceeds_creditable_amount") : null,
|
|
203
229
|
iconRight: d,
|
|
204
230
|
key: "finalize",
|
|
205
231
|
label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
206
232
|
visible: e.value.status === t.READY,
|
|
207
|
-
onClick:
|
|
233
|
+
onClick: T
|
|
208
234
|
}
|
|
209
|
-
].filter((e) => e.visible)),
|
|
210
|
-
let r = [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
235
|
+
].filter((e) => e.visible)), O = N(() => {
|
|
236
|
+
let r = [
|
|
237
|
+
{
|
|
238
|
+
icon: f,
|
|
239
|
+
key: "downloadPdf",
|
|
240
|
+
label: n.t("wise_invoicing.common.download_pdf"),
|
|
241
|
+
visible: re.value,
|
|
242
|
+
onSelect: ce
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
icon: m,
|
|
246
|
+
key: "backToDraft",
|
|
247
|
+
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
248
|
+
visible: e.value.status === t.READY,
|
|
249
|
+
onSelect: E
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
icon: te,
|
|
253
|
+
key: "copyToInvoice",
|
|
254
|
+
label: n.t("wise_invoicing.credit_note.detail.actions.copy_to_invoice"),
|
|
255
|
+
visible: !0,
|
|
256
|
+
onSelect: ae
|
|
257
|
+
}
|
|
258
|
+
], i = [{
|
|
259
|
+
icon: ee,
|
|
224
260
|
key: "delete",
|
|
225
261
|
label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
|
|
226
262
|
visible: o.isEditable(e.value.status),
|
|
227
|
-
onSelect:
|
|
263
|
+
onSelect: se
|
|
228
264
|
}];
|
|
229
265
|
return [{
|
|
230
266
|
items: r.filter((e) => e.visible),
|
|
@@ -235,14 +271,14 @@ function Ze(e) {
|
|
|
235
271
|
}].filter((e) => e.items.length > 0);
|
|
236
272
|
});
|
|
237
273
|
return {
|
|
238
|
-
isActionMenuVisible:
|
|
239
|
-
menuGroups:
|
|
240
|
-
primaryButtons:
|
|
274
|
+
isActionMenuVisible: N(() => O.value.length > 0),
|
|
275
|
+
menuGroups: O,
|
|
276
|
+
primaryButtons: le
|
|
241
277
|
};
|
|
242
278
|
}
|
|
243
279
|
//#endregion
|
|
244
280
|
//#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
|
|
245
|
-
var
|
|
281
|
+
var et = /* @__PURE__ */ R({
|
|
246
282
|
__name: "CreditNoteDetailHeaderSection",
|
|
247
283
|
props: {
|
|
248
284
|
isPdfViewActive: { type: Boolean },
|
|
@@ -250,35 +286,35 @@ var Qe = /* @__PURE__ */ z({
|
|
|
250
286
|
},
|
|
251
287
|
emits: ["togglePdfView"],
|
|
252
288
|
setup(e, { emit: n }) {
|
|
253
|
-
let r = e, i = n, a =
|
|
289
|
+
let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = $e(N(() => r.creditNote)), u = N(() => new E(r.creditNote.status)), d = N(() => u.value.color), f = N(() => a.t(u.value.translationKey)), p = N(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), m = X({
|
|
254
290
|
initialState: { subject: r.creditNote.subject },
|
|
255
|
-
schema:
|
|
291
|
+
schema: Ge,
|
|
256
292
|
onSubmit: async (e) => {
|
|
257
293
|
let t = await s.execute({
|
|
258
294
|
body: {
|
|
259
|
-
...
|
|
295
|
+
...w.toForm(r.creditNote),
|
|
260
296
|
subject: e.subject
|
|
261
297
|
},
|
|
262
298
|
params: { creditNoteUuid: r.creditNote.uuid }
|
|
263
299
|
});
|
|
264
300
|
t.isErr() && o.apiError(t.error);
|
|
265
301
|
}
|
|
266
|
-
}),
|
|
267
|
-
return
|
|
302
|
+
}), ee = m.register("subject");
|
|
303
|
+
return k({ form: m }), (e, t) => (B(), P(H(K), {
|
|
268
304
|
form: H(m),
|
|
269
305
|
"prompt-on-unsaved-changes": !1
|
|
270
306
|
}, {
|
|
271
|
-
default: U(() => [
|
|
307
|
+
default: U(() => [L(be, {
|
|
272
308
|
"fallback-title": H(a).t("wise_invoicing.credit_note.detail.fallback_title"),
|
|
273
309
|
"is-disabled": p.value,
|
|
274
310
|
sequence: r.creditNote.sequence,
|
|
275
311
|
"status-color": d.value,
|
|
276
312
|
"status-label": f.value,
|
|
277
|
-
icon: H(
|
|
278
|
-
"subject-field": H(
|
|
313
|
+
icon: H(g),
|
|
314
|
+
"subject-field": H(ee),
|
|
279
315
|
"subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
280
316
|
}, {
|
|
281
|
-
actions: U(() => [
|
|
317
|
+
actions: U(() => [L(D, {
|
|
282
318
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
283
319
|
"menu-groups": H(c),
|
|
284
320
|
"primary-buttons": H(l),
|
|
@@ -288,11 +324,11 @@ var Qe = /* @__PURE__ */ z({
|
|
|
288
324
|
"menu-groups",
|
|
289
325
|
"primary-buttons"
|
|
290
326
|
])]),
|
|
291
|
-
status: U(() => [
|
|
327
|
+
status: U(() => [L(H(q), {
|
|
292
328
|
gap: "xs",
|
|
293
329
|
class: "flex-wrap items-start"
|
|
294
330
|
}, {
|
|
295
|
-
default: U(() => [r.creditNote.isOverdue ? (
|
|
331
|
+
default: U(() => [r.creditNote.isOverdue ? (B(), P(Se, { key: 0 })) : F("", !0)]),
|
|
296
332
|
_: 1
|
|
297
333
|
})]),
|
|
298
334
|
_: 1
|
|
@@ -309,13 +345,13 @@ var Qe = /* @__PURE__ */ z({
|
|
|
309
345
|
_: 1
|
|
310
346
|
}, 8, ["form"]));
|
|
311
347
|
}
|
|
312
|
-
}),
|
|
348
|
+
}), tt = /* @__PURE__ */ R({
|
|
313
349
|
__name: "CreditNoteDetailRemarksSection",
|
|
314
350
|
props: { creditNote: {} },
|
|
315
351
|
setup(e) {
|
|
316
|
-
let n = e, r =
|
|
317
|
-
initialState:
|
|
318
|
-
schema:
|
|
352
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
353
|
+
initialState: N(() => w.toForm(n.creditNote)),
|
|
354
|
+
schema: We,
|
|
319
355
|
onSubmit: async (e) => {
|
|
320
356
|
let t = await a.execute({
|
|
321
357
|
body: e,
|
|
@@ -323,12 +359,12 @@ var Qe = /* @__PURE__ */ z({
|
|
|
323
359
|
});
|
|
324
360
|
t.isErr() && i.apiError(t.error);
|
|
325
361
|
}
|
|
326
|
-
}), s = o.register("externalRemarks"), c =
|
|
327
|
-
return
|
|
362
|
+
}), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
363
|
+
return k({ form: o }), (e, t) => (B(), P(H(K), {
|
|
328
364
|
form: H(o),
|
|
329
365
|
"prompt-on-unsaved-changes": !1
|
|
330
366
|
}, {
|
|
331
|
-
default: U(() => [
|
|
367
|
+
default: U(() => [L(O, {
|
|
332
368
|
"is-disabled": c.value,
|
|
333
369
|
placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
334
370
|
"remarks-field": H(s),
|
|
@@ -345,23 +381,23 @@ var Qe = /* @__PURE__ */ z({
|
|
|
345
381
|
});
|
|
346
382
|
//#endregion
|
|
347
383
|
//#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
|
|
348
|
-
function
|
|
349
|
-
return
|
|
384
|
+
function nt(e) {
|
|
385
|
+
return Ae("creditNoteActivityLogIndex", {
|
|
350
386
|
params: { creditNoteUuid: e },
|
|
351
|
-
queryFn: (t) =>
|
|
387
|
+
queryFn: (t) => C.getActivityLogs(e.value, { pagination: t })
|
|
352
388
|
});
|
|
353
389
|
}
|
|
354
390
|
//#endregion
|
|
355
391
|
//#region src/modules/credit-note/use-cases/detail/components/sidebar/CreditNoteDetailSidebarActivityTab.vue
|
|
356
|
-
var
|
|
392
|
+
var rt = /* @__PURE__ */ R({
|
|
357
393
|
__name: "CreditNoteDetailSidebarActivityTab",
|
|
358
394
|
props: { creditNote: {} },
|
|
359
395
|
setup(e) {
|
|
360
|
-
let t = e, r =
|
|
396
|
+
let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = nt(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
|
|
361
397
|
data: [],
|
|
362
398
|
meta: { next: null }
|
|
363
399
|
}).data);
|
|
364
|
-
return (e, c) => (
|
|
400
|
+
return (e, c) => (B(), P(ue, {
|
|
365
401
|
"current-billing-document": {
|
|
366
402
|
role: H(n).CREDIT_NOTE,
|
|
367
403
|
uuid: t.creditNote.uuid
|
|
@@ -382,7 +418,7 @@ var tt = /* @__PURE__ */ z({
|
|
|
382
418
|
"is-loading"
|
|
383
419
|
]));
|
|
384
420
|
}
|
|
385
|
-
}), Q = /* @__PURE__ */
|
|
421
|
+
}), Q = /* @__PURE__ */ R({
|
|
386
422
|
__name: "BillingDocumentDetailSidebarInfoItem",
|
|
387
423
|
props: {
|
|
388
424
|
hasError: {
|
|
@@ -394,25 +430,25 @@ var tt = /* @__PURE__ */ z({
|
|
|
394
430
|
},
|
|
395
431
|
setup(e) {
|
|
396
432
|
let t = e;
|
|
397
|
-
return (e, n) => (
|
|
433
|
+
return (e, n) => (B(), P(H(q), null, {
|
|
398
434
|
default: U(() => [
|
|
399
|
-
(
|
|
435
|
+
(B(), P(ke(t.icon), { class: z([{
|
|
400
436
|
"text-error-primary": t.hasError,
|
|
401
437
|
"text-tertiary": !t.hasError
|
|
402
438
|
}, "size-3.5 shrink-0"]) }, null, 8, ["class"])),
|
|
403
|
-
|
|
439
|
+
L(H(J), {
|
|
404
440
|
text: t.label,
|
|
405
|
-
class:
|
|
441
|
+
class: z([{
|
|
406
442
|
"text-error-primary": t.hasError,
|
|
407
443
|
"text-tertiary": !t.hasError
|
|
408
444
|
}, "w-24 shrink-0 text-xs"])
|
|
409
445
|
}, null, 8, ["text", "class"]),
|
|
410
|
-
|
|
446
|
+
Oe(e.$slots, "default")
|
|
411
447
|
]),
|
|
412
448
|
_: 3
|
|
413
449
|
}));
|
|
414
450
|
}
|
|
415
|
-
}), $ = /* @__PURE__ */
|
|
451
|
+
}), $ = /* @__PURE__ */ R({
|
|
416
452
|
__name: "BillingDocumentDetailSidebarPartySection",
|
|
417
453
|
props: {
|
|
418
454
|
title: {},
|
|
@@ -425,71 +461,71 @@ var tt = /* @__PURE__ */ z({
|
|
|
425
461
|
email: { default: null }
|
|
426
462
|
},
|
|
427
463
|
setup(e) {
|
|
428
|
-
let t = e, n =
|
|
464
|
+
let t = e, n = V(t.isDefaultOpen);
|
|
429
465
|
function i() {
|
|
430
466
|
n.value = !n.value;
|
|
431
467
|
}
|
|
432
|
-
return (e, a) => (
|
|
433
|
-
default: U(() => [
|
|
434
|
-
default: U(() => [
|
|
435
|
-
default: U(() => [
|
|
468
|
+
return (e, a) => (B(), P(H(G), { class: "w-full" }, {
|
|
469
|
+
default: U(() => [L(H(q), { justify: "between" }, {
|
|
470
|
+
default: U(() => [L(H(Pe), { class: "rounded-sm" }, {
|
|
471
|
+
default: U(() => [Te("button", {
|
|
436
472
|
type: "button",
|
|
437
473
|
class: "flex w-full items-center gap-sm",
|
|
438
474
|
onClick: i
|
|
439
475
|
}, [
|
|
440
|
-
|
|
476
|
+
L(H(J), {
|
|
441
477
|
text: t.title,
|
|
442
478
|
class: "text-xs font-semibold text-primary"
|
|
443
479
|
}, null, 8, ["text"]),
|
|
444
|
-
|
|
480
|
+
L(H(Ne), {
|
|
445
481
|
label: t.name,
|
|
446
482
|
color: "gray",
|
|
447
483
|
variant: "outline"
|
|
448
484
|
}, null, 8, ["label"]),
|
|
449
|
-
|
|
485
|
+
L(H(_), { class: z([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
|
|
450
486
|
])]),
|
|
451
487
|
_: 1
|
|
452
488
|
})]),
|
|
453
489
|
_: 1
|
|
454
|
-
}),
|
|
455
|
-
default: U(() => [n.value ? (
|
|
490
|
+
}), L(H(Me), null, {
|
|
491
|
+
default: U(() => [n.value ? (B(), P(H(G), {
|
|
456
492
|
key: 0,
|
|
457
493
|
gap: "xs"
|
|
458
494
|
}, {
|
|
459
495
|
default: U(() => [
|
|
460
|
-
|
|
496
|
+
L(H(J), {
|
|
461
497
|
text: t.name,
|
|
462
498
|
class: "text-xs font-medium text-primary"
|
|
463
499
|
}, null, 8, ["text"]),
|
|
464
|
-
t.address ? (
|
|
500
|
+
t.address ? (B(), P(H(J), {
|
|
465
501
|
key: 0,
|
|
466
502
|
truncate: !1,
|
|
467
503
|
text: H(r).format(t.address),
|
|
468
504
|
class: "text-xs text-primary"
|
|
469
|
-
}, null, 8, ["text"])) :
|
|
470
|
-
t.email ? (
|
|
505
|
+
}, null, 8, ["text"])) : F("", !0),
|
|
506
|
+
t.email ? (B(), P(H(J), {
|
|
471
507
|
key: 1,
|
|
472
508
|
text: t.email,
|
|
473
509
|
class: "text-xs text-primary"
|
|
474
|
-
}, null, 8, ["text"])) :
|
|
510
|
+
}, null, 8, ["text"])) : F("", !0)
|
|
475
511
|
]),
|
|
476
512
|
_: 1
|
|
477
|
-
})) :
|
|
513
|
+
})) : F("", !0)]),
|
|
478
514
|
_: 1
|
|
479
515
|
})]),
|
|
480
516
|
_: 1
|
|
481
517
|
}));
|
|
482
518
|
}
|
|
483
|
-
}),
|
|
519
|
+
}), it = /* @__PURE__ */ R({
|
|
484
520
|
__name: "CreditNoteDetailSidebarInfoTab",
|
|
485
521
|
props: {
|
|
486
522
|
creditNote: {},
|
|
487
523
|
customFieldDefinitions: {}
|
|
488
524
|
},
|
|
489
525
|
setup(e) {
|
|
490
|
-
let n = e, r =
|
|
491
|
-
initialState:
|
|
492
|
-
schema:
|
|
526
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
527
|
+
initialState: N(() => w.toForm(n.creditNote)),
|
|
528
|
+
schema: We,
|
|
493
529
|
onSubmit: async (e) => {
|
|
494
530
|
let t = await a.execute({
|
|
495
531
|
body: e,
|
|
@@ -497,38 +533,38 @@ var tt = /* @__PURE__ */ z({
|
|
|
497
533
|
});
|
|
498
534
|
t.isErr() && i.apiError(t.error);
|
|
499
535
|
}
|
|
500
|
-
}), u =
|
|
501
|
-
return
|
|
536
|
+
}), u = N(() => l.listByDefinitions(n.customFieldDefinitions, n.creditNote.customFields)), d = o.register("issuedOn"), f = o.register("poNumber"), p = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
537
|
+
return k({ form: o }), (e, t) => (B(), P(H(K), {
|
|
502
538
|
form: H(o),
|
|
503
539
|
"prompt-on-unsaved-changes": !1
|
|
504
540
|
}, {
|
|
505
|
-
default: U(() => [
|
|
541
|
+
default: U(() => [L(H(G), {
|
|
506
542
|
gap: "lg",
|
|
507
543
|
class: "px-2xl py-xl"
|
|
508
544
|
}, {
|
|
509
545
|
default: U(() => [
|
|
510
|
-
|
|
511
|
-
default: U(() => [
|
|
546
|
+
L(H(G), null, {
|
|
547
|
+
default: U(() => [L(H(J), {
|
|
512
548
|
text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
|
|
513
549
|
class: "text-xs font-semibold text-primary"
|
|
514
|
-
}, null, 8, ["text"]),
|
|
550
|
+
}, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
|
|
515
551
|
default: U(() => [
|
|
516
|
-
|
|
517
|
-
icon: H(
|
|
552
|
+
L(Q, {
|
|
553
|
+
icon: H(h),
|
|
518
554
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
519
555
|
}, {
|
|
520
|
-
default: U(() => [
|
|
556
|
+
default: U(() => [L(H(J), {
|
|
521
557
|
text: n.creditNote.sequence ?? "-",
|
|
522
558
|
class: "text-xs text-primary"
|
|
523
559
|
}, null, 8, ["text"])]),
|
|
524
560
|
_: 1
|
|
525
561
|
}, 8, ["icon", "label"]),
|
|
526
|
-
|
|
527
|
-
icon: H(
|
|
562
|
+
L(Q, {
|
|
563
|
+
icon: H(y),
|
|
528
564
|
"has-error": H(f).errors.value.length > 0,
|
|
529
565
|
label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
530
566
|
}, {
|
|
531
|
-
default: U(() => [
|
|
567
|
+
default: U(() => [L(H(He), Ee(H(S)(H(f)), {
|
|
532
568
|
"is-disabled": p.value,
|
|
533
569
|
label: null,
|
|
534
570
|
class: "w-full"
|
|
@@ -539,34 +575,34 @@ var tt = /* @__PURE__ */ z({
|
|
|
539
575
|
"has-error",
|
|
540
576
|
"label"
|
|
541
577
|
]),
|
|
542
|
-
|
|
543
|
-
icon: H(
|
|
578
|
+
L(Q, {
|
|
579
|
+
icon: H(b),
|
|
544
580
|
label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
545
581
|
}, {
|
|
546
|
-
default: U(() => [
|
|
582
|
+
default: U(() => [L(H(J), {
|
|
547
583
|
text: n.creditNote.issuer.name ?? "-",
|
|
548
584
|
class: "text-xs text-primary"
|
|
549
585
|
}, null, 8, ["text"])]),
|
|
550
586
|
_: 1
|
|
551
587
|
}, 8, ["icon", "label"]),
|
|
552
|
-
|
|
553
|
-
icon: H(
|
|
588
|
+
L(Q, {
|
|
589
|
+
icon: H(v),
|
|
554
590
|
"has-error": H(d).errors.value.length > 0,
|
|
555
591
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
556
592
|
}, {
|
|
557
|
-
default: U(() => [
|
|
593
|
+
default: U(() => [L(H(Fe), Ee({ "is-disabled": p.value }, H(S)(H(d))), null, 16, ["is-disabled"])]),
|
|
558
594
|
_: 1
|
|
559
595
|
}, 8, [
|
|
560
596
|
"icon",
|
|
561
597
|
"has-error",
|
|
562
598
|
"label"
|
|
563
599
|
]),
|
|
564
|
-
(
|
|
600
|
+
(B(!0), I(M, null, De(u.value, (e) => (B(), P(Q, {
|
|
565
601
|
key: e.definition.uuid,
|
|
566
|
-
icon: H(
|
|
602
|
+
icon: H(fe)[e.definition.type],
|
|
567
603
|
label: H(s).getLabel(e.definition, H(r).locale.value)
|
|
568
604
|
}, {
|
|
569
|
-
default: U(() => [
|
|
605
|
+
default: U(() => [L(c, {
|
|
570
606
|
definition: e.definition,
|
|
571
607
|
value: e.value
|
|
572
608
|
}, null, 8, ["definition", "value"])]),
|
|
@@ -577,9 +613,9 @@ var tt = /* @__PURE__ */ z({
|
|
|
577
613
|
})]),
|
|
578
614
|
_: 1
|
|
579
615
|
}),
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
616
|
+
L(H(Ve)),
|
|
617
|
+
L(he, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
|
|
618
|
+
L($, {
|
|
583
619
|
"is-default-open": !0,
|
|
584
620
|
name: n.creditNote.customer.name ?? "-",
|
|
585
621
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
@@ -591,8 +627,8 @@ var tt = /* @__PURE__ */ z({
|
|
|
591
627
|
"address",
|
|
592
628
|
"email"
|
|
593
629
|
]),
|
|
594
|
-
|
|
595
|
-
|
|
630
|
+
L(H(Ve)),
|
|
631
|
+
L($, {
|
|
596
632
|
name: n.creditNote.issuer.email ?? "-",
|
|
597
633
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
598
634
|
address: n.creditNote.issuer.address
|
|
@@ -607,20 +643,20 @@ var tt = /* @__PURE__ */ z({
|
|
|
607
643
|
_: 1
|
|
608
644
|
}, 8, ["form"]));
|
|
609
645
|
}
|
|
610
|
-
}),
|
|
646
|
+
}), at = /* @__PURE__ */ R({
|
|
611
647
|
__name: "CreditNoteDetailSidebar",
|
|
612
648
|
props: {
|
|
613
649
|
creditNote: {},
|
|
614
650
|
customFieldDefinitions: {}
|
|
615
651
|
},
|
|
616
652
|
setup(e) {
|
|
617
|
-
let t = e, n =
|
|
618
|
-
return (e, n) => (
|
|
653
|
+
let t = e, n = j(), r = x(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
|
|
654
|
+
return (e, n) => (B(), P(le, {
|
|
619
655
|
"billing-document": t.creditNote,
|
|
620
656
|
"updated-footer": i.value
|
|
621
657
|
}, {
|
|
622
|
-
activity: U(() => [
|
|
623
|
-
info: U(() => [
|
|
658
|
+
activity: U(() => [L(rt, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
|
|
659
|
+
info: U(() => [L(it, {
|
|
624
660
|
"credit-note": t.creditNote,
|
|
625
661
|
"custom-field-definitions": t.customFieldDefinitions
|
|
626
662
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -630,9 +666,9 @@ var tt = /* @__PURE__ */ z({
|
|
|
630
666
|
});
|
|
631
667
|
//#endregion
|
|
632
668
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
|
|
633
|
-
function
|
|
669
|
+
function ot() {
|
|
634
670
|
return W({
|
|
635
|
-
queryFn: (e) =>
|
|
671
|
+
queryFn: (e) => C.updateLines(e.params.creditNoteUuid, e.body),
|
|
636
672
|
queryKeysToInvalidate: {
|
|
637
673
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
638
674
|
invoiceIndex: {}
|
|
@@ -641,15 +677,15 @@ function it() {
|
|
|
641
677
|
}
|
|
642
678
|
//#endregion
|
|
643
679
|
//#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
|
|
644
|
-
var
|
|
680
|
+
var st = /* @__PURE__ */ R({
|
|
645
681
|
__name: "CreditNoteLineItemsTableSection",
|
|
646
682
|
props: {
|
|
647
683
|
creditNote: {},
|
|
648
684
|
customFieldDefinitions: {}
|
|
649
685
|
},
|
|
650
686
|
setup(e) {
|
|
651
|
-
let t = e, n =
|
|
652
|
-
isSaving:
|
|
687
|
+
let t = e, n = N(() => t.creditNote), r = ot(), i = de({
|
|
688
|
+
isSaving: N(() => r.isLoading.value),
|
|
653
689
|
billingDocument: () => n.value,
|
|
654
690
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
655
691
|
updateLines: (e) => r.execute({
|
|
@@ -657,24 +693,24 @@ var at = /* @__PURE__ */ z({
|
|
|
657
693
|
params: { creditNoteUuid: t.creditNote.uuid }
|
|
658
694
|
})
|
|
659
695
|
});
|
|
660
|
-
return
|
|
696
|
+
return ce(i), (e, n) => (B(), P(me, null, {
|
|
661
697
|
default: U(() => [
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
698
|
+
L(_e, { "show-apply-discount": !1 }),
|
|
699
|
+
L(se),
|
|
700
|
+
L(ae, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
|
|
701
|
+
L(ye)
|
|
666
702
|
]),
|
|
667
703
|
_: 1
|
|
668
704
|
}));
|
|
669
705
|
}
|
|
670
|
-
}),
|
|
706
|
+
}), ct = /* @__PURE__ */ R({
|
|
671
707
|
__name: "CreditNoteDetailView",
|
|
672
708
|
props: {
|
|
673
709
|
creditNote: {},
|
|
674
710
|
customFieldDefinitions: {}
|
|
675
711
|
},
|
|
676
712
|
setup(e) {
|
|
677
|
-
let t = e, n =
|
|
713
|
+
let t = e, n = j(), r = V(!1), a = N(() => s.filterByView(t.customFieldDefinitions, i.CREDIT_NOTE_DETAIL)), o = N(() => [
|
|
678
714
|
{
|
|
679
715
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
680
716
|
to: { name: "invoicing-invoice-overview" }
|
|
@@ -689,29 +725,29 @@ var at = /* @__PURE__ */ z({
|
|
|
689
725
|
{ label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
|
|
690
726
|
{ label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
|
|
691
727
|
]);
|
|
692
|
-
return (e, i) => (
|
|
728
|
+
return (e, i) => (B(), P(ge, {
|
|
693
729
|
"billing-document": t.creditNote,
|
|
694
730
|
breadcrumbs: o.value,
|
|
695
731
|
title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
|
|
696
732
|
}, {
|
|
697
|
-
header: U(() => [
|
|
733
|
+
header: U(() => [L(et, {
|
|
698
734
|
"credit-note": t.creditNote,
|
|
699
735
|
"is-pdf-view-active": r.value,
|
|
700
736
|
class: "w-full",
|
|
701
737
|
onTogglePdfView: i[0] ||= (e) => r.value = !r.value
|
|
702
738
|
}, null, 8, ["credit-note", "is-pdf-view-active"])]),
|
|
703
|
-
default: U(() => [r.value ? (
|
|
739
|
+
default: U(() => [r.value ? (B(), P(pe, {
|
|
704
740
|
key: 0,
|
|
705
741
|
"billing-document": t.creditNote,
|
|
706
742
|
class: "w-full"
|
|
707
|
-
}, null, 8, ["billing-document"])) : (
|
|
743
|
+
}, null, 8, ["billing-document"])) : (B(), I(M, { key: 1 }, [L(st, {
|
|
708
744
|
"credit-note": t.creditNote,
|
|
709
745
|
"custom-field-definitions": a.value
|
|
710
|
-
}, null, 8, ["credit-note", "custom-field-definitions"]),
|
|
746
|
+
}, null, 8, ["credit-note", "custom-field-definitions"]), L(tt, {
|
|
711
747
|
"credit-note": t.creditNote,
|
|
712
748
|
class: "w-full"
|
|
713
749
|
}, null, 8, ["credit-note"])], 64))]),
|
|
714
|
-
sidebar: U(() => [
|
|
750
|
+
sidebar: U(() => [L(at, {
|
|
715
751
|
"credit-note": t.creditNote,
|
|
716
752
|
"custom-field-definitions": a.value
|
|
717
753
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -722,20 +758,20 @@ var at = /* @__PURE__ */ z({
|
|
|
722
758
|
"title"
|
|
723
759
|
]));
|
|
724
760
|
}
|
|
725
|
-
}),
|
|
761
|
+
}), lt = /* @__PURE__ */ R({
|
|
726
762
|
__name: "CreditNoteDetailViewDataProvider",
|
|
727
763
|
props: { creditNoteUuid: {} },
|
|
728
764
|
setup(e) {
|
|
729
|
-
let t = e, n =
|
|
765
|
+
let t = e, n = j(), r = N(() => [{
|
|
730
766
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
731
767
|
to: { name: "invoicing-invoice-overview" }
|
|
732
|
-
}]), i =
|
|
733
|
-
return (e, t) => (
|
|
768
|
+
}]), i = T(N(() => t.creditNoteUuid)), o = a();
|
|
769
|
+
return (e, t) => (B(), P(ve, {
|
|
734
770
|
"custom-field-definitions-query": H(o),
|
|
735
771
|
query: H(i),
|
|
736
772
|
"loading-breadcrumbs": r.value
|
|
737
773
|
}, {
|
|
738
|
-
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [
|
|
774
|
+
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [L(ct, {
|
|
739
775
|
"credit-note": e,
|
|
740
776
|
"custom-field-definitions": t
|
|
741
777
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -748,4 +784,4 @@ var at = /* @__PURE__ */ z({
|
|
|
748
784
|
}
|
|
749
785
|
});
|
|
750
786
|
//#endregion
|
|
751
|
-
export {
|
|
787
|
+
export { lt as default };
|