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