@wisemen/wise-invoicing-web 0.2.0 → 0.3.1
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-D-qXZrPT.js → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-Dub07ybW.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-DgtUB45R.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-BxNfC6yO.js} +90 -90
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-D0j8qqK-.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-Cuhs9sRn.js} +26 -26
- package/dist/DunningCaseDetailViewDataProvider-ou1FfNWQ.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView--zaPD0-c.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js} +5 -4
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-Co4oLFtZ.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Bw-6rkon.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-IyzJ--TJ.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-8G-11W1e.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-B9gul2ei.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-5KgIdhfL.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-5sJ-u_gT.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-BLVXDPv6.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-CnhYazmB.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.js +47 -0
- package/dist/{InvoicingFileUploadProvider-D9Xk4rQM.js → InvoicingFileUploadProvider-Kcq7kSSt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-CGRa8F-2.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +3 -3
- package/dist/{ReminderSettingsViewDataProvider-1ucp3z2T.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +100 -102
- package/dist/{api.util-C_kMGlJN.js → api.util-CkIRZS3h.js} +985 -930
- package/dist/{billingDocumentDetail.transformer-Da6_-Hv9.js → billingDocumentDetail.transformer-Bfd8geNo.js} +5 -7
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +2 -1
- package/dist/client/types.gen.d.ts +114 -31
- package/dist/client/zod.gen.d.ts +343 -78
- package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
- package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
- package/dist/{creditNoteDetail.query-DLR7L0Ep.js → creditNoteDetail.query-tLnfqsEB.js} +27 -27
- package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
- package/dist/{dist-Cxdm09Lp.js → dist-BQbaoN5W.js} +144 -96
- package/dist/{dist-CoztMdYH.js → dist-CGZBUnWK.js} +62 -62
- package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
- package/dist/{documentTitle.composable-DsBbzhXN.js → documentTitle.composable-CRJjS6p-.js} +19 -17
- package/dist/{i18n.lib-Cvr8pcDw.js → i18n.lib--mzprLMR.js} +88 -54
- package/dist/index.d.ts +56 -22
- package/dist/index.js +193 -201
- package/dist/{invoice.service-DEEA9mal.js → invoice.service-B1w16_Md.js} +184 -172
- package/dist/{invoiceApproval.service-DvL3LliM.js → invoiceApproval.service-BHAJmFkU.js} +8 -8
- package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js} +42 -38
- package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
- package/dist/{invoiceDetail.query-CRoH_SgM.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
- package/dist/{invoiceDeliveryStatus.util-nCsqDypY.js → invoiceIndexCache.util-BDLs7W9m.js} +128 -51
- package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
- package/dist/{issuerSettings.query-Dc5gsaEm.js → issuerSettings.query-CDFk2GiP.js} +3 -2
- package/dist/libs/i18n.lib.d.ts +56 -22
- package/dist/locales/en-US.json.d.ts +44 -27
- package/dist/locales/nl-BE.json.d.ts +44 -27
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
- package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
- package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
- package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
- package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +8 -0
- package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +8 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +2 -3
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +2 -9
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
- package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +2 -3
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +2 -2
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +3 -1
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +7 -4
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +2 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +5 -6
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +0 -5
- package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
- package/dist/{reminderConfig.query-snaHQmrY.js → reminderConfig.query-DSO0ekC_.js} +112 -105
- package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
- package/package.json +3 -3
- package/dist/DunningCaseDetailViewDataProvider-DC-ziMoO.js +0 -409
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +0 -870
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +0 -161
- package/dist/InvoiceApproveDialog-2LXneG2r.js +0 -308
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +0 -318
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +0 -1620
- package/dist/customerUuid.model-GUFYq3O2.js +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-is-number-input=true][data-v-
|
|
1
|
+
[data-is-number-input=true][data-v-5bc38dfe]{appearance:textfield}[data-is-number-input=true][data-v-5bc38dfe]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[data-is-number-input=true][data-v-5bc38dfe]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[data-line-item-row].billing-document-line-items-table-row--ghost>td[data-v-afb742d9]{background-color:var(--bg-secondary);box-shadow:inset 0 2px 0 0 var(--border-brand)}[data-line-item-row].billing-document-line-items-table-row--ghost>td[data-v-afb742d9]>*{opacity:.4}[data-drop-intent=group] [data-line-item-row].billing-document-line-items-table-row--ghost>td[data-v-afb742d9]{transform:translateX(var(--spacing-xl))}[data-line-item-row].billing-document-line-items-table-row--chosen>td[data-v-afb742d9],[data-line-item-row].billing-document-line-items-table-row--drag>td[data-v-afb742d9],[data-line-item-row].billing-document-line-items-table-row--fallback>td[data-v-afb742d9]{background-color:var(--bg-primary)}[data-line-item-row].billing-document-line-items-table-row--fallback[data-v-afb742d9]{table-layout:fixed;box-shadow:var(--shadow-lg);pointer-events:none;display:table}[data-line-item-row].billing-document-line-items-table-row--chosen [data-line-item-drag-handle][data-v-afb742d9],[data-line-item-row].billing-document-line-items-table-row--drag [data-line-item-drag-handle][data-v-afb742d9],[data-line-item-row].billing-document-line-items-table-row--fallback [data-line-item-drag-handle][data-v-afb742d9]{color:var(--text-secondary);cursor:grabbing;opacity:1}@media (prefers-reduced-motion:no-preference){[data-line-item-row][data-appearing]>td[data-v-afb742d9]{animation:.22s ease-out billing-document-line-item-appear-afb742d9}@keyframes billing-document-line-item-appear-afb742d9{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:none}}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { b as e,
|
|
3
|
-
import { n } from "./invoicingConfig.composable-
|
|
1
|
+
import "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { b as e, x as t } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
|
+
import { n } from "./invoicingConfig.composable-COn1rKRf.js";
|
|
4
4
|
import { n as r } from "./address.transformer-jGddczLV.js";
|
|
5
|
-
import {
|
|
5
|
+
import { st as i } from "./dist-BQbaoN5W.js";
|
|
6
6
|
import { useI18n as a } from "vue-i18n";
|
|
7
7
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
8
8
|
import { UIColumnLayout as S, UIRowLayout as C, UIText as w } from "@wisemen/vue-core-design-system";
|
|
@@ -268,8 +268,8 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
268
268
|
invoice: {},
|
|
269
269
|
pageType: {}
|
|
270
270
|
},
|
|
271
|
-
setup(
|
|
272
|
-
let r =
|
|
271
|
+
setup(e) {
|
|
272
|
+
let r = e, d = a(), f = n(), m = s(() => d.locale.value || "en-US"), h = s(() => r.invoice.type === t.CREDIT_NOTE), v = s(() => h.value ? r.invoice.sequence === null ? d.t("wise_invoicing.credit_note.detail.fallback_title") : `${d.t("wise_invoicing.invoice.type.credit_note")} ${r.invoice.sequence}` : r.invoice.sequence ?? d.t("wise_invoicing.invoice.detail.fallback_title")), y = s(() => {
|
|
273
273
|
let e = r.invoice.originalInvoice?.sequence;
|
|
274
274
|
return !h.value || r.pageType !== "first" || e === null ? null : `${d.t("wise_invoicing.invoice.type.standard")} ${e}`;
|
|
275
275
|
}), T = s(() => (r.invoice.issuer.name ?? d.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), E = s(() => I.getAddressLines(r.invoice.customer.address)), D = s(() => {
|
|
@@ -560,8 +560,8 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
560
560
|
hasLines: { type: Boolean },
|
|
561
561
|
invoice: {}
|
|
562
562
|
},
|
|
563
|
-
setup(
|
|
564
|
-
let n =
|
|
563
|
+
setup(e) {
|
|
564
|
+
let n = e, r = a(), i = s(() => r.locale.value || "en-US"), c = s(() => n.invoice.type === t.CREDIT_NOTE);
|
|
565
565
|
function f(e) {
|
|
566
566
|
return {
|
|
567
567
|
...e,
|
|
@@ -682,15 +682,19 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
682
682
|
class: "pointer-events-none absolute inset-0 flex transform-[rotate(-34deg)] items-center justify-center text-[42mm] leading-none font-bold whitespace-nowrap text-primary uppercase opacity-[0.05] select-none"
|
|
683
683
|
}, oe = /* @__PURE__ */ m({
|
|
684
684
|
__name: "InvoicePdfWatermark",
|
|
685
|
+
props: { label: {} },
|
|
685
686
|
setup(e) {
|
|
686
|
-
let t = a();
|
|
687
|
-
return (e,
|
|
687
|
+
let t = e, n = a();
|
|
688
|
+
return (e, r) => (g(), u("div", ae, y(t.label ?? b(n).t("wise_invoicing.invoice.status.draft")), 1));
|
|
688
689
|
}
|
|
689
690
|
}), se = { class: "absolute right-9 bottom-9 text-xs leading-none font-medium text-tertiary" }, ce = /* @__PURE__ */ m({
|
|
690
691
|
__name: "BillingDocumentPdf",
|
|
691
|
-
props: {
|
|
692
|
+
props: {
|
|
693
|
+
billingDocument: {},
|
|
694
|
+
watermark: {}
|
|
695
|
+
},
|
|
692
696
|
setup(n) {
|
|
693
|
-
let r = n, i = s(() => r.billingDocument.status ===
|
|
697
|
+
let r = n, i = s(() => r.billingDocument.status === e.DRAFT || r.billingDocument.status === e.READY), a = s(() => r.billingDocument.type === t.CREDIT_NOTE), f = s(() => I.buildRows(r.billingDocument, { isCreditNote: a.value })), m = s(() => {
|
|
694
698
|
let e = I.paginateRows(f.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
|
|
695
699
|
return e.map((t, n) => ({
|
|
696
700
|
isLastPage: n === e.length - 1,
|
|
@@ -702,7 +706,10 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
702
706
|
key: `invoice-pdf-page-${t}`,
|
|
703
707
|
class: h([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"])
|
|
704
708
|
}, [
|
|
705
|
-
i.value ? (g(), c(oe, {
|
|
709
|
+
i.value ? (g(), c(oe, {
|
|
710
|
+
key: 0,
|
|
711
|
+
label: r.watermark
|
|
712
|
+
}, null, 8, ["label"])) : l("", !0),
|
|
706
713
|
p(R, {
|
|
707
714
|
invoice: r.billingDocument,
|
|
708
715
|
"page-type": e.headerType
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "./i18n.lib--mzprLMR.js";
|
|
2
|
+
import "./api.util-CkIRZS3h.js";
|
|
3
|
+
import { b as t, r as n } from "./documentTitle.composable-CRJjS6p-.js";
|
|
4
4
|
import { n as r } from "./address.transformer-jGddczLV.js";
|
|
5
5
|
import { t as i } from "./download.util-B5Q7KUC9.js";
|
|
6
|
-
import {
|
|
7
|
-
import { n as _, t as v } from "./dist-
|
|
6
|
+
import { $ as a, K as o, L as s, N as c, O as l, W as u, dt as d, g as f, i as p, j as m, l as h, y as g } from "./dist-BQbaoN5W.js";
|
|
7
|
+
import { n as _, t as v } from "./dist-Cdbpkd3Y.js";
|
|
8
8
|
import { t as y } from "./formango.util-D5c2ql--.js";
|
|
9
|
-
import { i as b, n as ee } from "./CustomFieldValueText-
|
|
10
|
-
import { n as x, r as S, t as C } from "./creditNoteDetail.query-
|
|
11
|
-
import { C as w, S as T, _ as E, a as D, b as te, c as O, d as k, f as A, g as ne, h as re, i as ie, m as ae, n as oe, o as se, p as ce, r as le, s as ue, t as de, u as fe, v as pe, x as me, y as he } from "./BillingDocumentDetailViewDataProvider-
|
|
12
|
-
import { r as ge } from "./InvoicingFileUploadProvider-
|
|
9
|
+
import { i as b, n as ee } from "./CustomFieldValueText-Cuhs9sRn.js";
|
|
10
|
+
import { n as x, r as S, t as C } from "./creditNoteDetail.query-tLnfqsEB.js";
|
|
11
|
+
import { C as w, S as T, _ as E, a as D, b as te, c as O, d as k, f as A, g as ne, h as re, i as ie, m as ae, n as oe, o as se, p as ce, r as le, s as ue, t as de, u as fe, v as pe, x as me, y as he } from "./BillingDocumentDetailViewDataProvider-Dub07ybW.js";
|
|
12
|
+
import { r as ge } from "./InvoicingFileUploadProvider-Kcq7kSSt.js";
|
|
13
13
|
import _e, { z as j } from "zod";
|
|
14
14
|
import { useI18n as M } from "vue-i18n";
|
|
15
15
|
import { Fragment as ve, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as ye, createElementVNode as be, createVNode as I, defineComponent as L, mergeProps as R, normalizeClass as z, openBlock as B, ref as V, renderSlot as xe, resolveDynamicComponent as Se, unref as H, withCtx as U } from "vue";
|
|
@@ -120,7 +120,7 @@ var We = /* @__PURE__ */ L({
|
|
|
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
122
|
}, null, 8, ["title", "description"]), I(H(ke), null, {
|
|
123
|
-
right: U(() => [I(H(Ae)
|
|
123
|
+
right: U(() => [I(H(Ae)), I(H(je), {
|
|
124
124
|
"is-destructive": !0,
|
|
125
125
|
label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
|
|
126
126
|
}, null, 8, ["label"])]),
|
|
@@ -133,66 +133,66 @@ var We = /* @__PURE__ */ L({
|
|
|
133
133
|
//#endregion
|
|
134
134
|
//#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
|
|
135
135
|
function Ge(e) {
|
|
136
|
-
let
|
|
136
|
+
let n = M(), r = Y(), a = Ie(), o = a.create(We), s = a.create(te), u = ze(), f = Be(), h = Ve(), _ = He(), { shouldSkipConfirmation: v } = me(), y = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), b = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
|
|
137
137
|
async function S() {
|
|
138
|
-
let
|
|
138
|
+
let t = await h.execute({ params: {
|
|
139
139
|
creditNoteUuid: e.value.uuid,
|
|
140
140
|
invoiceUuid: y.value
|
|
141
141
|
} });
|
|
142
|
-
if (
|
|
143
|
-
r.apiError(
|
|
142
|
+
if (t.isErr()) {
|
|
143
|
+
r.apiError(t.error);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
r.show({ message:
|
|
146
|
+
r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
|
|
147
147
|
}
|
|
148
148
|
async function C() {
|
|
149
|
-
let
|
|
149
|
+
let t = await u.execute({ params: {
|
|
150
150
|
creditNoteUuid: e.value.uuid,
|
|
151
151
|
invoiceUuid: y.value
|
|
152
152
|
} });
|
|
153
|
-
return
|
|
153
|
+
return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
|
|
154
154
|
}
|
|
155
155
|
async function w() {
|
|
156
156
|
if (v.value) {
|
|
157
157
|
await C();
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
await
|
|
160
|
+
await s.open({
|
|
161
161
|
billingDocumentType: "credit_note",
|
|
162
162
|
onConfirm: C
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
async function T() {
|
|
166
|
-
let
|
|
166
|
+
let t = await f.execute({ params: {
|
|
167
167
|
creditNoteUuid: e.value.uuid,
|
|
168
168
|
invoiceUuid: y.value
|
|
169
169
|
} });
|
|
170
|
-
if (
|
|
171
|
-
r.apiError(
|
|
170
|
+
if (t.isErr()) {
|
|
171
|
+
r.apiError(t.error);
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
174
|
-
r.show({ message:
|
|
174
|
+
r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
|
|
175
175
|
}
|
|
176
176
|
async function E() {
|
|
177
|
-
let
|
|
178
|
-
if (
|
|
179
|
-
r.apiError(
|
|
177
|
+
let t = await _.execute({ params: { creditNoteUuid: e.value.uuid } });
|
|
178
|
+
if (t.isErr()) {
|
|
179
|
+
r.apiError(t.error);
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
r.show({ message:
|
|
182
|
+
r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
|
|
183
183
|
}
|
|
184
184
|
async function D() {
|
|
185
|
-
await
|
|
185
|
+
await o.open({ creditNote: e.value });
|
|
186
186
|
}
|
|
187
187
|
async function O() {
|
|
188
|
-
let
|
|
189
|
-
if (
|
|
190
|
-
r.apiError(
|
|
188
|
+
let t = await x.getByUuid(e.value.uuid);
|
|
189
|
+
if (t.isErr()) {
|
|
190
|
+
r.apiError(t.error);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
let a =
|
|
193
|
+
let a = t.value.file;
|
|
194
194
|
if (a === null) {
|
|
195
|
-
r.show({ message:
|
|
195
|
+
r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
let o = await ge.getDownloadUrl(a.uuid);
|
|
@@ -203,44 +203,44 @@ function Ge(e) {
|
|
|
203
203
|
isLoading: _.isLoading.value,
|
|
204
204
|
iconLeft: d,
|
|
205
205
|
key: "send",
|
|
206
|
-
label:
|
|
206
|
+
label: n.t("wise_invoicing.invoice.detail.actions.send"),
|
|
207
207
|
variant: "primary",
|
|
208
|
-
visible: e.value.status ===
|
|
208
|
+
visible: e.value.status === t.FINALIZED,
|
|
209
209
|
onClick: E
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
|
-
isLoading:
|
|
212
|
+
isLoading: h.isLoading.value,
|
|
213
213
|
iconRight: p,
|
|
214
214
|
key: "markAsReady",
|
|
215
|
-
label:
|
|
216
|
-
visible: e.value.status ===
|
|
215
|
+
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
216
|
+
visible: e.value.status === t.DRAFT,
|
|
217
217
|
onClick: S
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
isLoading:
|
|
221
|
-
iconRight:
|
|
220
|
+
isLoading: u.isLoading.value,
|
|
221
|
+
iconRight: l,
|
|
222
222
|
key: "finalize",
|
|
223
|
-
label:
|
|
224
|
-
visible: e.value.status ===
|
|
223
|
+
label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
224
|
+
visible: e.value.status === t.READY,
|
|
225
225
|
onClick: w
|
|
226
226
|
}
|
|
227
227
|
].filter((e) => e.visible)), A = N(() => {
|
|
228
228
|
let r = [{
|
|
229
|
-
icon:
|
|
229
|
+
icon: g,
|
|
230
230
|
key: "downloadPdf",
|
|
231
|
-
label:
|
|
231
|
+
label: n.t("wise_invoicing.common.download_pdf"),
|
|
232
232
|
visible: b.value,
|
|
233
233
|
onSelect: O
|
|
234
234
|
}, {
|
|
235
|
-
icon:
|
|
235
|
+
icon: c,
|
|
236
236
|
key: "backToDraft",
|
|
237
|
-
label:
|
|
238
|
-
visible: e.value.status ===
|
|
237
|
+
label: n.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
238
|
+
visible: e.value.status === t.READY,
|
|
239
239
|
onSelect: T
|
|
240
240
|
}], i = [{
|
|
241
|
-
icon:
|
|
241
|
+
icon: m,
|
|
242
242
|
key: "delete",
|
|
243
|
-
label:
|
|
243
|
+
label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
|
|
244
244
|
visible: ee.isEditable(e.value.status),
|
|
245
245
|
onSelect: D
|
|
246
246
|
}];
|
|
@@ -267,19 +267,19 @@ var Ke = /* @__PURE__ */ L({
|
|
|
267
267
|
creditNote: {}
|
|
268
268
|
},
|
|
269
269
|
emits: ["togglePdfView"],
|
|
270
|
-
setup(e, { emit:
|
|
271
|
-
let r = e, i =
|
|
270
|
+
setup(e, { emit: n }) {
|
|
271
|
+
let r = e, i = n, o = M(), s = Y(), c = Z(), { menuGroups: l, primaryButtons: u } = Ge(N(() => r.creditNote)), d = N(() => new T(r.creditNote.status)), f = N(() => d.value.color), p = N(() => o.t(d.value.translationKey)), m = N(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), h = X({
|
|
272
272
|
initialState: { subject: r.creditNote.subject },
|
|
273
273
|
schema: Re,
|
|
274
274
|
onSubmit: async (e) => {
|
|
275
|
-
let t = await
|
|
275
|
+
let t = await c.execute({
|
|
276
276
|
body: {
|
|
277
277
|
...S.toForm(r.creditNote),
|
|
278
278
|
subject: e.subject
|
|
279
279
|
},
|
|
280
280
|
params: { creditNoteUuid: r.creditNote.uuid }
|
|
281
281
|
});
|
|
282
|
-
t.isErr() &&
|
|
282
|
+
t.isErr() && s.apiError(t.error);
|
|
283
283
|
}
|
|
284
284
|
}), g = h.register("subject");
|
|
285
285
|
return w({ form: h }), (e, t) => (B(), P(H(K), {
|
|
@@ -287,18 +287,18 @@ var Ke = /* @__PURE__ */ L({
|
|
|
287
287
|
"prompt-on-unsaved-changes": !1
|
|
288
288
|
}, {
|
|
289
289
|
default: U(() => [I(pe, {
|
|
290
|
-
"fallback-title": H(
|
|
290
|
+
"fallback-title": H(o).t("wise_invoicing.credit_note.detail.fallback_title"),
|
|
291
291
|
"is-disabled": m.value,
|
|
292
292
|
sequence: r.creditNote.sequence,
|
|
293
293
|
"status-color": f.value,
|
|
294
294
|
"status-label": p.value,
|
|
295
|
-
icon: H(
|
|
295
|
+
icon: H(a),
|
|
296
296
|
"subject-field": H(g),
|
|
297
|
-
"subject-placeholder": H(
|
|
297
|
+
"subject-placeholder": H(o).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
298
298
|
}, {
|
|
299
299
|
actions: U(() => [I(E, {
|
|
300
300
|
"is-pdf-view-active": r.isPdfViewActive,
|
|
301
|
-
"menu-groups": H(
|
|
301
|
+
"menu-groups": H(l),
|
|
302
302
|
"primary-buttons": H(u),
|
|
303
303
|
onTogglePdfView: t[0] ||= (e) => i("togglePdfView")
|
|
304
304
|
}, null, 8, [
|
|
@@ -331,17 +331,17 @@ var Ke = /* @__PURE__ */ L({
|
|
|
331
331
|
__name: "CreditNoteDetailRemarksSection",
|
|
332
332
|
props: { creditNote: {} },
|
|
333
333
|
setup(e) {
|
|
334
|
-
let
|
|
335
|
-
initialState: N(() => S.toForm(
|
|
334
|
+
let n = e, r = M(), i = Y(), a = Z(), o = X({
|
|
335
|
+
initialState: N(() => S.toForm(n.creditNote)),
|
|
336
336
|
schema: Le,
|
|
337
337
|
onSubmit: async (e) => {
|
|
338
|
-
let
|
|
338
|
+
let t = await a.execute({
|
|
339
339
|
body: e,
|
|
340
|
-
params: { creditNoteUuid:
|
|
340
|
+
params: { creditNoteUuid: n.creditNote.uuid }
|
|
341
341
|
});
|
|
342
|
-
|
|
342
|
+
t.isErr() && i.apiError(t.error);
|
|
343
343
|
}
|
|
344
|
-
}), s = o.register("externalRemarks"), c = N(() =>
|
|
344
|
+
}), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
345
345
|
return w({ form: o }), (e, t) => (B(), P(H(K), {
|
|
346
346
|
form: H(o),
|
|
347
347
|
"prompt-on-unsaved-changes": !1
|
|
@@ -375,14 +375,14 @@ var Ye = /* @__PURE__ */ L({
|
|
|
375
375
|
__name: "CreditNoteDetailSidebarActivityTab",
|
|
376
376
|
props: { creditNote: {} },
|
|
377
377
|
setup(e) {
|
|
378
|
-
let
|
|
378
|
+
let t = e, r = M(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = Je(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
|
|
379
379
|
data: [],
|
|
380
380
|
meta: { next: null }
|
|
381
381
|
}).data);
|
|
382
382
|
return (e, c) => (B(), P(re, {
|
|
383
383
|
"current-billing-document": {
|
|
384
|
-
role: H(
|
|
385
|
-
uuid:
|
|
384
|
+
role: H(n).CREDIT_NOTE,
|
|
385
|
+
uuid: t.creditNote.uuid
|
|
386
386
|
},
|
|
387
387
|
"empty-message": H(r).t("wise_invoicing.credit_note.detail.sidebar.activity_empty"),
|
|
388
388
|
entries: l.value,
|
|
@@ -463,7 +463,7 @@ var Ye = /* @__PURE__ */ L({
|
|
|
463
463
|
color: "gray",
|
|
464
464
|
variant: "outline"
|
|
465
465
|
}, null, 8, ["label"]),
|
|
466
|
-
I(H(
|
|
466
|
+
I(H(o), { class: z([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
|
|
467
467
|
])]),
|
|
468
468
|
_: 1
|
|
469
469
|
})]),
|
|
@@ -496,19 +496,19 @@ var Ye = /* @__PURE__ */ L({
|
|
|
496
496
|
customFieldDefinitions: {}
|
|
497
497
|
},
|
|
498
498
|
setup(e) {
|
|
499
|
-
let
|
|
500
|
-
initialState: N(() => S.toForm(
|
|
499
|
+
let n = e, r = M(), i = Y(), a = Z(), o = X({
|
|
500
|
+
initialState: N(() => S.toForm(n.creditNote)),
|
|
501
501
|
schema: Le,
|
|
502
502
|
onSubmit: async (e) => {
|
|
503
|
-
let
|
|
503
|
+
let t = await a.execute({
|
|
504
504
|
body: e,
|
|
505
|
-
params: { creditNoteUuid:
|
|
505
|
+
params: { creditNoteUuid: n.creditNote.uuid }
|
|
506
506
|
});
|
|
507
|
-
|
|
507
|
+
t.isErr() && i.apiError(t.error);
|
|
508
508
|
}
|
|
509
|
-
}),
|
|
510
|
-
return w({ form:
|
|
511
|
-
form: H(
|
|
509
|
+
}), c = o.register("issuedOn"), l = o.register("poNumber"), d = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
|
|
510
|
+
return w({ form: o }), (e, t) => (B(), P(H(K), {
|
|
511
|
+
form: H(o),
|
|
512
512
|
"prompt-on-unsaved-changes": !1
|
|
513
513
|
}, {
|
|
514
514
|
default: U(() => [I(H(G), {
|
|
@@ -527,17 +527,17 @@ var Ye = /* @__PURE__ */ L({
|
|
|
527
527
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
528
528
|
}, {
|
|
529
529
|
default: U(() => [I(H(J), {
|
|
530
|
-
text:
|
|
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
535
|
I(Q, {
|
|
536
|
-
icon: H(
|
|
537
|
-
"has-error": H(
|
|
536
|
+
icon: H(s),
|
|
537
|
+
"has-error": H(l).errors.value.length > 0,
|
|
538
538
|
label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
|
|
539
539
|
}, {
|
|
540
|
-
default: U(() => [I(H(Fe), R(H(y)(H(
|
|
540
|
+
default: U(() => [I(H(Fe), R(H(y)(H(l)), {
|
|
541
541
|
"is-disabled": d.value,
|
|
542
542
|
label: null,
|
|
543
543
|
class: "w-full"
|
|
@@ -549,21 +549,21 @@ var Ye = /* @__PURE__ */ L({
|
|
|
549
549
|
"label"
|
|
550
550
|
]),
|
|
551
551
|
I(Q, {
|
|
552
|
-
icon: H(
|
|
552
|
+
icon: H(h),
|
|
553
553
|
label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
|
|
554
554
|
}, {
|
|
555
555
|
default: U(() => [I(H(J), {
|
|
556
|
-
text:
|
|
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
561
|
I(Q, {
|
|
562
|
-
icon: H(
|
|
563
|
-
"has-error": H(
|
|
562
|
+
icon: H(u),
|
|
563
|
+
"has-error": H(c).errors.value.length > 0,
|
|
564
564
|
label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
565
565
|
}, {
|
|
566
|
-
default: U(() => [I(H(Oe), R({ "is-disabled": d.value }, H(y)(H(
|
|
566
|
+
default: U(() => [I(H(Oe), R({ "is-disabled": d.value }, H(y)(H(c))), null, 16, ["is-disabled"])]),
|
|
567
567
|
_: 1
|
|
568
568
|
}, 8, [
|
|
569
569
|
"icon",
|
|
@@ -571,8 +571,8 @@ var Ye = /* @__PURE__ */ L({
|
|
|
571
571
|
"label"
|
|
572
572
|
]),
|
|
573
573
|
I(ae, {
|
|
574
|
-
definitions:
|
|
575
|
-
values:
|
|
574
|
+
definitions: n.customFieldDefinitions,
|
|
575
|
+
values: n.creditNote.customFields
|
|
576
576
|
}, null, 8, ["definitions", "values"])
|
|
577
577
|
]),
|
|
578
578
|
_: 1
|
|
@@ -580,12 +580,12 @@ var Ye = /* @__PURE__ */ L({
|
|
|
580
580
|
_: 1
|
|
581
581
|
}),
|
|
582
582
|
I(H(Pe)),
|
|
583
|
-
I(ce, { "original-invoice":
|
|
583
|
+
I(ce, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
|
|
584
584
|
I($, {
|
|
585
585
|
"is-default-open": !0,
|
|
586
|
-
name:
|
|
586
|
+
name: n.creditNote.customer.name ?? "-",
|
|
587
587
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
588
|
-
address:
|
|
588
|
+
address: n.creditNote.customer.address
|
|
589
589
|
}, null, 8, [
|
|
590
590
|
"name",
|
|
591
591
|
"title",
|
|
@@ -593,9 +593,9 @@ var Ye = /* @__PURE__ */ L({
|
|
|
593
593
|
]),
|
|
594
594
|
I(H(Pe)),
|
|
595
595
|
I($, {
|
|
596
|
-
name:
|
|
596
|
+
name: n.creditNote.issuer.email ?? "-",
|
|
597
597
|
title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
598
|
-
address:
|
|
598
|
+
address: n.creditNote.issuer.address
|
|
599
599
|
}, null, 8, [
|
|
600
600
|
"name",
|
|
601
601
|
"title",
|
package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-D0j8qqK-.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./DataProvider-C3uEds9v.js";
|
|
2
|
-
import { t } from "./InvoicePdfView-
|
|
3
|
-
import { t as n } from "./creditNoteDetail.query-
|
|
2
|
+
import { t } from "./InvoicePdfView-5sJ-u_gT.js";
|
|
3
|
+
import { t as n } from "./creditNoteDetail.query-tLnfqsEB.js";
|
|
4
4
|
import { useI18n as r } from "vue-i18n";
|
|
5
5
|
import { computed as i, createBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, openBlock as l, unref as u, withCtx as d } from "vue";
|
|
6
6
|
import { UIText as f } from "@wisemen/vue-core-design-system";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Y as e, t } from "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { b as n, u as r, y as i } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { n as o } from "./dist-
|
|
4
|
+
import { n as o } from "./dist-Cdbpkd3Y.js";
|
|
5
5
|
import { useI18n as s } from "vue-i18n";
|
|
6
6
|
import { computed as c, createBlock as l, defineComponent as u, normalizeClass as d, openBlock as f, unref as p } from "vue";
|
|
7
7
|
import { useQuery as m } from "@wisemen/vue-core-api-utils";
|
|
@@ -56,7 +56,7 @@ var y = class {
|
|
|
56
56
|
return i?.value ?? a?.value ?? e.items[0]?.value ?? "";
|
|
57
57
|
}
|
|
58
58
|
}, b = {
|
|
59
|
-
[
|
|
59
|
+
[n.CREDITED]: {
|
|
60
60
|
isEditable: !1,
|
|
61
61
|
isRefreshable: !1,
|
|
62
62
|
isTerminal: !0,
|
|
@@ -64,7 +64,7 @@ var y = class {
|
|
|
64
64
|
tone: "success",
|
|
65
65
|
translationKey: "wise_invoicing.invoice.status.credited"
|
|
66
66
|
},
|
|
67
|
-
[
|
|
67
|
+
[n.DRAFT]: {
|
|
68
68
|
isEditable: !0,
|
|
69
69
|
isRefreshable: !1,
|
|
70
70
|
isTerminal: !1,
|
|
@@ -72,7 +72,7 @@ var y = class {
|
|
|
72
72
|
tone: "gray",
|
|
73
73
|
translationKey: "wise_invoicing.invoice.status.draft"
|
|
74
74
|
},
|
|
75
|
-
[
|
|
75
|
+
[n.FINALIZED]: {
|
|
76
76
|
isEditable: !1,
|
|
77
77
|
isRefreshable: !0,
|
|
78
78
|
isTerminal: !1,
|
|
@@ -80,7 +80,7 @@ var y = class {
|
|
|
80
80
|
tone: "brand",
|
|
81
81
|
translationKey: "wise_invoicing.invoice.status.finalized"
|
|
82
82
|
},
|
|
83
|
-
[
|
|
83
|
+
[n.OVERDUE]: {
|
|
84
84
|
isEditable: !1,
|
|
85
85
|
isRefreshable: !0,
|
|
86
86
|
isTerminal: !1,
|
|
@@ -92,7 +92,7 @@ var y = class {
|
|
|
92
92
|
tone: "error",
|
|
93
93
|
translationKey: "wise_invoicing.invoice.status.overdue"
|
|
94
94
|
},
|
|
95
|
-
[
|
|
95
|
+
[n.OVERPAID]: {
|
|
96
96
|
isEditable: !1,
|
|
97
97
|
isRefreshable: !1,
|
|
98
98
|
isTerminal: !0,
|
|
@@ -100,7 +100,7 @@ var y = class {
|
|
|
100
100
|
tone: "warning",
|
|
101
101
|
translationKey: "wise_invoicing.invoice.status.overpaid"
|
|
102
102
|
},
|
|
103
|
-
[
|
|
103
|
+
[n.PAID]: {
|
|
104
104
|
isEditable: !1,
|
|
105
105
|
isRefreshable: !1,
|
|
106
106
|
isTerminal: !0,
|
|
@@ -108,7 +108,7 @@ var y = class {
|
|
|
108
108
|
tone: "success",
|
|
109
109
|
translationKey: "wise_invoicing.invoice.status.paid"
|
|
110
110
|
},
|
|
111
|
-
[
|
|
111
|
+
[n.PROTESTED]: {
|
|
112
112
|
isEditable: !1,
|
|
113
113
|
isRefreshable: !0,
|
|
114
114
|
isTerminal: !1,
|
|
@@ -120,7 +120,7 @@ var y = class {
|
|
|
120
120
|
tone: "warning",
|
|
121
121
|
translationKey: "wise_invoicing.invoice.status.protested"
|
|
122
122
|
},
|
|
123
|
-
[
|
|
123
|
+
[n.READY]: {
|
|
124
124
|
isEditable: !0,
|
|
125
125
|
isRefreshable: !1,
|
|
126
126
|
isTerminal: !1,
|
|
@@ -128,7 +128,7 @@ var y = class {
|
|
|
128
128
|
tone: "blue",
|
|
129
129
|
translationKey: "wise_invoicing.invoice.status.ready"
|
|
130
130
|
},
|
|
131
|
-
[
|
|
131
|
+
[n.SENT]: {
|
|
132
132
|
isEditable: !1,
|
|
133
133
|
isRefreshable: !0,
|
|
134
134
|
isTerminal: !1,
|
|
@@ -141,9 +141,9 @@ var y = class {
|
|
|
141
141
|
translationKey: "wise_invoicing.invoice.status.sent"
|
|
142
142
|
}
|
|
143
143
|
}, x = {
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
144
|
+
[i.DRAFT]: b[n.DRAFT],
|
|
145
|
+
[i.FINALIZED]: b[n.FINALIZED],
|
|
146
|
+
[i.READY]: b[n.READY]
|
|
147
147
|
}, S = class {
|
|
148
148
|
static getLifecycleMetadata(e) {
|
|
149
149
|
return x[e];
|
|
@@ -162,22 +162,22 @@ var y = class {
|
|
|
162
162
|
value: {}
|
|
163
163
|
},
|
|
164
164
|
setup(e) {
|
|
165
|
-
let t = e,
|
|
165
|
+
let t = e, n = s(), i = a(), u = o(), m = c(() => {
|
|
166
166
|
switch (t.value.type) {
|
|
167
|
-
case
|
|
168
|
-
case
|
|
169
|
-
case
|
|
170
|
-
case
|
|
171
|
-
case
|
|
172
|
-
case
|
|
173
|
-
case
|
|
174
|
-
case
|
|
175
|
-
case
|
|
167
|
+
case r.BOOLEAN: return t.value.value ? n.t("wise_invoicing.common.yes") : n.t("wise_invoicing.common.no");
|
|
168
|
+
case r.DATE: return t.value.value === "infinity" ? n.t("wise_invoicing.custom_field.date.infinity") : t.value.value === "-infinity" ? n.t("wise_invoicing.custom_field.date.negative_infinity") : u.formatPlainDate(t.value.value);
|
|
169
|
+
case r.MONETARY: return i.formatMonetary(t.value.value);
|
|
170
|
+
case r.MULTI_SELECT: return t.value.value.map((e) => _(e)).join(", ");
|
|
171
|
+
case r.NUMBER: return new Intl.NumberFormat(n.locale.value, { maximumFractionDigits: 20 }).format(t.value.value);
|
|
172
|
+
case r.SINGLE_SELECT: return _(t.value.value);
|
|
173
|
+
case r.TEXT: return t.value.value;
|
|
174
|
+
case r.TEXT_ARRAY: return t.value.value.join(", ");
|
|
175
|
+
case r.TIMESTAMP: return u.toDateTime(t.value.value);
|
|
176
176
|
default: throw TypeError("Unsupported custom field value type");
|
|
177
177
|
}
|
|
178
178
|
}), g = c(() => t.size === "md" ? "min-w-0 text-sm/5 text-primary" : "min-w-0 text-xs text-primary");
|
|
179
179
|
function _(e) {
|
|
180
|
-
return t.definition === void 0 ? e : y.getChoiceLabel(t.definition, e,
|
|
180
|
+
return t.definition === void 0 ? e : y.getChoiceLabel(t.definition, e, n.locale.value);
|
|
181
181
|
}
|
|
182
182
|
return (e, t) => (f(), l(p(h), {
|
|
183
183
|
text: m.value || "-",
|