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