@wisemen/wise-invoicing-web 0.17.0 → 0.19.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-CSvHKx35.js → ApprovalReminderSettingsViewDataProvider-C1cI6KQq.js} +11 -11
- package/dist/{BillingDocumentDetailViewDataProvider-BSZiFFDZ.js → BillingDocumentDetailViewDataProvider-BZCFhsjA.js} +1338 -1317
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-DQWebrh4.js → BillingDocumentPdf-DMTwOlzG.js} +79 -79
- package/dist/{DunningCaseSendDialog-MJ8KSI2s.js → DunningCaseSendDialog-DfMYo2LV.js} +23 -23
- package/dist/{InvoiceApprovalOutOfSyncIndicator-BNlaBokg.js → InvoiceApprovalOutOfSyncIndicator-BjlBhzNg.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-2zmnNJJM.js → InvoiceApprovalOverviewView-BH5rJgk6.js} +22 -22
- package/dist/{InvoiceApprovalStatusBadge-C7-CrTtD.js → InvoiceApprovalStatusBadge-CaVSCtI0.js} +4 -4
- package/dist/{InvoicePdfView-DA34o3C4.js → InvoicePdfView-DRqX3P-X.js} +2 -2
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-DljBWIFb.js → InvoicePublicProFormaPdfViewDataProvider-Dz2jGWVg.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-CclSNBDj.js → InvoiceRejectDialog-_5i8eFuk.js} +178 -178
- package/dist/{invoiceDeliveryStatus.util-CJGCDiFf.js → InvoiceStatusBadge-BI41yxpr.js} +72 -72
- package/dist/{InvoicingFileUploadProvider-B3ZzLMR8.js → InvoicingFileUploadProvider-rU9APFrt.js} +2 -2
- package/dist/IssuerSettingsViewDataProvider-nNg0lR7Y.js +544 -0
- package/dist/{PeppolSettingsViewDataProvider-BD2CGw2K.js → PeppolSettingsViewDataProvider-CFelH70Q.js} +32 -32
- package/dist/{api.util-BMza-ojm.js → api.util-sW4gNny-.js} +1 -0
- package/dist/{billingDocumentDetail.transformer-D8lwLPds.js → billingDocumentDetail.transformer-Ifa6tWtE.js} +14 -13
- package/dist/client/types.gen.d.ts +1 -0
- package/dist/client/zod.gen.d.ts +35 -0
- package/dist/{creditNoteDetail.query-8g2bZ21Y.js → creditNoteDetail.query-C4DvgGFR.js} +5 -3
- package/dist/{InvoiceDeliverySendDialog-BjFaLTOg.js → customFieldDefinitionIndex.query-BBqxMfvT.js} +272 -203
- package/dist/{deliveryReason.util-B9ZPSt7J.js → deliveryReason.util-KBh3q_-P.js} +2 -2
- package/dist/{dist-Ck8ZEByl.js → dist-47-1LAzT.js} +8 -8
- package/dist/{dist-ByzJNujV.js → dist-CyUNvdkD.js} +1 -1
- package/dist/{documentTitle.composable-QdSLs6eT.js → documentTitle.composable-Dl8Cm3v3.js} +1 -1
- package/dist/{i18n.lib-Bs40rct-.js → i18n.lib-DckceEsg.js} +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5974 -3081
- package/dist/{invoice.service-Dqj-rXA5.js → invoice.service-v9uIoFgR.js} +115 -113
- package/dist/{invoiceApproval.service-C4ZxwGB8.js → invoiceApproval.service-DXIKgCI_.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-B6IhZXLq.js → invoiceApprovalStatus.util-CB5pi_hm.js} +2 -2
- package/dist/{invoiceCustomer.service-BNekA43U.js → invoiceCustomer.service-Bl4vN_U5.js} +2 -2
- package/dist/{invoiceDetail.query-xl08jVB3.js → invoiceDetail.query-MElhxTMM.js} +1 -1
- package/dist/{invoicingConfig.composable-B0Kj9ini.js → invoicingConfig.composable-D-hxnEnh.js} +2 -2
- package/dist/{issuerSettings.query-Cmt5oUiJ.js → issuerSettings.query-CR7EtvNm.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +4 -0
- package/dist/locales/en-US.json.d.ts +2 -0
- package/dist/locales/nl-BE.json.d.ts +2 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/credit-note/api/mutations/creditNoteUpdate.mutation.d.ts +1 -0
- package/dist/modules/credit-note/models/update/creditNoteUpdateForm.model.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceUpdate.mutation.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.d.ts +1 -1
- package/dist/modules/invoice/models/invoice/update/invoiceUpdateForm.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +2 -2
- package/dist/{reminderConfig.query-DDLxE3no.js → reminderConfig.query-DJmhJp6W.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +1 -1
- package/package.json +4 -4
- package/dist/CreditNoteDetailViewDataProvider-Bs8kadYX.js +0 -799
- package/dist/CreditNotePdfViewDataProvider-DxojGCdS.js +0 -22
- package/dist/InvoiceDetailViewDataProvider-DK5Tandr.js +0 -2167
- package/dist/InvoicePdfViewDataProvider-Bl7a578G.js +0 -22
- package/dist/IssuerSettingsViewDataProvider-BgpoLQZL.js +0 -544
- package/dist/download.util-LyRpGWKA.js +0 -25
package/dist/{InvoiceApprovalOverviewView-2zmnNJJM.js → InvoiceApprovalOverviewView-BH5rJgk6.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { a as e, o as t, t as n, y as r } from "./documentTitle.composable-
|
|
1
|
+
import "./api.util-sW4gNny-.js";
|
|
2
|
+
import { a as e, o as t, t as n, y as r } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
3
3
|
import { r as i } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { t as a } from "./search.composable-CU9OpyUB.js";
|
|
5
5
|
import { Ct as o, G as s, H as c, Q as l, R as u, S as d, Tt as f, W as p, Y as m, et as h, ft as ee, i as g, l as te } from "./dist-B33lNwLw.js";
|
|
6
|
-
import { r as _ } from "./dist-
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { t as O } from "./invoiceApproval.service-
|
|
6
|
+
import { r as _ } from "./dist-CyUNvdkD.js";
|
|
7
|
+
import { t as v } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
8
|
+
import { t as y } from "./InvoiceApprovalStatusBadge-CaVSCtI0.js";
|
|
9
|
+
import { f as b, i as x, n as ne, o as re, r as ie, s as ae } from "./dist-47-1LAzT.js";
|
|
10
|
+
import { i as S, n as C, r as w, t as T } from "./InvoiceRejectDialog-_5i8eFuk.js";
|
|
11
|
+
import { n as E, t as D } from "./InvoiceApprovalOutOfSyncIndicator-BjlBhzNg.js";
|
|
12
|
+
import { t as O } from "./invoiceApproval.service-DXIKgCI_.js";
|
|
13
13
|
import { useI18n as k } from "vue-i18n";
|
|
14
14
|
import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, isRef as oe, nextTick as R, normalizeClass as z, normalizeStyle as se, openBlock as B, ref as ce, renderList as V, resolveDynamicComponent as le, unref as H, withCtx as U } from "vue";
|
|
15
15
|
import { useOffsetInfiniteQuery as ue } from "@wisemen/vue-core-api-utils";
|
|
@@ -41,7 +41,7 @@ function Te() {
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/modules/invoice-approval/actions/invoiceApprovalReject.action.ts
|
|
43
43
|
function Ee() {
|
|
44
|
-
let e = k(), t = Z().create(
|
|
44
|
+
let e = k(), t = Z().create(T);
|
|
45
45
|
return Q({
|
|
46
46
|
id: "invoice-approval-reject",
|
|
47
47
|
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? e.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === r.REQUESTED : !1,
|
|
@@ -62,7 +62,7 @@ function De(e) {
|
|
|
62
62
|
return e.approval.status === r.REJECTED || e.approval.status === r.EXPIRED || e.hasChangesSinceApprovalSent;
|
|
63
63
|
}
|
|
64
64
|
function Oe() {
|
|
65
|
-
let e = k(), t = Ce(), n =
|
|
65
|
+
let e = k(), t = Ce(), n = S();
|
|
66
66
|
return Q({
|
|
67
67
|
id: "invoice-approval-send-request",
|
|
68
68
|
isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? De(e.targetedModelOfTypeOrThrow("InvoiceApproval")) : !1,
|
|
@@ -321,11 +321,11 @@ function Fe(e) {
|
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.ts
|
|
323
323
|
function Ie() {
|
|
324
|
-
let e = k(), t = a({ debounceMs: 250 }), n =
|
|
324
|
+
let e = k(), t = a({ debounceMs: 250 }), n = E({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = x({
|
|
325
325
|
actionGroup: { name: "invoice-approvals" },
|
|
326
|
-
filters: [
|
|
326
|
+
filters: [b({
|
|
327
327
|
defaultValue: {
|
|
328
|
-
operator:
|
|
328
|
+
operator: ie.INCLUDES,
|
|
329
329
|
value: []
|
|
330
330
|
},
|
|
331
331
|
disableOperators: !0,
|
|
@@ -343,13 +343,13 @@ function Ie() {
|
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.ts
|
|
345
345
|
function Le() {
|
|
346
|
-
let e = k(), t = Z().create(
|
|
346
|
+
let e = k(), t = Z().create(C);
|
|
347
347
|
return Q({
|
|
348
348
|
id: "invoice-approval-mark-as-approved",
|
|
349
349
|
isApplicable: (e) => {
|
|
350
350
|
if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
|
|
351
351
|
let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
|
|
352
|
-
return
|
|
352
|
+
return v.canMarkAsApproved(t.approval.status);
|
|
353
353
|
},
|
|
354
354
|
name: () => e.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
|
|
355
355
|
execute: async (e) => {
|
|
@@ -459,7 +459,7 @@ var Re = /* @__PURE__ */ L({
|
|
|
459
459
|
}), s = j(() => {
|
|
460
460
|
let e = t.item.approval, i = e.reminderSentAt;
|
|
461
461
|
return i !== null && e.level !== null ? n.t("wise_invoicing.invoice_approval.overview.last_reminder", {
|
|
462
|
-
level: n.t(
|
|
462
|
+
level: n.t(v.getReminderLevelTranslationKey(e.level)),
|
|
463
463
|
time: r.toRelativeTime(i)
|
|
464
464
|
}) : e.sentAt === null ? n.t("wise_invoicing.invoice_approval.overview.not_sent_yet") : n.t("wise_invoicing.invoice_approval.overview.request_sent", { time: r.toRelativeTime(e.sentAt) });
|
|
465
465
|
}), c = {
|
|
@@ -510,7 +510,7 @@ var Re = /* @__PURE__ */ L({
|
|
|
510
510
|
align: "center",
|
|
511
511
|
gap: "xs"
|
|
512
512
|
}, {
|
|
513
|
-
default: U(() => [i.value === null ? (B(), M(
|
|
513
|
+
default: U(() => [i.value === null ? (B(), M(y, {
|
|
514
514
|
key: 1,
|
|
515
515
|
approval: t.item.approval,
|
|
516
516
|
rejection: t.item.rejectionReason === null ? null : {
|
|
@@ -529,7 +529,7 @@ var Re = /* @__PURE__ */ L({
|
|
|
529
529
|
class: "text-xs text-primary"
|
|
530
530
|
}, null, 8, ["text"])]),
|
|
531
531
|
_: 1
|
|
532
|
-
})), t.item.hasChangesSinceApprovalSent ? (B(), M(
|
|
532
|
+
})), t.item.hasChangesSinceApprovalSent ? (B(), M(D, { key: 2 })) : N("", !0)]),
|
|
533
533
|
_: 1
|
|
534
534
|
})]),
|
|
535
535
|
_: 1
|
|
@@ -595,7 +595,7 @@ var Je = /* @__PURE__ */ L({
|
|
|
595
595
|
setup(e) {
|
|
596
596
|
let t = k(), r = n(), i = we("tab", "awaiting"), a = ce(!0), { customerUuid: s, filters: u } = Ie();
|
|
597
597
|
ne(u);
|
|
598
|
-
let { hasCountError: f, isFetchingNextPage: h, isLoading: g, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal:
|
|
598
|
+
let { hasCountError: f, isFetchingNextPage: h, isLoading: g, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal: ie, tabCounts: S } = Fe({
|
|
599
599
|
customerUuid: s,
|
|
600
600
|
activeTab: j(() => i.value)
|
|
601
601
|
}), C = j(() => u.activeFilters.value.length), w = j(() => [
|
|
@@ -689,7 +689,7 @@ var Je = /* @__PURE__ */ L({
|
|
|
689
689
|
"needs-attention-total": H(x),
|
|
690
690
|
"out-of-sync-count": H(_).outOfSync,
|
|
691
691
|
"rejected-count": H(_).rejected,
|
|
692
|
-
"reminder-count-total": H(
|
|
692
|
+
"reminder-count-total": H(ie),
|
|
693
693
|
"reminder-one-count": H(_).reminderOne,
|
|
694
694
|
"reminder-two-count": H(_).reminderTwo,
|
|
695
695
|
onShowOutOfSync: n[1] ||= (e) => i.value = "out-of-sync",
|
|
@@ -753,7 +753,7 @@ var Je = /* @__PURE__ */ L({
|
|
|
753
753
|
key: 0,
|
|
754
754
|
text: H(t).t("wise_invoicing.common.no_active_filters"),
|
|
755
755
|
class: "px-sm text-xs text-secondary"
|
|
756
|
-
}, null, 8, ["text"])) : (B(), M(H(re), { key: 1 })), I(H(
|
|
756
|
+
}, null, 8, ["text"])) : (B(), M(H(re), { key: 1 })), I(H(ae))]),
|
|
757
757
|
_: 1
|
|
758
758
|
}),
|
|
759
759
|
F.value ? (B(), M(H(he), {
|
package/dist/{InvoiceApprovalStatusBadge-C7-CrTtD.js → InvoiceApprovalStatusBadge-CaVSCtI0.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./api.util-
|
|
2
|
-
import { a as e, o as t } from "./documentTitle.composable-
|
|
1
|
+
import "./api.util-sW4gNny-.js";
|
|
2
|
+
import { a as e, o as t } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
3
3
|
import { $ as n, S as r } from "./dist-B33lNwLw.js";
|
|
4
|
-
import { r as i } from "./dist-
|
|
5
|
-
import { t as a } from "./invoiceApprovalStatus.util-
|
|
4
|
+
import { r as i } from "./dist-CyUNvdkD.js";
|
|
5
|
+
import { t as a } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
6
6
|
import { useI18n as o } from "vue-i18n";
|
|
7
7
|
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, unref as v, withCtx as y } from "vue";
|
|
8
8
|
import { UIBadge as b, UIText as x, UITooltip as S, UITooltipContent as C } from "@wisemen/vue-core-design-system";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./documentTitle.composable-
|
|
2
|
-
import { t } from "./BillingDocumentPdf-
|
|
1
|
+
import { t as e } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
2
|
+
import { t } from "./BillingDocumentPdf-DMTwOlzG.js";
|
|
3
3
|
import { useI18n as n } from "vue-i18n";
|
|
4
4
|
import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, openBlock as s } from "vue";
|
|
5
5
|
//#region src/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as e } from "./invoicingConfig.composable-
|
|
2
|
-
import { t } from "./invoice.service-
|
|
1
|
+
import { n as e } from "./invoicingConfig.composable-D-hxnEnh.js";
|
|
2
|
+
import { t } from "./invoice.service-v9uIoFgR.js";
|
|
3
3
|
import { t as n } from "./DataProvider-BtnD-BzI.js";
|
|
4
|
-
import { t as r } from "./InvoicePdfView-
|
|
4
|
+
import { t as r } from "./InvoicePdfView-DRqX3P-X.js";
|
|
5
5
|
import { useI18n as i } from "vue-i18n";
|
|
6
6
|
import { computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, openBlock as d, resolveDynamicComponent as f, unref as p, watch as m, withCtx as h } from "vue";
|
|
7
7
|
import { useQuery as g } from "@wisemen/vue-core-api-utils";
|
package/dist/{InvoiceApproveDialogDataProvider-CclSNBDj.js → InvoiceRejectDialog-_5i8eFuk.js}
RENAMED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import "./api.util-
|
|
3
|
-
import { v as t } from "./documentTitle.composable-
|
|
4
|
-
import { t as n } from "./invoice.service-
|
|
1
|
+
import { t as e } from "./i18n.lib-DckceEsg.js";
|
|
2
|
+
import "./api.util-sW4gNny-.js";
|
|
3
|
+
import { v as t } from "./documentTitle.composable-Dl8Cm3v3.js";
|
|
4
|
+
import { t as n } from "./invoice.service-v9uIoFgR.js";
|
|
5
5
|
import { G as r, ft as i, xt as a } from "./dist-B33lNwLw.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
6
|
+
import { n as o, r as s, t as c } from "./InvoicingFileUploadProvider-rU9APFrt.js";
|
|
7
|
+
import { t as l } from "./formango.util-D5c2ql--.js";
|
|
8
|
+
import { t as u } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
|
|
9
|
+
import { t as d } from "./DataProvider-BtnD-BzI.js";
|
|
10
|
+
import { t as f } from "./issuerSettings.query-CR7EtvNm.js";
|
|
11
11
|
import { z as p } from "zod";
|
|
12
12
|
import { useI18n as m } from "vue-i18n";
|
|
13
13
|
import { computed as h, createBlock as g, createVNode as _, defineComponent as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
|
|
14
14
|
import { useMutation as C } from "@wisemen/vue-core-api-utils";
|
|
15
15
|
import { UIDialogBody as w, UIDialogFooter as T, UIDialogFooterCancel as E, UIDialogFooterSubmit as D, UIDialogHeader as O, UIFormDialog as k, UIFormFieldGroup as A, UIFormFileUpload as j, UIFormSubmitButton as M, UISelect as N, UITextareaField as P, createSelectOptions as F, useToast as I } from "@wisemen/vue-core-design-system";
|
|
16
16
|
import { useForm as L } from "formango";
|
|
17
|
-
//#region src/modules/invoice/api/mutations/
|
|
17
|
+
//#region src/modules/invoice/api/mutations/invoiceSendApproval.mutation.ts
|
|
18
18
|
function R() {
|
|
19
|
+
return C({
|
|
20
|
+
queryFn: (e) => e.params.hasActiveApproval ? n.restartApproval(e.params.invoiceUuid) : n.sendApproval(e.params.invoiceUuid),
|
|
21
|
+
queryKeysToInvalidate: {
|
|
22
|
+
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
23
|
+
invoiceApprovalIndex: {},
|
|
24
|
+
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
25
|
+
invoiceIndex: {}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.ts
|
|
31
|
+
function z() {
|
|
19
32
|
return C({
|
|
20
33
|
queryFn: (e) => n.archiveApproval(e.params.approvalUuid),
|
|
21
34
|
queryKeysToInvalidate: {
|
|
@@ -28,7 +41,7 @@ function R() {
|
|
|
28
41
|
}
|
|
29
42
|
//#endregion
|
|
30
43
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue
|
|
31
|
-
var
|
|
44
|
+
var B = /* @__PURE__ */ v({
|
|
32
45
|
__name: "InvoiceApprovalArchiveDialog",
|
|
33
46
|
props: {
|
|
34
47
|
approvalUuid: {},
|
|
@@ -36,7 +49,7 @@ var z = /* @__PURE__ */ v({
|
|
|
36
49
|
},
|
|
37
50
|
emits: ["close"],
|
|
38
51
|
setup(e, { emit: t }) {
|
|
39
|
-
let n = e, i = t, a = m(), o = I(), s =
|
|
52
|
+
let n = e, i = t, a = m(), o = I(), s = z(), c = L({
|
|
40
53
|
initialState: {},
|
|
41
54
|
schema: p.object({}),
|
|
42
55
|
onSubmit: async () => {
|
|
@@ -73,151 +86,8 @@ var z = /* @__PURE__ */ v({
|
|
|
73
86
|
}
|
|
74
87
|
});
|
|
75
88
|
//#endregion
|
|
76
|
-
//#region src/modules/invoice/api/mutations/invoiceRejectApproval.mutation.ts
|
|
77
|
-
function B() {
|
|
78
|
-
return C({
|
|
79
|
-
queryFn: (e) => n.rejectApproval(e.params.approvalUuid, e.body),
|
|
80
|
-
queryKeysToInvalidate: {
|
|
81
|
-
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
82
|
-
invoiceApprovalIndex: {},
|
|
83
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
84
|
-
invoiceIndex: {}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
var V = p.object({
|
|
89
|
-
attachments: u.array(),
|
|
90
|
-
reason: p.enum(t).nullable(),
|
|
91
|
-
remarks: p.string().trim().max(500).nullable()
|
|
92
|
-
}).superRefine((n, r) => {
|
|
93
|
-
n.reason === null ? r.addIssue({
|
|
94
|
-
code: "custom",
|
|
95
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
96
|
-
path: ["reason"]
|
|
97
|
-
}) : n.reason === t.OTHER && (n.remarks ?? "") === "" && r.addIssue({
|
|
98
|
-
code: "custom",
|
|
99
|
-
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
100
|
-
path: ["remarks"]
|
|
101
|
-
});
|
|
102
|
-
}), H = 10485760, U = /* @__PURE__ */ v({
|
|
103
|
-
__name: "InvoiceRejectDialog",
|
|
104
|
-
props: {
|
|
105
|
-
approvalUuid: {},
|
|
106
|
-
invoiceUuid: {}
|
|
107
|
-
},
|
|
108
|
-
emits: ["close"],
|
|
109
|
-
setup(e, { emit: n }) {
|
|
110
|
-
let r = e, a = n, o = m(), l = I(), u = B(), p = L({
|
|
111
|
-
initialState: {
|
|
112
|
-
attachments: [],
|
|
113
|
-
reason: null,
|
|
114
|
-
remarks: null
|
|
115
|
-
},
|
|
116
|
-
schema: V,
|
|
117
|
-
onSubmit: async (e) => {
|
|
118
|
-
let t = await u.execute({
|
|
119
|
-
body: e,
|
|
120
|
-
params: {
|
|
121
|
-
approvalUuid: r.approvalUuid,
|
|
122
|
-
invoiceUuid: r.invoiceUuid
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
t.isErr() ? l.apiError(t.error) : (l.show({ message: o.t("wise_invoicing.invoice.reject.success") }), a("close"));
|
|
126
|
-
},
|
|
127
|
-
onSubmitError: () => {
|
|
128
|
-
l.unableToSave();
|
|
129
|
-
}
|
|
130
|
-
}), v = p.register("attachments"), C = p.register("reason"), D = p.register("remarks"), R = h(() => F([...Object.values(t).filter((e) => e !== t.OTHER), t.OTHER]));
|
|
131
|
-
function z(e) {
|
|
132
|
-
return o.t(c.getRejectionReasonTranslationKey(e));
|
|
133
|
-
}
|
|
134
|
-
let U = h(() => C.modelValue.value === t.OTHER);
|
|
135
|
-
function W(e) {
|
|
136
|
-
return e.size > H ? o.t("wise_invoicing.invoice.reject.attachment_too_large") : !0;
|
|
137
|
-
}
|
|
138
|
-
return (e, t) => (b(), g(x(k), {
|
|
139
|
-
form: x(p),
|
|
140
|
-
size: "sm",
|
|
141
|
-
onClose: t[0] ||= (e) => a("close")
|
|
142
|
-
}, {
|
|
143
|
-
default: S(() => [
|
|
144
|
-
_(x(O), {
|
|
145
|
-
title: x(o).t("wise_invoicing.invoice.reject.title"),
|
|
146
|
-
description: x(o).t("wise_invoicing.invoice.reject.description"),
|
|
147
|
-
icon: x(i),
|
|
148
|
-
"icon-variant": "warning"
|
|
149
|
-
}, null, 8, [
|
|
150
|
-
"title",
|
|
151
|
-
"description",
|
|
152
|
-
"icon"
|
|
153
|
-
]),
|
|
154
|
-
_(x(w), null, {
|
|
155
|
-
default: S(() => [_(x(A), null, {
|
|
156
|
-
default: S(() => [
|
|
157
|
-
_(x(N), y(x(s)(x(C)), {
|
|
158
|
-
"display-fn": z,
|
|
159
|
-
"is-required": !0,
|
|
160
|
-
items: R.value,
|
|
161
|
-
label: x(o).t("wise_invoicing.invoice.reject.fields.reason")
|
|
162
|
-
}), null, 16, ["items", "label"]),
|
|
163
|
-
_(x(P), y(x(s)(x(D)), {
|
|
164
|
-
"is-required": U.value,
|
|
165
|
-
label: x(o).t("wise_invoicing.invoice.reject.fields.remark"),
|
|
166
|
-
placeholder: x(o).t("wise_invoicing.invoice.reject.fields.remark_placeholder")
|
|
167
|
-
}), null, 16, [
|
|
168
|
-
"is-required",
|
|
169
|
-
"label",
|
|
170
|
-
"placeholder"
|
|
171
|
-
]),
|
|
172
|
-
_(f, null, {
|
|
173
|
-
default: S(() => [_(x(j), y(x(s)(x(v)), {
|
|
174
|
-
accept: [
|
|
175
|
-
"application/pdf",
|
|
176
|
-
"image/png",
|
|
177
|
-
"image/jpeg"
|
|
178
|
-
],
|
|
179
|
-
description: x(o).t("wise_invoicing.invoice.reject.fields.attachment_description"),
|
|
180
|
-
hint: x(o).t("wise_invoicing.invoice.reject.fields.attachment_hint"),
|
|
181
|
-
"is-valid-file": W,
|
|
182
|
-
preprocess: x(d).preprocess,
|
|
183
|
-
class: "w-full"
|
|
184
|
-
}), null, 16, [
|
|
185
|
-
"description",
|
|
186
|
-
"hint",
|
|
187
|
-
"preprocess"
|
|
188
|
-
])]),
|
|
189
|
-
_: 1
|
|
190
|
-
})
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
})]),
|
|
194
|
-
_: 1
|
|
195
|
-
}),
|
|
196
|
-
_(x(T), null, {
|
|
197
|
-
default: S(() => [_(x(E)), _(x(M), { label: x(o).t("wise_invoicing.invoice.reject.submit") }, null, 8, ["label"])]),
|
|
198
|
-
_: 1
|
|
199
|
-
})
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["form"]));
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region src/modules/invoice/api/mutations/invoiceSendApproval.mutation.ts
|
|
207
|
-
function W() {
|
|
208
|
-
return C({
|
|
209
|
-
queryFn: (e) => e.params.hasActiveApproval ? n.restartApproval(e.params.invoiceUuid) : n.sendApproval(e.params.invoiceUuid),
|
|
210
|
-
queryKeysToInvalidate: {
|
|
211
|
-
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
212
|
-
invoiceApprovalIndex: {},
|
|
213
|
-
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
214
|
-
invoiceIndex: {}
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
//#endregion
|
|
219
89
|
//#region src/modules/invoice/api/mutations/invoiceApproveApproval.mutation.ts
|
|
220
|
-
function
|
|
90
|
+
function V() {
|
|
221
91
|
return C({
|
|
222
92
|
queryFn: (e) => n.approveApproval(e.params.approvalUuid, e.body),
|
|
223
93
|
queryKeysToInvalidate: {
|
|
@@ -230,12 +100,12 @@ function G() {
|
|
|
230
100
|
}
|
|
231
101
|
//#endregion
|
|
232
102
|
//#region src/modules/invoice/models/invoice/approval/invoiceApproveForm.model.ts
|
|
233
|
-
var
|
|
234
|
-
proofOfApproval:
|
|
103
|
+
var H = p.object({
|
|
104
|
+
proofOfApproval: o.array(),
|
|
235
105
|
remarks: p.string().trim().nullable()
|
|
236
106
|
});
|
|
237
|
-
function
|
|
238
|
-
return
|
|
107
|
+
function U(t) {
|
|
108
|
+
return H.superRefine((n, r) => {
|
|
239
109
|
t && n.proofOfApproval.length === 0 && r.addIssue({
|
|
240
110
|
code: "custom",
|
|
241
111
|
message: e.global.t("wise_invoicing.invoice.approve.proof_required"),
|
|
@@ -245,7 +115,7 @@ function q(t) {
|
|
|
245
115
|
}
|
|
246
116
|
//#endregion
|
|
247
117
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue?vue&type=script&setup=true&lang.ts
|
|
248
|
-
var
|
|
118
|
+
var W = 26214400, G = /* @__PURE__ */ v({
|
|
249
119
|
__name: "InvoiceApproveDialog",
|
|
250
120
|
props: {
|
|
251
121
|
approvalUuid: {},
|
|
@@ -258,31 +128,31 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
258
128
|
"application/pdf",
|
|
259
129
|
"image/png",
|
|
260
130
|
"image/jpeg"
|
|
261
|
-
]), o = m(),
|
|
131
|
+
]), o = m(), u = I(), d = V(), f = L({
|
|
262
132
|
initialState: {
|
|
263
133
|
proofOfApproval: [],
|
|
264
134
|
remarks: null
|
|
265
135
|
},
|
|
266
|
-
schema:
|
|
136
|
+
schema: U(n.isProofOfApprovalRequired),
|
|
267
137
|
onSubmit: async (e) => {
|
|
268
|
-
let t = await
|
|
138
|
+
let t = await d.execute({
|
|
269
139
|
body: e,
|
|
270
140
|
params: {
|
|
271
141
|
approvalUuid: n.approvalUuid,
|
|
272
142
|
invoiceUuid: n.invoiceUuid
|
|
273
143
|
}
|
|
274
144
|
});
|
|
275
|
-
t.isErr() ?
|
|
145
|
+
t.isErr() ? u.apiError(t.error) : (u.show({ message: o.t("wise_invoicing.invoice.approve.success") }), r("close"));
|
|
276
146
|
},
|
|
277
147
|
onSubmitError: () => {
|
|
278
|
-
|
|
148
|
+
u.unableToSave();
|
|
279
149
|
}
|
|
280
|
-
}), p =
|
|
150
|
+
}), p = f.register("proofOfApproval"), h = f.register("remarks");
|
|
281
151
|
function v(e) {
|
|
282
|
-
return i.has(e.type) ? e.size >
|
|
152
|
+
return i.has(e.type) ? e.size > W ? o.t("wise_invoicing.invoice.approve.proof_too_large") : !0 : o.t("wise_invoicing.invoice.approve.proof_invalid_type");
|
|
283
153
|
}
|
|
284
154
|
return (e, t) => (b(), g(x(k), {
|
|
285
|
-
form: x(
|
|
155
|
+
form: x(f),
|
|
286
156
|
size: "sm",
|
|
287
157
|
onClose: t[0] ||= (e) => r("close")
|
|
288
158
|
}, {
|
|
@@ -299,14 +169,14 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
299
169
|
]),
|
|
300
170
|
_(x(w), null, {
|
|
301
171
|
default: S(() => [_(x(A), null, {
|
|
302
|
-
default: S(() => [_(
|
|
303
|
-
default: S(() => [_(x(j), y(x(
|
|
172
|
+
default: S(() => [_(c, null, {
|
|
173
|
+
default: S(() => [_(x(j), y(x(l)(x(p)), {
|
|
304
174
|
accept: Array.from(x(i)),
|
|
305
175
|
description: x(o).t("wise_invoicing.invoice.approve.fields.proof_description"),
|
|
306
176
|
hint: x(o).t("wise_invoicing.invoice.approve.fields.proof_hint"),
|
|
307
177
|
"is-required": n.isProofOfApprovalRequired,
|
|
308
178
|
"is-valid-file": v,
|
|
309
|
-
preprocess: x(
|
|
179
|
+
preprocess: x(s).preprocess,
|
|
310
180
|
class: "w-full"
|
|
311
181
|
}), null, 16, [
|
|
312
182
|
"accept",
|
|
@@ -316,7 +186,7 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
316
186
|
"preprocess"
|
|
317
187
|
])]),
|
|
318
188
|
_: 1
|
|
319
|
-
}), _(x(P), y(x(
|
|
189
|
+
}), _(x(P), y(x(l)(x(h)), {
|
|
320
190
|
label: x(o).t("wise_invoicing.invoice.approve.fields.note"),
|
|
321
191
|
placeholder: x(o).t("wise_invoicing.invoice.approve.fields.note_placeholder")
|
|
322
192
|
}), null, 16, ["label", "placeholder"])]),
|
|
@@ -332,7 +202,7 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
332
202
|
_: 1
|
|
333
203
|
}, 8, ["form"]));
|
|
334
204
|
}
|
|
335
|
-
}),
|
|
205
|
+
}), K = /* @__PURE__ */ v({
|
|
336
206
|
inheritAttrs: !1,
|
|
337
207
|
__name: "InvoiceApproveDialogDataProvider",
|
|
338
208
|
props: {
|
|
@@ -341,9 +211,9 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
341
211
|
},
|
|
342
212
|
emits: ["close"],
|
|
343
213
|
setup(e, { emit: t }) {
|
|
344
|
-
let n = e, r = t, i =
|
|
345
|
-
return (e, t) => (b(), g(
|
|
346
|
-
default: S(({ data: i }) => [_(
|
|
214
|
+
let n = e, r = t, i = f();
|
|
215
|
+
return (e, t) => (b(), g(d, { queries: { issuerSettings: x(i) } }, {
|
|
216
|
+
default: S(({ data: i }) => [_(G, y(e.$attrs, {
|
|
347
217
|
"approval-uuid": n.approvalUuid,
|
|
348
218
|
"invoice-uuid": n.invoiceUuid,
|
|
349
219
|
"is-proof-of-approval-required": i.issuerSettings.requiresInvoiceApprovalFile,
|
|
@@ -358,4 +228,134 @@ var J = 26214400, Y = /* @__PURE__ */ v({
|
|
|
358
228
|
}
|
|
359
229
|
});
|
|
360
230
|
//#endregion
|
|
361
|
-
|
|
231
|
+
//#region src/modules/invoice/api/mutations/invoiceRejectApproval.mutation.ts
|
|
232
|
+
function q() {
|
|
233
|
+
return C({
|
|
234
|
+
queryFn: (e) => n.rejectApproval(e.params.approvalUuid, e.body),
|
|
235
|
+
queryKeysToInvalidate: {
|
|
236
|
+
invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
|
|
237
|
+
invoiceApprovalIndex: {},
|
|
238
|
+
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
239
|
+
invoiceIndex: {}
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
var J = p.object({
|
|
244
|
+
attachments: o.array(),
|
|
245
|
+
reason: p.enum(t).nullable(),
|
|
246
|
+
remarks: p.string().trim().max(500).nullable()
|
|
247
|
+
}).superRefine((n, r) => {
|
|
248
|
+
n.reason === null ? r.addIssue({
|
|
249
|
+
code: "custom",
|
|
250
|
+
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
251
|
+
path: ["reason"]
|
|
252
|
+
}) : n.reason === t.OTHER && (n.remarks ?? "") === "" && r.addIssue({
|
|
253
|
+
code: "custom",
|
|
254
|
+
message: e.global.t("wise_invoicing.invoice.approval.validation.required"),
|
|
255
|
+
path: ["remarks"]
|
|
256
|
+
});
|
|
257
|
+
}), Y = 10485760, X = /* @__PURE__ */ v({
|
|
258
|
+
__name: "InvoiceRejectDialog",
|
|
259
|
+
props: {
|
|
260
|
+
approvalUuid: {},
|
|
261
|
+
invoiceUuid: {}
|
|
262
|
+
},
|
|
263
|
+
emits: ["close"],
|
|
264
|
+
setup(e, { emit: n }) {
|
|
265
|
+
let r = e, a = n, o = m(), d = I(), f = q(), p = L({
|
|
266
|
+
initialState: {
|
|
267
|
+
attachments: [],
|
|
268
|
+
reason: null,
|
|
269
|
+
remarks: null
|
|
270
|
+
},
|
|
271
|
+
schema: J,
|
|
272
|
+
onSubmit: async (e) => {
|
|
273
|
+
let t = await f.execute({
|
|
274
|
+
body: e,
|
|
275
|
+
params: {
|
|
276
|
+
approvalUuid: r.approvalUuid,
|
|
277
|
+
invoiceUuid: r.invoiceUuid
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
t.isErr() ? d.apiError(t.error) : (d.show({ message: o.t("wise_invoicing.invoice.reject.success") }), a("close"));
|
|
281
|
+
},
|
|
282
|
+
onSubmitError: () => {
|
|
283
|
+
d.unableToSave();
|
|
284
|
+
}
|
|
285
|
+
}), v = p.register("attachments"), C = p.register("reason"), D = p.register("remarks"), R = h(() => F([...Object.values(t).filter((e) => e !== t.OTHER), t.OTHER]));
|
|
286
|
+
function z(e) {
|
|
287
|
+
return o.t(u.getRejectionReasonTranslationKey(e));
|
|
288
|
+
}
|
|
289
|
+
let B = h(() => C.modelValue.value === t.OTHER);
|
|
290
|
+
function V(e) {
|
|
291
|
+
return e.size > Y ? o.t("wise_invoicing.invoice.reject.attachment_too_large") : !0;
|
|
292
|
+
}
|
|
293
|
+
return (e, t) => (b(), g(x(k), {
|
|
294
|
+
form: x(p),
|
|
295
|
+
size: "sm",
|
|
296
|
+
onClose: t[0] ||= (e) => a("close")
|
|
297
|
+
}, {
|
|
298
|
+
default: S(() => [
|
|
299
|
+
_(x(O), {
|
|
300
|
+
title: x(o).t("wise_invoicing.invoice.reject.title"),
|
|
301
|
+
description: x(o).t("wise_invoicing.invoice.reject.description"),
|
|
302
|
+
icon: x(i),
|
|
303
|
+
"icon-variant": "warning"
|
|
304
|
+
}, null, 8, [
|
|
305
|
+
"title",
|
|
306
|
+
"description",
|
|
307
|
+
"icon"
|
|
308
|
+
]),
|
|
309
|
+
_(x(w), null, {
|
|
310
|
+
default: S(() => [_(x(A), null, {
|
|
311
|
+
default: S(() => [
|
|
312
|
+
_(x(N), y(x(l)(x(C)), {
|
|
313
|
+
"display-fn": z,
|
|
314
|
+
"is-required": !0,
|
|
315
|
+
items: R.value,
|
|
316
|
+
label: x(o).t("wise_invoicing.invoice.reject.fields.reason")
|
|
317
|
+
}), null, 16, ["items", "label"]),
|
|
318
|
+
_(x(P), y(x(l)(x(D)), {
|
|
319
|
+
"is-required": B.value,
|
|
320
|
+
label: x(o).t("wise_invoicing.invoice.reject.fields.remark"),
|
|
321
|
+
placeholder: x(o).t("wise_invoicing.invoice.reject.fields.remark_placeholder")
|
|
322
|
+
}), null, 16, [
|
|
323
|
+
"is-required",
|
|
324
|
+
"label",
|
|
325
|
+
"placeholder"
|
|
326
|
+
]),
|
|
327
|
+
_(c, null, {
|
|
328
|
+
default: S(() => [_(x(j), y(x(l)(x(v)), {
|
|
329
|
+
accept: [
|
|
330
|
+
"application/pdf",
|
|
331
|
+
"image/png",
|
|
332
|
+
"image/jpeg"
|
|
333
|
+
],
|
|
334
|
+
description: x(o).t("wise_invoicing.invoice.reject.fields.attachment_description"),
|
|
335
|
+
hint: x(o).t("wise_invoicing.invoice.reject.fields.attachment_hint"),
|
|
336
|
+
"is-valid-file": V,
|
|
337
|
+
preprocess: x(s).preprocess,
|
|
338
|
+
class: "w-full"
|
|
339
|
+
}), null, 16, [
|
|
340
|
+
"description",
|
|
341
|
+
"hint",
|
|
342
|
+
"preprocess"
|
|
343
|
+
])]),
|
|
344
|
+
_: 1
|
|
345
|
+
})
|
|
346
|
+
]),
|
|
347
|
+
_: 1
|
|
348
|
+
})]),
|
|
349
|
+
_: 1
|
|
350
|
+
}),
|
|
351
|
+
_(x(T), null, {
|
|
352
|
+
default: S(() => [_(x(E)), _(x(M), { label: x(o).t("wise_invoicing.invoice.reject.submit") }, null, 8, ["label"])]),
|
|
353
|
+
_: 1
|
|
354
|
+
})
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["form"]));
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
//#endregion
|
|
361
|
+
export { R as i, K as n, B as r, X as t };
|