@wisemen/wise-invoicing-web 0.2.0 → 0.3.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-D-qXZrPT.js → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-TJUwMhtn.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-PU9Ldfhs.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-DOPmal5D.js} +89 -89
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-BH7MaReQ.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-BjRVovZL.js} +25 -25
- package/dist/DunningCaseDetailViewDataProvider-CW8ijY3H.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView-Cfo-4VIw.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js} +4 -3
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-BYFXJYMM.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Cjdu9iZC.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-CcX8agTF.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-4wNAetBn.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-C9O3hXGo.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-DBdw7FvZ.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-CvU9bRVd.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-CFjHQ58K.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-DDv-LdBU.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.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-BD7Allff.js} +143 -95
- package/dist/{dist-CoztMdYH.js → dist-D5agTXFI.js} +61 -61
- 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-jHsrFwcA.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 +2 -2
- 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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as e, t, tt as n, z as r } from "./api.util-CkIRZS3h.js";
|
|
2
2
|
import { n as i, r as a, t as o } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
3
|
-
import { t as s } from "./invoiceApprovalStatus.util-
|
|
3
|
+
import { t as s } from "./invoiceApprovalStatus.util-DohOKR4q.js";
|
|
4
4
|
//#region src/modules/invoice-approval/models/approvalReminderConfig.transformer.ts
|
|
5
5
|
var c = class {
|
|
6
6
|
static toDto(e) {
|
|
@@ -43,7 +43,7 @@ var c = class {
|
|
|
43
43
|
}
|
|
44
44
|
}, u = class {
|
|
45
45
|
static toDto(e) {
|
|
46
|
-
let t = {
|
|
46
|
+
let t = {};
|
|
47
47
|
if (e.filters?.approvalStatus) {
|
|
48
48
|
let n = s.toIndexFilter(e.filters.approvalStatus);
|
|
49
49
|
t.status = n.approvalStatus, t.level = n.level;
|
|
@@ -55,17 +55,17 @@ var c = class {
|
|
|
55
55
|
}
|
|
56
56
|
}, d = class {
|
|
57
57
|
static async getAll(e) {
|
|
58
|
-
return (await
|
|
58
|
+
return (await t.fromPromise(n({ query: u.toDto(e) }))).map((e) => ({
|
|
59
59
|
data: e.data.items.map(l.fromDto),
|
|
60
60
|
meta: e.data.meta
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
63
63
|
static async getReminderConfigs() {
|
|
64
|
-
return (await
|
|
64
|
+
return (await t.fromPromise(e())).map((e) => e.data.items);
|
|
65
65
|
}
|
|
66
|
-
static async updateReminderConfigs(
|
|
67
|
-
let n = await
|
|
68
|
-
return
|
|
66
|
+
static async updateReminderConfigs(e) {
|
|
67
|
+
let n = await t.fromPromise(r({ body: c.toDto(e) }));
|
|
68
|
+
return t.void(n);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
//#endregion
|
package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js}
RENAMED
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import {
|
|
3
|
-
//#region src/modules/invoice/models/invoice/invoiceApprovalStatus.
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
}({}), i = {
|
|
7
|
-
[r.APPROVED]: {
|
|
1
|
+
import "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { _ as e, a as t, g as n, o as r } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
|
+
//#region src/modules/invoice/models/invoice/invoiceApprovalStatus.util.ts
|
|
4
|
+
var i = {
|
|
5
|
+
[t.APPROVED]: {
|
|
8
6
|
tone: "success",
|
|
9
7
|
translationKey: "wise_invoicing.invoice.approval_status.approved"
|
|
10
8
|
},
|
|
11
|
-
[
|
|
9
|
+
[t.AWAITING_APPROVAL]: {
|
|
12
10
|
tone: "blue",
|
|
13
11
|
translationKey: "wise_invoicing.invoice.approval_status.awaiting_approval"
|
|
14
12
|
},
|
|
15
|
-
[
|
|
13
|
+
[t.EXPIRED]: {
|
|
16
14
|
tone: "gray",
|
|
17
15
|
translationKey: "wise_invoicing.invoice.approval_status.expired"
|
|
18
16
|
},
|
|
19
|
-
[
|
|
17
|
+
[t.REJECTED]: {
|
|
18
|
+
tone: "error",
|
|
19
|
+
translationKey: "wise_invoicing.invoice.approval_status.rejected"
|
|
20
|
+
},
|
|
21
|
+
[t.REMINDER_1]: {
|
|
20
22
|
tone: "warning",
|
|
21
23
|
translationKey: "wise_invoicing.invoice.approval_status.r1"
|
|
22
24
|
},
|
|
23
|
-
[
|
|
25
|
+
[t.REMINDER_2]: {
|
|
24
26
|
tone: "warning",
|
|
25
27
|
translationKey: "wise_invoicing.invoice.approval_status.r2"
|
|
26
|
-
},
|
|
27
|
-
[r.REJECTED]: {
|
|
28
|
-
tone: "error",
|
|
29
|
-
translationKey: "wise_invoicing.invoice.approval_status.rejected"
|
|
30
28
|
}
|
|
31
29
|
}, a = {
|
|
32
30
|
[n.INCORRECT_CUSTOMER_OR_REFERENCE_DATA]: "wise_invoicing.invoice.approval_rejection_reason.incorrect_customer_or_reference_data",
|
|
@@ -36,19 +34,25 @@ var r = /* @__PURE__ */ function(e) {
|
|
|
36
34
|
[n.MISSING_OR_INCORRECT_PO_REFERENCE]: "wise_invoicing.invoice.approval_rejection_reason.missing_or_incorrect_po_reference",
|
|
37
35
|
[n.OTHER]: "wise_invoicing.invoice.approval_rejection_reason.other",
|
|
38
36
|
[n.WORK_NOT_FULLY_DELIVERED]: "wise_invoicing.invoice.approval_rejection_reason.work_not_fully_delivered"
|
|
39
|
-
}, o = {
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
},
|
|
43
|
-
static
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
case
|
|
37
|
+
}, o = /* @__PURE__ */ new Set([e.EXPIRED, e.REQUESTED]), s = {
|
|
38
|
+
[r._1]: t.REMINDER_1,
|
|
39
|
+
[r._2]: t.REMINDER_2
|
|
40
|
+
}, c = class {
|
|
41
|
+
static canMarkAsApproved(e) {
|
|
42
|
+
return o.has(e);
|
|
43
|
+
}
|
|
44
|
+
static getDisplayStatus(n) {
|
|
45
|
+
if (n.approval === null) return n.requiresPriorApproval ? t.AWAITING_APPROVAL : null;
|
|
46
|
+
switch (n.approval.status) {
|
|
47
|
+
case e.APPROVED: return t.APPROVED;
|
|
48
|
+
case e.EXPIRED: return t.EXPIRED;
|
|
49
|
+
case e.REJECTED: return t.REJECTED;
|
|
50
|
+
case e.REQUESTED: return n.approval.level === null ? t.AWAITING_APPROVAL : s[n.approval.level];
|
|
50
51
|
}
|
|
51
52
|
}
|
|
53
|
+
static getFilterTranslationKey(e) {
|
|
54
|
+
return e === t.NO_APPROVAL_REQUIRED ? "wise_invoicing.invoice.approval_status.no_approval_required" : i[e].translationKey;
|
|
55
|
+
}
|
|
52
56
|
static getMetadata(e) {
|
|
53
57
|
return i[e];
|
|
54
58
|
}
|
|
@@ -56,24 +60,24 @@ var r = /* @__PURE__ */ function(e) {
|
|
|
56
60
|
return a[e];
|
|
57
61
|
}
|
|
58
62
|
static getReminderLevelTranslationKey(e) {
|
|
59
|
-
return i[
|
|
63
|
+
return i[s[e]].translationKey;
|
|
60
64
|
}
|
|
61
65
|
static toIndexFilter(n) {
|
|
62
66
|
switch (n) {
|
|
63
|
-
case
|
|
64
|
-
case
|
|
65
|
-
case
|
|
66
|
-
case
|
|
67
|
-
approvalStatus:
|
|
68
|
-
level:
|
|
67
|
+
case t.APPROVED: return { approvalStatus: e.APPROVED };
|
|
68
|
+
case t.AWAITING_APPROVAL: return { approvalStatus: e.REQUESTED };
|
|
69
|
+
case t.EXPIRED: return { approvalStatus: e.EXPIRED };
|
|
70
|
+
case t.REMINDER_1: return {
|
|
71
|
+
approvalStatus: e.REQUESTED,
|
|
72
|
+
level: r._1
|
|
69
73
|
};
|
|
70
|
-
case
|
|
71
|
-
approvalStatus:
|
|
72
|
-
level:
|
|
74
|
+
case t.REMINDER_2: return {
|
|
75
|
+
approvalStatus: e.REQUESTED,
|
|
76
|
+
level: r._2
|
|
73
77
|
};
|
|
74
|
-
case
|
|
78
|
+
case t.REJECTED: return { approvalStatus: e.REJECTED };
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
};
|
|
78
82
|
//#endregion
|
|
79
|
-
export {
|
|
83
|
+
export { c as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { X as e, Z as t, t as n } from "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { o as r } from "./invoice.service-B1w16_Md.js";
|
|
3
|
+
//#region src/models/customer/customerDetail.transformer.ts
|
|
4
|
+
var i = class {
|
|
5
|
+
static fromDto(e) {
|
|
6
|
+
return {
|
|
7
|
+
uuid: e.uuid,
|
|
8
|
+
defaultPaymentTermDays: e.defaultPaymentTerm.value
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}, a = class {
|
|
12
|
+
static fromDto(e) {
|
|
13
|
+
return {
|
|
14
|
+
uuid: e.uuid,
|
|
15
|
+
name: e.name,
|
|
16
|
+
type: e.type
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}, o = class {
|
|
20
|
+
static toDto(e) {
|
|
21
|
+
return {
|
|
22
|
+
filter: { isDeactivated: !1 },
|
|
23
|
+
pagination: e.pagination,
|
|
24
|
+
search: r.toDto(e.search)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}, s = class {
|
|
28
|
+
static async getAll(e) {
|
|
29
|
+
return (await n.fromPromise(t({ query: o.toDto(e) }))).map((e) => ({
|
|
30
|
+
data: e.data.items.map(a.fromDto),
|
|
31
|
+
meta: e.data.meta
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
static async getByUuid(t) {
|
|
35
|
+
return (await n.fromPromise(e({ path: { uuid: t } }))).map((e) => i.fromDto(e.data));
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { s as t };
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import {
|
|
1
|
+
import "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { T as e, v as t } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { n as r } from "./CustomFieldValueText-
|
|
4
|
+
import { n as r } from "./CustomFieldValueText-BjRVovZL.js";
|
|
5
5
|
import { useI18n as i } from "vue-i18n";
|
|
6
6
|
import { computed as a, createBlock as o, createCommentVNode as s, createVNode as c, defineComponent as l, openBlock as u, unref as d, withCtx as f } from "vue";
|
|
7
|
-
import {
|
|
7
|
+
import { QueryClient as p, getTanstackQueryClient as m } from "@wisemen/vue-core-api-utils";
|
|
8
|
+
import { UIBadge as h, UIColumnLayout as g, UIText as _, UITooltip as v, UITooltipContent as y } from "@wisemen/vue-core-design-system";
|
|
8
9
|
//#region src/modules/invoice/models/invoice/invoiceSettlementStatus.util.ts
|
|
9
|
-
var
|
|
10
|
-
[
|
|
10
|
+
var b = {
|
|
11
|
+
[e.CREDITED]: {
|
|
11
12
|
tone: "success",
|
|
12
13
|
translationKey: "wise_invoicing.invoice.settlement_status.credited"
|
|
13
14
|
},
|
|
14
|
-
[
|
|
15
|
+
[e.OVERPAID]: {
|
|
15
16
|
tone: "warning",
|
|
16
17
|
translationKey: "wise_invoicing.invoice.settlement_status.paid"
|
|
17
18
|
},
|
|
18
|
-
[
|
|
19
|
+
[e.PAID]: {
|
|
19
20
|
tone: "success",
|
|
20
21
|
translationKey: "wise_invoicing.invoice.settlement_status.paid"
|
|
21
22
|
},
|
|
22
|
-
[
|
|
23
|
+
[e.PARTIALLY_PAID]: {
|
|
23
24
|
tone: "blue",
|
|
24
25
|
translationKey: "wise_invoicing.invoice.settlement_status.partially_paid"
|
|
25
26
|
},
|
|
26
|
-
[
|
|
27
|
+
[e.SETTLED]: {
|
|
27
28
|
tone: "brand",
|
|
28
29
|
translationKey: "wise_invoicing.invoice.settlement_status.settled"
|
|
29
30
|
},
|
|
30
|
-
[
|
|
31
|
+
[e.UNPAID]: {
|
|
31
32
|
tone: "gray",
|
|
32
33
|
translationKey: "wise_invoicing.invoice.settlement_status.unpaid"
|
|
33
34
|
}
|
|
34
|
-
},
|
|
35
|
+
}, x = {
|
|
35
36
|
tone: "warning",
|
|
36
37
|
translationKey: "wise_invoicing.invoice.settlement_status.awaiting_payment"
|
|
37
|
-
},
|
|
38
|
+
}, S = /* @__PURE__ */ new Set([e.PARTIALLY_PAID, e.UNPAID]), C = class t {
|
|
38
39
|
static getCreditedAmount(e) {
|
|
39
40
|
if (e.totalCreditedAmount !== null) return e.totalCreditedAmount.amount > 0 ? e.totalCreditedAmount : null;
|
|
40
41
|
if (e.balanceDueAmount == null) return null;
|
|
@@ -45,12 +46,12 @@ var v = {
|
|
|
45
46
|
} : null;
|
|
46
47
|
}
|
|
47
48
|
static getMetadata(e, t) {
|
|
48
|
-
return t &&
|
|
49
|
+
return t && S.has(e) ? x : b[e];
|
|
49
50
|
}
|
|
50
51
|
static getSubtextParts(n) {
|
|
51
|
-
let r = n.paidAmount, i =
|
|
52
|
+
let r = n.paidAmount, i = t.getCreditedAmount(n);
|
|
52
53
|
switch (n.settlementStatus) {
|
|
53
|
-
case
|
|
54
|
+
case e.OVERPAID: {
|
|
54
55
|
if (r === null) return null;
|
|
55
56
|
let e = Math.max(r.amount - n.grossAmount.amount, 0), t = Math.min(r.amount, n.grossAmount.amount);
|
|
56
57
|
return e > 0 ? {
|
|
@@ -65,8 +66,8 @@ var v = {
|
|
|
65
66
|
}
|
|
66
67
|
} : null;
|
|
67
68
|
}
|
|
68
|
-
case
|
|
69
|
-
case
|
|
69
|
+
case e.PARTIALLY_PAID:
|
|
70
|
+
case e.SETTLED: return r === null && i === null ? null : {
|
|
70
71
|
creditedAmount: i,
|
|
71
72
|
overpaidAmount: null,
|
|
72
73
|
paidAmount: r ?? null
|
|
@@ -74,19 +75,19 @@ var v = {
|
|
|
74
75
|
default: return null;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
},
|
|
78
|
+
}, w = /* @__PURE__ */ l({
|
|
78
79
|
__name: "InvoiceDisputedBadge",
|
|
79
80
|
props: { size: { default: "sm" } },
|
|
80
81
|
setup(e) {
|
|
81
82
|
let t = e, n = i(), r = a(() => n.t("wise_invoicing.invoice.status.disputed"));
|
|
82
|
-
return (e, n) => (u(), o(d(
|
|
83
|
+
return (e, n) => (u(), o(d(h), {
|
|
83
84
|
label: r.value,
|
|
84
85
|
size: t.size,
|
|
85
86
|
color: "warning",
|
|
86
87
|
variant: "translucent"
|
|
87
88
|
}, null, 8, ["label", "size"]));
|
|
88
89
|
}
|
|
89
|
-
}),
|
|
90
|
+
}), T = /* @__PURE__ */ l({
|
|
90
91
|
__name: "InvoiceStatusBadge",
|
|
91
92
|
props: {
|
|
92
93
|
lifecycleStatus: {},
|
|
@@ -94,7 +95,7 @@ var v = {
|
|
|
94
95
|
},
|
|
95
96
|
setup(e) {
|
|
96
97
|
let t = e, n = i(), s = a(() => r.getLifecycleMetadata(t.lifecycleStatus)), c = a(() => n.t(s.value.translationKey));
|
|
97
|
-
return (e, n) => (u(), o(d(
|
|
98
|
+
return (e, n) => (u(), o(d(h), {
|
|
98
99
|
label: c.value,
|
|
99
100
|
color: s.value.tone,
|
|
100
101
|
size: t.size
|
|
@@ -104,7 +105,7 @@ var v = {
|
|
|
104
105
|
"size"
|
|
105
106
|
]));
|
|
106
107
|
}
|
|
107
|
-
}),
|
|
108
|
+
}), E = /* @__PURE__ */ l({
|
|
108
109
|
__name: "InvoiceSettlementStatusBadge",
|
|
109
110
|
props: {
|
|
110
111
|
isSent: { type: Boolean },
|
|
@@ -119,9 +120,9 @@ var v = {
|
|
|
119
120
|
size: { default: "sm" },
|
|
120
121
|
totalCreditedAmount: {}
|
|
121
122
|
},
|
|
122
|
-
setup(
|
|
123
|
-
let r =
|
|
124
|
-
let e =
|
|
123
|
+
setup(t) {
|
|
124
|
+
let r = t, l = i(), p = n(), m = a(() => r.isSent || r.settlementStatus !== e.UNPAID), b = a(() => C.getMetadata(r.settlementStatus, r.isSent)), x = a(() => l.t(b.value.translationKey)), S = a(() => {
|
|
125
|
+
let e = C.getSubtextParts({
|
|
125
126
|
balanceDueAmount: r.balanceDueAmount,
|
|
126
127
|
grossAmount: r.grossAmount,
|
|
127
128
|
paidAmount: r.paidAmount,
|
|
@@ -129,25 +130,25 @@ var v = {
|
|
|
129
130
|
totalCreditedAmount: r.totalCreditedAmount
|
|
130
131
|
});
|
|
131
132
|
return e == null ? null : e.paidAmount !== null && e.overpaidAmount !== null ? l.t("wise_invoicing.invoice.status_subtext.paid_overpaid", {
|
|
132
|
-
overpaidAmount:
|
|
133
|
-
paidAmount:
|
|
133
|
+
overpaidAmount: p.formatMonetary(e.overpaidAmount),
|
|
134
|
+
paidAmount: p.formatMonetary(e.paidAmount)
|
|
134
135
|
}) : e.paidAmount !== null && e.creditedAmount !== null ? l.t("wise_invoicing.invoice.status_subtext.paid_credited", {
|
|
135
|
-
creditedAmount:
|
|
136
|
-
paidAmount:
|
|
137
|
-
}) : e.paidAmount === null ? e.creditedAmount === null ? null : l.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount:
|
|
138
|
-
}), w = a(() => r.showSubtext &&
|
|
139
|
-
return (e, t) =>
|
|
136
|
+
creditedAmount: p.formatMonetary(e.creditedAmount),
|
|
137
|
+
paidAmount: p.formatMonetary(e.paidAmount)
|
|
138
|
+
}) : e.paidAmount === null ? e.creditedAmount === null ? null : l.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount: p.formatMonetary(e.creditedAmount) }) : l.t("wise_invoicing.invoice.status_subtext.paid", { paidAmount: p.formatMonetary(e.paidAmount) });
|
|
139
|
+
}), w = a(() => r.showSubtext && S.value !== null), T = a(() => S.value ?? "");
|
|
140
|
+
return (e, t) => m.value ? (u(), o(d(g), {
|
|
140
141
|
key: 0,
|
|
141
142
|
gap: "xs"
|
|
142
143
|
}, {
|
|
143
|
-
default: f(() => [w.value ? (u(), o(d(
|
|
144
|
+
default: f(() => [w.value ? (u(), o(d(v), {
|
|
144
145
|
key: 0,
|
|
145
146
|
"popover-side-offset": 8,
|
|
146
147
|
"popover-align": "center",
|
|
147
148
|
"popover-side": "bottom"
|
|
148
149
|
}, {
|
|
149
|
-
trigger: f(() => [c(d(
|
|
150
|
-
label:
|
|
150
|
+
trigger: f(() => [c(d(h), {
|
|
151
|
+
label: x.value,
|
|
151
152
|
color: b.value.tone,
|
|
152
153
|
size: r.size,
|
|
153
154
|
variant: "translucent"
|
|
@@ -156,17 +157,17 @@ var v = {
|
|
|
156
157
|
"color",
|
|
157
158
|
"size"
|
|
158
159
|
])]),
|
|
159
|
-
content: f(() => [c(d(
|
|
160
|
-
default: f(() => [c(d(
|
|
160
|
+
content: f(() => [c(d(y), null, {
|
|
161
|
+
default: f(() => [c(d(_), {
|
|
161
162
|
text: T.value,
|
|
162
163
|
class: "text-sm text-primary"
|
|
163
164
|
}, null, 8, ["text"])]),
|
|
164
165
|
_: 1
|
|
165
166
|
})]),
|
|
166
167
|
_: 1
|
|
167
|
-
})) : (u(), o(d(
|
|
168
|
+
})) : (u(), o(d(h), {
|
|
168
169
|
key: 1,
|
|
169
|
-
label:
|
|
170
|
+
label: x.value,
|
|
170
171
|
color: b.value.tone,
|
|
171
172
|
size: r.size,
|
|
172
173
|
variant: "translucent"
|
|
@@ -178,34 +179,110 @@ var v = {
|
|
|
178
179
|
_: 1
|
|
179
180
|
})) : s("", !0);
|
|
180
181
|
}
|
|
181
|
-
}),
|
|
182
|
-
[
|
|
182
|
+
}), D = {
|
|
183
|
+
[t.FAILED]: {
|
|
183
184
|
tone: "error",
|
|
184
185
|
translationKey: "wise_invoicing.invoice.delivery_status.failed"
|
|
185
186
|
},
|
|
186
|
-
[
|
|
187
|
+
[t.PROCESSING]: {
|
|
187
188
|
tone: "blue",
|
|
188
189
|
translationKey: "wise_invoicing.invoice.delivery_status.processing"
|
|
189
190
|
},
|
|
190
|
-
[
|
|
191
|
+
[t.SENT]: {
|
|
191
192
|
tone: "brand",
|
|
192
193
|
translationKey: "wise_invoicing.invoice.delivery_status.sent"
|
|
193
194
|
},
|
|
194
|
-
[
|
|
195
|
+
[t.UNSENT]: {
|
|
195
196
|
tone: "gray",
|
|
196
197
|
translationKey: "wise_invoicing.invoice.delivery_status.unsent"
|
|
197
198
|
},
|
|
198
|
-
[
|
|
199
|
+
[t.VIEWED]: {
|
|
199
200
|
tone: "success",
|
|
200
201
|
translationKey: "wise_invoicing.invoice.delivery_status.viewed"
|
|
201
202
|
}
|
|
202
|
-
},
|
|
203
|
+
}, O = class {
|
|
203
204
|
static getMetadata(e) {
|
|
204
|
-
return
|
|
205
|
+
return D[e];
|
|
206
|
+
}
|
|
207
|
+
static isSent(e) {
|
|
208
|
+
return [t.SENT, t.VIEWED].includes(e);
|
|
209
|
+
}
|
|
210
|
+
}, k = 3e5, A = /* @__PURE__ */ new Map(), j = null, M = null;
|
|
211
|
+
function N(e) {
|
|
212
|
+
return typeof e == "object" && !!e && "pages" in e && Array.isArray(e.pages);
|
|
213
|
+
}
|
|
214
|
+
function P(e) {
|
|
215
|
+
return N(e) ? e.pages.flatMap((e) => e.isOk() ? e.getValue().data : []) : [];
|
|
216
|
+
}
|
|
217
|
+
function F(e) {
|
|
218
|
+
return Object.keys(e);
|
|
219
|
+
}
|
|
220
|
+
function I(e, t) {
|
|
221
|
+
return JSON.stringify(e) === JSON.stringify(t);
|
|
222
|
+
}
|
|
223
|
+
function L(e, t) {
|
|
224
|
+
let n = F(t.patch);
|
|
225
|
+
return n.every((n) => I(e[n], t.patch[n])) ? !0 : n.some((n) => n in t.serverValues && !I(e[n], t.serverValues[n]));
|
|
226
|
+
}
|
|
227
|
+
function R() {
|
|
228
|
+
return m().getQueryCache().findAll({ predicate: (e) => e.queryKey[0] === "invoiceIndex" }).flatMap((e) => P(e.state.data));
|
|
229
|
+
}
|
|
230
|
+
function z(e, t) {
|
|
231
|
+
return e === void 0 ? {} : Object.fromEntries(F(t).map((t) => [t, e[t]]));
|
|
232
|
+
}
|
|
233
|
+
function B() {
|
|
234
|
+
new p(m()).update("invoiceIndex", {
|
|
235
|
+
by: (e) => A.has(e.uuid),
|
|
236
|
+
value: (e) => ({
|
|
237
|
+
...e,
|
|
238
|
+
...A.get(e.uuid)?.patch
|
|
239
|
+
})
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
function V(e) {
|
|
243
|
+
let t = Date.now() - k;
|
|
244
|
+
for (let [e, n] of A) n.patchedAt <= t && A.delete(e);
|
|
245
|
+
for (let t of e) {
|
|
246
|
+
let e = A.get(t.uuid);
|
|
247
|
+
e !== void 0 && L(t, e) && A.delete(t.uuid);
|
|
205
248
|
}
|
|
206
|
-
|
|
207
|
-
|
|
249
|
+
}
|
|
250
|
+
function H() {
|
|
251
|
+
M?.(), M = null, j = null;
|
|
252
|
+
}
|
|
253
|
+
function U(e) {
|
|
254
|
+
if (e.type !== "updated" || e.action.type !== "success" || e.action.manual === !0 || e.query.queryKey[0] !== "invoiceIndex") return;
|
|
255
|
+
let t = e.query.state.data;
|
|
256
|
+
if (V(P(t)), A.size === 0) {
|
|
257
|
+
H();
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
B();
|
|
261
|
+
}
|
|
262
|
+
function W() {
|
|
263
|
+
let e = m().getQueryCache();
|
|
264
|
+
j !== e && (H(), j = e, M = e.subscribe(U));
|
|
265
|
+
}
|
|
266
|
+
var G = class {
|
|
267
|
+
static reflectBulkAction(e, t) {
|
|
268
|
+
if (e.length === 0) return;
|
|
269
|
+
let n = Date.now(), r = new Map(R().map((e) => [e.uuid, e]));
|
|
270
|
+
for (let i of e) {
|
|
271
|
+
let e = A.get(i);
|
|
272
|
+
A.set(i, {
|
|
273
|
+
patchedAt: n,
|
|
274
|
+
patch: {
|
|
275
|
+
...e?.patch,
|
|
276
|
+
...t
|
|
277
|
+
},
|
|
278
|
+
serverValues: {
|
|
279
|
+
...z(r.get(i), t),
|
|
280
|
+
...e?.serverValues
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
B(), W();
|
|
208
285
|
}
|
|
209
286
|
};
|
|
210
287
|
//#endregion
|
|
211
|
-
export {
|
|
288
|
+
export { w as a, T as i, O as n, C as o, E as r, G as t };
|
package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./i18n.lib--mzprLMR.js";
|
|
2
|
+
import { ft as t } from "./api.util-CkIRZS3h.js";
|
|
3
3
|
import { useI18n as n } from "vue-i18n";
|
|
4
4
|
import { computed as r, ref as i, shallowRef as a, toValue as o, watch as s } from "vue";
|
|
5
5
|
//#region src/libs/http.lib.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { G as e, at as t, t as n } from "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { p as r } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { n as i, t as a } from "./address.transformer-jGddczLV.js";
|
|
4
4
|
import { t as o } from "./dist-BFx8U4Su.js";
|
|
5
5
|
import { useQuery as s } from "@wisemen/vue-core-api-utils";
|
|
@@ -61,6 +61,7 @@ var u = class {
|
|
|
61
61
|
defaultPaymentTermDays: e.defaultPaymentTerm.value,
|
|
62
62
|
email: e.email,
|
|
63
63
|
phoneNumber: e.phoneNumber,
|
|
64
|
+
requiresInvoiceApprovalFile: e.requiresInvoiceApprovalFile,
|
|
64
65
|
sequencePrefix: e.sequencePrefix,
|
|
65
66
|
vatNumber: e.vatNumber,
|
|
66
67
|
website: e.website
|