@wisemen/wise-invoicing-web 0.6.0 → 0.8.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-r9DcFi76.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-CsqBeAiA.js → BillingDocumentDetailViewDataProvider-V5c_cJwt.js} +1544 -1459
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-thrvzGfh.js → BillingDocumentPdf-BYn3lUyl.js} +8 -7
- package/dist/{CreditNoteDetailViewDataProvider-D6IMBwLn.js → CreditNoteDetailViewDataProvider-BqLYeBUQ.js} +230 -223
- package/dist/CreditNotePdfViewDataProvider-Co4R7QJx.js +22 -0
- package/dist/{CustomFieldValueText-BRpCwCqJ.js → CustomFieldValueText-BP4bKQh7.js} +53 -38
- package/dist/{DunningCaseDetailViewDataProvider-DTotyRX8.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
- package/dist/{DunningCaseOverviewView-kDq7UY5e.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
- package/dist/{DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
- package/dist/{DunningCaseSendDialog-DVfBVtgr.js → DunningCaseSendDialog-DwB_jFum.js} +8 -8
- package/dist/{InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-B6naRElx.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-CDc_Pwsm.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-CK6ij8X1.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
- package/dist/{InvoiceDetailViewDataProvider-BKurQPAV.js → InvoiceDetailViewDataProvider-DSG6VnDh.js} +592 -586
- package/dist/{InvoiceOverviewViewDataProvider-ChoyCi5L.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +440 -440
- package/dist/{InvoicePdfView-DLEKQ29O.js → InvoicePdfView-BIDvRCr4.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-C-b7iXiH.js → InvoicePdfViewDataProvider-Ct1HBqqa.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-DZ4WQsvi.js → InvoicePublicPdfViewDataProvider-DS0Q-BEX.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js → InvoicePublicProFormaPdfViewDataProvider-DqWKGeAm.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-t64Qiyn6.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-Cc8R6ekd.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +3 -3
- package/dist/{PeppolSettingsViewDataProvider-DpVIfFVG.js → PeppolSettingsViewDataProvider-Cptga29B.js} +2 -2
- package/dist/{ReminderSettingsViewDataProvider-QOh3LpMX.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +4 -4
- package/dist/{api.util-Do9BEwG4.js → api.util-CR2xLnNj.js} +536 -515
- package/dist/{billingDocumentDetail.transformer-BAOQ3Zrg.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +8 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +23 -17
- package/dist/client/zod.gen.d.ts +360 -0
- package/dist/composables/invoicingConfig.composable.d.ts +16 -3
- package/dist/{creditNoteDetail.query-C1rr54m1.js → creditNoteDetail.query-DGeG9_sO.js} +3 -3
- package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
- package/dist/{dist-CZAOPudv.js → dist-DALBiuub.js} +133 -133
- package/dist/{documentTitle.composable-C3k1m0Nz.js → documentTitle.composable-RvqrZTBa.js} +1 -1
- package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
- package/dist/{i18n.lib-Bkz_R954.js → i18n.lib-MOiHLIGc.js} +4 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +219 -204
- package/dist/{invoice.service-DrI2ULIR.js → invoice.service-Fv4F4aZq.js} +3 -3
- package/dist/{invoiceApproval.service-Dpxiru7l.js → invoiceApproval.service-DJvXagC7.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-CdOAcPzv.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
- package/dist/{invoiceCustomer.service-RRFosiYR.js → invoiceCustomer.service-CDyrtcwH.js} +2 -2
- package/dist/{invoiceDetail.query-BmtHdfj0.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
- package/dist/{invoiceIndexCache.util-DKtJorc_.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
- package/dist/{invoicingConfig.composable-CMTYHHS9.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
- package/dist/{issuerSettings.query-CKDhoStt.js → issuerSettings.query-CoiXblSm.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/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
- package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
- package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
- package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
- package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/{reminderConfig.query-yImUS5qt.js → reminderConfig.query-aRFzY6uZ.js} +2 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
- package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/CreditNotePdfViewDataProvider-C4z1NE3Q.js +0 -21
|
@@ -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-MOiHLIGc.js";
|
|
2
|
+
import "./api.util-CR2xLnNj.js";
|
|
3
|
+
import { b as t, r as n } from "./documentTitle.composable-RvqrZTBa.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 } from "./CustomFieldValueText-
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { C as
|
|
12
|
-
import { r as
|
|
13
|
-
import
|
|
5
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-BP4bKQh7.js";
|
|
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 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 S, t as C } from "./dist-Cdbpkd3Y.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-DGeG9_sO.js";
|
|
11
|
+
import { C as O, S as te, _ as k, a as ne, b as re, c as ie, 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, x as ye, y as be } from "./BillingDocumentDetailViewDataProvider-V5c_cJwt.js";
|
|
12
|
+
import { r as xe } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
|
|
13
|
+
import Se, { z as A } from "zod";
|
|
14
14
|
import { useI18n as j } from "vue-i18n";
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useKeysetInfiniteQuery as
|
|
17
|
-
import { useRouter as
|
|
18
|
-
import { UIAnimateHeight as
|
|
15
|
+
import { Fragment as M, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as Ce, createVNode as L, defineComponent as R, mergeProps as z, normalizeClass as B, openBlock as V, ref as we, renderList as Te, renderSlot as Ee, resolveDynamicComponent as De, unref as H, withCtx as U } from "vue";
|
|
16
|
+
import { useKeysetInfiniteQuery as Oe, useMutation as W } from "@wisemen/vue-core-api-utils";
|
|
17
|
+
import { useRouter as ke } from "vue-router";
|
|
18
|
+
import { UIAnimateHeight as Ae, UIBadge as je, UIClickableElement as Me, UIColumnLayout as G, UIDateField as Ne, UIDialogFooter as Pe, UIDialogFooterCancel as Fe, UIDialogFooterSubmit as Ie, UIDialogHeader as Le, UIForm as K, UIFormDialog as Re, UIRowLayout as q, UISeparator as ze, UIText as J, UITextField as Be, useOverlay as Ve, 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
|
-
return
|
|
23
|
-
queryFn: (e) =>
|
|
22
|
+
return W({
|
|
23
|
+
queryFn: (e) => T.update(e.params.creditNoteUuid, e.body),
|
|
24
24
|
queryKeysToInvalidate: {
|
|
25
25
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
26
26
|
invoiceIndex: {}
|
|
@@ -29,8 +29,8 @@ function Z() {
|
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/modules/credit-note/models/update/creditNoteUpdateForm.model.ts
|
|
32
|
-
var
|
|
33
|
-
issuedOn:
|
|
32
|
+
var He = A.object({
|
|
33
|
+
issuedOn: C,
|
|
34
34
|
externalRemarks: A.string().nullable(),
|
|
35
35
|
poNumber: A.string().nullable(),
|
|
36
36
|
subject: A.string().nullable()
|
|
@@ -40,12 +40,12 @@ var Q = A.object({
|
|
|
40
40
|
message: e.global.t("wise_invoicing.credit_note.finalize.validation.external_remarks_required"),
|
|
41
41
|
path: ["externalRemarks"]
|
|
42
42
|
});
|
|
43
|
-
}),
|
|
43
|
+
}), Ue = A.object({ subject: A.string().nullable() });
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
queryFn: (e) =>
|
|
46
|
+
function We() {
|
|
47
|
+
return W({
|
|
48
|
+
queryFn: (e) => T.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 Be() {
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
|
|
58
|
-
function
|
|
59
|
-
return
|
|
60
|
-
queryFn: (e) =>
|
|
58
|
+
function Ge() {
|
|
59
|
+
return W({
|
|
60
|
+
queryFn: (e) => T.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 Ve() {
|
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
|
|
70
|
-
function
|
|
71
|
-
return
|
|
72
|
-
queryFn: (e) =>
|
|
70
|
+
function Ke() {
|
|
71
|
+
return W({
|
|
72
|
+
queryFn: (e) => T.markAsReady(e.params.creditNoteUuid),
|
|
73
73
|
queryKeysToInvalidate: {
|
|
74
74
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
75
75
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -79,29 +79,29 @@ function He() {
|
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/modules/credit-note/api/mutations/creditNoteSend.mutation.ts
|
|
82
|
-
function
|
|
83
|
-
return
|
|
84
|
-
queryFn: (e) =>
|
|
82
|
+
function qe() {
|
|
83
|
+
return W({
|
|
84
|
+
queryFn: (e) => T.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
|
|
91
|
-
return
|
|
92
|
-
queryFn: (e) =>
|
|
90
|
+
function Je() {
|
|
91
|
+
return W({
|
|
92
|
+
queryFn: (e) => T.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 Ye = /* @__PURE__ */ R({
|
|
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 = j(), a =
|
|
104
|
-
schema:
|
|
103
|
+
let n = e, r = t, i = j(), a = ke(), o = Y(), s = Je(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
|
|
104
|
+
schema: Se.object({}),
|
|
105
105
|
onSubmit: async () => {
|
|
106
106
|
let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
|
|
107
107
|
if (e.isErr()) {
|
|
@@ -111,18 +111,18 @@ var Ge = /* @__PURE__ */ I({
|
|
|
111
111
|
o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
return (e, t) => (
|
|
115
|
-
form:
|
|
114
|
+
return (e, t) => (V(), P(H(Re), {
|
|
115
|
+
form: H(l),
|
|
116
116
|
size: "xs",
|
|
117
117
|
onClose: t[0] ||= (e) => r("close")
|
|
118
118
|
}, {
|
|
119
|
-
default:
|
|
120
|
-
title:
|
|
121
|
-
description:
|
|
122
|
-
}, null, 8, ["title", "description"]),
|
|
123
|
-
right:
|
|
119
|
+
default: U(() => [L(H(Le), {
|
|
120
|
+
title: H(i).t("wise_invoicing.credit_note.delete.title"),
|
|
121
|
+
description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
|
|
122
|
+
}, null, 8, ["title", "description"]), L(H(Pe), null, {
|
|
123
|
+
right: U(() => [L(H(Fe)), L(H(Ie), {
|
|
124
124
|
"is-destructive": !0,
|
|
125
|
-
label:
|
|
125
|
+
label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
126
126
|
}, null, 8, ["label"])]),
|
|
127
127
|
_: 1
|
|
128
128
|
})]),
|
|
@@ -132,12 +132,12 @@ var Ge = /* @__PURE__ */ I({
|
|
|
132
132
|
});
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
|
|
135
|
-
function
|
|
136
|
-
let n = j(), r = Y(), i =
|
|
137
|
-
async function
|
|
138
|
-
let t = await
|
|
135
|
+
function Xe(e) {
|
|
136
|
+
let n = j(), r = Y(), i = Ve(), a = i.create(Ye), s = i.create(re), c = We(), l = Ge(), g = Ke(), _ = qe(), { shouldSkipConfirmation: v } = ye(), y = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), b = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
|
|
137
|
+
async function x() {
|
|
138
|
+
let t = await g.execute({ params: {
|
|
139
139
|
creditNoteUuid: e.value.uuid,
|
|
140
|
-
invoiceUuid:
|
|
140
|
+
invoiceUuid: y.value
|
|
141
141
|
} });
|
|
142
142
|
if (t.isErr()) {
|
|
143
143
|
r.apiError(t.error);
|
|
@@ -145,27 +145,27 @@ function Ke(e) {
|
|
|
145
145
|
}
|
|
146
146
|
r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
|
|
147
147
|
}
|
|
148
|
-
async function
|
|
149
|
-
let t = await
|
|
148
|
+
async function S() {
|
|
149
|
+
let t = await c.execute({ params: {
|
|
150
150
|
creditNoteUuid: e.value.uuid,
|
|
151
|
-
invoiceUuid:
|
|
151
|
+
invoiceUuid: y.value
|
|
152
152
|
} });
|
|
153
153
|
return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
|
|
154
154
|
}
|
|
155
155
|
async function C() {
|
|
156
|
-
if (
|
|
157
|
-
await
|
|
156
|
+
if (v.value) {
|
|
157
|
+
await S();
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
await s.open({
|
|
161
161
|
billingDocumentType: "credit_note",
|
|
162
|
-
onConfirm:
|
|
162
|
+
onConfirm: S
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
async function w() {
|
|
166
|
-
let t = await
|
|
166
|
+
let t = await l.execute({ params: {
|
|
167
167
|
creditNoteUuid: e.value.uuid,
|
|
168
|
-
invoiceUuid:
|
|
168
|
+
invoiceUuid: y.value
|
|
169
169
|
} });
|
|
170
170
|
if (t.isErr()) {
|
|
171
171
|
r.apiError(t.error);
|
|
@@ -173,19 +173,19 @@ function Ke(e) {
|
|
|
173
173
|
}
|
|
174
174
|
r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
177
|
-
let t = await
|
|
176
|
+
async function E() {
|
|
177
|
+
let t = await _.execute({ params: { creditNoteUuid: e.value.uuid } });
|
|
178
178
|
if (t.isErr()) {
|
|
179
179
|
r.apiError(t.error);
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
|
|
183
183
|
}
|
|
184
|
-
async function
|
|
184
|
+
async function D() {
|
|
185
185
|
await a.open({ creditNote: e.value });
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
188
|
-
let t = await
|
|
187
|
+
async function O() {
|
|
188
|
+
let t = await T.getByUuid(e.value.uuid);
|
|
189
189
|
if (t.isErr()) {
|
|
190
190
|
r.apiError(t.error);
|
|
191
191
|
return;
|
|
@@ -195,54 +195,54 @@ function Ke(e) {
|
|
|
195
195
|
r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
let a = await
|
|
199
|
-
a !== null &&
|
|
198
|
+
let a = await xe.getDownloadUrl(i.uuid);
|
|
199
|
+
a !== null && u.downloadUrl(a, i.name);
|
|
200
200
|
}
|
|
201
|
-
let
|
|
201
|
+
let te = N(() => [
|
|
202
202
|
{
|
|
203
|
-
isLoading:
|
|
204
|
-
iconLeft:
|
|
203
|
+
isLoading: _.isLoading.value,
|
|
204
|
+
iconLeft: p,
|
|
205
205
|
key: "send",
|
|
206
206
|
label: n.t("wise_invoicing.invoice.detail.actions.send"),
|
|
207
207
|
variant: "primary",
|
|
208
208
|
visible: e.value.status === t.FINALIZED,
|
|
209
|
-
onClick:
|
|
209
|
+
onClick: E
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
isLoading:
|
|
213
|
-
iconRight:
|
|
212
|
+
isLoading: g.isLoading.value,
|
|
213
|
+
iconRight: ee,
|
|
214
214
|
key: "markAsReady",
|
|
215
215
|
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
216
216
|
visible: e.value.status === t.DRAFT,
|
|
217
|
-
onClick:
|
|
217
|
+
onClick: x
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
isLoading:
|
|
221
|
-
iconRight:
|
|
220
|
+
isLoading: c.isLoading.value,
|
|
221
|
+
iconRight: d,
|
|
222
222
|
key: "finalize",
|
|
223
223
|
label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
224
224
|
visible: e.value.status === t.READY,
|
|
225
225
|
onClick: C
|
|
226
226
|
}
|
|
227
|
-
].filter((e) => e.visible)), k =
|
|
227
|
+
].filter((e) => e.visible)), k = N(() => {
|
|
228
228
|
let r = [{
|
|
229
|
-
icon:
|
|
229
|
+
icon: f,
|
|
230
230
|
key: "downloadPdf",
|
|
231
231
|
label: n.t("wise_invoicing.common.download_pdf"),
|
|
232
|
-
visible:
|
|
233
|
-
onSelect:
|
|
232
|
+
visible: b.value,
|
|
233
|
+
onSelect: O
|
|
234
234
|
}, {
|
|
235
|
-
icon:
|
|
235
|
+
icon: m,
|
|
236
236
|
key: "backToDraft",
|
|
237
237
|
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
238
238
|
visible: e.value.status === t.READY,
|
|
239
239
|
onSelect: w
|
|
240
240
|
}], i = [{
|
|
241
|
-
icon:
|
|
241
|
+
icon: h,
|
|
242
242
|
key: "delete",
|
|
243
243
|
label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
|
|
244
244
|
visible: o.isEditable(e.value.status),
|
|
245
|
-
onSelect:
|
|
245
|
+
onSelect: D
|
|
246
246
|
}];
|
|
247
247
|
return [{
|
|
248
248
|
items: r.filter((e) => e.visible),
|
|
@@ -253,14 +253,14 @@ function Ke(e) {
|
|
|
253
253
|
}].filter((e) => e.items.length > 0);
|
|
254
254
|
});
|
|
255
255
|
return {
|
|
256
|
-
isActionMenuVisible:
|
|
256
|
+
isActionMenuVisible: N(() => k.value.length > 0),
|
|
257
257
|
menuGroups: k,
|
|
258
|
-
primaryButtons:
|
|
258
|
+
primaryButtons: te
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
262
|
//#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
|
|
263
|
-
var
|
|
263
|
+
var Ze = /* @__PURE__ */ R({
|
|
264
264
|
__name: "CreditNoteDetailHeaderSection",
|
|
265
265
|
props: {
|
|
266
266
|
isPdfViewActive: { type: Boolean },
|
|
@@ -268,13 +268,13 @@ var qe = /* @__PURE__ */ I({
|
|
|
268
268
|
},
|
|
269
269
|
emits: ["togglePdfView"],
|
|
270
270
|
setup(e, { emit: n }) {
|
|
271
|
-
let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } =
|
|
271
|
+
let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = Xe(N(() => r.creditNote)), u = N(() => new te(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({
|
|
272
272
|
initialState: { subject: r.creditNote.subject },
|
|
273
|
-
schema:
|
|
273
|
+
schema: Ue,
|
|
274
274
|
onSubmit: async (e) => {
|
|
275
275
|
let t = await s.execute({
|
|
276
276
|
body: {
|
|
277
|
-
...
|
|
277
|
+
...E.toForm(r.creditNote),
|
|
278
278
|
subject: e.subject
|
|
279
279
|
},
|
|
280
280
|
params: { creditNoteUuid: r.creditNote.uuid }
|
|
@@ -282,35 +282,35 @@ var qe = /* @__PURE__ */ I({
|
|
|
282
282
|
t.isErr() && o.apiError(t.error);
|
|
283
283
|
}
|
|
284
284
|
}), h = m.register("subject");
|
|
285
|
-
return
|
|
286
|
-
form:
|
|
285
|
+
return O({ form: m }), (e, t) => (V(), P(H(K), {
|
|
286
|
+
form: H(m),
|
|
287
287
|
"prompt-on-unsaved-changes": !1
|
|
288
288
|
}, {
|
|
289
|
-
default:
|
|
290
|
-
"fallback-title":
|
|
289
|
+
default: U(() => [L(ve, {
|
|
290
|
+
"fallback-title": H(a).t("wise_invoicing.credit_note.detail.fallback_title"),
|
|
291
291
|
"is-disabled": p.value,
|
|
292
292
|
sequence: r.creditNote.sequence,
|
|
293
293
|
"status-color": d.value,
|
|
294
294
|
"status-label": f.value,
|
|
295
|
-
icon:
|
|
296
|
-
"subject-field":
|
|
297
|
-
"subject-placeholder":
|
|
295
|
+
icon: H(_),
|
|
296
|
+
"subject-field": H(h),
|
|
297
|
+
"subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
298
298
|
}, {
|
|
299
|
-
actions:
|
|
299
|
+
actions: U(() => [L(k, {
|
|
300
300
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
301
|
-
"menu-groups":
|
|
302
|
-
"primary-buttons":
|
|
301
|
+
"menu-groups": H(c),
|
|
302
|
+
"primary-buttons": H(l),
|
|
303
303
|
onTogglePdfView: t[0] ||= (e) => i("togglePdfView")
|
|
304
304
|
}, null, 8, [
|
|
305
305
|
"is-pdf-view-active",
|
|
306
306
|
"menu-groups",
|
|
307
307
|
"primary-buttons"
|
|
308
308
|
])]),
|
|
309
|
-
status:
|
|
309
|
+
status: U(() => [L(H(q), {
|
|
310
310
|
gap: "xs",
|
|
311
311
|
class: "flex-wrap items-start"
|
|
312
312
|
}, {
|
|
313
|
-
default:
|
|
313
|
+
default: U(() => [r.creditNote.isOverdue ? (V(), P(be, { key: 0 })) : F("", !0)]),
|
|
314
314
|
_: 1
|
|
315
315
|
})]),
|
|
316
316
|
_: 1
|
|
@@ -327,13 +327,13 @@ var qe = /* @__PURE__ */ I({
|
|
|
327
327
|
_: 1
|
|
328
328
|
}, 8, ["form"]));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), Qe = /* @__PURE__ */ R({
|
|
331
331
|
__name: "CreditNoteDetailRemarksSection",
|
|
332
332
|
props: { creditNote: {} },
|
|
333
333
|
setup(e) {
|
|
334
334
|
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
335
|
-
initialState:
|
|
336
|
-
schema:
|
|
335
|
+
initialState: N(() => E.toForm(n.creditNote)),
|
|
336
|
+
schema: He,
|
|
337
337
|
onSubmit: async (e) => {
|
|
338
338
|
let t = await a.execute({
|
|
339
339
|
body: e,
|
|
@@ -341,16 +341,16 @@ var qe = /* @__PURE__ */ I({
|
|
|
341
341
|
});
|
|
342
342
|
t.isErr() && i.apiError(t.error);
|
|
343
343
|
}
|
|
344
|
-
}), s = o.register("externalRemarks"), c =
|
|
345
|
-
return
|
|
346
|
-
form:
|
|
344
|
+
}), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
345
|
+
return O({ form: o }), (e, t) => (V(), P(H(K), {
|
|
346
|
+
form: H(o),
|
|
347
347
|
"prompt-on-unsaved-changes": !1
|
|
348
348
|
}, {
|
|
349
|
-
default:
|
|
349
|
+
default: U(() => [L(se, {
|
|
350
350
|
"is-disabled": c.value,
|
|
351
|
-
placeholder:
|
|
352
|
-
"remarks-field":
|
|
353
|
-
title:
|
|
351
|
+
placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
352
|
+
"remarks-field": H(s),
|
|
353
|
+
title: H(r).t("wise_invoicing.invoice.detail.remarks.title")
|
|
354
354
|
}, null, 8, [
|
|
355
355
|
"is-disabled",
|
|
356
356
|
"placeholder",
|
|
@@ -363,33 +363,33 @@ var qe = /* @__PURE__ */ I({
|
|
|
363
363
|
});
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
|
|
366
|
-
function
|
|
367
|
-
return
|
|
366
|
+
function $e(e) {
|
|
367
|
+
return Oe("creditNoteActivityLogIndex", {
|
|
368
368
|
params: { creditNoteUuid: e },
|
|
369
|
-
queryFn: (t) =>
|
|
369
|
+
queryFn: (t) => T.getActivityLogs(e.value, { pagination: t })
|
|
370
370
|
});
|
|
371
371
|
}
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/modules/credit-note/use-cases/detail/components/sidebar/CreditNoteDetailSidebarActivityTab.vue
|
|
374
|
-
var
|
|
374
|
+
var et = /* @__PURE__ */ R({
|
|
375
375
|
__name: "CreditNoteDetailSidebarActivityTab",
|
|
376
376
|
props: { creditNote: {} },
|
|
377
377
|
setup(e) {
|
|
378
|
-
let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } =
|
|
378
|
+
let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = $e(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
|
|
379
379
|
data: [],
|
|
380
380
|
meta: { next: null }
|
|
381
381
|
}).data);
|
|
382
|
-
return (e, c) => (
|
|
382
|
+
return (e, c) => (V(), P(ce, {
|
|
383
383
|
"current-billing-document": {
|
|
384
|
-
role:
|
|
384
|
+
role: H(n).CREDIT_NOTE,
|
|
385
385
|
uuid: t.creditNote.uuid
|
|
386
386
|
},
|
|
387
|
-
"empty-message":
|
|
387
|
+
"empty-message": H(r).t("wise_invoicing.credit_note.detail.sidebar.activity_empty"),
|
|
388
388
|
entries: l.value,
|
|
389
|
-
"fetch-next-page":
|
|
390
|
-
"has-next-page":
|
|
391
|
-
"is-fetching-next-page":
|
|
392
|
-
"is-loading":
|
|
389
|
+
"fetch-next-page": H(s),
|
|
390
|
+
"has-next-page": H(i),
|
|
391
|
+
"is-fetching-next-page": H(a),
|
|
392
|
+
"is-loading": H(o)
|
|
393
393
|
}, null, 8, [
|
|
394
394
|
"current-billing-document",
|
|
395
395
|
"empty-message",
|
|
@@ -400,7 +400,7 @@ var Xe = /* @__PURE__ */ I({
|
|
|
400
400
|
"is-loading"
|
|
401
401
|
]));
|
|
402
402
|
}
|
|
403
|
-
}),
|
|
403
|
+
}), Q = /* @__PURE__ */ R({
|
|
404
404
|
__name: "BillingDocumentDetailSidebarInfoItem",
|
|
405
405
|
props: {
|
|
406
406
|
hasError: {
|
|
@@ -412,25 +412,25 @@ var Xe = /* @__PURE__ */ I({
|
|
|
412
412
|
},
|
|
413
413
|
setup(e) {
|
|
414
414
|
let t = e;
|
|
415
|
-
return (e, n) => (
|
|
416
|
-
default:
|
|
417
|
-
(
|
|
415
|
+
return (e, n) => (V(), P(H(q), null, {
|
|
416
|
+
default: U(() => [
|
|
417
|
+
(V(), P(De(t.icon), { class: B([{
|
|
418
418
|
"text-error-primary": t.hasError,
|
|
419
419
|
"text-tertiary": !t.hasError
|
|
420
420
|
}, "size-3.5 shrink-0"]) }, null, 8, ["class"])),
|
|
421
|
-
|
|
421
|
+
L(H(J), {
|
|
422
422
|
text: t.label,
|
|
423
|
-
class:
|
|
423
|
+
class: B([{
|
|
424
424
|
"text-error-primary": t.hasError,
|
|
425
425
|
"text-tertiary": !t.hasError
|
|
426
426
|
}, "w-24 shrink-0 text-xs"])
|
|
427
427
|
}, null, 8, ["text", "class"]),
|
|
428
|
-
|
|
428
|
+
Ee(e.$slots, "default")
|
|
429
429
|
]),
|
|
430
430
|
_: 3
|
|
431
431
|
}));
|
|
432
432
|
}
|
|
433
|
-
}),
|
|
433
|
+
}), $ = /* @__PURE__ */ R({
|
|
434
434
|
__name: "BillingDocumentDetailSidebarPartySection",
|
|
435
435
|
props: {
|
|
436
436
|
title: {},
|
|
@@ -442,54 +442,54 @@ var Xe = /* @__PURE__ */ I({
|
|
|
442
442
|
address: {}
|
|
443
443
|
},
|
|
444
444
|
setup(e) {
|
|
445
|
-
let t = e, n =
|
|
445
|
+
let t = e, n = we(t.isDefaultOpen);
|
|
446
446
|
function i() {
|
|
447
447
|
n.value = !n.value;
|
|
448
448
|
}
|
|
449
|
-
return (e, a) => (
|
|
450
|
-
default:
|
|
451
|
-
default:
|
|
452
|
-
default:
|
|
449
|
+
return (e, a) => (V(), P(H(G), { class: "w-full" }, {
|
|
450
|
+
default: U(() => [L(H(q), { justify: "between" }, {
|
|
451
|
+
default: U(() => [L(H(Me), { class: "rounded-sm" }, {
|
|
452
|
+
default: U(() => [Ce("button", {
|
|
453
453
|
type: "button",
|
|
454
454
|
class: "flex w-full items-center gap-sm",
|
|
455
455
|
onClick: i
|
|
456
456
|
}, [
|
|
457
|
-
|
|
457
|
+
L(H(J), {
|
|
458
458
|
text: t.title,
|
|
459
459
|
class: "text-xs font-semibold text-primary"
|
|
460
460
|
}, null, 8, ["text"]),
|
|
461
|
-
|
|
461
|
+
L(H(je), {
|
|
462
462
|
label: t.name,
|
|
463
463
|
color: "gray",
|
|
464
464
|
variant: "outline"
|
|
465
465
|
}, null, 8, ["label"]),
|
|
466
|
-
|
|
466
|
+
L(H(v), { class: B([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
|
|
467
467
|
])]),
|
|
468
468
|
_: 1
|
|
469
469
|
})]),
|
|
470
470
|
_: 1
|
|
471
|
-
}),
|
|
472
|
-
default:
|
|
471
|
+
}), L(H(Ae), null, {
|
|
472
|
+
default: U(() => [n.value ? (V(), P(H(G), {
|
|
473
473
|
key: 0,
|
|
474
474
|
gap: "xs"
|
|
475
475
|
}, {
|
|
476
|
-
default:
|
|
476
|
+
default: U(() => [L(H(J), {
|
|
477
477
|
text: t.name,
|
|
478
478
|
class: "text-xs font-medium text-primary"
|
|
479
|
-
}, null, 8, ["text"]), t.address ? (
|
|
479
|
+
}, null, 8, ["text"]), t.address ? (V(), P(H(J), {
|
|
480
480
|
key: 0,
|
|
481
481
|
truncate: !1,
|
|
482
|
-
text:
|
|
482
|
+
text: H(r).format(t.address),
|
|
483
483
|
class: "text-xs text-primary"
|
|
484
|
-
}, null, 8, ["text"])) :
|
|
484
|
+
}, null, 8, ["text"])) : F("", !0)]),
|
|
485
485
|
_: 1
|
|
486
|
-
})) :
|
|
486
|
+
})) : F("", !0)]),
|
|
487
487
|
_: 1
|
|
488
488
|
})]),
|
|
489
489
|
_: 1
|
|
490
490
|
}));
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), tt = /* @__PURE__ */ R({
|
|
493
493
|
__name: "CreditNoteDetailSidebarInfoTab",
|
|
494
494
|
props: {
|
|
495
495
|
creditNote: {},
|
|
@@ -497,8 +497,8 @@ var Xe = /* @__PURE__ */ I({
|
|
|
497
497
|
},
|
|
498
498
|
setup(e) {
|
|
499
499
|
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
500
|
-
initialState:
|
|
501
|
-
schema:
|
|
500
|
+
initialState: N(() => E.toForm(n.creditNote)),
|
|
501
|
+
schema: He,
|
|
502
502
|
onSubmit: async (e) => {
|
|
503
503
|
let t = await a.execute({
|
|
504
504
|
body: e,
|
|
@@ -506,39 +506,39 @@ var Xe = /* @__PURE__ */ I({
|
|
|
506
506
|
});
|
|
507
507
|
t.isErr() && i.apiError(t.error);
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
510
|
-
return
|
|
511
|
-
form:
|
|
509
|
+
}), 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);
|
|
510
|
+
return O({ form: o }), (e, t) => (V(), P(H(K), {
|
|
511
|
+
form: H(o),
|
|
512
512
|
"prompt-on-unsaved-changes": !1
|
|
513
513
|
}, {
|
|
514
|
-
default:
|
|
514
|
+
default: U(() => [L(H(G), {
|
|
515
515
|
gap: "lg",
|
|
516
516
|
class: "px-2xl py-xl"
|
|
517
517
|
}, {
|
|
518
|
-
default:
|
|
519
|
-
|
|
520
|
-
default:
|
|
521
|
-
text:
|
|
518
|
+
default: U(() => [
|
|
519
|
+
L(H(G), null, {
|
|
520
|
+
default: U(() => [L(H(J), {
|
|
521
|
+
text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
|
|
522
522
|
class: "text-xs font-semibold text-primary"
|
|
523
|
-
}, null, 8, ["text"]),
|
|
524
|
-
default:
|
|
525
|
-
|
|
526
|
-
icon:
|
|
527
|
-
label:
|
|
523
|
+
}, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
|
|
524
|
+
default: U(() => [
|
|
525
|
+
L(Q, {
|
|
526
|
+
icon: H(g),
|
|
527
|
+
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
528
528
|
}, {
|
|
529
|
-
default:
|
|
529
|
+
default: U(() => [L(H(J), {
|
|
530
530
|
text: n.creditNote.sequence ?? "-",
|
|
531
531
|
class: "text-xs text-primary"
|
|
532
532
|
}, null, 8, ["text"])]),
|
|
533
533
|
_: 1
|
|
534
534
|
}, 8, ["icon", "label"]),
|
|
535
|
-
|
|
536
|
-
icon:
|
|
537
|
-
"has-error":
|
|
538
|
-
label:
|
|
535
|
+
L(Q, {
|
|
536
|
+
icon: H(b),
|
|
537
|
+
"has-error": H(f).errors.value.length > 0,
|
|
538
|
+
label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
539
539
|
}, {
|
|
540
|
-
default:
|
|
541
|
-
"is-disabled":
|
|
540
|
+
default: U(() => [L(H(Be), z(H(w)(H(f)), {
|
|
541
|
+
"is-disabled": p.value,
|
|
542
542
|
label: null,
|
|
543
543
|
class: "w-full"
|
|
544
544
|
}), null, 16, ["is-disabled"])]),
|
|
@@ -548,53 +548,60 @@ var Xe = /* @__PURE__ */ I({
|
|
|
548
548
|
"has-error",
|
|
549
549
|
"label"
|
|
550
550
|
]),
|
|
551
|
-
|
|
552
|
-
icon:
|
|
553
|
-
label:
|
|
551
|
+
L(Q, {
|
|
552
|
+
icon: H(x),
|
|
553
|
+
label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
554
554
|
}, {
|
|
555
|
-
default:
|
|
555
|
+
default: U(() => [L(H(J), {
|
|
556
556
|
text: n.creditNote.issuer.name ?? "-",
|
|
557
557
|
class: "text-xs text-primary"
|
|
558
558
|
}, null, 8, ["text"])]),
|
|
559
559
|
_: 1
|
|
560
560
|
}, 8, ["icon", "label"]),
|
|
561
|
-
|
|
562
|
-
icon:
|
|
563
|
-
"has-error":
|
|
564
|
-
label:
|
|
561
|
+
L(Q, {
|
|
562
|
+
icon: H(y),
|
|
563
|
+
"has-error": H(d).errors.value.length > 0,
|
|
564
|
+
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
565
565
|
}, {
|
|
566
|
-
default:
|
|
566
|
+
default: U(() => [L(H(Ne), z({ "is-disabled": p.value }, H(w)(H(d))), null, 16, ["is-disabled"])]),
|
|
567
567
|
_: 1
|
|
568
568
|
}, 8, [
|
|
569
569
|
"icon",
|
|
570
570
|
"has-error",
|
|
571
571
|
"label"
|
|
572
572
|
]),
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
573
|
+
(V(!0), I(M, null, Te(u.value, (e) => (V(), P(Q, {
|
|
574
|
+
key: e.definition.uuid,
|
|
575
|
+
icon: H(ue)[e.definition.type],
|
|
576
|
+
label: H(s).getLabel(e.definition, H(r).locale.value)
|
|
577
|
+
}, {
|
|
578
|
+
default: U(() => [L(c, {
|
|
579
|
+
definition: e.definition,
|
|
580
|
+
value: e.value
|
|
581
|
+
}, null, 8, ["definition", "value"])]),
|
|
582
|
+
_: 2
|
|
583
|
+
}, 1032, ["icon", "label"]))), 128))
|
|
577
584
|
]),
|
|
578
585
|
_: 1
|
|
579
586
|
})]),
|
|
580
587
|
_: 1
|
|
581
588
|
}),
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
589
|
+
L(H(ze)),
|
|
590
|
+
L(pe, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
|
|
591
|
+
L($, {
|
|
585
592
|
"is-default-open": !0,
|
|
586
593
|
name: n.creditNote.customer.name ?? "-",
|
|
587
|
-
title:
|
|
594
|
+
title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
588
595
|
address: n.creditNote.customer.address
|
|
589
596
|
}, null, 8, [
|
|
590
597
|
"name",
|
|
591
598
|
"title",
|
|
592
599
|
"address"
|
|
593
600
|
]),
|
|
594
|
-
|
|
595
|
-
|
|
601
|
+
L(H(ze)),
|
|
602
|
+
L($, {
|
|
596
603
|
name: n.creditNote.issuer.email ?? "-",
|
|
597
|
-
title:
|
|
604
|
+
title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
598
605
|
address: n.creditNote.issuer.address
|
|
599
606
|
}, null, 8, [
|
|
600
607
|
"name",
|
|
@@ -607,20 +614,20 @@ var Xe = /* @__PURE__ */ I({
|
|
|
607
614
|
_: 1
|
|
608
615
|
}, 8, ["form"]));
|
|
609
616
|
}
|
|
610
|
-
}),
|
|
617
|
+
}), nt = /* @__PURE__ */ R({
|
|
611
618
|
__name: "CreditNoteDetailSidebar",
|
|
612
619
|
props: {
|
|
613
620
|
creditNote: {},
|
|
614
621
|
customFieldDefinitions: {}
|
|
615
622
|
},
|
|
616
623
|
setup(e) {
|
|
617
|
-
let t = e, n = j(), r =
|
|
618
|
-
return (e, n) => (
|
|
624
|
+
let t = e, n = j(), r = S(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
|
|
625
|
+
return (e, n) => (V(), P(oe, {
|
|
619
626
|
"billing-document": t.creditNote,
|
|
620
627
|
"updated-footer": i.value
|
|
621
628
|
}, {
|
|
622
|
-
activity:
|
|
623
|
-
info:
|
|
629
|
+
activity: U(() => [L(et, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
|
|
630
|
+
info: U(() => [L(tt, {
|
|
624
631
|
"credit-note": t.creditNote,
|
|
625
632
|
"custom-field-definitions": t.customFieldDefinitions
|
|
626
633
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -630,9 +637,9 @@ var Xe = /* @__PURE__ */ I({
|
|
|
630
637
|
});
|
|
631
638
|
//#endregion
|
|
632
639
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
|
|
633
|
-
function
|
|
634
|
-
return
|
|
635
|
-
queryFn: (e) =>
|
|
640
|
+
function rt() {
|
|
641
|
+
return W({
|
|
642
|
+
queryFn: (e) => T.updateLines(e.params.creditNoteUuid, e.body),
|
|
636
643
|
queryKeysToInvalidate: {
|
|
637
644
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
638
645
|
invoiceIndex: {}
|
|
@@ -641,15 +648,15 @@ function et() {
|
|
|
641
648
|
}
|
|
642
649
|
//#endregion
|
|
643
650
|
//#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
|
|
644
|
-
var
|
|
651
|
+
var it = /* @__PURE__ */ R({
|
|
645
652
|
__name: "CreditNoteLineItemsTableSection",
|
|
646
653
|
props: {
|
|
647
654
|
creditNote: {},
|
|
648
655
|
customFieldDefinitions: {}
|
|
649
656
|
},
|
|
650
657
|
setup(e) {
|
|
651
|
-
let t = e, n =
|
|
652
|
-
isSaving:
|
|
658
|
+
let t = e, n = N(() => t.creditNote), r = rt(), i = le({
|
|
659
|
+
isSaving: N(() => r.isLoading.value),
|
|
653
660
|
billingDocument: () => n.value,
|
|
654
661
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
655
662
|
updateLines: (e) => r.execute({
|
|
@@ -657,24 +664,24 @@ var tt = /* @__PURE__ */ I({
|
|
|
657
664
|
params: { creditNoteUuid: t.creditNote.uuid }
|
|
658
665
|
})
|
|
659
666
|
});
|
|
660
|
-
return
|
|
661
|
-
default:
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
667
|
+
return ae(i), (e, n) => (V(), P(fe, null, {
|
|
668
|
+
default: U(() => [
|
|
669
|
+
L(he, { "show-apply-discount": !1 }),
|
|
670
|
+
L(ie),
|
|
671
|
+
L(ne, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
|
|
672
|
+
L(_e)
|
|
666
673
|
]),
|
|
667
674
|
_: 1
|
|
668
675
|
}));
|
|
669
676
|
}
|
|
670
|
-
}),
|
|
677
|
+
}), at = /* @__PURE__ */ R({
|
|
671
678
|
__name: "CreditNoteDetailView",
|
|
672
679
|
props: {
|
|
673
680
|
creditNote: {},
|
|
674
681
|
customFieldDefinitions: {}
|
|
675
682
|
},
|
|
676
683
|
setup(e) {
|
|
677
|
-
let t = e, n = j(), r =
|
|
684
|
+
let t = e, n = j(), r = we(!1), a = N(() => s.filterByView(t.customFieldDefinitions, i.CREDIT_NOTE_DETAIL)), o = N(() => [
|
|
678
685
|
{
|
|
679
686
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
680
687
|
to: { name: "invoicing-invoice-overview" }
|
|
@@ -689,29 +696,29 @@ var tt = /* @__PURE__ */ I({
|
|
|
689
696
|
{ label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
|
|
690
697
|
{ label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
|
|
691
698
|
]);
|
|
692
|
-
return (e, i) => (
|
|
699
|
+
return (e, i) => (V(), P(me, {
|
|
693
700
|
"billing-document": t.creditNote,
|
|
694
701
|
breadcrumbs: o.value,
|
|
695
|
-
title:
|
|
702
|
+
title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
|
|
696
703
|
}, {
|
|
697
|
-
header:
|
|
704
|
+
header: U(() => [L(Ze, {
|
|
698
705
|
"credit-note": t.creditNote,
|
|
699
706
|
"is-pdf-view-active": r.value,
|
|
700
707
|
class: "w-full",
|
|
701
708
|
onTogglePdfView: i[0] ||= (e) => r.value = !r.value
|
|
702
709
|
}, null, 8, ["credit-note", "is-pdf-view-active"])]),
|
|
703
|
-
default:
|
|
710
|
+
default: U(() => [r.value ? (V(), P(de, {
|
|
704
711
|
key: 0,
|
|
705
712
|
"billing-document": t.creditNote,
|
|
706
713
|
class: "w-full"
|
|
707
|
-
}, null, 8, ["billing-document"])) : (
|
|
714
|
+
}, null, 8, ["billing-document"])) : (V(), I(M, { key: 1 }, [L(it, {
|
|
708
715
|
"credit-note": t.creditNote,
|
|
709
716
|
"custom-field-definitions": a.value
|
|
710
|
-
}, null, 8, ["credit-note", "custom-field-definitions"]),
|
|
717
|
+
}, null, 8, ["credit-note", "custom-field-definitions"]), L(Qe, {
|
|
711
718
|
"credit-note": t.creditNote,
|
|
712
719
|
class: "w-full"
|
|
713
720
|
}, null, 8, ["credit-note"])], 64))]),
|
|
714
|
-
sidebar:
|
|
721
|
+
sidebar: U(() => [L(nt, {
|
|
715
722
|
"credit-note": t.creditNote,
|
|
716
723
|
"custom-field-definitions": a.value
|
|
717
724
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -722,20 +729,20 @@ var tt = /* @__PURE__ */ I({
|
|
|
722
729
|
"title"
|
|
723
730
|
]));
|
|
724
731
|
}
|
|
725
|
-
}),
|
|
732
|
+
}), ot = /* @__PURE__ */ R({
|
|
726
733
|
__name: "CreditNoteDetailViewDataProvider",
|
|
727
734
|
props: { creditNoteUuid: {} },
|
|
728
735
|
setup(e) {
|
|
729
|
-
let t = e, n = j(), r =
|
|
736
|
+
let t = e, n = j(), r = N(() => [{
|
|
730
737
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
731
738
|
to: { name: "invoicing-invoice-overview" }
|
|
732
|
-
}]), i =
|
|
733
|
-
return (e, t) => (
|
|
734
|
-
"custom-field-definitions-query":
|
|
735
|
-
query:
|
|
739
|
+
}]), i = D(N(() => t.creditNoteUuid)), o = a();
|
|
740
|
+
return (e, t) => (V(), P(ge, {
|
|
741
|
+
"custom-field-definitions-query": H(o),
|
|
742
|
+
query: H(i),
|
|
736
743
|
"loading-breadcrumbs": r.value
|
|
737
744
|
}, {
|
|
738
|
-
default:
|
|
745
|
+
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [L(at, {
|
|
739
746
|
"credit-note": e,
|
|
740
747
|
"custom-field-definitions": t
|
|
741
748
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -748,4 +755,4 @@ var tt = /* @__PURE__ */ I({
|
|
|
748
755
|
}
|
|
749
756
|
});
|
|
750
757
|
//#endregion
|
|
751
|
-
export {
|
|
758
|
+
export { ot as default };
|