@wisemen/wise-invoicing-web 0.1.0 → 0.2.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 +151 -0
- package/dist/{BillingDocumentDetailViewDataProvider-BemnzVNY.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1417 -1459
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-BuY9ELoK.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
- package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
- package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
- package/dist/DataProvider-C3uEds9v.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
- package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
- package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
- package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
- package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
- package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
- package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
- package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
- package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
- package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
- package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
- package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
- package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +18 -1
- package/dist/client/types.gen.d.ts +1059 -106
- package/dist/client/zod.gen.d.ts +32759 -16136
- package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
- package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
- package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
- package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
- package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
- package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
- package/dist/index.d.ts +297 -31
- package/dist/index.js +344 -324
- package/dist/invoice.service-DEEA9mal.js +745 -0
- package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
- package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
- package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
- package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
- package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
- package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +270 -6
- package/dist/locales/en-US.json.d.ts +136 -4
- package/dist/locales/nl-BE.json.d.ts +136 -4
- package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
- package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
- package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
- package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
- package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
- package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
- package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
- package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
- package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
- package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
- package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
- package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
- package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
- package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
- package/dist/reminderConfig.query-snaHQmrY.js +309 -0
- package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
- package/dist/search.composable-CU9OpyUB.js +52 -0
- package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +15 -0
- package/dist/utils/html.util.d.ts +4 -0
- package/package.json +2 -1
- package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
- package/dist/AirlineIcon-Z6sH_StM.js +0 -26
- package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
- package/dist/AirportIcon-m4itDKCV.js +0 -16
- package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
- package/dist/AllocationsIcon-hcg93Sll.js +0 -16
- package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
- package/dist/AssetIcon-qOYs6Wna.js +0 -16
- package/dist/BarChartIcon-DDyzpV_3.js +0 -22
- package/dist/BellIcon-DF1OBFta.js +0 -21
- package/dist/BuildingIcon-CC5PMNeP.js +0 -22
- package/dist/ChargerIcon-aM_endLr.js +0 -16
- package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
- package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
- package/dist/ClockIcon-BNiPCaiB.js +0 -23
- package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
- package/dist/CopyIcon-DH5ly0dZ.js +0 -19
- package/dist/DataProvider-Dj34ljUX.js +0 -75
- package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
- package/dist/EditIcon-Dr7OHBBR.js +0 -21
- package/dist/EraserIcon-B1VJSvdI.js +0 -23
- package/dist/FileIcon-ssmQI5Yl.js +0 -23
- package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
- package/dist/GlobeIcon-BfRM6Ike.js +0 -22
- package/dist/HelpIcon-BrJ49P5y.js +0 -22
- package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
- package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
- package/dist/InvoiceDetailViewDataProvider-D6E7YVV1.js +0 -1670
- package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
- package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
- package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
- package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
- package/dist/LinkIcon-DuPwae98.js +0 -22
- package/dist/MarkerIcon-B1Jqenjb.js +0 -28
- package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
- package/dist/MonitorIcon-pbK22reU.js +0 -22
- package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
- package/dist/ParkingIcon-DnUPW3pB.js +0 -24
- package/dist/PlanningIcon-CXvrskgj.js +0 -16
- package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
- package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
- package/dist/RefreshIcon-DShY-aoS.js +0 -22
- package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
- package/dist/RewindIcon-GWg2AQax.js +0 -22
- package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
- package/dist/ShieldIcon-CVnrOcxl.js +0 -19
- package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
- package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
- package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
- package/dist/StandIcon-CoYnBLMn.js +0 -23
- package/dist/StarsIcon-D7ZlqOW7.js +0 -22
- package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
- package/dist/TargetIcon-HMWj77-Q.js +0 -22
- package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
- package/dist/ToolIcon-DRfDb7fE.js +0 -22
- package/dist/TrashIcon-BwxBjHv5.js +0 -19
- package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
- package/dist/UploadCloudIcon-BF0equKg.js +0 -22
- package/dist/UserIcon-B0rCC6KE.js +0 -22
- package/dist/UsersIcon-cK5l_zKG.js +0 -22
- package/dist/VerifiedIcon-CELYlqcv.js +0 -22
- package/dist/WifiIcon--JPvMNEF.js +0 -23
- package/dist/WifiOffIcon-BS2KftcP.js +0 -23
- package/dist/ZapIcon-BHwcIQc0.js +0 -23
- package/dist/ZoomInIcon-Cu6r915V.js +0 -23
- package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/instant.transformer-KmBsH3E9.js +0 -18
- package/dist/invoice.service-Bb8VqQvc.js +0 -635
- package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
- package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
- package/dist/search.composable-BCtYqudV.js +0 -52
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { R as e, et as t, q as n, t as r } from "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { n as i, r as a, t as o } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
3
|
+
import { t as s } from "./invoiceApprovalStatus.util-3Zh10Pj8.js";
|
|
4
|
+
//#region src/modules/invoice-approval/models/approvalReminderConfig.transformer.ts
|
|
5
|
+
var c = class {
|
|
6
|
+
static toDto(e) {
|
|
7
|
+
return { reminders: e.reminders.map((e) => ({
|
|
8
|
+
offsetDays: e.offsetDays,
|
|
9
|
+
schedule: e.schedule,
|
|
10
|
+
sequence: e.sequence,
|
|
11
|
+
template: e.template
|
|
12
|
+
})) };
|
|
13
|
+
}
|
|
14
|
+
static toForm(e) {
|
|
15
|
+
return { reminders: e.toSorted((e, t) => e.sequence - t.sequence).map((e) => ({
|
|
16
|
+
offsetDays: e.offsetDays,
|
|
17
|
+
schedule: e.schedule,
|
|
18
|
+
sequence: e.sequence,
|
|
19
|
+
template: e.template
|
|
20
|
+
})) };
|
|
21
|
+
}
|
|
22
|
+
}, l = class {
|
|
23
|
+
static fromDto(e) {
|
|
24
|
+
return {
|
|
25
|
+
uuid: e.uuid,
|
|
26
|
+
customerUuid: e.customer.uuid,
|
|
27
|
+
invoiceUuid: e.invoice.uuid,
|
|
28
|
+
nextReminderOn: o.fromNullableDto(e.nextReminderOn),
|
|
29
|
+
hasChangesSinceApprovalSent: e.invoice.hasChangesSinceApprovalSent,
|
|
30
|
+
approval: {
|
|
31
|
+
reminderSentAt: a.fromNullableDto(e.lastReminderSentAt),
|
|
32
|
+
sentAt: a.fromNullableDto(e.sentAt),
|
|
33
|
+
level: e.level,
|
|
34
|
+
status: e.status
|
|
35
|
+
},
|
|
36
|
+
customerName: e.customer.name,
|
|
37
|
+
grossAmount: i.fromDto(e.proForma.grossAmount),
|
|
38
|
+
invoiceSubject: e.invoice.subject,
|
|
39
|
+
netAmount: i.fromDto(e.proForma.netAmount),
|
|
40
|
+
recipientEmail: e.recipient.email,
|
|
41
|
+
rejectionReason: e.rejectionReason
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}, u = class {
|
|
45
|
+
static toDto(e) {
|
|
46
|
+
let t = { isCancelled: !1 };
|
|
47
|
+
if (e.filters?.approvalStatus) {
|
|
48
|
+
let n = s.toIndexFilter(e.filters.approvalStatus);
|
|
49
|
+
t.status = n.approvalStatus, t.level = n.level;
|
|
50
|
+
}
|
|
51
|
+
return e.filters?.hasChangesSinceApprovalSent !== null && e.filters?.hasChangesSinceApprovalSent !== void 0 && (t.hasChangesSinceApprovalSent = e.filters.hasChangesSinceApprovalSent), e.filters?.customerUuid && (t.customerUuid = e.filters.customerUuid), {
|
|
52
|
+
filter: t,
|
|
53
|
+
pagination: e.pagination
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}, d = class {
|
|
57
|
+
static async getAll(e) {
|
|
58
|
+
return (await r.fromPromise(t({ query: u.toDto(e) }))).map((e) => ({
|
|
59
|
+
data: e.data.items.map(l.fromDto),
|
|
60
|
+
meta: e.data.meta
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
static async getReminderConfigs() {
|
|
64
|
+
return (await r.fromPromise(n())).map((e) => e.data.items);
|
|
65
|
+
}
|
|
66
|
+
static async updateReminderConfigs(t) {
|
|
67
|
+
let n = await r.fromPromise(e({ body: c.toDto(t) }));
|
|
68
|
+
return r.void(n);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { c as n, d as t };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { a as e, g as t, h as n } from "./documentTitle.composable-DsBbzhXN.js";
|
|
3
|
+
//#region src/modules/invoice/models/invoice/invoiceApprovalStatus.model.ts
|
|
4
|
+
var r = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.APPROVED = "approved", e.AWAITING_APPROVAL = "awaiting_approval", e.EXPIRED = "expired", e.R1 = "r1", e.R2 = "r2", e.REJECTED = "rejected", e;
|
|
6
|
+
}({}), i = {
|
|
7
|
+
[r.APPROVED]: {
|
|
8
|
+
tone: "success",
|
|
9
|
+
translationKey: "wise_invoicing.invoice.approval_status.approved"
|
|
10
|
+
},
|
|
11
|
+
[r.AWAITING_APPROVAL]: {
|
|
12
|
+
tone: "blue",
|
|
13
|
+
translationKey: "wise_invoicing.invoice.approval_status.awaiting_approval"
|
|
14
|
+
},
|
|
15
|
+
[r.EXPIRED]: {
|
|
16
|
+
tone: "gray",
|
|
17
|
+
translationKey: "wise_invoicing.invoice.approval_status.expired"
|
|
18
|
+
},
|
|
19
|
+
[r.R1]: {
|
|
20
|
+
tone: "warning",
|
|
21
|
+
translationKey: "wise_invoicing.invoice.approval_status.r1"
|
|
22
|
+
},
|
|
23
|
+
[r.R2]: {
|
|
24
|
+
tone: "warning",
|
|
25
|
+
translationKey: "wise_invoicing.invoice.approval_status.r2"
|
|
26
|
+
},
|
|
27
|
+
[r.REJECTED]: {
|
|
28
|
+
tone: "error",
|
|
29
|
+
translationKey: "wise_invoicing.invoice.approval_status.rejected"
|
|
30
|
+
}
|
|
31
|
+
}, a = {
|
|
32
|
+
[n.INCORRECT_CUSTOMER_OR_REFERENCE_DATA]: "wise_invoicing.invoice.approval_rejection_reason.incorrect_customer_or_reference_data",
|
|
33
|
+
[n.INCORRECT_PRICE]: "wise_invoicing.invoice.approval_rejection_reason.incorrect_price",
|
|
34
|
+
[n.INCORRECT_QUANTITY]: "wise_invoicing.invoice.approval_rejection_reason.incorrect_quantity",
|
|
35
|
+
[n.MISSING_OR_INCORRECT_ATTACHMENT]: "wise_invoicing.invoice.approval_rejection_reason.missing_or_incorrect_attachment",
|
|
36
|
+
[n.MISSING_OR_INCORRECT_PO_REFERENCE]: "wise_invoicing.invoice.approval_rejection_reason.missing_or_incorrect_po_reference",
|
|
37
|
+
[n.OTHER]: "wise_invoicing.invoice.approval_rejection_reason.other",
|
|
38
|
+
[n.WORK_NOT_FULLY_DELIVERED]: "wise_invoicing.invoice.approval_rejection_reason.work_not_fully_delivered"
|
|
39
|
+
}, o = {
|
|
40
|
+
[e._1]: r.R1,
|
|
41
|
+
[e._2]: r.R2
|
|
42
|
+
}, s = class {
|
|
43
|
+
static getDisplayStatus(e) {
|
|
44
|
+
if (e.approval === null) return e.requiresPriorApproval ? r.AWAITING_APPROVAL : null;
|
|
45
|
+
switch (e.approval.status) {
|
|
46
|
+
case t.APPROVED: return r.APPROVED;
|
|
47
|
+
case t.EXPIRED: return r.EXPIRED;
|
|
48
|
+
case t.REJECTED: return r.REJECTED;
|
|
49
|
+
case t.REQUESTED: return e.approval.level === null ? r.AWAITING_APPROVAL : o[e.approval.level];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static getMetadata(e) {
|
|
53
|
+
return i[e];
|
|
54
|
+
}
|
|
55
|
+
static getRejectionReasonTranslationKey(e) {
|
|
56
|
+
return a[e];
|
|
57
|
+
}
|
|
58
|
+
static getReminderLevelTranslationKey(e) {
|
|
59
|
+
return i[o[e]].translationKey;
|
|
60
|
+
}
|
|
61
|
+
static toIndexFilter(n) {
|
|
62
|
+
switch (n) {
|
|
63
|
+
case r.APPROVED: return { approvalStatus: t.APPROVED };
|
|
64
|
+
case r.AWAITING_APPROVAL: return { approvalStatus: t.REQUESTED };
|
|
65
|
+
case r.EXPIRED: return { approvalStatus: t.EXPIRED };
|
|
66
|
+
case r.R1: return {
|
|
67
|
+
approvalStatus: t.REQUESTED,
|
|
68
|
+
level: e._1
|
|
69
|
+
};
|
|
70
|
+
case r.R2: return {
|
|
71
|
+
approvalStatus: t.REQUESTED,
|
|
72
|
+
level: e._2
|
|
73
|
+
};
|
|
74
|
+
case r.REJECTED: return { approvalStatus: t.REJECTED };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { r as n, s as t };
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { _ as e, w as t } from "./documentTitle.composable-DsBbzhXN.js";
|
|
3
|
+
import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { n as r } from "./CustomFieldValueText-CZQXGE5F.js";
|
|
5
|
+
import { useI18n as i } from "vue-i18n";
|
|
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 { UIBadge as p, UIColumnLayout as m, UIText as h, UITooltip as g, UITooltipContent as _ } from "@wisemen/vue-core-design-system";
|
|
8
|
+
//#region src/modules/invoice/models/invoice/invoiceSettlementStatus.util.ts
|
|
9
|
+
var v = {
|
|
10
|
+
[t.CREDITED]: {
|
|
11
|
+
tone: "success",
|
|
12
|
+
translationKey: "wise_invoicing.invoice.settlement_status.credited"
|
|
13
|
+
},
|
|
14
|
+
[t.OVERPAID]: {
|
|
15
|
+
tone: "warning",
|
|
16
|
+
translationKey: "wise_invoicing.invoice.settlement_status.paid"
|
|
17
|
+
},
|
|
18
|
+
[t.PAID]: {
|
|
19
|
+
tone: "success",
|
|
20
|
+
translationKey: "wise_invoicing.invoice.settlement_status.paid"
|
|
21
|
+
},
|
|
22
|
+
[t.PARTIALLY_PAID]: {
|
|
23
|
+
tone: "blue",
|
|
24
|
+
translationKey: "wise_invoicing.invoice.settlement_status.partially_paid"
|
|
25
|
+
},
|
|
26
|
+
[t.SETTLED]: {
|
|
27
|
+
tone: "brand",
|
|
28
|
+
translationKey: "wise_invoicing.invoice.settlement_status.settled"
|
|
29
|
+
},
|
|
30
|
+
[t.UNPAID]: {
|
|
31
|
+
tone: "gray",
|
|
32
|
+
translationKey: "wise_invoicing.invoice.settlement_status.unpaid"
|
|
33
|
+
}
|
|
34
|
+
}, y = {
|
|
35
|
+
tone: "warning",
|
|
36
|
+
translationKey: "wise_invoicing.invoice.settlement_status.awaiting_payment"
|
|
37
|
+
}, b = /* @__PURE__ */ new Set([t.PARTIALLY_PAID, t.UNPAID]), x = class e {
|
|
38
|
+
static getCreditedAmount(e) {
|
|
39
|
+
if (e.totalCreditedAmount !== null) return e.totalCreditedAmount.amount > 0 ? e.totalCreditedAmount : null;
|
|
40
|
+
if (e.balanceDueAmount == null) return null;
|
|
41
|
+
let t = e.paidAmount?.amount ?? 0, n = Math.max(e.grossAmount.amount - e.balanceDueAmount.amount - t, 0);
|
|
42
|
+
return n > 0 ? {
|
|
43
|
+
...e.grossAmount,
|
|
44
|
+
amount: n
|
|
45
|
+
} : null;
|
|
46
|
+
}
|
|
47
|
+
static getMetadata(e, t) {
|
|
48
|
+
return t && b.has(e) ? y : v[e];
|
|
49
|
+
}
|
|
50
|
+
static getSubtextParts(n) {
|
|
51
|
+
let r = n.paidAmount, i = e.getCreditedAmount(n);
|
|
52
|
+
switch (n.settlementStatus) {
|
|
53
|
+
case t.OVERPAID: {
|
|
54
|
+
if (r === null) return null;
|
|
55
|
+
let e = Math.max(r.amount - n.grossAmount.amount, 0), t = Math.min(r.amount, n.grossAmount.amount);
|
|
56
|
+
return e > 0 ? {
|
|
57
|
+
creditedAmount: null,
|
|
58
|
+
overpaidAmount: {
|
|
59
|
+
...n.grossAmount,
|
|
60
|
+
amount: e
|
|
61
|
+
},
|
|
62
|
+
paidAmount: {
|
|
63
|
+
...n.grossAmount,
|
|
64
|
+
amount: t
|
|
65
|
+
}
|
|
66
|
+
} : null;
|
|
67
|
+
}
|
|
68
|
+
case t.PARTIALLY_PAID:
|
|
69
|
+
case t.SETTLED: return r === null && i === null ? null : {
|
|
70
|
+
creditedAmount: i,
|
|
71
|
+
overpaidAmount: null,
|
|
72
|
+
paidAmount: r ?? null
|
|
73
|
+
};
|
|
74
|
+
default: return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, S = /* @__PURE__ */ l({
|
|
78
|
+
__name: "InvoiceDisputedBadge",
|
|
79
|
+
props: { size: { default: "sm" } },
|
|
80
|
+
setup(e) {
|
|
81
|
+
let t = e, n = i(), r = a(() => n.t("wise_invoicing.invoice.status.disputed"));
|
|
82
|
+
return (e, n) => (u(), o(d(p), {
|
|
83
|
+
label: r.value,
|
|
84
|
+
size: t.size,
|
|
85
|
+
color: "warning",
|
|
86
|
+
variant: "translucent"
|
|
87
|
+
}, null, 8, ["label", "size"]));
|
|
88
|
+
}
|
|
89
|
+
}), C = /* @__PURE__ */ l({
|
|
90
|
+
__name: "InvoiceStatusBadge",
|
|
91
|
+
props: {
|
|
92
|
+
lifecycleStatus: {},
|
|
93
|
+
size: { default: "sm" }
|
|
94
|
+
},
|
|
95
|
+
setup(e) {
|
|
96
|
+
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(p), {
|
|
98
|
+
label: c.value,
|
|
99
|
+
color: s.value.tone,
|
|
100
|
+
size: t.size
|
|
101
|
+
}, null, 8, [
|
|
102
|
+
"label",
|
|
103
|
+
"color",
|
|
104
|
+
"size"
|
|
105
|
+
]));
|
|
106
|
+
}
|
|
107
|
+
}), w = /* @__PURE__ */ l({
|
|
108
|
+
__name: "InvoiceSettlementStatusBadge",
|
|
109
|
+
props: {
|
|
110
|
+
isSent: { type: Boolean },
|
|
111
|
+
balanceDueAmount: {},
|
|
112
|
+
grossAmount: {},
|
|
113
|
+
paidAmount: {},
|
|
114
|
+
settlementStatus: {},
|
|
115
|
+
showSubtext: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: !0
|
|
118
|
+
},
|
|
119
|
+
size: { default: "sm" },
|
|
120
|
+
totalCreditedAmount: {}
|
|
121
|
+
},
|
|
122
|
+
setup(e) {
|
|
123
|
+
let r = e, l = i(), v = n(), y = a(() => r.isSent || r.settlementStatus !== t.UNPAID), b = a(() => x.getMetadata(r.settlementStatus, r.isSent)), S = a(() => l.t(b.value.translationKey)), C = a(() => {
|
|
124
|
+
let e = x.getSubtextParts({
|
|
125
|
+
balanceDueAmount: r.balanceDueAmount,
|
|
126
|
+
grossAmount: r.grossAmount,
|
|
127
|
+
paidAmount: r.paidAmount,
|
|
128
|
+
settlementStatus: r.settlementStatus,
|
|
129
|
+
totalCreditedAmount: r.totalCreditedAmount
|
|
130
|
+
});
|
|
131
|
+
return e == null ? null : e.paidAmount !== null && e.overpaidAmount !== null ? l.t("wise_invoicing.invoice.status_subtext.paid_overpaid", {
|
|
132
|
+
overpaidAmount: v.formatMonetary(e.overpaidAmount),
|
|
133
|
+
paidAmount: v.formatMonetary(e.paidAmount)
|
|
134
|
+
}) : e.paidAmount !== null && e.creditedAmount !== null ? l.t("wise_invoicing.invoice.status_subtext.paid_credited", {
|
|
135
|
+
creditedAmount: v.formatMonetary(e.creditedAmount),
|
|
136
|
+
paidAmount: v.formatMonetary(e.paidAmount)
|
|
137
|
+
}) : e.paidAmount === null ? e.creditedAmount === null ? null : l.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount: v.formatMonetary(e.creditedAmount) }) : l.t("wise_invoicing.invoice.status_subtext.paid", { paidAmount: v.formatMonetary(e.paidAmount) });
|
|
138
|
+
}), w = a(() => r.showSubtext && C.value !== null), T = a(() => C.value ?? "");
|
|
139
|
+
return (e, t) => y.value ? (u(), o(d(m), {
|
|
140
|
+
key: 0,
|
|
141
|
+
gap: "xs"
|
|
142
|
+
}, {
|
|
143
|
+
default: f(() => [w.value ? (u(), o(d(g), {
|
|
144
|
+
key: 0,
|
|
145
|
+
"popover-side-offset": 8,
|
|
146
|
+
"popover-align": "center",
|
|
147
|
+
"popover-side": "bottom"
|
|
148
|
+
}, {
|
|
149
|
+
trigger: f(() => [c(d(p), {
|
|
150
|
+
label: S.value,
|
|
151
|
+
color: b.value.tone,
|
|
152
|
+
size: r.size,
|
|
153
|
+
variant: "translucent"
|
|
154
|
+
}, null, 8, [
|
|
155
|
+
"label",
|
|
156
|
+
"color",
|
|
157
|
+
"size"
|
|
158
|
+
])]),
|
|
159
|
+
content: f(() => [c(d(_), null, {
|
|
160
|
+
default: f(() => [c(d(h), {
|
|
161
|
+
text: T.value,
|
|
162
|
+
class: "text-sm text-primary"
|
|
163
|
+
}, null, 8, ["text"])]),
|
|
164
|
+
_: 1
|
|
165
|
+
})]),
|
|
166
|
+
_: 1
|
|
167
|
+
})) : (u(), o(d(p), {
|
|
168
|
+
key: 1,
|
|
169
|
+
label: S.value,
|
|
170
|
+
color: b.value.tone,
|
|
171
|
+
size: r.size,
|
|
172
|
+
variant: "translucent"
|
|
173
|
+
}, null, 8, [
|
|
174
|
+
"label",
|
|
175
|
+
"color",
|
|
176
|
+
"size"
|
|
177
|
+
]))]),
|
|
178
|
+
_: 1
|
|
179
|
+
})) : s("", !0);
|
|
180
|
+
}
|
|
181
|
+
}), T = {
|
|
182
|
+
[e.FAILED]: {
|
|
183
|
+
tone: "error",
|
|
184
|
+
translationKey: "wise_invoicing.invoice.delivery_status.failed"
|
|
185
|
+
},
|
|
186
|
+
[e.PROCESSING]: {
|
|
187
|
+
tone: "blue",
|
|
188
|
+
translationKey: "wise_invoicing.invoice.delivery_status.processing"
|
|
189
|
+
},
|
|
190
|
+
[e.SENT]: {
|
|
191
|
+
tone: "brand",
|
|
192
|
+
translationKey: "wise_invoicing.invoice.delivery_status.sent"
|
|
193
|
+
},
|
|
194
|
+
[e.UNSENT]: {
|
|
195
|
+
tone: "gray",
|
|
196
|
+
translationKey: "wise_invoicing.invoice.delivery_status.unsent"
|
|
197
|
+
},
|
|
198
|
+
[e.VIEWED]: {
|
|
199
|
+
tone: "success",
|
|
200
|
+
translationKey: "wise_invoicing.invoice.delivery_status.viewed"
|
|
201
|
+
}
|
|
202
|
+
}, E = class {
|
|
203
|
+
static getMetadata(e) {
|
|
204
|
+
return T[e];
|
|
205
|
+
}
|
|
206
|
+
static isSent(t) {
|
|
207
|
+
return [e.SENT, e.VIEWED].includes(t);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
//#endregion
|
|
211
|
+
export { x as a, S as i, w as n, C as r, E as t };
|
package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./i18n.lib-Cvr8pcDw.js";
|
|
2
|
+
import { ut as t } from "./api.util-C_kMGlJN.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 { W as e, it as t, t as n } from "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { f as r } from "./documentTitle.composable-DsBbzhXN.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";
|
|
@@ -101,10 +101,10 @@ var u = class {
|
|
|
101
101
|
}
|
|
102
102
|
}, d = class {
|
|
103
103
|
static async get() {
|
|
104
|
-
return (await n.fromPromise(
|
|
104
|
+
return (await n.fromPromise(t({ responseValidator: void 0 }))).map((e) => u.fromDto(e.data));
|
|
105
105
|
}
|
|
106
|
-
static async update(
|
|
107
|
-
let r = await n.fromPromise(
|
|
106
|
+
static async update(t) {
|
|
107
|
+
let r = await n.fromPromise(e({ body: u.toDto(t) }));
|
|
108
108
|
return n.void(r);
|
|
109
109
|
}
|
|
110
110
|
};
|