@unimaze/billing 0.21.46 → 0.21.47
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/billing-lines/CurrencySelector.d.ts +1 -3
- package/lib/common/components/billing-lines/CurrencySelector.js +45 -8
- package/lib/common/components/billing-lines/NewBillingLines.js +0 -8
- package/lib/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/common/components/billing-lines/SingleBillingLine.js +9 -5
- package/lib/common/components/billing-lines/cwdwdw.d.ts +1 -0
- package/lib/common/components/billing-lines/cwdwdw.js +14 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +109 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +110 -0
- package/lib/unimaze-api-clients/src/mapi/api.d.ts +6664 -0
- package/lib/unimaze-api-clients/src/mapi/api.js +4743 -0
- package/lib/unimaze-api-clients/src/mapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/mapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/mapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/mapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/mapi/index.js +30 -0
- package/lib/unimaze-api-clients/src/rapi/api.d.ts +5015 -0
- package/lib/unimaze-api-clients/src/rapi/api.js +5582 -0
- package/lib/unimaze-api-clients/src/rapi/base.d.ts +55 -0
- package/lib/unimaze-api-clients/src/rapi/base.js +84 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.d.ts +63 -0
- package/lib/unimaze-api-clients/src/rapi/configuration.js +28 -0
- package/lib/unimaze-api-clients/src/rapi/index.d.ts +13 -0
- package/lib/unimaze-api-clients/src/rapi/index.js +30 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.d.ts +74 -0
- package/lib/unimaze-billing/src/common/components/CommonTranslations.js +78 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/attachments/Attachment.js +164 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/attachments/AttachmentModal.js +206 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.d.ts +27 -0
- package/lib/unimaze-billing/src/common/components/attachments/index.js +214 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/base-information/AccountingCost.js +61 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.d.ts +16 -0
- package/lib/unimaze-billing/src/common/components/base-information/OrderReference.js +58 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/base-information/ProjectReference.js +30 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.d.ts +53 -0
- package/lib/unimaze-billing/src/common/components/base-information/ReferenceIdentifiers.js +328 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.d.ts +77 -0
- package/lib/unimaze-billing/src/common/components/base-information/index.js +186 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingCalculations.js +151 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.d.ts +24 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingLinePreview.js +61 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.d.ts +13 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/BillingTaxSummary.js +133 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.d.ts +20 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/CurrencySelector.js +17 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.d.ts +10 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/DiscountTypeSelector.js +16 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.d.ts +134 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewBillingLines.js +209 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/NewNewBillingLines.js +36 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.d.ts +19 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/SingleBillingLine.js +275 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/UnitOfMeasureSelector.js +15 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.d.ts +49 -0
- package/lib/unimaze-billing/src/common/components/billing-lines/index.js +104 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/component-container/Content.js +13 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.d.ts +9 -0
- package/lib/unimaze-billing/src/common/components/component-container/Header.js +28 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/component-container/index.js +22 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CostCenter.js +163 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.d.ts +17 -0
- package/lib/unimaze-billing/src/common/components/customer/CustomerContactName.js +53 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/customer/hardCoddedCustomer.js +41 -0
- package/lib/unimaze-billing/src/common/components/customer/index.d.ts +26 -0
- package/lib/unimaze-billing/src/common/components/customer/index.js +166 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.d.ts +21 -0
- package/lib/unimaze-billing/src/common/components/date-picker/index.js +23 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/delivery-location/index.js +89 -0
- package/lib/unimaze-billing/src/common/components/editable-cell/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/editable-cell/index.js +295 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.d.ts +5 -0
- package/lib/unimaze-billing/src/common/components/editable-row/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.d.ts +35 -0
- package/lib/unimaze-billing/src/common/components/form-item/index.js +60 -0
- package/lib/unimaze-billing/src/common/components/index.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/index.js +42 -0
- package/lib/unimaze-billing/src/common/components/input/index.d.ts +23 -0
- package/lib/unimaze-billing/src/common/components/input/index.js +37 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.d.ts +42 -0
- package/lib/unimaze-billing/src/common/components/invoice/index.js +59 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfo.js +75 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewCustomerSupplierInfoBox.js +73 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewHeader.js +104 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.d.ts +12 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewInvoiceLines.js +93 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +77 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewPaymentInfoBox.js +58 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.d.ts +14 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +52 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.d.ts +102 -0
- package/lib/unimaze-billing/src/common/components/invoice-preview/index.js +196 -0
- package/lib/unimaze-billing/src/common/components/locale-intl/index.d.ts +0 -0
- package/lib/unimaze-billing/src/common/components/locale-intl/index.js +51 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.d.ts +76 -0
- package/lib/unimaze-billing/src/common/components/payment-method/index.js +356 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/payment-method/paymentMethodForConversion.js +37 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.d.ts +3 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/SubmitConfirmationSVG.js +17 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.d.ts +8 -0
- package/lib/unimaze-billing/src/common/components/submit-confirmation/index.js +34 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.d.ts +18 -0
- package/lib/unimaze-billing/src/common/components/supplier/CityAutofill.js +159 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.d.ts +94 -0
- package/lib/unimaze-billing/src/common/components/supplier/index.js +334 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.d.ts +7 -0
- package/lib/unimaze-billing/src/common/components/tooltip/index.js +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.d.ts +15 -0
- package/lib/unimaze-billing/src/common/components/welcome-modal/index.js +26 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.d.ts +74 -0
- package/lib/unimaze-billing/src/common/consts/formLayout.js +45 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.d.ts +6 -0
- package/lib/unimaze-billing/src/common/consts/validationRules.js +69 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.d.ts +5 -0
- package/lib/unimaze-billing/src/common/enums/DocumentTypeEnum.js +8 -0
- package/lib/unimaze-billing/src/common/enums/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/enums/index.js +8 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.d.ts +26 -0
- package/lib/unimaze-billing/src/common/types/AppConfiguration.js +2 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.d.ts +10 -0
- package/lib/unimaze-billing/src/common/types/BillingLineMetadataOverride.js +2 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.d.ts +33 -0
- package/lib/unimaze-billing/src/common/types/CommonProps.js +2 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/DiscountType.js +2 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/InvoiceFormFields.js +2 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.d.ts +27 -0
- package/lib/unimaze-billing/src/common/types/NewReceiverRequirements.js +2 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.d.ts +83 -0
- package/lib/unimaze-billing/src/common/types/ReceiverRequirements.js +393 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.d.ts +11 -0
- package/lib/unimaze-billing/src/common/types/SupplierInfo.js +2 -0
- package/lib/unimaze-billing/src/common/types/index.d.ts +1 -0
- package/lib/unimaze-billing/src/common/types/index.js +17 -0
- package/lib/unimaze-billing/src/create-credit-note/index.d.ts +9 -0
- package/lib/unimaze-billing/src/create-credit-note/index.js +62 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.d.ts +11 -0
- package/lib/unimaze-billing/src/create-invoice/IntlLoader.js +116 -0
- package/lib/unimaze-billing/src/create-invoice/index.d.ts +82 -0
- package/lib/unimaze-billing/src/create-invoice/index.js +710 -0
- package/lib/unimaze-billing/src/enums.d.ts +14 -0
- package/lib/unimaze-billing/src/enums.js +18 -0
- package/lib/unimaze-billing/src/index.d.ts +4 -0
- package/lib/unimaze-billing/src/index.js +28 -0
- package/lib/unimaze-billing/src/translations/locales/en.json +183 -0
- package/lib/unimaze-billing/src/translations/locales/is.json +183 -0
- package/lib/unimaze-billing/src/translations/locales.d.ts +369 -0
- package/lib/unimaze-billing/src/translations/locales.js +11 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.d.ts +29 -0
- package/lib/unimaze-billing/src/utils/ApiUtility.js +133 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.d.ts +25 -0
- package/lib/unimaze-billing/src/utils/BillingLineUtility.js +190 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/ConversionUtility.js +222 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.d.ts +9 -0
- package/lib/unimaze-billing/src/utils/FileUploadUtility.js +45 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.d.ts +6 -0
- package/lib/unimaze-billing/src/utils/IntlUtility.js +78 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.d.ts +1 -0
- package/lib/unimaze-billing/src/utils/LocationUtility.js +81 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.d.ts +7 -0
- package/lib/unimaze-billing/src/utils/ReferenceIdentifierUtility.js +26 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.d.ts +21 -0
- package/lib/unimaze-billing/src/utils/RequirementsUtility.js +237 -0
- package/lib/unimaze-billing/src/utils/index.d.ts +2 -0
- package/lib/unimaze-billing/src/utils/index.js +8 -0
- package/lib/utils/RequirementsUtility.d.ts +3 -2
- package/lib/utils/RequirementsUtility.js +12 -2
- package/package.json +1 -1
- package/lib/style/index.css +0 -51
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var 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);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.translationMessages = void 0;
|
|
30
|
+
var React = __importStar(require("react"));
|
|
31
|
+
var antd_1 = require("antd");
|
|
32
|
+
var form_item_1 = __importDefault(require("../form-item"));
|
|
33
|
+
var react_intl_1 = require("react-intl");
|
|
34
|
+
var NewBillingLines_1 = __importDefault(require("./NewBillingLines"));
|
|
35
|
+
var BillingCalculations_1 = __importDefault(require("./BillingCalculations"));
|
|
36
|
+
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
37
|
+
var react_use_1 = require("react-use");
|
|
38
|
+
var tooltip_1 = __importDefault(require("../tooltip"));
|
|
39
|
+
exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
40
|
+
billingLines_title: {
|
|
41
|
+
id: "billingLines_title",
|
|
42
|
+
defaultMessage: "Document lines",
|
|
43
|
+
},
|
|
44
|
+
billingLines_tooltip_title: {
|
|
45
|
+
id: "billingLines_tooltip_title",
|
|
46
|
+
defaultMessage: "Item number, Name, Quantity, Unit of measure, Unit price amount Tax category and Discount need to be defined here.\n" +
|
|
47
|
+
"VAT is automatically applied.\n" +
|
|
48
|
+
'Click "Add a row" to add a new line', // "Hér þarf að skilgreina Vörunr, Nafn, Fjölda, Mælieiningu, Verð pr. einingu og upphæð. Virðisauki reiknast sjálfkrafa. Smelltu á \"Bæta við röð\" til þess að bæta við vörulínu",
|
|
49
|
+
},
|
|
50
|
+
baseInformation_notes: {
|
|
51
|
+
id: "baseInformation_notes",
|
|
52
|
+
defaultMessage: "Notes",
|
|
53
|
+
},
|
|
54
|
+
billingLines_button_addRow: {
|
|
55
|
+
id: "billingLines_button_addRow",
|
|
56
|
+
defaultMessage: "Add a row",
|
|
57
|
+
},
|
|
58
|
+
billingLines_placeholders_itemNo: {
|
|
59
|
+
id: "billingLines_placeholders_itemNo",
|
|
60
|
+
defaultMessage: "Item No",
|
|
61
|
+
},
|
|
62
|
+
billingLines_placeholders_newItem: {
|
|
63
|
+
id: "billingLines_placeholders_newItem",
|
|
64
|
+
defaultMessage: "New Item",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
var BillingLines = function (props) {
|
|
68
|
+
var _a;
|
|
69
|
+
var width = (0, react_use_1.useWindowSize)().width;
|
|
70
|
+
var _b = React.useState(false), isMobile = _b[0], setIsMobile = _b[1];
|
|
71
|
+
var token = antd_1.theme.useToken().token;
|
|
72
|
+
React.useEffect(function () {
|
|
73
|
+
if (width < 768) {
|
|
74
|
+
setIsMobile(true);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setIsMobile(false);
|
|
78
|
+
}
|
|
79
|
+
}, [width]);
|
|
80
|
+
var currencyCode = props.formInstance.getFieldValue(["invoice", "currencyCode"])
|
|
81
|
+
? props.formInstance.getFieldValue(["invoice", "currencyCode"])
|
|
82
|
+
: "";
|
|
83
|
+
return (React.createElement(antd_1.Flex, { justify: "center" },
|
|
84
|
+
React.createElement(antd_1.Flex, { vertical: true, style: { width: "100%", maxWidth: "900px", paddingBottom: isMobile ? "20px" : "35px" }, gap: "middle" },
|
|
85
|
+
React.createElement(antd_1.Flex, { gap: isMobile ? "small" : "middle", vertical: true, style: isMobile
|
|
86
|
+
? {
|
|
87
|
+
width: "100vw",
|
|
88
|
+
backgroundColor: token.colorInfoBg,
|
|
89
|
+
margin: "0 -20px",
|
|
90
|
+
padding: "20px 20px 0 20px",
|
|
91
|
+
}
|
|
92
|
+
: { paddingTop: "20px" } },
|
|
93
|
+
React.createElement(antd_1.Flex, { gap: "small" },
|
|
94
|
+
React.createElement(antd_1.Typography.Title, { level: 5 }, props.intl.formatMessage(exports.translationMessages.billingLines_title)),
|
|
95
|
+
React.createElement(antd_1.Flex, { style: { marginBottom: (_a = token.Typography) === null || _a === void 0 ? void 0 : _a.titleMarginBottom } },
|
|
96
|
+
React.createElement(tooltip_1.default, { title: props.intl.formatMessage(exports.translationMessages.billingLines_tooltip_title) }))),
|
|
97
|
+
React.createElement(NewBillingLines_1.default, { formInstance: props.formInstance, receiverRequirements: props.receiverRequirements, outsideVatScope: props.outsideVatScope, validateFields: props.validateFields })),
|
|
98
|
+
React.createElement(antd_1.Flex, { gap: "middle", vertical: true },
|
|
99
|
+
React.createElement(BillingCalculations_1.default, { currencyCode: currencyCode, formInstance: props.formInstance, outsideVatScope: props.outsideVatScope }),
|
|
100
|
+
React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields.notes, defaultLabel: props.intl.formatMessage(exports.translationMessages.baseInformation_notes), defaultIsRequired: false, fieldName: ["invoice", "notes"], style: { marginBottom: 0 } },
|
|
101
|
+
React.createElement(antd_1.Input.TextArea, { placeholder: props.intl.formatMessage(exports.translationMessages.baseInformation_notes) }))))));
|
|
102
|
+
};
|
|
103
|
+
var BillingLinesIntl = (0, react_intl_1.injectIntl)(BillingLines);
|
|
104
|
+
exports.default = BillingLinesIntl;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 Content = function (props) {
|
|
8
|
+
var cssStyle = {
|
|
9
|
+
height: props.height ? props.height : undefined,
|
|
10
|
+
};
|
|
11
|
+
return (react_1.default.createElement("div", { className: "component_body", style: cssStyle }, props.children));
|
|
12
|
+
};
|
|
13
|
+
exports.default = Content;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProps } from "@ant-design/compatible/es/icon";
|
|
3
|
+
interface HeaderProps {
|
|
4
|
+
iconProps?: IconProps;
|
|
5
|
+
title?: string | React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Header: React.FC<HeaderProps>;
|
|
9
|
+
export default Header;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var compatible_1 = require("@ant-design/compatible");
|
|
19
|
+
var Header = function (props) {
|
|
20
|
+
return (react_1.default.createElement("div", { className: "component_header" },
|
|
21
|
+
react_1.default.createElement("div", null,
|
|
22
|
+
react_1.default.createElement("span", null, props.iconProps
|
|
23
|
+
? react_1.default.createElement(compatible_1.Icon, __assign({}, props.iconProps, { className: "header_icon" }))
|
|
24
|
+
: null),
|
|
25
|
+
react_1.default.createElement("span", { className: "component_header_title" }, props.title)),
|
|
26
|
+
react_1.default.createElement("div", { className: "header_right" }, props.action)));
|
|
27
|
+
};
|
|
28
|
+
exports.default = Header;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProps } from "@ant-design/compatible/es/icon";
|
|
3
|
+
interface Props {
|
|
4
|
+
iconProps?: IconProps;
|
|
5
|
+
title?: string | React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
noPadding?: boolean;
|
|
8
|
+
noHeader?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const ComponentContainer: React.FC<Props>;
|
|
12
|
+
export default ComponentContainer;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 antd_1 = require("antd");
|
|
8
|
+
var Header_1 = __importDefault(require("./Header"));
|
|
9
|
+
var Content_1 = __importDefault(require("./Content"));
|
|
10
|
+
var ComponentContainer = function (props) {
|
|
11
|
+
var iconProps = props.iconProps, title = props.title, action = props.action, noPadding = props.noPadding;
|
|
12
|
+
return (react_1.default.createElement("div", { className: "component_wrapper" },
|
|
13
|
+
props.noHeader
|
|
14
|
+
? null
|
|
15
|
+
: react_1.default.createElement(antd_1.Row, { align: "stretch" },
|
|
16
|
+
react_1.default.createElement(antd_1.Col, { span: 24 },
|
|
17
|
+
react_1.default.createElement(Header_1.default, { iconProps: iconProps, title: title, action: action }))),
|
|
18
|
+
react_1.default.createElement(antd_1.Row, null,
|
|
19
|
+
react_1.default.createElement(antd_1.Col, { span: 24, className: "".concat(noPadding ? '' : 'component_wrapper_padding') },
|
|
20
|
+
react_1.default.createElement(Content_1.default, null, props.children)))));
|
|
21
|
+
};
|
|
22
|
+
exports.default = ComponentContainer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
4
|
+
import { FormInstance } from "antd/es/form";
|
|
5
|
+
interface Props extends WrappedComponentProps {
|
|
6
|
+
receiverRequirements: NewReceiverRequirements;
|
|
7
|
+
updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void;
|
|
8
|
+
rapiBaseUrl: string;
|
|
9
|
+
formInstance: FormInstance;
|
|
10
|
+
legalIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
13
|
+
forwardedRef?: React.Ref<any>;
|
|
14
|
+
} & React.RefAttributes<any>> & {
|
|
15
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var 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);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var react_1 = __importStar(require("react"));
|
|
30
|
+
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
31
|
+
var form_item_1 = __importDefault(require("../form-item"));
|
|
32
|
+
var react_intl_1 = require("react-intl");
|
|
33
|
+
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
34
|
+
// import {FormInstance} from "antd/es/form";
|
|
35
|
+
var translationMessages = {
|
|
36
|
+
baseInformation_costCenter: {
|
|
37
|
+
id: "baseInformation_costCenter",
|
|
38
|
+
defaultMessage: "Cost center",
|
|
39
|
+
},
|
|
40
|
+
baseInformation_costCenter_placeholder_input: {
|
|
41
|
+
id: "baseInformation_costCenter_placeholder_input",
|
|
42
|
+
defaultMessage: "Input you cost center",
|
|
43
|
+
},
|
|
44
|
+
baseInformation_costCenter_placeholder_search: {
|
|
45
|
+
id: "baseInformation_costCenter_placeholder_search",
|
|
46
|
+
defaultMessage: "Search cost centers",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
//
|
|
50
|
+
// const handleReferenceIdentifierValueSearch = (
|
|
51
|
+
// searchValue: string,
|
|
52
|
+
// costCenterFieldDefinition: FieldDefinition,
|
|
53
|
+
// receiverRequirements: NewReceiverRequirements,
|
|
54
|
+
// rapiBaseUrl: string,
|
|
55
|
+
// setLoadingCostCenterValues: (loadingCostCenterValues: boolean) => void,
|
|
56
|
+
// updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void
|
|
57
|
+
// ) => {
|
|
58
|
+
// if (costCenterFieldDefinition && costCenterFieldDefinition.properties && costCenterFieldDefinition.properties.href) {
|
|
59
|
+
// const searchUrl = rapiBaseUrl + costCenterFieldDefinition.properties.href.replace("%7BtextFilter%7D", searchValue).replace("%7Boffset%7D", "0").replace("%7Blimit%7D", "15");
|
|
60
|
+
// setLoadingCostCenterValues(true)
|
|
61
|
+
// axios.get(searchUrl)
|
|
62
|
+
// .then(response => {
|
|
63
|
+
// setLoadingCostCenterValues(false)
|
|
64
|
+
// const updatedFieldDefinitions: FieldDefinition[] = [...receiverRequirements.fieldDefinitions];
|
|
65
|
+
// const index = updatedFieldDefinitions.findIndex(x => x.key === costCenterFieldDefinition.key)
|
|
66
|
+
//
|
|
67
|
+
// const updatedReferenceIdentifier: FieldDefinition = {
|
|
68
|
+
// ...updatedFieldDefinitions[index],
|
|
69
|
+
// properties: {
|
|
70
|
+
// label: updatedFieldDefinitions[index].properties.label,
|
|
71
|
+
// href: updatedFieldDefinitions[index].properties.href,
|
|
72
|
+
// cardinality: updatedFieldDefinitions[index].properties.cardinality,
|
|
73
|
+
// values: response.data.value
|
|
74
|
+
// }
|
|
75
|
+
// };
|
|
76
|
+
// updatedFieldDefinitions.splice(index, 1, updatedReferenceIdentifier)
|
|
77
|
+
//
|
|
78
|
+
// const newReceiverRequirements: NewReceiverRequirements = {
|
|
79
|
+
// ...receiverRequirements,
|
|
80
|
+
// fieldDefinitions: updatedFieldDefinitions
|
|
81
|
+
// }
|
|
82
|
+
//
|
|
83
|
+
// updateReceiverRequirementsProp(newReceiverRequirements);
|
|
84
|
+
// }
|
|
85
|
+
// )
|
|
86
|
+
// .catch(error => {
|
|
87
|
+
// setLoadingCostCenterValues(false)
|
|
88
|
+
// })
|
|
89
|
+
//
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
|
+
//
|
|
93
|
+
// const getCostCenterInput = (
|
|
94
|
+
// fieldDefinition: FieldDefinition,
|
|
95
|
+
// receiverRequirements: NewReceiverRequirements,
|
|
96
|
+
// rapiBaseUrl: string,
|
|
97
|
+
// setLoadingCostCenterValues: (loadingCostCenterValues: boolean) => void,
|
|
98
|
+
// loadingCostCenterValues: boolean,
|
|
99
|
+
// updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void,
|
|
100
|
+
// constCenterPlaceholderInput: string,
|
|
101
|
+
// constCenterPlaceholderSearch: string,
|
|
102
|
+
// ): React.ReactElement => {
|
|
103
|
+
// let handling = null;
|
|
104
|
+
// if (fieldDefinition.properties.handling) {
|
|
105
|
+
// handling = JSON.parse(fieldDefinition.properties.handling)
|
|
106
|
+
// }
|
|
107
|
+
//
|
|
108
|
+
// if (fieldDefinition) {
|
|
109
|
+
// if (fieldDefinition.properties.values) {
|
|
110
|
+
// const selectProps: SelectProps<any> = fieldDefinition.properties.hasOwnProperty("href")
|
|
111
|
+
// ? {
|
|
112
|
+
// showSearch: true,
|
|
113
|
+
// filterOption: false,
|
|
114
|
+
// onSearch: (searchValue: string) => {
|
|
115
|
+
// handleReferenceIdentifierValueSearch(searchValue, fieldDefinition, receiverRequirements, rapiBaseUrl, setLoadingCostCenterValues, updateReceiverRequirementsProp);
|
|
116
|
+
// },
|
|
117
|
+
// onChange: (searchValue: string) => {
|
|
118
|
+
// if (!searchValue) {
|
|
119
|
+
// handleReferenceIdentifierValueSearch("", fieldDefinition, receiverRequirements, rapiBaseUrl, setLoadingCostCenterValues, updateReceiverRequirementsProp);
|
|
120
|
+
// }
|
|
121
|
+
// },
|
|
122
|
+
// loading: loadingCostCenterValues,
|
|
123
|
+
// }
|
|
124
|
+
// : {}
|
|
125
|
+
//
|
|
126
|
+
// return <Select
|
|
127
|
+
// popupMatchSelectWidth={false}
|
|
128
|
+
// allowClear
|
|
129
|
+
// {...selectProps}
|
|
130
|
+
// placeholder={getFieldPlaceholderOverride(receiverRequirements,AvailableFields["customer.locationIdentifier"], constCenterPlaceholderSearch)}
|
|
131
|
+
// >
|
|
132
|
+
// {fieldDefinition.properties.values.map(op => {
|
|
133
|
+
// return <Select.Option
|
|
134
|
+
// key={op.key}
|
|
135
|
+
// value={op.key}
|
|
136
|
+
// >
|
|
137
|
+
// {op.name}
|
|
138
|
+
// </Select.Option>;
|
|
139
|
+
// }
|
|
140
|
+
// )}
|
|
141
|
+
// </Select>;
|
|
142
|
+
// } else {
|
|
143
|
+
// return <Input
|
|
144
|
+
// placeholder={getFieldPlaceholderOverride(receiverRequirements,AvailableFields["customer.locationIdentifier"], constCenterPlaceholderInput)}/>
|
|
145
|
+
// }
|
|
146
|
+
// } else {
|
|
147
|
+
// return <Input
|
|
148
|
+
// placeholder={getFieldPlaceholderOverride(receiverRequirements,AvailableFields["customer.locationIdentifier"], constCenterPlaceholderInput)}/>
|
|
149
|
+
// }
|
|
150
|
+
// }
|
|
151
|
+
var CostCenter = function (props) {
|
|
152
|
+
var _a = (0, react_1.useState)(""), costCenterHandlingValidationStatus = _a[0], setCostCenterHandlingValidationStatus = _a[1];
|
|
153
|
+
var _b = (0, react_1.useState)({}), costCenterFieldProps = _b[0], setCostCenterFieldProps = _b[1];
|
|
154
|
+
var _c = (0, react_1.useState)(false), loadingCostCenterValues = _c[0], setLoadingCostCenterValues = _c[1];
|
|
155
|
+
var costCenterFieldDefinition = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"]);
|
|
156
|
+
if (costCenterFieldDefinition) {
|
|
157
|
+
return (react_1.default.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.locationIdentifier"], defaultLabel: props.intl.formatMessage(translationMessages.baseInformation_costCenter), defaultIsRequired: false, fieldName: ["invoice", "customer", "locationIdentifier"], validateStatus: costCenterHandlingValidationStatus }, (0, RequirementsUtility_1.getInput)(costCenterFieldDefinition, ["invoice", "customer", "locationIdentifier"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCostCenterFieldProps, costCenterFieldProps, setLoadingCostCenterValues, loadingCostCenterValues, setCostCenterHandlingValidationStatus, props.intl.formatMessage(translationMessages.baseInformation_costCenter), true)));
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
exports.default = (0, react_intl_1.injectIntl)(CostCenter);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
4
|
+
import { FormInstance } from "antd/es/form";
|
|
5
|
+
interface CustomerContactNameProps extends WrappedComponentProps {
|
|
6
|
+
receiverRequirements: NewReceiverRequirements;
|
|
7
|
+
updateReceiverRequirementsProp: (receiverRequirements: NewReceiverRequirements) => void;
|
|
8
|
+
rapiBaseUrl: string;
|
|
9
|
+
formInstance: FormInstance;
|
|
10
|
+
legalIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<CustomerContactNameProps, "intl"> & {
|
|
13
|
+
forwardedRef?: React.Ref<any>;
|
|
14
|
+
} & React.RefAttributes<any>> & {
|
|
15
|
+
WrappedComponent: React.ComponentType<CustomerContactNameProps>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var 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);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var React = __importStar(require("react"));
|
|
30
|
+
var react_intl_1 = require("react-intl");
|
|
31
|
+
var react_1 = require("react");
|
|
32
|
+
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
33
|
+
var ReceiverRequirements_1 = require("../../types/ReceiverRequirements");
|
|
34
|
+
var form_item_1 = __importDefault(require("../form-item"));
|
|
35
|
+
var translationMessages = {
|
|
36
|
+
baseInformation_customerContactName: {
|
|
37
|
+
id: "baseInformation_customerContactName",
|
|
38
|
+
defaultMessage: "Contact name",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
var CustomerContactName = function (props) {
|
|
42
|
+
var _a = (0, react_1.useState)(""), customerContactNameHandlingValidationStatus = _a[0], setCustomerContactNameHandlingValidationStatus = _a[1];
|
|
43
|
+
var _b = (0, react_1.useState)({}), customerContactNameFieldProps = _b[0], setCustomerContactNameFieldProps = _b[1];
|
|
44
|
+
var _c = (0, react_1.useState)(false), loadingCustomerContactNameValues = _c[0], setLoadingCustomerContactNameValues = _c[1];
|
|
45
|
+
var customerContactNameFieldDefinition = (0, RequirementsUtility_1.getFieldRequirements)(props.receiverRequirements, ReceiverRequirements_1.AvailableFields["customer.contact.name"]);
|
|
46
|
+
if (customerContactNameFieldDefinition) {
|
|
47
|
+
return (React.createElement(form_item_1.default, { receiverRequirements: props.receiverRequirements, receiverRequirementsKey: ReceiverRequirements_1.AvailableFields["customer.contact.name"], defaultIsRequired: false, fieldName: ["invoice", "customer", "contact", "name"], validateStatus: customerContactNameHandlingValidationStatus }, (0, RequirementsUtility_1.getInput)(customerContactNameFieldDefinition, ["invoice", "customer", "contact", "name"], "handleCostCenterValidation", props.legalIdentifier, props.formInstance, props.rapiBaseUrl, props.receiverRequirements, props.updateReceiverRequirementsProp, setCustomerContactNameFieldProps, customerContactNameFieldProps, setLoadingCustomerContactNameValues, loadingCustomerContactNameValues, setCustomerContactNameHandlingValidationStatus, props.intl.formatMessage(translationMessages.baseInformation_customerContactName), true)));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = (0, react_intl_1.injectIntl)(CustomerContactName);
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var 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);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var React = __importStar(require("react"));
|
|
27
|
+
var components_1 = require("../../components");
|
|
28
|
+
var Customer = function (props) {
|
|
29
|
+
var _a = props.customer, participantLegalIsoIdentifier = _a.participantLegalIsoIdentifier, participantLegalAddressPostalCode = _a.participantLegalAddressPostalCode, participantLegalAddressCity = _a.participantLegalAddressCity, participantLegalAddressStreet = _a.participantLegalAddressStreet, email = _a.email, name = _a.name, country = _a.country;
|
|
30
|
+
return (React.createElement(components_1.ComponentContainer, { title: "Invoice payer" },
|
|
31
|
+
React.createElement("div", null,
|
|
32
|
+
React.createElement("strong", null, name),
|
|
33
|
+
" (",
|
|
34
|
+
participantLegalIsoIdentifier,
|
|
35
|
+
")"),
|
|
36
|
+
React.createElement("div", null, "".concat(participantLegalAddressPostalCode, " ").concat(participantLegalAddressCity)),
|
|
37
|
+
React.createElement("div", null, participantLegalAddressStreet),
|
|
38
|
+
React.createElement("div", null, country),
|
|
39
|
+
React.createElement("div", null, email)));
|
|
40
|
+
};
|
|
41
|
+
exports.default = Customer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { FormInstance } from "antd/es/form";
|
|
4
|
+
import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
5
|
+
import { ProfileOutputWithApiKey } from "../../types/AppConfiguration";
|
|
6
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
7
|
+
interface Props extends WrappedComponentProps {
|
|
8
|
+
receiverRequirements: NewReceiverRequirements;
|
|
9
|
+
customers: ProfileOutputWithApiKey[];
|
|
10
|
+
formInstance: FormInstance;
|
|
11
|
+
chosenCustomer: PartyMetadata | undefined;
|
|
12
|
+
setChosenCustomer: (chosenCustomer: PartyMetadata) => void;
|
|
13
|
+
setChosenCustomerApiKey: (chosenCustomerApiKey: string) => void;
|
|
14
|
+
rapiBaseUrl: string;
|
|
15
|
+
updateReceiverRequirementsProp: (newReceiverRequirements: NewReceiverRequirements) => void;
|
|
16
|
+
validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
|
|
17
|
+
isSaveFieldValuesSelected: boolean;
|
|
18
|
+
onSaveFieldValuesChange: () => void;
|
|
19
|
+
isActiveStep: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const CustomerIntl: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
22
|
+
forwardedRef?: React.Ref<any>;
|
|
23
|
+
} & React.RefAttributes<any>> & {
|
|
24
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
25
|
+
};
|
|
26
|
+
export default CustomerIntl;
|