@unimaze/billing 0.20.16 → 0.21.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/lib/common/components/CommonTranslations.d.ts +102 -2
- package/lib/common/components/CommonTranslations.js +10 -1
- package/lib/common/components/attachments/Attachment.d.ts +6 -4
- package/lib/common/components/attachments/Attachment.js +26 -10
- package/lib/common/components/attachments/AttachmentModal.d.ts +21 -0
- package/lib/common/components/attachments/AttachmentModal.js +195 -0
- package/lib/common/components/attachments/index.d.ts +13 -17
- package/lib/common/components/attachments/index.js +189 -23
- package/lib/common/components/base-information/AccountingCost.d.ts +7 -5
- package/lib/common/components/base-information/AccountingCost.js +32 -11
- package/lib/common/components/base-information/OrderReference.d.ts +6 -4
- package/lib/common/components/base-information/OrderReference.js +31 -14
- package/lib/common/components/base-information/ProjectReference.d.ts +9 -5
- package/lib/common/components/base-information/ProjectReference.js +8 -6
- package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +32 -5
- package/lib/common/components/base-information/ReferenceIdentifiers.js +126 -83
- package/lib/common/components/base-information/index.d.ts +51 -5
- package/lib/common/components/base-information/index.js +99 -154
- package/lib/common/components/billing-lines/BillingCalculations.d.ts +7 -5
- package/lib/common/components/billing-lines/BillingCalculations.js +79 -46
- package/lib/common/components/billing-lines/BillingLinePreview.d.ts +21 -0
- package/lib/common/components/billing-lines/BillingLinePreview.js +41 -0
- package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +6 -4
- package/lib/common/components/billing-lines/BillingTaxSummary.js +39 -13
- package/lib/common/components/billing-lines/NewBillingLines.d.ts +120 -4
- package/lib/common/components/billing-lines/NewBillingLines.js +396 -72
- package/lib/common/components/billing-lines/index.d.ts +33 -6
- package/lib/common/components/billing-lines/index.js +71 -244
- package/lib/common/components/component-container/Content.d.ts +2 -2
- package/lib/common/components/component-container/index.d.ts +1 -0
- package/lib/common/components/component-container/index.js +1 -1
- package/lib/common/components/customer/CostCenter.d.ts +6 -4
- package/lib/common/components/customer/CostCenter.js +25 -9
- package/lib/common/components/customer/CustomerContactName.d.ts +6 -4
- package/lib/common/components/customer/CustomerContactName.js +24 -8
- package/lib/common/components/customer/hardCoddedCustomer.js +19 -3
- package/lib/common/components/customer/index.d.ts +11 -5
- package/lib/common/components/customer/index.js +97 -42
- package/lib/common/components/date-picker/index.d.ts +21 -0
- package/lib/common/components/date-picker/index.js +23 -0
- package/lib/common/components/delivery-location/index.d.ts +6 -4
- package/lib/common/components/delivery-location/index.js +20 -4
- package/lib/common/components/editable-cell/index.js +2 -2
- package/lib/common/components/editable-row/index.d.ts +1 -1
- package/lib/common/components/editable-row/index.js +24 -7
- package/lib/common/components/form-item/index.d.ts +13 -6
- package/lib/common/components/form-item/index.js +16 -20
- package/lib/common/components/index.d.ts +10 -0
- package/lib/common/components/index.js +30 -8
- package/lib/common/components/input/index.d.ts +23 -0
- package/lib/common/components/input/index.js +37 -0
- package/lib/common/components/invoice/index.d.ts +40 -0
- package/lib/common/components/invoice/index.js +52 -0
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
- package/lib/common/components/invoice-preview/InvoicePreviewHeader.js +105 -0
- package/lib/common/components/invoice-preview/index.d.ts +16 -0
- package/lib/common/components/invoice-preview/index.js +393 -0
- package/lib/common/components/locale-intl/index.d.ts +0 -10
- package/lib/common/components/locale-intl/index.js +50 -42
- package/lib/common/components/payment-method/index.d.ts +69 -6
- package/lib/common/components/payment-method/index.js +145 -57
- package/lib/common/components/payment-method/paymentMethodForConversion.js +3 -1
- package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
- package/lib/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
- package/lib/common/components/submit-confirmation/index.d.ts +8 -0
- package/lib/common/components/submit-confirmation/index.js +34 -0
- package/lib/common/components/supplier/CityAutofill.d.ts +18 -0
- package/lib/common/components/supplier/CityAutofill.js +159 -0
- package/lib/common/components/supplier/index.d.ts +79 -5
- package/lib/common/components/supplier/index.js +195 -103
- package/lib/common/components/tooltip/index.d.ts +7 -0
- package/lib/common/components/tooltip/index.js +15 -0
- package/lib/common/components/welcome-modal/index.d.ts +15 -0
- package/lib/common/components/welcome-modal/index.js +26 -0
- package/lib/common/consts/formLayout.js +4 -3
- package/lib/common/consts/validationRules.d.ts +1 -1
- package/lib/common/consts/validationRules.js +6 -0
- package/lib/common/enums/index.js +5 -1
- package/lib/common/style/index.css +18 -0
- package/lib/common/types/BillingLineMetadataOverride.d.ts +2 -0
- package/lib/common/types/CommonProps.d.ts +15 -1
- package/lib/common/types/DiscountType.d.ts +1 -0
- package/lib/common/types/DiscountType.js +2 -0
- package/lib/common/types/ReceiverRequirements.d.ts +1 -1
- package/lib/common/types/ReceiverRequirements.js +1 -0
- package/lib/common/types/index.js +15 -0
- package/lib/create-invoice/IntlLoader.d.ts +0 -6
- package/lib/create-invoice/IntlLoader.js +78 -13
- package/lib/create-invoice/index.d.ts +65 -4
- package/lib/create-invoice/index.js +437 -181
- package/lib/enums.d.ts +2 -3
- package/lib/enums.js +1 -0
- package/lib/index.js +22 -6
- package/lib/translations/locales/en.json +181 -0
- package/lib/translations/locales/is.json +135 -116
- package/lib/translations/locales.d.ts +360 -161
- package/lib/translations/locales.js +3 -2
- package/lib/utils/ApiUtility.d.ts +4 -4
- package/lib/utils/ApiUtility.js +13 -10
- package/lib/utils/BillingLineUtility.d.ts +16 -5
- package/lib/utils/BillingLineUtility.js +65 -26
- package/lib/utils/ConversionUtility.js +15 -7
- package/lib/utils/FileUploadUtility.d.ts +4 -2
- package/lib/utils/FileUploadUtility.js +28 -9
- package/lib/utils/IntlUtility.d.ts +3 -2
- package/lib/utils/IntlUtility.js +2 -1
- package/lib/utils/LocationUtility.d.ts +1 -0
- package/lib/utils/LocationUtility.js +81 -0
- package/lib/utils/ReferenceIdentifierUtility.js +2 -1
- package/lib/utils/RequirementsUtility.d.ts +9 -7
- package/lib/utils/RequirementsUtility.js +46 -22
- package/lib/utils/index.js +4 -3
- package/package.json +36 -18
- package/lib/style/index.css +0 -51
|
@@ -1,43 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
2
|
+
// import * as React from "react";
|
|
3
|
+
// import {IntlProvider} from "react-intl";
|
|
4
|
+
// import * as dayjs from "dayjs";
|
|
5
|
+
// import "moment/locale/is";
|
|
6
|
+
// import "moment/locale/sr";
|
|
7
|
+
// import {ConfigProvider} from "antd";
|
|
8
|
+
// import enUS from "antd/es/locale/en_US";
|
|
9
|
+
// import isIS from "antd/es/locale/is_IS";
|
|
10
|
+
// import {Locale} from "antd/es/locale";
|
|
11
|
+
// import localeData from "../../../translations/locales";
|
|
12
|
+
// interface IHotSwappingIntlProviderOwnProps {
|
|
13
|
+
// initialLocale: string;
|
|
14
|
+
// initialMessages: any;
|
|
15
|
+
// languageString?: string;
|
|
16
|
+
// children?: React.ReactNode;
|
|
17
|
+
// }
|
|
18
|
+
// const HotIntlProvider: React.FC<IHotSwappingIntlProviderOwnProps> = (props) => {
|
|
19
|
+
// let antLocale: Locale;
|
|
20
|
+
// const {languageString, initialLocale} = props;
|
|
21
|
+
// // const language: string = languageString ? languageString : "en";
|
|
22
|
+
// const language: string = initialLocale;
|
|
23
|
+
// switch (language.toLowerCase()) {
|
|
24
|
+
// case "en":
|
|
25
|
+
// antLocale = enUS;
|
|
26
|
+
// dayjs.locale("en");
|
|
27
|
+
// break;
|
|
28
|
+
// case "is":
|
|
29
|
+
// antLocale = isIS;
|
|
30
|
+
// dayjs.locale("is");
|
|
31
|
+
// break;
|
|
32
|
+
// default:
|
|
33
|
+
// antLocale = enUS;
|
|
34
|
+
// dayjs.locale("en");
|
|
35
|
+
// }
|
|
36
|
+
// return (
|
|
37
|
+
// <ConfigProvider
|
|
38
|
+
// locale={antLocale}
|
|
39
|
+
// >
|
|
40
|
+
// <IntlProvider
|
|
41
|
+
// locale={language}
|
|
42
|
+
// defaultLocale={"en"}
|
|
43
|
+
// key={language}
|
|
44
|
+
// messages={(localeData as any)[language]}
|
|
45
|
+
// >
|
|
46
|
+
// {props.children}
|
|
47
|
+
// </IntlProvider>
|
|
48
|
+
// </ConfigProvider>
|
|
49
|
+
// );
|
|
50
|
+
// };
|
|
51
|
+
// export default HotIntlProvider;
|
|
@@ -1,13 +1,76 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
3
|
import { FormInstance } from "antd/es/form";
|
|
4
4
|
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
export declare const translationMessages:
|
|
6
|
-
|
|
5
|
+
export declare const translationMessages: {
|
|
6
|
+
paymentMethod_title: {
|
|
7
|
+
id: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
};
|
|
10
|
+
paymentMethod_label: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
paymentMethod_labels_domesticTransfer_bankNo: {
|
|
15
|
+
id: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
};
|
|
18
|
+
paymentMethod_labels_domesticTransfer_accountType: {
|
|
19
|
+
id: string;
|
|
20
|
+
defaultMessage: string;
|
|
21
|
+
};
|
|
22
|
+
paymentMethod_labels_domesticTransfer_accountNo: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
};
|
|
26
|
+
paymentMethod_labels_domesticTransfer_paymentReference: {
|
|
27
|
+
id: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
};
|
|
30
|
+
paymentMethod_labels_icelandicClaim_bankNo: {
|
|
31
|
+
id: string;
|
|
32
|
+
defaultMessage: string;
|
|
33
|
+
};
|
|
34
|
+
paymentMethod_labels_icelandicClaim_claimNo: {
|
|
35
|
+
id: string;
|
|
36
|
+
defaultMessage: string;
|
|
37
|
+
};
|
|
38
|
+
paymentMethod_labels_methods_undefined: {
|
|
39
|
+
id: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
};
|
|
42
|
+
paymentMethod_labels_methods_mutuallyAgreed: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
};
|
|
46
|
+
paymentMethod_labels_methods_domesticTransfer: {
|
|
47
|
+
id: string;
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
};
|
|
50
|
+
paymentMethod_labels_methods_domesticClaim: {
|
|
51
|
+
id: string;
|
|
52
|
+
defaultMessage: string;
|
|
53
|
+
};
|
|
54
|
+
paymentMethod_rules_number: {
|
|
55
|
+
id: string;
|
|
56
|
+
defaultMessage: string;
|
|
57
|
+
};
|
|
58
|
+
paymentMethod_rules_Length: {
|
|
59
|
+
id: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
interface Props extends WrappedComponentProps {
|
|
7
64
|
formInstance: FormInstance;
|
|
8
65
|
receiverRequirements: NewReceiverRequirements;
|
|
66
|
+
validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
|
|
67
|
+
isSaveFieldValuesSelected: boolean;
|
|
68
|
+
onSaveFieldValuesChange: () => void;
|
|
69
|
+
isActiveStep: boolean;
|
|
9
70
|
}
|
|
10
|
-
declare const _default: React.
|
|
11
|
-
|
|
71
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
72
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
73
|
+
} & React.RefAttributes<any>> & {
|
|
74
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
12
75
|
};
|
|
13
76
|
export default _default;
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
3
19
|
if (mod && mod.__esModule) return mod;
|
|
4
20
|
var result = {};
|
|
5
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result
|
|
6
|
-
result
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
7
23
|
return result;
|
|
8
24
|
};
|
|
9
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.translationMessages = void 0;
|
|
10
27
|
var react_1 = __importStar(require("react"));
|
|
11
28
|
var components_1 = require("../../components");
|
|
12
29
|
var antd_1 = require("antd");
|
|
@@ -15,7 +32,10 @@ var form_item_1 = require("../form-item");
|
|
|
15
32
|
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
16
33
|
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
17
34
|
var mapi_1 = require("@unimaze/api-clients/lib/mapi");
|
|
18
|
-
|
|
35
|
+
var react_use_1 = require("react-use");
|
|
36
|
+
var CommonTranslations_1 = require("../CommonTranslations");
|
|
37
|
+
var lodash_1 = require("lodash");
|
|
38
|
+
exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
19
39
|
paymentMethod_title: {
|
|
20
40
|
id: "paymentMethod_title",
|
|
21
41
|
defaultMessage: "Payment method",
|
|
@@ -47,6 +67,7 @@ exports.translationMessages = react_intl_1.defineMessages({
|
|
|
47
67
|
paymentMethod_labels_icelandicClaim_claimNo: {
|
|
48
68
|
id: "paymentMethod_labels_icelandicClaim_claimNo",
|
|
49
69
|
defaultMessage: "Account no",
|
|
70
|
+
// defaultMessage: "Claim no", // "Kröfunúmer",
|
|
50
71
|
},
|
|
51
72
|
paymentMethod_labels_methods_undefined: {
|
|
52
73
|
id: "paymentMethod_labels_methods_undefined",
|
|
@@ -58,7 +79,7 @@ exports.translationMessages = react_intl_1.defineMessages({
|
|
|
58
79
|
},
|
|
59
80
|
paymentMethod_labels_methods_domesticTransfer: {
|
|
60
81
|
id: "paymentMethod_labels_methods_domesticTransfer",
|
|
61
|
-
defaultMessage: "Transfer",
|
|
82
|
+
defaultMessage: "Transfer", // Domestic transfer - "Millifærsla innanlands"
|
|
62
83
|
},
|
|
63
84
|
paymentMethod_labels_methods_domesticClaim: {
|
|
64
85
|
id: "paymentMethod_labels_methods_domesticClaim",
|
|
@@ -66,47 +87,88 @@ exports.translationMessages = react_intl_1.defineMessages({
|
|
|
66
87
|
},
|
|
67
88
|
paymentMethod_rules_number: {
|
|
68
89
|
id: "paymentMethod_rules_number",
|
|
69
|
-
defaultMessage: "Please use only number characters"
|
|
90
|
+
defaultMessage: "Please use only number characters",
|
|
70
91
|
},
|
|
71
92
|
paymentMethod_rules_Length: {
|
|
72
93
|
id: "paymentMethod_rules_Length",
|
|
73
|
-
defaultMessage: "{fieldName} must be between {min} and {max}"
|
|
74
|
-
}
|
|
94
|
+
defaultMessage: "{fieldName} must be between {min} and {max}",
|
|
95
|
+
},
|
|
75
96
|
});
|
|
76
97
|
var PaymentMethod = function (props) {
|
|
77
|
-
var
|
|
98
|
+
var width = (0, react_use_1.useWindowSize)().width;
|
|
99
|
+
var _a = (0, react_1.useState)(false), isMobile = _a[0], setIsMobile = _a[1];
|
|
100
|
+
var colorInfoBg = antd_1.theme.useToken().token.colorInfoBg;
|
|
101
|
+
react_1.default.useEffect(function () {
|
|
102
|
+
if (width < 768) {
|
|
103
|
+
setIsMobile(true);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
setIsMobile(false);
|
|
107
|
+
}
|
|
108
|
+
}, [width]);
|
|
109
|
+
var paymentMeansType = props.formInstance.getFieldValue([
|
|
110
|
+
"invoice",
|
|
111
|
+
"paymentMeans",
|
|
112
|
+
"type",
|
|
113
|
+
])
|
|
114
|
+
? props.formInstance.getFieldValue(["invoice", "paymentMeans", "type"])
|
|
115
|
+
: "NotSpecified";
|
|
78
116
|
var initialPaymentMeansType = mapi_1.PaymentMeansType[paymentMeansType];
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
|
|
117
|
+
var _b = (0, react_1.useState)(initialPaymentMeansType), paymentMethod = _b[0], setPaymentMethod = _b[1]; // PaymentMeansType.DomesticClaim);
|
|
118
|
+
var fieldPaths = [
|
|
119
|
+
["invoice", "paymentMeans", "domesticTransfer", "bankNumber"],
|
|
120
|
+
["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber"],
|
|
121
|
+
["invoice", "paymentMeans", "domesticTransfer", "accountNumber"],
|
|
122
|
+
["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier"],
|
|
123
|
+
["invoice", "paymentMeans", "domesticClaim", "bankNumber"],
|
|
124
|
+
["invoice", "paymentMeans", "domesticClaim", "accountNumber"],
|
|
125
|
+
["invoice", "paymentMeans", "type"],
|
|
126
|
+
];
|
|
127
|
+
var debouncedValidateFields = (0, lodash_1.debounce)(props.validateFields, 500);
|
|
128
|
+
react_1.default.useEffect(function () {
|
|
129
|
+
if (!props.isActiveStep)
|
|
130
|
+
return;
|
|
131
|
+
debouncedValidateFields(fieldPaths, true);
|
|
132
|
+
}, [props.isActiveStep, JSON.stringify(props.formInstance.getFieldsValue(fieldPaths))]);
|
|
133
|
+
var domesticTransferFormFields = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
134
|
+
react_1.default.createElement(antd_1.Form.Item, null,
|
|
82
135
|
react_1.default.createElement(antd_1.Row, { gutter: [8, 0] },
|
|
83
136
|
react_1.default.createElement(antd_1.Col, { span: 6 },
|
|
84
|
-
react_1.default.createElement(antd_1.Form.Item, { noStyle: true,
|
|
85
|
-
// label={props.intl.formatMessage(translationMessages.paymentMethod_labels_domesticTransfer_bankNo)}
|
|
86
|
-
name: ["invoice", "paymentMeans", "domesticTransfer", "bankNumber"], rules: [
|
|
137
|
+
react_1.default.createElement(antd_1.Form.Item, { noStyle: true, name: ["invoice", "paymentMeans", "domesticTransfer", "bankNumber"], rules: [
|
|
87
138
|
{
|
|
88
139
|
pattern: new RegExp("^[0-9]*$"),
|
|
89
140
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_number),
|
|
90
141
|
},
|
|
142
|
+
{
|
|
143
|
+
required: true,
|
|
144
|
+
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage),
|
|
145
|
+
},
|
|
91
146
|
{
|
|
92
147
|
min: 1,
|
|
93
148
|
max: 4,
|
|
94
149
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_Length, {
|
|
95
150
|
fieldName: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_bankNo),
|
|
96
151
|
min: 1,
|
|
97
|
-
max: 4
|
|
152
|
+
max: 4,
|
|
98
153
|
}),
|
|
99
|
-
}
|
|
154
|
+
},
|
|
100
155
|
] },
|
|
101
|
-
react_1.default.createElement(
|
|
156
|
+
react_1.default.createElement(components_1.UmzInput, { defaultIsRequired: true, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_bankNo) }))),
|
|
102
157
|
react_1.default.createElement(antd_1.Col, { span: 6 },
|
|
103
158
|
react_1.default.createElement(antd_1.Form.Item, { noStyle: true,
|
|
104
159
|
// label={props.intl.formatMessage(translationMessages.paymentMethod_labels_domesticTransfer_accountType)}
|
|
105
|
-
name: ["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber"], rules: [
|
|
160
|
+
name: ["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber"], rules: [
|
|
161
|
+
{
|
|
106
162
|
required: true,
|
|
107
|
-
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage)
|
|
108
|
-
}
|
|
109
|
-
|
|
163
|
+
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage),
|
|
164
|
+
},
|
|
165
|
+
] },
|
|
166
|
+
react_1.default.createElement(antd_1.Select, { placeholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_accountType), popupMatchSelectWidth: false, defaultValue: props.formInstance.getFieldValue([
|
|
167
|
+
"invoice",
|
|
168
|
+
"paymentMeans",
|
|
169
|
+
"domesticTransfer",
|
|
170
|
+
"accountTypeNumber",
|
|
171
|
+
]) || "04" },
|
|
110
172
|
react_1.default.createElement(antd_1.Select.Option, { value: "04" }, "04"),
|
|
111
173
|
react_1.default.createElement(antd_1.Select.Option, { value: "05" }, "05"),
|
|
112
174
|
react_1.default.createElement(antd_1.Select.Option, { value: "13" }, "13"),
|
|
@@ -121,18 +183,22 @@ var PaymentMethod = function (props) {
|
|
|
121
183
|
pattern: new RegExp("^[0-9]*$"),
|
|
122
184
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_number),
|
|
123
185
|
},
|
|
186
|
+
{
|
|
187
|
+
required: true,
|
|
188
|
+
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage),
|
|
189
|
+
},
|
|
124
190
|
{
|
|
125
191
|
min: 1,
|
|
126
192
|
max: 6,
|
|
127
193
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_Length, {
|
|
128
194
|
fieldName: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_accountNo),
|
|
129
195
|
min: 1,
|
|
130
|
-
max: 6
|
|
196
|
+
max: 6,
|
|
131
197
|
}),
|
|
132
|
-
}
|
|
198
|
+
},
|
|
133
199
|
] },
|
|
134
|
-
react_1.default.createElement(
|
|
135
|
-
react_1.default.createElement(antd_1.Form.Item, {
|
|
200
|
+
react_1.default.createElement(components_1.UmzInput, { defaultIsRequired: true, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_accountNo) }))))),
|
|
201
|
+
react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "paymentMeans", "domesticTransfer", "paymentIdentifier"], rules: [
|
|
136
202
|
{
|
|
137
203
|
pattern: new RegExp("^[0-9]*$"),
|
|
138
204
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_number),
|
|
@@ -142,13 +208,18 @@ var PaymentMethod = function (props) {
|
|
|
142
208
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_Length, {
|
|
143
209
|
fieldName: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_paymentReference),
|
|
144
210
|
min: 1,
|
|
145
|
-
max: 18
|
|
211
|
+
max: 18,
|
|
146
212
|
}),
|
|
147
|
-
}
|
|
213
|
+
},
|
|
148
214
|
] },
|
|
149
|
-
react_1.default.createElement(
|
|
150
|
-
|
|
151
|
-
|
|
215
|
+
react_1.default.createElement(components_1.UmzInput, { defaultIsRequired: false, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_domesticTransfer_paymentReference), defaultValue: props.formInstance.getFieldValue([
|
|
216
|
+
"invoice",
|
|
217
|
+
"paymentMeans",
|
|
218
|
+
"domesticTransfer",
|
|
219
|
+
"paymentIdentifier",
|
|
220
|
+
]) }))));
|
|
221
|
+
var icelandicClaimFormFields = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
222
|
+
react_1.default.createElement(antd_1.Form.Item, null,
|
|
152
223
|
react_1.default.createElement(antd_1.Row, { gutter: [8, 0] },
|
|
153
224
|
react_1.default.createElement(antd_1.Col, { span: 6 },
|
|
154
225
|
react_1.default.createElement(antd_1.Form.Item, { noStyle: true,
|
|
@@ -156,7 +227,7 @@ var PaymentMethod = function (props) {
|
|
|
156
227
|
name: ["invoice", "paymentMeans", "domesticClaim", "bankNumber"], rules: [
|
|
157
228
|
{
|
|
158
229
|
required: true,
|
|
159
|
-
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage)
|
|
230
|
+
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage),
|
|
160
231
|
},
|
|
161
232
|
{
|
|
162
233
|
pattern: new RegExp("^[0-9]*$"),
|
|
@@ -168,11 +239,16 @@ var PaymentMethod = function (props) {
|
|
|
168
239
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_Length, {
|
|
169
240
|
fieldName: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_icelandicClaim_bankNo),
|
|
170
241
|
min: 1,
|
|
171
|
-
max: 4
|
|
242
|
+
max: 4,
|
|
172
243
|
}),
|
|
173
|
-
}
|
|
244
|
+
},
|
|
174
245
|
] },
|
|
175
|
-
react_1.default.createElement(
|
|
246
|
+
react_1.default.createElement(components_1.UmzInput, { defaultIsRequired: true, defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_icelandicClaim_bankNo), defaultValue: props.formInstance.getFieldValue([
|
|
247
|
+
"invoice",
|
|
248
|
+
"paymentMeans",
|
|
249
|
+
"domesticClaim",
|
|
250
|
+
"bankNumber",
|
|
251
|
+
]) }))),
|
|
176
252
|
react_1.default.createElement(antd_1.Col, { span: 6 },
|
|
177
253
|
react_1.default.createElement(antd_1.Input, { disabled: true, value: 66 })),
|
|
178
254
|
react_1.default.createElement(antd_1.Col, { span: 12 },
|
|
@@ -181,7 +257,7 @@ var PaymentMethod = function (props) {
|
|
|
181
257
|
name: ["invoice", "paymentMeans", "domesticClaim", "accountNumber"], rules: [
|
|
182
258
|
{
|
|
183
259
|
required: true,
|
|
184
|
-
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage)
|
|
260
|
+
message: props.intl.formatMessage(form_item_1.translationMessages.formItem_required_errorMessage),
|
|
185
261
|
},
|
|
186
262
|
{
|
|
187
263
|
pattern: new RegExp("^[0-9]*$"),
|
|
@@ -193,20 +269,25 @@ var PaymentMethod = function (props) {
|
|
|
193
269
|
message: props.intl.formatMessage(exports.translationMessages.paymentMethod_rules_Length, {
|
|
194
270
|
fieldName: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_icelandicClaim_claimNo),
|
|
195
271
|
min: 1,
|
|
196
|
-
max: 6
|
|
272
|
+
max: 6,
|
|
197
273
|
}),
|
|
198
|
-
}
|
|
274
|
+
},
|
|
199
275
|
] },
|
|
200
|
-
react_1.default.createElement(
|
|
276
|
+
react_1.default.createElement(components_1.UmzInput, { defaultPlaceholder: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_icelandicClaim_claimNo), defaultIsRequired: true, defaultValue: props.formInstance.getFieldValue([
|
|
277
|
+
"invoice",
|
|
278
|
+
"paymentMeans",
|
|
279
|
+
"domesticClaim",
|
|
280
|
+
"accountNumber",
|
|
281
|
+
]) })))))));
|
|
201
282
|
var renderFormFields = function (payMthd) {
|
|
202
283
|
switch (payMthd) {
|
|
203
284
|
case mapi_1.PaymentMeansType.NotSpecified:
|
|
204
285
|
case mapi_1.PaymentMeansType.MutuallyAgreed:
|
|
205
286
|
return null;
|
|
206
287
|
case mapi_1.PaymentMeansType.DomesticTransfer:
|
|
207
|
-
return
|
|
288
|
+
return domesticTransferFormFields;
|
|
208
289
|
case mapi_1.PaymentMeansType.DomesticClaim:
|
|
209
|
-
return
|
|
290
|
+
return icelandicClaimFormFields;
|
|
210
291
|
default:
|
|
211
292
|
return null;
|
|
212
293
|
}
|
|
@@ -214,40 +295,47 @@ var PaymentMethod = function (props) {
|
|
|
214
295
|
var defaultPaymentMethods = [
|
|
215
296
|
{
|
|
216
297
|
key: mapi_1.PaymentMeansType.NotSpecified,
|
|
217
|
-
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_undefined) // "Undefined" "Óskilgreint"
|
|
298
|
+
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_undefined), // "Undefined" "Óskilgreint"
|
|
218
299
|
},
|
|
219
300
|
{
|
|
220
301
|
key: mapi_1.PaymentMeansType.MutuallyAgreed,
|
|
221
|
-
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_mutuallyAgreed) // "Mutually agreed" "Skv. samkomulagi"
|
|
302
|
+
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_mutuallyAgreed), // "Mutually agreed" "Skv. samkomulagi"
|
|
222
303
|
},
|
|
223
304
|
{
|
|
224
305
|
key: mapi_1.PaymentMeansType.DomesticTransfer,
|
|
225
|
-
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_domesticTransfer) // "Transfer"
|
|
306
|
+
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_domesticTransfer), // "Transfer"
|
|
226
307
|
},
|
|
227
308
|
{
|
|
228
309
|
key: mapi_1.PaymentMeansType.DomesticClaim,
|
|
229
|
-
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_domesticClaim) // "Claim"
|
|
230
|
-
}
|
|
310
|
+
name: props.intl.formatMessage(exports.translationMessages.paymentMethod_labels_methods_domesticClaim), // "Claim"
|
|
311
|
+
},
|
|
231
312
|
];
|
|
232
313
|
var getPaymentMeansTypeOptions = function (receiverRequirements) {
|
|
233
|
-
var paymentMeansTypeFieldDefinition = RequirementsUtility_1.getFieldRequirements(receiverRequirements, ReceiverRequirements_1.AvailableFields["paymentMeans.type"]);
|
|
234
|
-
if (paymentMeansTypeFieldDefinition
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
314
|
+
var paymentMeansTypeFieldDefinition = (0, RequirementsUtility_1.getFieldRequirements)(receiverRequirements, ReceiverRequirements_1.AvailableFields["paymentMeans.type"]);
|
|
315
|
+
if (paymentMeansTypeFieldDefinition &&
|
|
316
|
+
paymentMeansTypeFieldDefinition.hasOwnProperty("properties") &&
|
|
317
|
+
paymentMeansTypeFieldDefinition.properties.hasOwnProperty("values") &&
|
|
318
|
+
paymentMeansTypeFieldDefinition.properties.values) {
|
|
238
319
|
return paymentMeansTypeFieldDefinition.properties.values.map(function (op) {
|
|
239
|
-
return react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: mapi_1.PaymentMeansType[op.key], title: op.name }, op.name);
|
|
320
|
+
return (react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: mapi_1.PaymentMeansType[op.key], title: op.name }, op.name));
|
|
240
321
|
});
|
|
241
322
|
}
|
|
242
323
|
else {
|
|
243
324
|
return defaultPaymentMethods.map(function (op) {
|
|
244
|
-
return react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: mapi_1.PaymentMeansType[op.key], title: op.name }, op.name);
|
|
325
|
+
return (react_1.default.createElement(antd_1.Select.Option, { key: op.key, value: mapi_1.PaymentMeansType[op.key], title: op.name }, op.name));
|
|
245
326
|
});
|
|
246
327
|
}
|
|
247
328
|
};
|
|
248
|
-
return (react_1.default.createElement(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
329
|
+
return (react_1.default.createElement(antd_1.Flex, { style: {
|
|
330
|
+
backgroundColor: isMobile ? undefined : colorInfoBg,
|
|
331
|
+
padding: isMobile ? 0 : "35px 0",
|
|
332
|
+
}, justify: "center" },
|
|
333
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px" }, gap: isMobile ? "small" : "middle" },
|
|
334
|
+
react_1.default.createElement(antd_1.Typography.Title, { level: 5 }, props.intl.formatMessage(exports.translationMessages.paymentMethod_title)),
|
|
335
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
336
|
+
react_1.default.createElement(antd_1.Form.Item, { name: ["invoice", "paymentMeans", "type"] },
|
|
337
|
+
react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, value: paymentMethod, onSelect: setPaymentMethod, defaultValue: props.formInstance.getFieldValue(["invoice", "paymentMeans", "type"]) }, getPaymentMeansTypeOptions(props.receiverRequirements))),
|
|
338
|
+
renderFormFields(paymentMethod),
|
|
339
|
+
react_1.default.createElement(antd_1.Checkbox, { checked: props.isSaveFieldValuesSelected, onChange: props.onSaveFieldValuesChange }, props.intl.formatMessage(CommonTranslations_1.commonTranslationMessages.saveInformation_label))))));
|
|
252
340
|
};
|
|
253
|
-
exports.default = react_intl_1.injectIntl(PaymentMethod);
|
|
341
|
+
exports.default = (0, react_intl_1.injectIntl)(PaymentMethod);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentMethodFormData =
|
|
3
|
+
exports.PaymentMethodFormData = void 0;
|
|
4
|
+
var PaymentMethodFormData = function (formData) {
|
|
4
5
|
if (formData.invoice.paymentMeans.type === "DomesticTransfer") {
|
|
5
6
|
return {
|
|
6
7
|
type: formData.invoice.paymentMeans.type,
|
|
@@ -33,3 +34,4 @@ exports.PaymentMethodFormData = function (formData) {
|
|
|
33
34
|
};
|
|
34
35
|
return paymentMeansFull;
|
|
35
36
|
};
|
|
37
|
+
exports.PaymentMethodFormData = PaymentMethodFormData;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var SubmitConfirmationSVG = function () { return (react_1.default.createElement("svg", { width: "268", height: "243", viewBox: "0 0 268 243", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
|
+
react_1.default.createElement("path", { d: "M101.029 230.876C45.2323 223.558 6.20928 170.282 13.8687 111.882C21.5281 53.4814 72.9695 12.0707 128.766 19.3886", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "12" }),
|
|
9
|
+
react_1.default.createElement("path", { d: "M99.7757 230.399C126.084 234.471 165.902 230.399 185.602 209.222", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "12" }),
|
|
10
|
+
react_1.default.createElement("path", { d: "M252.736 85.2564L220.765 29.117C219.873 27.5518 218.406 26.4009 216.666 25.9236L129.702 2.06968C126.078 1.07577 122.348 3.20024 121.354 6.82374L74.6343 177.149C73.6404 180.772 75.7649 184.503 79.3884 185.497L210.408 221.435C214.031 222.429 217.762 220.304 218.756 216.681L253.385 90.4313C253.863 88.6912 253.627 86.8216 252.736 85.2564ZM237.452 89.2966L198.924 78.7285L209.492 40.2007L237.452 89.2966ZM206.262 204.449L91.6201 173.003L100.243 141.566L107.67 114.489L123.721 55.9749L133.847 19.0555L195.672 36.0138L183.543 80.2328C182.917 82.5131 183.223 84.9486 184.394 87.0034C185.564 89.0581 187.502 90.5639 189.783 91.1894L234.002 103.318L206.262 204.449Z", fill: "black", "fill-opacity": "0.88" }),
|
|
11
|
+
react_1.default.createElement("rect", { x: "95.5684", y: "55.9749", width: "42.1162", height: "78.7981", transform: "rotate(17.8 95.5684 55.9749)", fill: "white" }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M157.071 127.946L173.398 144.283L207.339 110.318", stroke: "#00BDFF", "stroke-width": "10" }),
|
|
13
|
+
react_1.default.createElement("line", { x1: "35.5811", y1: "138.066", x2: "115.531", y2: "138.066", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "7", "stroke-linecap": "round" }),
|
|
14
|
+
react_1.default.createElement("line", { x1: "46.4492", y1: "86.4396", x2: "167.156", y2: "86.4396", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "7", "stroke-linecap": "round" }),
|
|
15
|
+
react_1.default.createElement("line", { x1: "69.5459", y1: "110.894", x2: "125.041", y2: "110.894", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "7", "stroke-linecap": "round" }),
|
|
16
|
+
react_1.default.createElement("line", { x1: "88.5654", y1: "63.3436", x2: "144.06", y2: "63.3436", stroke: "black", "stroke-opacity": "0.88", "stroke-width": "7", "stroke-linecap": "round" }))); };
|
|
17
|
+
exports.default = SubmitConfirmationSVG;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WrappedComponentProps } from "react-intl";
|
|
2
|
+
import React from "react";
|
|
3
|
+
interface Props extends WrappedComponentProps {
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.FC<import("react-intl").WithIntlProps<Props>> & {
|
|
6
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var antd_1 = require("antd");
|
|
7
|
+
var react_intl_1 = require("react-intl");
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
var SubmitConfirmationSVG_1 = __importDefault(require("./SubmitConfirmationSVG"));
|
|
10
|
+
var translationMessages = (0, react_intl_1.defineMessages)({
|
|
11
|
+
submitConfirmation_title: {
|
|
12
|
+
id: "submitConfirmation_title",
|
|
13
|
+
defaultMessage: "Invoice sent",
|
|
14
|
+
},
|
|
15
|
+
submitConfirmation_text: {
|
|
16
|
+
id: "submitConfirmation_text",
|
|
17
|
+
defaultMessage: "The invoice has been sent to the customer.",
|
|
18
|
+
},
|
|
19
|
+
submitConfirmation_footer_text: {
|
|
20
|
+
id: "submitConfirmation_footer_text",
|
|
21
|
+
defaultMessage: "If any questions arise, please contact us at",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
var SubmitConfirmation = function (props) {
|
|
25
|
+
var token = antd_1.theme.useToken().token;
|
|
26
|
+
return (react_1.default.createElement(antd_1.Flex, { justify: "center", style: { padding: "45px" } },
|
|
27
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true, justify: "center", align: "center", style: { width: "100%", maxWidth: "900px" }, gap: "small" },
|
|
28
|
+
react_1.default.createElement(SubmitConfirmationSVG_1.default, null),
|
|
29
|
+
" ",
|
|
30
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true, align: "center", style: { paddingTop: "20px" } },
|
|
31
|
+
react_1.default.createElement(antd_1.Typography.Title, { level: 2 }, props.intl.formatMessage(translationMessages.submitConfirmation_title)),
|
|
32
|
+
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, textAlign: "center" } }, props.intl.formatMessage(translationMessages.submitConfirmation_text))))));
|
|
33
|
+
};
|
|
34
|
+
exports.default = (0, react_intl_1.injectIntl)(SubmitConfirmation);
|