@wisemen/wise-invoicing-web 0.5.0 → 0.7.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-CD0Seawd.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-BgVYrLu8.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1708 -1576
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-LYvPMzYT.js → BillingDocumentPdf-c-7N80u4.js} +266 -205
- package/dist/{CreditNoteDetailViewDataProvider-CpSIbMM2.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +196 -189
- package/dist/{CreditNotePdfViewDataProvider-Dtnu9gS3.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
- package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BP4bKQh7.js} +68 -38
- package/dist/{DunningCaseDetailViewDataProvider-DutSCkco.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
- package/dist/{DunningCaseOverviewView-D8o4VMQD.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
- package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
- package/dist/{DunningCaseSendDialog-DGg7bXeZ.js → DunningCaseSendDialog-DwB_jFum.js} +17 -17
- package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-C4MI4IqD.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-CMZ0zDZo.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
- package/dist/{InvoiceDetailViewDataProvider-k1yIeHYP.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +648 -642
- package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +501 -501
- package/dist/{InvoicePdfView-CB8gx8TE.js → InvoicePdfView-C518PlHp.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-Cs4Gqa0h.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-BaSvVJ8W.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-S3N9E91M.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +51 -46
- package/dist/PeppolSettingsViewDataProvider-Cptga29B.js +276 -0
- package/dist/{ReminderSettingsViewDataProvider-BotrOSmS.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +63 -63
- package/dist/{api.util-D6m6OY3_.js → api.util-CR2xLnNj.js} +785 -670
- package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +9 -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 +240 -56
- package/dist/client/zod.gen.d.ts +4206 -1343
- package/dist/composables/invoicingConfig.composable.d.ts +12 -0
- package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-DGeG9_sO.js} +15 -15
- package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
- package/dist/{dist-BpDuRYDT.js → dist-DALBiuub.js} +134 -134
- package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-RvqrZTBa.js} +28 -26
- package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
- package/dist/{i18n.lib-DBxdqkbJ.js → i18n.lib-MOiHLIGc.js} +58 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.js +232 -212
- package/dist/{invoice.service-DWDl9XRh.js → invoice.service-Fv4F4aZq.js} +39 -38
- package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-DJvXagC7.js} +7 -7
- package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
- package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-CDyrtcwH.js} +6 -6
- package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
- package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
- package/dist/{invoicingConfig.composable-CaWQMTP1.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
- package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CoiXblSm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +56 -0
- package/dist/locales/en-US.json.d.ts +29 -1
- package/dist/locales/nl-BE.json.d.ts +29 -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.vue.d.ts +0 -1
- package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
- 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-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/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 +3 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- 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-aRFzY6uZ.js} +22 -22
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +2 -1
- 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
|
@@ -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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
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, 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-TX-tovKU.js";
|
|
12
|
+
import { r as xe } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
|
|
13
|
+
import Se, { z as A } from "zod";
|
|
14
|
+
import { useI18n as j } from "vue-i18n";
|
|
15
|
+
import { Fragment as M, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as 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
22
|
return W({
|
|
23
|
-
queryFn: (e) =>
|
|
23
|
+
queryFn: (e) => T.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 He = A.object({
|
|
33
|
+
issuedOn: C,
|
|
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
|
+
}), Ue = A.object({ subject: A.string().nullable() });
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
|
|
46
|
-
function
|
|
46
|
+
function We() {
|
|
47
47
|
return W({
|
|
48
|
-
queryFn: (e) =>
|
|
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 ze() {
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
|
|
58
|
-
function
|
|
58
|
+
function Ge() {
|
|
59
59
|
return W({
|
|
60
|
-
queryFn: (e) =>
|
|
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 Be() {
|
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
|
|
70
|
-
function
|
|
70
|
+
function Ke() {
|
|
71
71
|
return W({
|
|
72
|
-
queryFn: (e) =>
|
|
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 Ve() {
|
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/modules/credit-note/api/mutations/creditNoteSend.mutation.ts
|
|
82
|
-
function
|
|
82
|
+
function qe() {
|
|
83
83
|
return W({
|
|
84
|
-
queryFn: (e) =>
|
|
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
|
|
90
|
+
function Je() {
|
|
91
91
|
return W({
|
|
92
|
-
queryFn: (e) =>
|
|
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 =
|
|
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,16 +111,16 @@ 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) => (
|
|
114
|
+
return (e, t) => (V(), P(H(Re), {
|
|
115
115
|
form: H(l),
|
|
116
116
|
size: "xs",
|
|
117
117
|
onClose: t[0] ||= (e) => r("close")
|
|
118
118
|
}, {
|
|
119
|
-
default: U(() => [
|
|
119
|
+
default: U(() => [L(H(Le), {
|
|
120
120
|
title: H(i).t("wise_invoicing.credit_note.delete.title"),
|
|
121
121
|
description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
|
|
122
|
-
}, null, 8, ["title", "description"]),
|
|
123
|
-
right: U(() => [
|
|
122
|
+
}, null, 8, ["title", "description"]), L(H(Pe), null, {
|
|
123
|
+
right: U(() => [L(H(Fe)), L(H(Ie), {
|
|
124
124
|
"is-destructive": !0,
|
|
125
125
|
label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
126
126
|
}, null, 8, ["label"])]),
|
|
@@ -132,10 +132,10 @@ 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 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
140
|
invoiceUuid: y.value
|
|
141
141
|
} });
|
|
@@ -145,25 +145,25 @@ 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 S() {
|
|
149
|
+
let t = await c.execute({ params: {
|
|
150
150
|
creditNoteUuid: e.value.uuid,
|
|
151
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
|
-
async function
|
|
155
|
+
async function C() {
|
|
156
156
|
if (v.value) {
|
|
157
|
-
await
|
|
157
|
+
await S();
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
await
|
|
160
|
+
await s.open({
|
|
161
161
|
billingDocumentType: "credit_note",
|
|
162
|
-
onConfirm:
|
|
162
|
+
onConfirm: S
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
166
|
-
let t = await
|
|
165
|
+
async function w() {
|
|
166
|
+
let t = await l.execute({ params: {
|
|
167
167
|
creditNoteUuid: e.value.uuid,
|
|
168
168
|
invoiceUuid: y.value
|
|
169
169
|
} });
|
|
@@ -182,26 +182,26 @@ function Ge(e) {
|
|
|
182
182
|
r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
|
|
183
183
|
}
|
|
184
184
|
async function D() {
|
|
185
|
-
await
|
|
185
|
+
await a.open({ creditNote: e.value });
|
|
186
186
|
}
|
|
187
187
|
async function O() {
|
|
188
|
-
let t = await
|
|
188
|
+
let t = await T.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 xe.getDownloadUrl(i.uuid);
|
|
199
|
+
a !== null && u.downloadUrl(a, i.name);
|
|
200
200
|
}
|
|
201
|
-
let
|
|
201
|
+
let te = N(() => [
|
|
202
202
|
{
|
|
203
203
|
isLoading: _.isLoading.value,
|
|
204
|
-
iconLeft:
|
|
204
|
+
iconLeft: p,
|
|
205
205
|
key: "send",
|
|
206
206
|
label: n.t("wise_invoicing.invoice.detail.actions.send"),
|
|
207
207
|
variant: "primary",
|
|
@@ -209,39 +209,39 @@ function Ge(e) {
|
|
|
209
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
|
-
onClick:
|
|
225
|
+
onClick: C
|
|
226
226
|
}
|
|
227
|
-
].filter((e) => e.visible)),
|
|
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
232
|
visible: b.value,
|
|
233
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
|
-
onSelect:
|
|
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
|
-
visible:
|
|
244
|
+
visible: o.isEditable(e.value.status),
|
|
245
245
|
onSelect: D
|
|
246
246
|
}];
|
|
247
247
|
return [{
|
|
@@ -253,14 +253,14 @@ function Ge(e) {
|
|
|
253
253
|
}].filter((e) => e.items.length > 0);
|
|
254
254
|
});
|
|
255
255
|
return {
|
|
256
|
-
isActionMenuVisible: N(() =>
|
|
257
|
-
menuGroups:
|
|
258
|
-
primaryButtons:
|
|
256
|
+
isActionMenuVisible: N(() => k.value.length > 0),
|
|
257
|
+
menuGroups: k,
|
|
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,35 +268,35 @@ 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 } = 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 }
|
|
281
281
|
});
|
|
282
282
|
t.isErr() && o.apiError(t.error);
|
|
283
283
|
}
|
|
284
|
-
}),
|
|
285
|
-
return
|
|
286
|
-
form: H(
|
|
284
|
+
}), h = m.register("subject");
|
|
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: U(() => [
|
|
289
|
+
default: U(() => [L(ve, {
|
|
290
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: H(
|
|
296
|
-
"subject-field": H(
|
|
295
|
+
icon: H(_),
|
|
296
|
+
"subject-field": H(h),
|
|
297
297
|
"subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
298
298
|
}, {
|
|
299
|
-
actions: U(() => [
|
|
299
|
+
actions: U(() => [L(k, {
|
|
300
300
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
301
301
|
"menu-groups": H(c),
|
|
302
302
|
"primary-buttons": H(l),
|
|
@@ -306,11 +306,11 @@ var Ke = /* @__PURE__ */ L({
|
|
|
306
306
|
"menu-groups",
|
|
307
307
|
"primary-buttons"
|
|
308
308
|
])]),
|
|
309
|
-
status: U(() => [
|
|
309
|
+
status: U(() => [L(H(q), {
|
|
310
310
|
gap: "xs",
|
|
311
311
|
class: "flex-wrap items-start"
|
|
312
312
|
}, {
|
|
313
|
-
default: U(() => [r.creditNote.isOverdue ? (
|
|
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 Ke = /* @__PURE__ */ L({
|
|
|
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
|
-
let n = e, r =
|
|
335
|
-
initialState: N(() =>
|
|
336
|
-
schema:
|
|
334
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
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,
|
|
@@ -342,11 +342,11 @@ var Ke = /* @__PURE__ */ L({
|
|
|
342
342
|
t.isErr() && i.apiError(t.error);
|
|
343
343
|
}
|
|
344
344
|
}), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
345
|
-
return
|
|
345
|
+
return O({ form: o }), (e, t) => (V(), P(H(K), {
|
|
346
346
|
form: H(o),
|
|
347
347
|
"prompt-on-unsaved-changes": !1
|
|
348
348
|
}, {
|
|
349
|
-
default: U(() => [
|
|
349
|
+
default: U(() => [L(se, {
|
|
350
350
|
"is-disabled": c.value,
|
|
351
351
|
placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
352
352
|
"remarks-field": H(s),
|
|
@@ -363,23 +363,23 @@ 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 $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 =
|
|
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
384
|
role: H(n).CREDIT_NOTE,
|
|
385
385
|
uuid: t.creditNote.uuid
|
|
@@ -400,7 +400,7 @@ var Ye = /* @__PURE__ */ L({
|
|
|
400
400
|
"is-loading"
|
|
401
401
|
]));
|
|
402
402
|
}
|
|
403
|
-
}), Q = /* @__PURE__ */
|
|
403
|
+
}), Q = /* @__PURE__ */ R({
|
|
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) => (
|
|
415
|
+
return (e, n) => (V(), P(H(q), null, {
|
|
416
416
|
default: U(() => [
|
|
417
|
-
(
|
|
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
|
-
}), $ = /* @__PURE__ */
|
|
433
|
+
}), $ = /* @__PURE__ */ R({
|
|
434
434
|
__name: "BillingDocumentDetailSidebarPartySection",
|
|
435
435
|
props: {
|
|
436
436
|
title: {},
|
|
@@ -442,41 +442,41 @@ var Ye = /* @__PURE__ */ L({
|
|
|
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: U(() => [
|
|
451
|
-
default: U(() => [
|
|
452
|
-
default: U(() => [
|
|
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: U(() => [n.value ? (
|
|
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: U(() => [
|
|
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
482
|
text: H(r).format(t.address),
|
|
@@ -489,56 +489,56 @@ var Ye = /* @__PURE__ */ L({
|
|
|
489
489
|
_: 1
|
|
490
490
|
}));
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), tt = /* @__PURE__ */ R({
|
|
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: N(() =>
|
|
501
|
-
schema:
|
|
499
|
+
let n = e, r = j(), i = Y(), a = Z(), o = X({
|
|
500
|
+
initialState: N(() => E.toForm(n.creditNote)),
|
|
501
|
+
schema: He,
|
|
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: H(
|
|
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: U(() => [
|
|
514
|
+
default: U(() => [L(H(G), {
|
|
515
515
|
gap: "lg",
|
|
516
516
|
class: "px-2xl py-xl"
|
|
517
517
|
}, {
|
|
518
518
|
default: U(() => [
|
|
519
|
-
|
|
520
|
-
default: U(() => [
|
|
519
|
+
L(H(G), null, {
|
|
520
|
+
default: U(() => [L(H(J), {
|
|
521
521
|
text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
|
|
522
522
|
class: "text-xs font-semibold text-primary"
|
|
523
|
-
}, null, 8, ["text"]),
|
|
523
|
+
}, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
|
|
524
524
|
default: U(() => [
|
|
525
|
-
|
|
526
|
-
icon: H(
|
|
525
|
+
L(Q, {
|
|
526
|
+
icon: H(g),
|
|
527
527
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
528
528
|
}, {
|
|
529
|
-
default: U(() => [
|
|
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: H(
|
|
537
|
-
"has-error": H(
|
|
535
|
+
L(Q, {
|
|
536
|
+
icon: H(b),
|
|
537
|
+
"has-error": H(f).errors.value.length > 0,
|
|
538
538
|
label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
539
539
|
}, {
|
|
540
|
-
default: U(() => [
|
|
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,40 +548,47 @@ var Ye = /* @__PURE__ */ L({
|
|
|
548
548
|
"has-error",
|
|
549
549
|
"label"
|
|
550
550
|
]),
|
|
551
|
-
|
|
552
|
-
icon: H(
|
|
551
|
+
L(Q, {
|
|
552
|
+
icon: H(x),
|
|
553
553
|
label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
554
554
|
}, {
|
|
555
|
-
default: U(() => [
|
|
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: H(
|
|
563
|
-
"has-error": H(
|
|
561
|
+
L(Q, {
|
|
562
|
+
icon: H(y),
|
|
563
|
+
"has-error": H(d).errors.value.length > 0,
|
|
564
564
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
565
565
|
}, {
|
|
566
|
-
default: U(() => [
|
|
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
|
-
I(
|
|
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
594
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
@@ -591,8 +598,8 @@ var Ye = /* @__PURE__ */ L({
|
|
|
591
598
|
"title",
|
|
592
599
|
"address"
|
|
593
600
|
]),
|
|
594
|
-
|
|
595
|
-
|
|
601
|
+
L(H(ze)),
|
|
602
|
+
L($, {
|
|
596
603
|
name: n.creditNote.issuer.email ?? "-",
|
|
597
604
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
598
605
|
address: n.creditNote.issuer.address
|
|
@@ -607,20 +614,20 @@ var Ye = /* @__PURE__ */ L({
|
|
|
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 =
|
|
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: U(() => [
|
|
623
|
-
info: U(() => [
|
|
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 Ye = /* @__PURE__ */ L({
|
|
|
630
637
|
});
|
|
631
638
|
//#endregion
|
|
632
639
|
//#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
|
|
633
|
-
function
|
|
640
|
+
function rt() {
|
|
634
641
|
return W({
|
|
635
|
-
queryFn: (e) =>
|
|
642
|
+
queryFn: (e) => T.updateLines(e.params.creditNoteUuid, e.body),
|
|
636
643
|
queryKeysToInvalidate: {
|
|
637
644
|
creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
|
|
638
645
|
invoiceIndex: {}
|
|
@@ -641,14 +648,14 @@ function Qe() {
|
|
|
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 = N(() => t.creditNote), r =
|
|
658
|
+
let t = e, n = N(() => t.creditNote), r = rt(), i = le({
|
|
652
659
|
isSaving: N(() => r.isLoading.value),
|
|
653
660
|
billingDocument: () => n.value,
|
|
654
661
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
@@ -657,24 +664,24 @@ var $e = /* @__PURE__ */ L({
|
|
|
657
664
|
params: { creditNoteUuid: t.creditNote.uuid }
|
|
658
665
|
})
|
|
659
666
|
});
|
|
660
|
-
return
|
|
667
|
+
return ae(i), (e, n) => (V(), P(fe, null, {
|
|
661
668
|
default: U(() => [
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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 =
|
|
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,31 +696,31 @@ var $e = /* @__PURE__ */ L({
|
|
|
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,
|
|
699
|
+
return (e, i) => (V(), P(me, {
|
|
693
700
|
"billing-document": t.creditNote,
|
|
694
|
-
breadcrumbs:
|
|
701
|
+
breadcrumbs: o.value,
|
|
695
702
|
title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
|
|
696
703
|
}, {
|
|
697
|
-
header: U(() => [
|
|
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
|
-
onTogglePdfView:
|
|
708
|
+
onTogglePdfView: i[0] ||= (e) => r.value = !r.value
|
|
702
709
|
}, null, 8, ["credit-note", "is-pdf-view-active"])]),
|
|
703
|
-
default: U(() => [r.value ? (
|
|
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
|
-
"custom-field-definitions":
|
|
710
|
-
}, null, 8, ["credit-note", "custom-field-definitions"]),
|
|
716
|
+
"custom-field-definitions": a.value
|
|
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: U(() => [
|
|
721
|
+
sidebar: U(() => [L(nt, {
|
|
715
722
|
"credit-note": t.creditNote,
|
|
716
|
-
"custom-field-definitions":
|
|
723
|
+
"custom-field-definitions": a.value
|
|
717
724
|
}, null, 8, ["credit-note", "custom-field-definitions"])]),
|
|
718
725
|
_: 1
|
|
719
726
|
}, 8, [
|
|
@@ -722,20 +729,20 @@ var $e = /* @__PURE__ */ L({
|
|
|
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 =
|
|
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": H(
|
|
739
|
+
}]), i = D(N(() => t.creditNoteUuid)), o = a();
|
|
740
|
+
return (e, t) => (V(), P(ge, {
|
|
741
|
+
"custom-field-definitions-query": H(o),
|
|
735
742
|
query: H(i),
|
|
736
743
|
"loading-breadcrumbs": r.value
|
|
737
744
|
}, {
|
|
738
|
-
default: U(({ billingDocument: e, customFieldDefinitions: t }) => [
|
|
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 $e = /* @__PURE__ */ L({
|
|
|
748
755
|
}
|
|
749
756
|
});
|
|
750
757
|
//#endregion
|
|
751
|
-
export {
|
|
758
|
+
export { ot as default };
|