@wisemen/wise-invoicing-web 0.4.0 → 0.6.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-IuReavOR.js → ApprovalReminderSettingsViewDataProvider-r9DcFi76.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-B3I6UIKY.js → BillingDocumentDetailViewDataProvider-CsqBeAiA.js} +1496 -1418
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-rFqmLUPy.js → BillingDocumentPdf-thrvzGfh.js} +266 -205
- package/dist/{CreditNoteDetailViewDataProvider-CQRnG2Fz.js → CreditNoteDetailViewDataProvider-D6IMBwLn.js} +242 -242
- package/dist/{CreditNotePdfViewDataProvider-RytwPWH5.js → CreditNotePdfViewDataProvider-C4z1NE3Q.js} +2 -2
- package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BRpCwCqJ.js} +37 -22
- package/dist/{DunningCaseDetailViewDataProvider-BRYbYgTw.js → DunningCaseDetailViewDataProvider-DTotyRX8.js} +5 -5
- package/dist/{DunningCaseOverviewView-D0vScVF1.js → DunningCaseOverviewView-kDq7UY5e.js} +5 -5
- package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js} +1 -1
- package/dist/{DunningCaseSendDialog-CV66_tMv.js → DunningCaseSendDialog-DVfBVtgr.js} +12 -12
- package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-CcMqr2jH.js → InvoiceApprovalOverviewView-B6naRElx.js} +8 -8
- package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-CDc_Pwsm.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-DaCEHgs0.js → InvoiceApproveDialogDataProvider-CK6ij8X1.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-B5uZY8Qy.js → InvoiceDetailViewDataProvider-BKurQPAV.js} +369 -369
- package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-ChoyCi5L.js} +368 -368
- package/dist/{InvoicePdfView-CPEX7E9W.js → InvoicePdfView-DLEKQ29O.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-T4-8A2OD.js → InvoicePdfViewDataProvider-C-b7iXiH.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-BkHZoPSZ.js → InvoicePublicPdfViewDataProvider-DZ4WQsvi.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js → InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-t64Qiyn6.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-Cc8R6ekd.js} +51 -46
- package/dist/PeppolSettingsViewDataProvider-DpVIfFVG.js +276 -0
- package/dist/{ReminderSettingsViewDataProvider-CjX7afDs.js → ReminderSettingsViewDataProvider-QOh3LpMX.js} +63 -63
- package/dist/{api.util-D6m6OY3_.js → api.util-Do9BEwG4.js} +735 -641
- package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-BAOQ3Zrg.js} +3 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +4 -1
- package/dist/client/types.gen.d.ts +218 -40
- package/dist/client/zod.gen.d.ts +2575 -72
- package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-C1rr54m1.js} +15 -15
- package/dist/{dist-BpDuRYDT.js → dist-CZAOPudv.js} +1 -1
- package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-C3k1m0Nz.js} +28 -26
- package/dist/{i18n.lib-CKs3ExEl.js → i18n.lib-Bkz_R954.js} +56 -2
- package/dist/index.d.ts +55 -0
- package/dist/index.js +161 -156
- package/dist/{invoice.service-DWDl9XRh.js → invoice.service-DrI2ULIR.js} +39 -38
- package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-Dpxiru7l.js} +7 -7
- package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-CdOAcPzv.js} +2 -2
- package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-RRFosiYR.js} +6 -6
- package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-BmtHdfj0.js} +1 -1
- package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-DKtJorc_.js} +3 -3
- package/dist/{invoicingConfig.composable-DjFexycc.js → invoicingConfig.composable-CMTYHHS9.js} +2 -2
- package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CKDhoStt.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +54 -0
- package/dist/locales/en-US.json.d.ts +28 -1
- package/dist/locales/nl-BE.json.d.ts +28 -1
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +2 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
- package/dist/modules/invoice-delivery/index.d.ts +1 -0
- package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
- package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-yImUS5qt.js} +22 -22
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +2 -1
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +4 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +4 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +0 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +0 -3
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +6 -0
- package/package.json +1 -1
|
@@ -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-Bkz_R954.js";
|
|
2
|
+
import "./api.util-Do9BEwG4.js";
|
|
3
|
+
import { b as t, r as n } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
4
4
|
import { n as r } from "./address.transformer-jGddczLV.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import { C as
|
|
12
|
-
import { r as
|
|
13
|
-
import
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useKeysetInfiniteQuery as
|
|
17
|
-
import { useRouter as
|
|
18
|
-
import { UIAnimateHeight as
|
|
5
|
+
import { a as i, i as a, n as o, r as s } from "./CustomFieldValueText-BRpCwCqJ.js";
|
|
6
|
+
import { t as c } from "./download.util-B5Q7KUC9.js";
|
|
7
|
+
import { B as l, I as u, P as d, Y as f, _ as p, gt as m, i as h, j as ee, l as g, nt as _, q as v, x as te } from "./dist-DCbLgB6Y.js";
|
|
8
|
+
import { n as y, t as b } from "./dist-Cdbpkd3Y.js";
|
|
9
|
+
import { t as x } from "./formango.util-D5c2ql--.js";
|
|
10
|
+
import { n as S, r as C, t as w } from "./creditNoteDetail.query-C1rr54m1.js";
|
|
11
|
+
import { C as T, S as E, _ as D, a as O, b as ne, c as k, d as re, f as ie, g as ae, h as oe, i as se, m as ce, n as le, o as ue, p as de, r as fe, s as pe, t as me, u as he, v as ge, x as _e, y as ve } from "./BillingDocumentDetailViewDataProvider-CsqBeAiA.js";
|
|
12
|
+
import { r as ye } from "./InvoicingFileUploadProvider-t64Qiyn6.js";
|
|
13
|
+
import be, { z as A } from "zod";
|
|
14
|
+
import { useI18n as j } from "vue-i18n";
|
|
15
|
+
import { Fragment as xe, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as Se, createElementVNode as Ce, createVNode as F, defineComponent as I, mergeProps as L, normalizeClass as R, openBlock as z, ref as B, renderSlot as we, resolveDynamicComponent as Te, unref as V, withCtx as H } from "vue";
|
|
16
|
+
import { useKeysetInfiniteQuery as Ee, useMutation as U } from "@wisemen/vue-core-api-utils";
|
|
17
|
+
import { useRouter as De } from "vue-router";
|
|
18
|
+
import { UIAnimateHeight as Oe, UIBadge as ke, UIClickableElement as Ae, UIColumnLayout as W, UIDateField as je, UIDialogFooter as Me, UIDialogFooterCancel as Ne, UIDialogFooterSubmit as Pe, UIDialogHeader as Fe, UIForm as G, UIFormDialog as Ie, UIRowLayout as K, UISeparator as q, UIText as J, UITextField as Le, useOverlay as Re, 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 U({
|
|
23
|
+
queryFn: (e) => S.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 Q = A.object({
|
|
33
|
+
issuedOn: b,
|
|
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
|
+
}), ze = 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 Be() {
|
|
47
|
+
return U({
|
|
48
|
+
queryFn: (e) => S.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 ze() {
|
|
|
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 Ve() {
|
|
59
|
+
return U({
|
|
60
|
+
queryFn: (e) => S.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 Be() {
|
|
|
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 He() {
|
|
71
|
+
return U({
|
|
72
|
+
queryFn: (e) => S.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 Ve() {
|
|
|
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 Ue() {
|
|
83
|
+
return U({
|
|
84
|
+
queryFn: (e) => S.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 We() {
|
|
91
|
+
return U({
|
|
92
|
+
queryFn: (e) => S.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 Ge = /* @__PURE__ */ I({
|
|
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 =
|
|
104
|
-
schema:
|
|
103
|
+
let n = e, r = t, i = j(), a = De(), o = Y(), s = We(), c = M(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
|
|
104
|
+
schema: be.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 We = /* @__PURE__ */ L({
|
|
|
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) => (z(), N(V(Ie), {
|
|
115
|
+
form: V(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: H(() => [F(V(Fe), {
|
|
120
|
+
title: V(i).t("wise_invoicing.credit_note.delete.title"),
|
|
121
|
+
description: V(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
|
|
122
|
+
}, null, 8, ["title", "description"]), F(V(Me), null, {
|
|
123
|
+
right: H(() => [F(V(Ne)), F(V(Pe), {
|
|
124
124
|
"is-destructive": !0,
|
|
125
|
-
label:
|
|
125
|
+
label: V(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
126
126
|
}, null, 8, ["label"])]),
|
|
127
127
|
_: 1
|
|
128
128
|
})]),
|
|
@@ -132,12 +132,12 @@ var We = /* @__PURE__ */ L({
|
|
|
132
132
|
});
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
|
|
135
|
-
function
|
|
136
|
-
let n =
|
|
137
|
-
async function
|
|
138
|
-
let t = await
|
|
135
|
+
function Ke(e) {
|
|
136
|
+
let n = j(), r = Y(), i = Re(), a = i.create(Ge), s = i.create(ne), l = Be(), f = Ve(), p = He(), g = Ue(), { shouldSkipConfirmation: _ } = _e(), v = M(() => e.value.originalInvoice?.uuid ?? e.value.uuid), y = M(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
|
|
137
|
+
async function b() {
|
|
138
|
+
let t = await p.execute({ params: {
|
|
139
139
|
creditNoteUuid: e.value.uuid,
|
|
140
|
-
invoiceUuid:
|
|
140
|
+
invoiceUuid: v.value
|
|
141
141
|
} });
|
|
142
142
|
if (t.isErr()) {
|
|
143
143
|
r.apiError(t.error);
|
|
@@ -145,27 +145,27 @@ function Ge(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 x() {
|
|
149
|
+
let t = await l.execute({ params: {
|
|
150
150
|
creditNoteUuid: e.value.uuid,
|
|
151
|
-
invoiceUuid:
|
|
151
|
+
invoiceUuid: v.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
|
-
async function
|
|
156
|
-
if (
|
|
157
|
-
await
|
|
155
|
+
async function C() {
|
|
156
|
+
if (_.value) {
|
|
157
|
+
await x();
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
await
|
|
160
|
+
await s.open({
|
|
161
161
|
billingDocumentType: "credit_note",
|
|
162
|
-
onConfirm:
|
|
162
|
+
onConfirm: x
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
166
|
-
let t = await
|
|
165
|
+
async function w() {
|
|
166
|
+
let t = await f.execute({ params: {
|
|
167
167
|
creditNoteUuid: e.value.uuid,
|
|
168
|
-
invoiceUuid:
|
|
168
|
+
invoiceUuid: v.value
|
|
169
169
|
} });
|
|
170
170
|
if (t.isErr()) {
|
|
171
171
|
r.apiError(t.error);
|
|
@@ -173,76 +173,76 @@ function Ge(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 T() {
|
|
177
|
+
let t = await g.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
|
|
185
|
-
await
|
|
184
|
+
async function E() {
|
|
185
|
+
await a.open({ creditNote: e.value });
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
188
|
-
let t = await
|
|
187
|
+
async function D() {
|
|
188
|
+
let t = await S.getByUuid(e.value.uuid);
|
|
189
189
|
if (t.isErr()) {
|
|
190
190
|
r.apiError(t.error);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
let
|
|
194
|
-
if (
|
|
193
|
+
let i = t.value.file;
|
|
194
|
+
if (i === null) {
|
|
195
195
|
r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
let
|
|
199
|
-
|
|
198
|
+
let a = await ye.getDownloadUrl(i.uuid);
|
|
199
|
+
a !== null && c.downloadUrl(a, i.name);
|
|
200
200
|
}
|
|
201
|
-
let
|
|
201
|
+
let O = M(() => [
|
|
202
202
|
{
|
|
203
|
-
isLoading:
|
|
204
|
-
iconLeft:
|
|
203
|
+
isLoading: g.isLoading.value,
|
|
204
|
+
iconLeft: m,
|
|
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: T
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
isLoading:
|
|
213
|
-
iconRight:
|
|
212
|
+
isLoading: p.isLoading.value,
|
|
213
|
+
iconRight: h,
|
|
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: b
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
isLoading:
|
|
221
|
-
iconRight:
|
|
220
|
+
isLoading: l.isLoading.value,
|
|
221
|
+
iconRight: ee,
|
|
222
222
|
key: "finalize",
|
|
223
223
|
label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
224
224
|
visible: e.value.status === t.READY,
|
|
225
|
-
onClick:
|
|
225
|
+
onClick: C
|
|
226
226
|
}
|
|
227
|
-
].filter((e) => e.visible)),
|
|
227
|
+
].filter((e) => e.visible)), k = M(() => {
|
|
228
228
|
let r = [{
|
|
229
|
-
icon:
|
|
229
|
+
icon: te,
|
|
230
230
|
key: "downloadPdf",
|
|
231
231
|
label: n.t("wise_invoicing.common.download_pdf"),
|
|
232
|
-
visible:
|
|
233
|
-
onSelect:
|
|
232
|
+
visible: y.value,
|
|
233
|
+
onSelect: D
|
|
234
234
|
}, {
|
|
235
|
-
icon:
|
|
235
|
+
icon: u,
|
|
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
|
-
onSelect:
|
|
239
|
+
onSelect: w
|
|
240
240
|
}], i = [{
|
|
241
|
-
icon:
|
|
241
|
+
icon: d,
|
|
242
242
|
key: "delete",
|
|
243
243
|
label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
|
|
244
|
-
visible:
|
|
245
|
-
onSelect:
|
|
244
|
+
visible: o.isEditable(e.value.status),
|
|
245
|
+
onSelect: E
|
|
246
246
|
}];
|
|
247
247
|
return [{
|
|
248
248
|
items: r.filter((e) => e.visible),
|
|
@@ -253,14 +253,14 @@ function Ge(e) {
|
|
|
253
253
|
}].filter((e) => e.items.length > 0);
|
|
254
254
|
});
|
|
255
255
|
return {
|
|
256
|
-
isActionMenuVisible:
|
|
257
|
-
menuGroups:
|
|
258
|
-
primaryButtons:
|
|
256
|
+
isActionMenuVisible: M(() => k.value.length > 0),
|
|
257
|
+
menuGroups: k,
|
|
258
|
+
primaryButtons: O
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
262
|
//#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
|
|
263
|
-
var
|
|
263
|
+
var qe = /* @__PURE__ */ I({
|
|
264
264
|
__name: "CreditNoteDetailHeaderSection",
|
|
265
265
|
props: {
|
|
266
266
|
isPdfViewActive: { type: Boolean },
|
|
@@ -268,49 +268,49 @@ var Ke = /* @__PURE__ */ L({
|
|
|
268
268
|
},
|
|
269
269
|
emits: ["togglePdfView"],
|
|
270
270
|
setup(e, { emit: n }) {
|
|
271
|
-
let r = e, i = n, a =
|
|
271
|
+
let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = Ke(M(() => r.creditNote)), u = M(() => new E(r.creditNote.status)), d = M(() => u.value.color), f = M(() => a.t(u.value.translationKey)), p = M(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), m = X({
|
|
272
272
|
initialState: { subject: r.creditNote.subject },
|
|
273
|
-
schema:
|
|
273
|
+
schema: ze,
|
|
274
274
|
onSubmit: async (e) => {
|
|
275
275
|
let t = await s.execute({
|
|
276
276
|
body: {
|
|
277
|
-
...
|
|
277
|
+
...C.toForm(r.creditNote),
|
|
278
278
|
subject: e.subject
|
|
279
279
|
},
|
|
280
280
|
params: { creditNoteUuid: r.creditNote.uuid }
|
|
281
281
|
});
|
|
282
282
|
t.isErr() && o.apiError(t.error);
|
|
283
283
|
}
|
|
284
|
-
}),
|
|
285
|
-
return
|
|
286
|
-
form:
|
|
284
|
+
}), h = m.register("subject");
|
|
285
|
+
return T({ form: m }), (e, t) => (z(), N(V(G), {
|
|
286
|
+
form: V(m),
|
|
287
287
|
"prompt-on-unsaved-changes": !1
|
|
288
288
|
}, {
|
|
289
|
-
default:
|
|
290
|
-
"fallback-title":
|
|
289
|
+
default: H(() => [F(ge, {
|
|
290
|
+
"fallback-title": V(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: V(_),
|
|
296
|
+
"subject-field": V(h),
|
|
297
|
+
"subject-placeholder": V(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
298
298
|
}, {
|
|
299
|
-
actions:
|
|
299
|
+
actions: H(() => [F(D, {
|
|
300
300
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
301
|
-
"menu-groups":
|
|
302
|
-
"primary-buttons":
|
|
301
|
+
"menu-groups": V(c),
|
|
302
|
+
"primary-buttons": V(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: H(() => [F(V(K), {
|
|
310
310
|
gap: "xs",
|
|
311
311
|
class: "flex-wrap items-start"
|
|
312
312
|
}, {
|
|
313
|
-
default:
|
|
313
|
+
default: H(() => [r.creditNote.isOverdue ? (z(), N(ve, { key: 0 })) : P("", !0)]),
|
|
314
314
|
_: 1
|
|
315
315
|
})]),
|
|
316
316
|
_: 1
|
|
@@ -327,13 +327,13 @@ var Ke = /* @__PURE__ */ L({
|
|
|
327
327
|
_: 1
|
|
328
328
|
}, 8, ["form"]));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), Je = /* @__PURE__ */ I({
|
|
331
331
|
__name: "CreditNoteDetailRemarksSection",
|
|
332
332
|
props: { creditNote: {} },
|
|
333
333
|
setup(e) {
|
|
334
|
-
let n = e, r =
|
|
335
|
-
initialState:
|
|
336
|
-
schema:
|
|
334
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
335
|
+
initialState: M(() => C.toForm(n.creditNote)),
|
|
336
|
+
schema: Q,
|
|
337
337
|
onSubmit: async (e) => {
|
|
338
338
|
let t = await a.execute({
|
|
339
339
|
body: e,
|
|
@@ -341,16 +341,16 @@ var Ke = /* @__PURE__ */ L({
|
|
|
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 = M(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
345
|
+
return T({ form: o }), (e, t) => (z(), N(V(G), {
|
|
346
|
+
form: V(o),
|
|
347
347
|
"prompt-on-unsaved-changes": !1
|
|
348
348
|
}, {
|
|
349
|
-
default:
|
|
349
|
+
default: H(() => [F(ae, {
|
|
350
350
|
"is-disabled": c.value,
|
|
351
|
-
placeholder:
|
|
352
|
-
"remarks-field":
|
|
353
|
-
title:
|
|
351
|
+
placeholder: V(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
352
|
+
"remarks-field": V(s),
|
|
353
|
+
title: V(r).t("wise_invoicing.invoice.detail.remarks.title")
|
|
354
354
|
}, null, 8, [
|
|
355
355
|
"is-disabled",
|
|
356
356
|
"placeholder",
|
|
@@ -363,33 +363,33 @@ var Ke = /* @__PURE__ */ L({
|
|
|
363
363
|
});
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
|
|
366
|
-
function
|
|
367
|
-
return
|
|
366
|
+
function Ye(e) {
|
|
367
|
+
return Ee("creditNoteActivityLogIndex", {
|
|
368
368
|
params: { creditNoteUuid: e },
|
|
369
|
-
queryFn: (t) =>
|
|
369
|
+
queryFn: (t) => S.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 Xe = /* @__PURE__ */ I({
|
|
375
375
|
__name: "CreditNoteDetailSidebarActivityTab",
|
|
376
376
|
props: { creditNote: {} },
|
|
377
377
|
setup(e) {
|
|
378
|
-
let t = e, r =
|
|
378
|
+
let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = Ye(M(() => t.creditNote.uuid)), l = M(() => c.value.unwrapOr({
|
|
379
379
|
data: [],
|
|
380
380
|
meta: { next: null }
|
|
381
381
|
}).data);
|
|
382
|
-
return (e, c) => (
|
|
382
|
+
return (e, c) => (z(), N(oe, {
|
|
383
383
|
"current-billing-document": {
|
|
384
|
-
role:
|
|
384
|
+
role: V(n).CREDIT_NOTE,
|
|
385
385
|
uuid: t.creditNote.uuid
|
|
386
386
|
},
|
|
387
|
-
"empty-message":
|
|
387
|
+
"empty-message": V(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": V(s),
|
|
390
|
+
"has-next-page": V(i),
|
|
391
|
+
"is-fetching-next-page": V(a),
|
|
392
|
+
"is-loading": V(o)
|
|
393
393
|
}, null, 8, [
|
|
394
394
|
"current-billing-document",
|
|
395
395
|
"empty-message",
|
|
@@ -400,7 +400,7 @@ var Ye = /* @__PURE__ */ L({
|
|
|
400
400
|
"is-loading"
|
|
401
401
|
]));
|
|
402
402
|
}
|
|
403
|
-
}),
|
|
403
|
+
}), $ = /* @__PURE__ */ I({
|
|
404
404
|
__name: "BillingDocumentDetailSidebarInfoItem",
|
|
405
405
|
props: {
|
|
406
406
|
hasError: {
|
|
@@ -412,25 +412,25 @@ var Ye = /* @__PURE__ */ L({
|
|
|
412
412
|
},
|
|
413
413
|
setup(e) {
|
|
414
414
|
let t = e;
|
|
415
|
-
return (e, n) => (
|
|
416
|
-
default:
|
|
417
|
-
(
|
|
415
|
+
return (e, n) => (z(), N(V(K), null, {
|
|
416
|
+
default: H(() => [
|
|
417
|
+
(z(), N(Te(t.icon), { class: R([{
|
|
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
|
+
F(V(J), {
|
|
422
422
|
text: t.label,
|
|
423
|
-
class:
|
|
423
|
+
class: R([{
|
|
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
|
+
we(e.$slots, "default")
|
|
429
429
|
]),
|
|
430
430
|
_: 3
|
|
431
431
|
}));
|
|
432
432
|
}
|
|
433
|
-
}),
|
|
433
|
+
}), Ze = /* @__PURE__ */ I({
|
|
434
434
|
__name: "BillingDocumentDetailSidebarPartySection",
|
|
435
435
|
props: {
|
|
436
436
|
title: {},
|
|
@@ -442,103 +442,103 @@ var Ye = /* @__PURE__ */ L({
|
|
|
442
442
|
address: {}
|
|
443
443
|
},
|
|
444
444
|
setup(e) {
|
|
445
|
-
let t = e, n =
|
|
445
|
+
let t = e, n = B(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) => (z(), N(V(W), { class: "w-full" }, {
|
|
450
|
+
default: H(() => [F(V(K), { justify: "between" }, {
|
|
451
|
+
default: H(() => [F(V(Ae), { class: "rounded-sm" }, {
|
|
452
|
+
default: H(() => [Ce("button", {
|
|
453
453
|
type: "button",
|
|
454
454
|
class: "flex w-full items-center gap-sm",
|
|
455
455
|
onClick: i
|
|
456
456
|
}, [
|
|
457
|
-
|
|
457
|
+
F(V(J), {
|
|
458
458
|
text: t.title,
|
|
459
459
|
class: "text-xs font-semibold text-primary"
|
|
460
460
|
}, null, 8, ["text"]),
|
|
461
|
-
|
|
461
|
+
F(V(ke), {
|
|
462
462
|
label: t.name,
|
|
463
463
|
color: "gray",
|
|
464
464
|
variant: "outline"
|
|
465
465
|
}, null, 8, ["label"]),
|
|
466
|
-
|
|
466
|
+
F(V(f), { class: R([{ "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
|
+
}), F(V(Oe), null, {
|
|
472
|
+
default: H(() => [n.value ? (z(), N(V(W), {
|
|
473
473
|
key: 0,
|
|
474
474
|
gap: "xs"
|
|
475
475
|
}, {
|
|
476
|
-
default:
|
|
476
|
+
default: H(() => [F(V(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 ? (z(), N(V(J), {
|
|
480
480
|
key: 0,
|
|
481
481
|
truncate: !1,
|
|
482
|
-
text:
|
|
482
|
+
text: V(r).format(t.address),
|
|
483
483
|
class: "text-xs text-primary"
|
|
484
|
-
}, null, 8, ["text"])) :
|
|
484
|
+
}, null, 8, ["text"])) : P("", !0)]),
|
|
485
485
|
_: 1
|
|
486
|
-
})) :
|
|
486
|
+
})) : P("", !0)]),
|
|
487
487
|
_: 1
|
|
488
488
|
})]),
|
|
489
489
|
_: 1
|
|
490
490
|
}));
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), Qe = /* @__PURE__ */ I({
|
|
493
493
|
__name: "CreditNoteDetailSidebarInfoTab",
|
|
494
494
|
props: {
|
|
495
495
|
creditNote: {},
|
|
496
496
|
customFieldDefinitions: {}
|
|
497
497
|
},
|
|
498
498
|
setup(e) {
|
|
499
|
-
let n = e, r =
|
|
500
|
-
initialState:
|
|
501
|
-
schema:
|
|
499
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
500
|
+
initialState: M(() => C.toForm(n.creditNote)),
|
|
501
|
+
schema: Q,
|
|
502
502
|
onSubmit: async (e) => {
|
|
503
|
-
let t = await
|
|
503
|
+
let t = await a.execute({
|
|
504
504
|
body: e,
|
|
505
505
|
params: { creditNoteUuid: n.creditNote.uuid }
|
|
506
506
|
});
|
|
507
507
|
t.isErr() && i.apiError(t.error);
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
510
|
-
return
|
|
511
|
-
form:
|
|
509
|
+
}), s = o.register("issuedOn"), c = o.register("poNumber"), u = M(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
510
|
+
return T({ form: o }), (e, t) => (z(), N(V(G), {
|
|
511
|
+
form: V(o),
|
|
512
512
|
"prompt-on-unsaved-changes": !1
|
|
513
513
|
}, {
|
|
514
|
-
default:
|
|
514
|
+
default: H(() => [F(V(W), {
|
|
515
515
|
gap: "lg",
|
|
516
516
|
class: "px-2xl py-xl"
|
|
517
517
|
}, {
|
|
518
|
-
default:
|
|
519
|
-
|
|
520
|
-
default:
|
|
521
|
-
text:
|
|
518
|
+
default: H(() => [
|
|
519
|
+
F(V(W), null, {
|
|
520
|
+
default: H(() => [F(V(J), {
|
|
521
|
+
text: V(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"]), F(V(W), { gap: "lg" }, {
|
|
524
|
+
default: H(() => [
|
|
525
|
+
F($, {
|
|
526
|
+
icon: V(p),
|
|
527
|
+
label: V(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
528
528
|
}, {
|
|
529
|
-
default:
|
|
529
|
+
default: H(() => [F(V(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
|
+
F($, {
|
|
536
|
+
icon: V(l),
|
|
537
|
+
"has-error": V(c).errors.value.length > 0,
|
|
538
|
+
label: V(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
539
539
|
}, {
|
|
540
|
-
default:
|
|
541
|
-
"is-disabled":
|
|
540
|
+
default: H(() => [F(V(Le), L(V(x)(V(c)), {
|
|
541
|
+
"is-disabled": u.value,
|
|
542
542
|
label: null,
|
|
543
543
|
class: "w-full"
|
|
544
544
|
}), null, 16, ["is-disabled"])]),
|
|
@@ -548,29 +548,29 @@ var Ye = /* @__PURE__ */ L({
|
|
|
548
548
|
"has-error",
|
|
549
549
|
"label"
|
|
550
550
|
]),
|
|
551
|
-
|
|
552
|
-
icon:
|
|
553
|
-
label:
|
|
551
|
+
F($, {
|
|
552
|
+
icon: V(g),
|
|
553
|
+
label: V(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
554
554
|
}, {
|
|
555
|
-
default:
|
|
555
|
+
default: H(() => [F(V(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
|
+
F($, {
|
|
562
|
+
icon: V(v),
|
|
563
|
+
"has-error": V(s).errors.value.length > 0,
|
|
564
|
+
label: V(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
565
565
|
}, {
|
|
566
|
-
default:
|
|
566
|
+
default: H(() => [F(V(je), L({ "is-disabled": u.value }, V(x)(V(s))), null, 16, ["is-disabled"])]),
|
|
567
567
|
_: 1
|
|
568
568
|
}, 8, [
|
|
569
569
|
"icon",
|
|
570
570
|
"has-error",
|
|
571
571
|
"label"
|
|
572
572
|
]),
|
|
573
|
-
|
|
573
|
+
F(ce, {
|
|
574
574
|
definitions: n.customFieldDefinitions,
|
|
575
575
|
values: n.creditNote.customFields
|
|
576
576
|
}, null, 8, ["definitions", "values"])
|
|
@@ -579,22 +579,22 @@ var Ye = /* @__PURE__ */ L({
|
|
|
579
579
|
})]),
|
|
580
580
|
_: 1
|
|
581
581
|
}),
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
582
|
+
F(V(q)),
|
|
583
|
+
F(de, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
|
|
584
|
+
F(Ze, {
|
|
585
585
|
"is-default-open": !0,
|
|
586
586
|
name: n.creditNote.customer.name ?? "-",
|
|
587
|
-
title:
|
|
587
|
+
title: V(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
588
588
|
address: n.creditNote.customer.address
|
|
589
589
|
}, null, 8, [
|
|
590
590
|
"name",
|
|
591
591
|
"title",
|
|
592
592
|
"address"
|
|
593
593
|
]),
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
F(V(q)),
|
|
595
|
+
F(Ze, {
|
|
596
596
|
name: n.creditNote.issuer.email ?? "-",
|
|
597
|
-
title:
|
|
597
|
+
title: V(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
598
598
|
address: n.creditNote.issuer.address
|
|
599
599
|
}, null, 8, [
|
|
600
600
|
"name",
|
|
@@ -607,20 +607,20 @@ var Ye = /* @__PURE__ */ L({
|
|
|
607
607
|
_: 1
|
|
608
608
|
}, 8, ["form"]));
|
|
609
609
|
}
|
|
610
|
-
}),
|
|
610
|
+
}), $e = /* @__PURE__ */ I({
|
|
611
611
|
__name: "CreditNoteDetailSidebar",
|
|
612
612
|
props: {
|
|
613
613
|
creditNote: {},
|
|
614
614
|
customFieldDefinitions: {}
|
|
615
615
|
},
|
|
616
616
|
setup(e) {
|
|
617
|
-
let t = e, n =
|
|
618
|
-
return (e, n) => (
|
|
617
|
+
let t = e, n = j(), r = y(), i = M(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
|
|
618
|
+
return (e, n) => (z(), N(ie, {
|
|
619
619
|
"billing-document": t.creditNote,
|
|
620
620
|
"updated-footer": i.value
|
|
621
621
|
}, {
|
|
622
|
-
activity:
|
|
623
|
-
info:
|
|
622
|
+
activity: H(() => [F(Xe, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
|
|
623
|
+
info: H(() => [F(Qe, {
|
|
624
624
|
"credit-note": t.creditNote,
|
|
625
625
|
"custom-field-definitions": t.customFieldDefinitions
|
|
626
626
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -630,9 +630,9 @@ var Ye = /* @__PURE__ */ L({
|
|
|
630
630
|
});
|
|
631
631
|
//#endregion
|
|
632
632
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
|
|
633
|
-
function
|
|
634
|
-
return
|
|
635
|
-
queryFn: (e) =>
|
|
633
|
+
function et() {
|
|
634
|
+
return U({
|
|
635
|
+
queryFn: (e) => S.updateLines(e.params.creditNoteUuid, e.body),
|
|
636
636
|
queryKeysToInvalidate: {
|
|
637
637
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
638
638
|
invoiceIndex: {}
|
|
@@ -641,15 +641,15 @@ function Qe() {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
|
|
644
|
-
var
|
|
644
|
+
var tt = /* @__PURE__ */ I({
|
|
645
645
|
__name: "CreditNoteLineItemsTableSection",
|
|
646
646
|
props: {
|
|
647
647
|
creditNote: {},
|
|
648
648
|
customFieldDefinitions: {}
|
|
649
649
|
},
|
|
650
650
|
setup(e) {
|
|
651
|
-
let t = e, n =
|
|
652
|
-
isSaving:
|
|
651
|
+
let t = e, n = M(() => t.creditNote), r = et(), i = se({
|
|
652
|
+
isSaving: M(() => r.isLoading.value),
|
|
653
653
|
billingDocument: () => n.value,
|
|
654
654
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
655
655
|
updateLines: (e) => r.execute({
|
|
@@ -657,24 +657,24 @@ var $e = /* @__PURE__ */ L({
|
|
|
657
657
|
params: { creditNoteUuid: t.creditNote.uuid }
|
|
658
658
|
})
|
|
659
659
|
});
|
|
660
|
-
return
|
|
661
|
-
default:
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
660
|
+
return re(i), (e, n) => (z(), N(ue, null, {
|
|
661
|
+
default: H(() => [
|
|
662
|
+
F(pe, { "show-apply-discount": !1 }),
|
|
663
|
+
F(k),
|
|
664
|
+
F(O, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
|
|
665
|
+
F(he)
|
|
666
666
|
]),
|
|
667
667
|
_: 1
|
|
668
668
|
}));
|
|
669
669
|
}
|
|
670
|
-
}),
|
|
670
|
+
}), nt = /* @__PURE__ */ I({
|
|
671
671
|
__name: "CreditNoteDetailView",
|
|
672
672
|
props: {
|
|
673
673
|
creditNote: {},
|
|
674
674
|
customFieldDefinitions: {}
|
|
675
675
|
},
|
|
676
676
|
setup(e) {
|
|
677
|
-
let t = e, n =
|
|
677
|
+
let t = e, n = j(), r = B(!1), a = M(() => s.filterByView(t.customFieldDefinitions, i.CREDIT_NOTE_DETAIL)), o = M(() => [
|
|
678
678
|
{
|
|
679
679
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
680
680
|
to: { name: "invoicing-invoice-overview" }
|
|
@@ -689,31 +689,31 @@ var $e = /* @__PURE__ */ L({
|
|
|
689
689
|
{ label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
|
|
690
690
|
{ label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
|
|
691
691
|
]);
|
|
692
|
-
return (e,
|
|
692
|
+
return (e, i) => (z(), N(fe, {
|
|
693
693
|
"billing-document": t.creditNote,
|
|
694
|
-
breadcrumbs:
|
|
695
|
-
title:
|
|
694
|
+
breadcrumbs: o.value,
|
|
695
|
+
title: V(n).t("wise_invoicing.credit_note.detail.fallback_title")
|
|
696
696
|
}, {
|
|
697
|
-
header:
|
|
697
|
+
header: H(() => [F(qe, {
|
|
698
698
|
"credit-note": t.creditNote,
|
|
699
699
|
"is-pdf-view-active": r.value,
|
|
700
700
|
class: "w-full",
|
|
701
|
-
onTogglePdfView:
|
|
701
|
+
onTogglePdfView: i[0] ||= (e) => r.value = !r.value
|
|
702
702
|
}, null, 8, ["credit-note", "is-pdf-view-active"])]),
|
|
703
|
-
default:
|
|
703
|
+
default: H(() => [r.value ? (z(), N(le, {
|
|
704
704
|
key: 0,
|
|
705
705
|
"billing-document": t.creditNote,
|
|
706
706
|
class: "w-full"
|
|
707
|
-
}, null, 8, ["billing-document"])) : (
|
|
707
|
+
}, null, 8, ["billing-document"])) : (z(), Se(xe, { key: 1 }, [F(tt, {
|
|
708
708
|
"credit-note": t.creditNote,
|
|
709
|
-
"custom-field-definitions":
|
|
710
|
-
}, null, 8, ["credit-note", "custom-field-definitions"]),
|
|
709
|
+
"custom-field-definitions": a.value
|
|
710
|
+
}, null, 8, ["credit-note", "custom-field-definitions"]), F(Je, {
|
|
711
711
|
"credit-note": t.creditNote,
|
|
712
712
|
class: "w-full"
|
|
713
713
|
}, null, 8, ["credit-note"])], 64))]),
|
|
714
|
-
sidebar:
|
|
714
|
+
sidebar: H(() => [F($e, {
|
|
715
715
|
"credit-note": t.creditNote,
|
|
716
|
-
"custom-field-definitions":
|
|
716
|
+
"custom-field-definitions": a.value
|
|
717
717
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
718
718
|
_: 1
|
|
719
719
|
}, 8, [
|
|
@@ -722,20 +722,20 @@ var $e = /* @__PURE__ */ L({
|
|
|
722
722
|
"title"
|
|
723
723
|
]));
|
|
724
724
|
}
|
|
725
|
-
}),
|
|
725
|
+
}), rt = /* @__PURE__ */ I({
|
|
726
726
|
__name: "CreditNoteDetailViewDataProvider",
|
|
727
727
|
props: { creditNoteUuid: {} },
|
|
728
728
|
setup(e) {
|
|
729
|
-
let t = e, n =
|
|
729
|
+
let t = e, n = j(), r = M(() => [{
|
|
730
730
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
731
731
|
to: { name: "invoicing-invoice-overview" }
|
|
732
|
-
}]), i =
|
|
733
|
-
return (e, t) => (
|
|
734
|
-
"custom-field-definitions-query":
|
|
735
|
-
query:
|
|
732
|
+
}]), i = w(M(() => t.creditNoteUuid)), o = a();
|
|
733
|
+
return (e, t) => (z(), N(me, {
|
|
734
|
+
"custom-field-definitions-query": V(o),
|
|
735
|
+
query: V(i),
|
|
736
736
|
"loading-breadcrumbs": r.value
|
|
737
737
|
}, {
|
|
738
|
-
default:
|
|
738
|
+
default: H(({ billingDocument: e, customFieldDefinitions: t }) => [F(nt, {
|
|
739
739
|
"credit-note": e,
|
|
740
740
|
"custom-field-definitions": t
|
|
741
741
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
@@ -748,4 +748,4 @@ var $e = /* @__PURE__ */ L({
|
|
|
748
748
|
}
|
|
749
749
|
});
|
|
750
750
|
//#endregion
|
|
751
|
-
export {
|
|
751
|
+
export { rt as default };
|