@unimaze/billing 0.21.43 → 0.21.45
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/NewNewBillingLines.d.ts +15 -0
- package/lib/common/components/billing-lines/NewNewBillingLines.js +36 -0
- 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/customer/index.js +5 -1
- 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/InvoicePreviewInvoiceLines.js +3 -1
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.d.ts +0 -0
- package/lib/common/components/invoice-preview/InvoicePreviewPaymentInfo.js +110 -0
- package/lib/common/components/invoice-preview/InvoicePreviewTotalAmountPreview.js +2 -1
- package/lib/common/components/invoice-preview/index.d.ts +8 -0
- package/lib/common/components/invoice-preview/index.js +8 -0
- package/lib/common/components/supplier/CityAutofill.js +5 -1
- package/lib/common/components/supplier/index.d.ts +4 -0
- package/lib/common/components/supplier/index.js +5 -1
- package/lib/create-invoice/index.d.ts +4 -0
- package/lib/create-invoice/index.js +5 -1
- package/lib/translations/locales/en.json +6 -0
- package/lib/translations/locales/is.json +28 -22
- package/lib/translations/locales.d.ts +12 -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/LocationUtility.d.ts +1 -1
- package/lib/utils/LocationUtility.js +2 -2
- package/package.json +1 -1
- package/lib/style/index.css +0 -51
|
@@ -0,0 +1,59 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.EditableContext = void 0;
|
|
49
|
+
var React = __importStar(require("react"));
|
|
50
|
+
var antd_1 = require("antd");
|
|
51
|
+
exports.EditableContext = React.createContext({});
|
|
52
|
+
var EditableRow = function (_a) {
|
|
53
|
+
var index = _a.index, props = __rest(_a, ["index"]);
|
|
54
|
+
var form = antd_1.Form.useForm()[0];
|
|
55
|
+
return React.createElement(antd_1.Form, { form: form, component: false },
|
|
56
|
+
React.createElement(exports.EditableContext.Provider, { value: form },
|
|
57
|
+
React.createElement("tr", __assign({}, props))));
|
|
58
|
+
};
|
|
59
|
+
exports.default = EditableRow;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvailableFields } from "../../types/ReceiverRequirements";
|
|
3
|
+
import { NamePath, Rule } from "rc-field-form/lib/interface";
|
|
4
|
+
import { WrappedComponentProps } from "react-intl";
|
|
5
|
+
import { FormItemProps } from "antd/lib/form/FormItem";
|
|
6
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
7
|
+
export declare const translationMessages: {
|
|
8
|
+
formItem_required_errorMessage: {
|
|
9
|
+
id: string;
|
|
10
|
+
defaultMessage: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
interface StringMap {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
}
|
|
16
|
+
interface Props extends WrappedComponentProps, FormItemProps {
|
|
17
|
+
receiverRequirements: NewReceiverRequirements;
|
|
18
|
+
receiverRequirementsKey: AvailableFields;
|
|
19
|
+
defaultLabel?: React.ReactNode | string;
|
|
20
|
+
defaultLabelTooltip?: React.ReactNode;
|
|
21
|
+
defaultIsRequired: boolean;
|
|
22
|
+
fieldName: NamePath;
|
|
23
|
+
additionalRules?: Rule[];
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
initialValue?: StringMap | string | number;
|
|
26
|
+
verticalLabels?: boolean;
|
|
27
|
+
onlyLabelOnFirstInList?: boolean;
|
|
28
|
+
index?: number;
|
|
29
|
+
}
|
|
30
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
31
|
+
forwardedRef?: React.Ref<any>;
|
|
32
|
+
} & React.RefAttributes<any>> & {
|
|
33
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,60 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
25
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
26
|
+
if (ar || !(i in from)) {
|
|
27
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
28
|
+
ar[i] = from[i];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
|
+
};
|
|
33
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.translationMessages = void 0;
|
|
38
|
+
var react_1 = __importDefault(require("react"));
|
|
39
|
+
var antd_1 = require("antd");
|
|
40
|
+
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
41
|
+
var react_intl_1 = require("react-intl");
|
|
42
|
+
var formLayout_1 = require("../../consts/formLayout");
|
|
43
|
+
exports.translationMessages = (0, react_intl_1.defineMessages)({
|
|
44
|
+
formItem_required_errorMessage: {
|
|
45
|
+
id: "formItem_required_errorMessage",
|
|
46
|
+
defaultMessage: "This field is required",
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
var UmzFormItem = function (props) {
|
|
50
|
+
var children = props.children, onlyLabelOnFirstInList = props.onlyLabelOnFirstInList, index = props.index, defaultLabel = props.defaultLabel, defaultIsRequired = props.defaultIsRequired, initialValue = props.initialValue, additionalRules = props.additionalRules, verticalLabels = props.verticalLabels, fieldName = props.fieldName, receiverRequirementsKey = props.receiverRequirementsKey, style = props.style, defaultLabelTooltip = props.defaultLabelTooltip, intl = props.intl, receiverRequirements = props.receiverRequirements, rest = __rest(props, ["children", "onlyLabelOnFirstInList", "index", "defaultLabel", "defaultIsRequired", "initialValue", "additionalRules", "verticalLabels", "fieldName", "receiverRequirementsKey", "style", "defaultLabelTooltip", "intl", "receiverRequirements"]);
|
|
51
|
+
var isRequired = (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired);
|
|
52
|
+
return (react_1.default.createElement(antd_1.Form.Item, __assign({}, verticalLabels ? formLayout_1.formItemVerticalLayout : formLayout_1.formItemLayout, { name: fieldName, rules: __spreadArray([
|
|
53
|
+
{
|
|
54
|
+
required: isRequired,
|
|
55
|
+
message: intl.formatMessage(exports.translationMessages.formItem_required_errorMessage),
|
|
56
|
+
}
|
|
57
|
+
], (additionalRules || []) // if the array is undefined
|
|
58
|
+
, true), style: style, initialValue: initialValue }, rest), children));
|
|
59
|
+
};
|
|
60
|
+
exports.default = (0, react_intl_1.injectIntl)(UmzFormItem);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import InvoicePreviewHeader from "./invoice-preview/InvoicePreviewHeader";
|
|
2
|
+
export { InvoicePreviewHeader };
|
|
3
|
+
export { default as Attachments } from "./attachments";
|
|
4
|
+
export { default as BaseInformation } from "./base-information";
|
|
5
|
+
export { default as BillingLines } from "./billing-lines";
|
|
6
|
+
export { default as ComponentContainer } from "./component-container";
|
|
7
|
+
export { default as Customer } from "./customer";
|
|
8
|
+
export { default as DeliveryLocation } from "./delivery-location";
|
|
9
|
+
export { default as PaymentMethod } from "./payment-method";
|
|
10
|
+
export { default as Supplier } from "./supplier";
|
|
11
|
+
export { default as UmzFormItem } from "./form-item";
|
|
12
|
+
export { default as UmzInput } from "./input";
|
|
13
|
+
export { default as UmzDatePicker } from "./date-picker";
|
|
14
|
+
export { default as WelcomeModal } from "./welcome-modal";
|
|
15
|
+
export { default as Invoice } from "./invoice";
|
|
16
|
+
export { default as InvoicePreview } from "./invoice-preview";
|
|
17
|
+
export { default as SubmitConfirmation } from "./submit-confirmation";
|
|
18
|
+
export { default as UmzTooltip } from "./tooltip";
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
exports.UmzTooltip = exports.SubmitConfirmation = exports.InvoicePreview = exports.Invoice = exports.WelcomeModal = exports.UmzDatePicker = exports.UmzInput = exports.UmzFormItem = exports.Supplier = exports.PaymentMethod = exports.DeliveryLocation = exports.Customer = exports.ComponentContainer = exports.BillingLines = exports.BaseInformation = exports.Attachments = exports.InvoicePreviewHeader = void 0;
|
|
7
|
+
var InvoicePreviewHeader_1 = __importDefault(require("./invoice-preview/InvoicePreviewHeader"));
|
|
8
|
+
exports.InvoicePreviewHeader = InvoicePreviewHeader_1.default;
|
|
9
|
+
var attachments_1 = require("./attachments");
|
|
10
|
+
Object.defineProperty(exports, "Attachments", { enumerable: true, get: function () { return __importDefault(attachments_1).default; } });
|
|
11
|
+
var base_information_1 = require("./base-information");
|
|
12
|
+
Object.defineProperty(exports, "BaseInformation", { enumerable: true, get: function () { return __importDefault(base_information_1).default; } });
|
|
13
|
+
var billing_lines_1 = require("./billing-lines");
|
|
14
|
+
Object.defineProperty(exports, "BillingLines", { enumerable: true, get: function () { return __importDefault(billing_lines_1).default; } });
|
|
15
|
+
var component_container_1 = require("./component-container");
|
|
16
|
+
Object.defineProperty(exports, "ComponentContainer", { enumerable: true, get: function () { return __importDefault(component_container_1).default; } });
|
|
17
|
+
var customer_1 = require("./customer");
|
|
18
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return __importDefault(customer_1).default; } });
|
|
19
|
+
var delivery_location_1 = require("./delivery-location");
|
|
20
|
+
Object.defineProperty(exports, "DeliveryLocation", { enumerable: true, get: function () { return __importDefault(delivery_location_1).default; } });
|
|
21
|
+
// export {default as EditableCell} from "./editable-cell";
|
|
22
|
+
// export {default as EditableRow} from "./editable-row";
|
|
23
|
+
var payment_method_1 = require("./payment-method");
|
|
24
|
+
Object.defineProperty(exports, "PaymentMethod", { enumerable: true, get: function () { return __importDefault(payment_method_1).default; } });
|
|
25
|
+
var supplier_1 = require("./supplier");
|
|
26
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return __importDefault(supplier_1).default; } });
|
|
27
|
+
var form_item_1 = require("./form-item");
|
|
28
|
+
Object.defineProperty(exports, "UmzFormItem", { enumerable: true, get: function () { return __importDefault(form_item_1).default; } });
|
|
29
|
+
var input_1 = require("./input");
|
|
30
|
+
Object.defineProperty(exports, "UmzInput", { enumerable: true, get: function () { return __importDefault(input_1).default; } });
|
|
31
|
+
var date_picker_1 = require("./date-picker");
|
|
32
|
+
Object.defineProperty(exports, "UmzDatePicker", { enumerable: true, get: function () { return __importDefault(date_picker_1).default; } });
|
|
33
|
+
var welcome_modal_1 = require("./welcome-modal");
|
|
34
|
+
Object.defineProperty(exports, "WelcomeModal", { enumerable: true, get: function () { return __importDefault(welcome_modal_1).default; } });
|
|
35
|
+
var invoice_1 = require("./invoice");
|
|
36
|
+
Object.defineProperty(exports, "Invoice", { enumerable: true, get: function () { return __importDefault(invoice_1).default; } });
|
|
37
|
+
var invoice_preview_1 = require("./invoice-preview");
|
|
38
|
+
Object.defineProperty(exports, "InvoicePreview", { enumerable: true, get: function () { return __importDefault(invoice_preview_1).default; } });
|
|
39
|
+
var submit_confirmation_1 = require("./submit-confirmation");
|
|
40
|
+
Object.defineProperty(exports, "SubmitConfirmation", { enumerable: true, get: function () { return __importDefault(submit_confirmation_1).default; } });
|
|
41
|
+
var tooltip_1 = require("./tooltip");
|
|
42
|
+
Object.defineProperty(exports, "UmzTooltip", { enumerable: true, get: function () { return __importDefault(tooltip_1).default; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
4
|
+
import { AvailableFields } from "../../types/ReceiverRequirements";
|
|
5
|
+
interface Props extends WrappedComponentProps {
|
|
6
|
+
receiverRequirements?: NewReceiverRequirements;
|
|
7
|
+
receiverRequirementsKey?: AvailableFields;
|
|
8
|
+
defaultPlaceholder?: string;
|
|
9
|
+
defaultIsRequired?: boolean;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultTooltip?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
16
|
+
size?: "large" | "middle" | "small";
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
19
|
+
forwardedRef?: React.Ref<any>;
|
|
20
|
+
} & React.RefAttributes<any>> & {
|
|
21
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
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_1 = __importDefault(require("react"));
|
|
8
|
+
var react_intl_1 = require("react-intl");
|
|
9
|
+
var RequirementsUtility_1 = require("../../../utils/RequirementsUtility");
|
|
10
|
+
var react_use_1 = require("react-use");
|
|
11
|
+
var tooltip_1 = __importDefault(require("../tooltip"));
|
|
12
|
+
var UmzInput = function (_a) {
|
|
13
|
+
var receiverRequirements = _a.receiverRequirements, receiverRequirementsKey = _a.receiverRequirementsKey, defaultPlaceholder = _a.defaultPlaceholder, _b = _a.defaultIsRequired, defaultIsRequired = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, defaultTooltip = _a.defaultTooltip, defaultValue = _a.defaultValue, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, size = _a.size;
|
|
14
|
+
var isRequired = receiverRequirements && receiverRequirementsKey
|
|
15
|
+
? (0, RequirementsUtility_1.getFieldIsRequired)(receiverRequirements, receiverRequirementsKey, defaultIsRequired)
|
|
16
|
+
: defaultIsRequired;
|
|
17
|
+
var tooltipTitle = receiverRequirements && receiverRequirementsKey
|
|
18
|
+
? (0, RequirementsUtility_1.getFieldLabelTooltipOverride)(receiverRequirements, receiverRequirementsKey, defaultTooltip)
|
|
19
|
+
: defaultTooltip;
|
|
20
|
+
var placeholder = receiverRequirements && receiverRequirementsKey && defaultPlaceholder
|
|
21
|
+
? (0, RequirementsUtility_1.getFieldLabelOverride)(receiverRequirements, receiverRequirementsKey, defaultPlaceholder)
|
|
22
|
+
: defaultPlaceholder;
|
|
23
|
+
var width = (0, react_use_1.useWindowSize)().width;
|
|
24
|
+
var _d = react_1.default.useState(false), isMobile = _d[0], setIsMobile = _d[1];
|
|
25
|
+
react_1.default.useEffect(function () {
|
|
26
|
+
if (width < 768) {
|
|
27
|
+
setIsMobile(true);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
setIsMobile(false);
|
|
31
|
+
}
|
|
32
|
+
}, [width]);
|
|
33
|
+
return (react_1.default.createElement(antd_1.Flex, { gap: "middle" },
|
|
34
|
+
react_1.default.createElement(antd_1.Input, { disabled: disabled, placeholder: placeholder, required: isRequired, onChange: onChange, size: size, prefix: isRequired ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, defaultValue: defaultValue, value: value, suffix: !isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle }), onBlur: onBlur, autoComplete: "off" }),
|
|
35
|
+
isMobile && tooltipTitle && react_1.default.createElement(tooltip_1.default, { title: tooltipTitle })));
|
|
36
|
+
};
|
|
37
|
+
exports.default = (0, react_intl_1.injectIntl)(UmzInput);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WrappedComponentProps } from "react-intl";
|
|
3
|
+
import { FormInstance } from "antd";
|
|
4
|
+
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
+
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
6
|
+
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
7
|
+
import { LanguageProp } from "../../types/CommonProps";
|
|
8
|
+
import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
9
|
+
interface Props extends WrappedComponentProps {
|
|
10
|
+
form: FormInstance;
|
|
11
|
+
receiverRequirements: NewReceiverRequirements;
|
|
12
|
+
documentType: "creditNote" | "invoice";
|
|
13
|
+
updateReceiverRequirementsProp: (newReceiverRequirements: NewReceiverRequirements) => void;
|
|
14
|
+
rapiBaseUrl: string;
|
|
15
|
+
legalIdentifier: string;
|
|
16
|
+
referenceIdentifiersLabelText?: string;
|
|
17
|
+
referenceIdentifiersHelpText?: string;
|
|
18
|
+
referenceIdentifierValidateStatus: ValidateStatus;
|
|
19
|
+
chosenCustomer: PartyMetadata;
|
|
20
|
+
setReferenceIdentifierValidateStatus: (referenceIdentifierValidateStatus: ValidateStatus) => void;
|
|
21
|
+
dueDateMinimumOffset: number;
|
|
22
|
+
billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
|
|
23
|
+
outsideVatScope: boolean;
|
|
24
|
+
uploadSizeLimit: number;
|
|
25
|
+
attachmentTooltipText?: {
|
|
26
|
+
is: string;
|
|
27
|
+
en: string;
|
|
28
|
+
};
|
|
29
|
+
languageString: LanguageProp;
|
|
30
|
+
validateFields: (fieldNames: string[][], validateOnly?: boolean | undefined) => void;
|
|
31
|
+
isSaveFieldValuesSelected: boolean;
|
|
32
|
+
onSaveFieldValuesChange: () => void;
|
|
33
|
+
isActiveStep: boolean;
|
|
34
|
+
setReferenceIdentifierIsMandatory: (referenceIdentifierIsMandatory: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const fieldPaths: string[][];
|
|
37
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
38
|
+
forwardedRef?: React.Ref<any>;
|
|
39
|
+
} & React.RefAttributes<any>> & {
|
|
40
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
exports.fieldPaths = void 0;
|
|
27
|
+
var react_1 = __importStar(require("react"));
|
|
28
|
+
var react_intl_1 = require("react-intl");
|
|
29
|
+
var __1 = require("..");
|
|
30
|
+
var lodash_1 = require("lodash");
|
|
31
|
+
exports.fieldPaths = [
|
|
32
|
+
["invoice", "invoiceNo"],
|
|
33
|
+
["invoice", "issueDate"],
|
|
34
|
+
["invoice", "dueDate"],
|
|
35
|
+
["invoice", "buyerReference"],
|
|
36
|
+
["invoice", "orderReference", "documentNo"],
|
|
37
|
+
["invoice", "accountingCost"],
|
|
38
|
+
["invoice", "documentReferences", "project", "documentNo"],
|
|
39
|
+
["invoice", "invoiceLines"],
|
|
40
|
+
["invoice", "singleReferenceIdentifier", "value"],
|
|
41
|
+
["invoice", "referenceIdentifiers"],
|
|
42
|
+
];
|
|
43
|
+
var Invoice = function (props) {
|
|
44
|
+
var debouncedValidateFields = (0, lodash_1.debounce)(props.validateFields, 500);
|
|
45
|
+
(0, react_1.useEffect)(function () {
|
|
46
|
+
if (!props.isActiveStep)
|
|
47
|
+
return;
|
|
48
|
+
debouncedValidateFields(exports.fieldPaths, true);
|
|
49
|
+
}, [props.isActiveStep, JSON.stringify(props.form.getFieldsValue(exports.fieldPaths))]);
|
|
50
|
+
(0, react_1.useEffect)(function () {
|
|
51
|
+
// Update validateField if there are changes to referenceIdentifierValidateStatus (which are debounced and thus late)
|
|
52
|
+
props.validateFields(exports.fieldPaths, true);
|
|
53
|
+
}, [props.referenceIdentifierValidateStatus]);
|
|
54
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
55
|
+
react_1.default.createElement(__1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: props.form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.chosenCustomer.identifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifierValidateStatus: props.referenceIdentifierValidateStatus, setReferenceIdentifierValidateStatus: props.setReferenceIdentifierValidateStatus, dueDateMinimumOffset: props.dueDateMinimumOffset, isSaveFieldValuesSelected: props.isSaveFieldValuesSelected, onSaveFieldValuesChange: props.onSaveFieldValuesChange, setReferenceIdentifierIsMandatory: props.setReferenceIdentifierIsMandatory }),
|
|
56
|
+
react_1.default.createElement(__1.BillingLines, { formInstance: props.form, billingLinesMetadata: props.billingLinesMetadata, receiverRequirements: props.receiverRequirements, outsideVatScope: props.outsideVatScope, validateFields: props.validateFields }),
|
|
57
|
+
react_1.default.createElement(__1.Attachments, { formInstance: props.form, uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, languageString: props.languageString })));
|
|
58
|
+
};
|
|
59
|
+
exports.default = (0, react_intl_1.injectIntl)(Invoice);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormInstance } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl";
|
|
4
|
+
import { PartyMetadata } from "../../../../../unimaze-api-clients/src/mapi";
|
|
5
|
+
interface Props extends WrappedComponentProps {
|
|
6
|
+
form: FormInstance;
|
|
7
|
+
chosenCustomer: PartyMetadata;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
+
forwardedRef?: React.Ref<any>;
|
|
11
|
+
} & React.RefAttributes<any>> & {
|
|
12
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
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_1 = __importDefault(require("react"));
|
|
8
|
+
var react_intl_1 = require("react-intl");
|
|
9
|
+
var index_1 = require("./index");
|
|
10
|
+
var colors_1 = require("@ant-design/colors");
|
|
11
|
+
var InvoicePreviewCustomerSupplierInfo = function (props) {
|
|
12
|
+
var _a, _b, _c, _d, _e;
|
|
13
|
+
var token = antd_1.theme.useToken().token;
|
|
14
|
+
return (react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, title: react_1.default.createElement(antd_1.Row, { gutter: 20 },
|
|
15
|
+
react_1.default.createElement(antd_1.Col, { span: 12 },
|
|
16
|
+
react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400 } },
|
|
17
|
+
react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(index_1.translationMessages.baseInformation_issueDate)),
|
|
18
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } }, (_a = props.form.getFieldValue(["invoice", "issueDate"])) === null || _a === void 0 ? void 0 : _a.format("DD.MM.YYYY")))),
|
|
19
|
+
react_1.default.createElement(antd_1.Col, { span: 12, style: { borderLeft: "1px solid ".concat(colors_1.grey[0]) } },
|
|
20
|
+
react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400 } },
|
|
21
|
+
react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(index_1.translationMessages.baseInformation_dueDate)),
|
|
22
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM } }, (_b = props.form.getFieldValue(["invoice", "dueDate"])) === null || _b === void 0 ? void 0 : _b.format("DD.MM.YYYY"))))) },
|
|
23
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true, gap: "small" },
|
|
24
|
+
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
|
|
25
|
+
props.intl.formatMessage(index_1.translationMessages.customer_title),
|
|
26
|
+
":"),
|
|
27
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.chosenCustomer.name),
|
|
28
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
29
|
+
props.intl.formatMessage(index_1.translationMessages.customer_identifier),
|
|
30
|
+
":",
|
|
31
|
+
" ",
|
|
32
|
+
props.chosenCustomer.identifier),
|
|
33
|
+
((_c = props.chosenCustomer.address) === null || _c === void 0 ? void 0 : _c.streetNameAndNumber) &&
|
|
34
|
+
((_d = props.chosenCustomer.address) === null || _d === void 0 ? void 0 : _d.postalZone) &&
|
|
35
|
+
((_e = props.chosenCustomer.address) === null || _e === void 0 ? void 0 : _e.city) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
36
|
+
props.intl.formatMessage(index_1.translationMessages.customer_address_streetNameAndNumber),
|
|
37
|
+
": ",
|
|
38
|
+
props.chosenCustomer.address.streetNameAndNumber,
|
|
39
|
+
",",
|
|
40
|
+
" ",
|
|
41
|
+
props.chosenCustomer.address.postalZone,
|
|
42
|
+
" ",
|
|
43
|
+
props.chosenCustomer.address.city)),
|
|
44
|
+
props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
45
|
+
props.intl.formatMessage(index_1.translationMessages.baseInformation_costCenter),
|
|
46
|
+
":",
|
|
47
|
+
" ",
|
|
48
|
+
props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]))),
|
|
49
|
+
react_1.default.createElement(antd_1.Col, { span: 8, style: { padding: 0 } },
|
|
50
|
+
react_1.default.createElement("hr", null)),
|
|
51
|
+
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
|
|
52
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_title),
|
|
53
|
+
":"),
|
|
54
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "name"])),
|
|
55
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
56
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_identifier),
|
|
57
|
+
":",
|
|
58
|
+
" ",
|
|
59
|
+
props.form.getFieldValue(["invoice", "supplier", "identifier"])),
|
|
60
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
61
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_address_streetNameAndNumber),
|
|
62
|
+
":",
|
|
63
|
+
" ",
|
|
64
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "streetNameAndNumber",]),
|
|
65
|
+
", ",
|
|
66
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "postalZone"]),
|
|
67
|
+
" ",
|
|
68
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "city"])),
|
|
69
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
70
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_contact_phoneNumber),
|
|
71
|
+
":",
|
|
72
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]))),
|
|
73
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]))))));
|
|
74
|
+
};
|
|
75
|
+
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewCustomerSupplierInfo);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormInstance } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl";
|
|
4
|
+
import { PartyMetadata } from "../../../../../unimaze-api-clients/lib/mapi";
|
|
5
|
+
interface Props extends WrappedComponentProps {
|
|
6
|
+
form: FormInstance;
|
|
7
|
+
chosenCustomer: PartyMetadata;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
10
|
+
forwardedRef?: React.Ref<any>;
|
|
11
|
+
} & React.RefAttributes<any>> & {
|
|
12
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
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_1 = __importDefault(require("react"));
|
|
8
|
+
var react_intl_1 = require("react-intl");
|
|
9
|
+
var index_1 = require("./index");
|
|
10
|
+
var colors_1 = require("@ant-design/colors");
|
|
11
|
+
var InvoicePreviewCustomerSupplierInfoBox = function (props) {
|
|
12
|
+
var _a, _b, _c, _d, _e;
|
|
13
|
+
var token = antd_1.theme.useToken().token;
|
|
14
|
+
return (react_1.default.createElement(antd_1.Card, { bordered: false, style: { backgroundColor: "#F5F5F5" }, title: react_1.default.createElement(antd_1.Row, null,
|
|
15
|
+
react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400, borderRight: "1px solid ".concat(colors_1.grey[0]), paddingRight: 10 } },
|
|
16
|
+
react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(index_1.translationMessages.baseInformation_issueDate)),
|
|
17
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM, padding: "0px 5px 0px 5px" } }, (_a = props.form.getFieldValue(["invoice", "issueDate"])) === null || _a === void 0 ? void 0 : _a.format("DD.MM.YYYY"))),
|
|
18
|
+
react_1.default.createElement(antd_1.Flex, { justify: "space-between", align: "flex-end", style: { fontWeight: 400, padding: "0px 10px 0px 10px" } },
|
|
19
|
+
react_1.default.createElement(antd_1.Typography.Text, null, props.intl.formatMessage(index_1.translationMessages.baseInformation_dueDate)),
|
|
20
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary", style: { fontSize: token.fontSizeSM, padding: "0px 5px 0px 5px" } }, (_b = props.form.getFieldValue(["invoice", "dueDate"])) === null || _b === void 0 ? void 0 : _b.format("DD.MM.YYYY")))) },
|
|
21
|
+
react_1.default.createElement(antd_1.Flex, { gap: "middle", justify: "space-between" },
|
|
22
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
23
|
+
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
|
|
24
|
+
props.intl.formatMessage(index_1.translationMessages.customer_title),
|
|
25
|
+
":"),
|
|
26
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.chosenCustomer.name),
|
|
27
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
28
|
+
props.intl.formatMessage(index_1.translationMessages.customer_identifier),
|
|
29
|
+
":",
|
|
30
|
+
" ",
|
|
31
|
+
props.chosenCustomer.identifier),
|
|
32
|
+
((_c = props.chosenCustomer.address) === null || _c === void 0 ? void 0 : _c.streetNameAndNumber) &&
|
|
33
|
+
((_d = props.chosenCustomer.address) === null || _d === void 0 ? void 0 : _d.postalZone) &&
|
|
34
|
+
((_e = props.chosenCustomer.address) === null || _e === void 0 ? void 0 : _e.city) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
35
|
+
props.intl.formatMessage(index_1.translationMessages.customer_address_streetNameAndNumber),
|
|
36
|
+
": ",
|
|
37
|
+
props.chosenCustomer.address.streetNameAndNumber,
|
|
38
|
+
",",
|
|
39
|
+
" ",
|
|
40
|
+
props.chosenCustomer.address.postalZone,
|
|
41
|
+
" ",
|
|
42
|
+
props.chosenCustomer.address.city)),
|
|
43
|
+
props.form.getFieldValue(["invoice", "customer", "locationIdentifier"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
44
|
+
props.intl.formatMessage(index_1.translationMessages.baseInformation_costCenter),
|
|
45
|
+
":",
|
|
46
|
+
" ",
|
|
47
|
+
props.form.getFieldValue(["invoice", "customer", "locationIdentifier"])))),
|
|
48
|
+
react_1.default.createElement(antd_1.Flex, { vertical: true },
|
|
49
|
+
react_1.default.createElement(antd_1.Typography.Text, { style: { fontSize: token.fontSizeHeading4, fontWeight: 500 } },
|
|
50
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_title),
|
|
51
|
+
":"),
|
|
52
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "name"])),
|
|
53
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
54
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_identifier),
|
|
55
|
+
":",
|
|
56
|
+
" ",
|
|
57
|
+
props.form.getFieldValue(["invoice", "supplier", "identifier"])),
|
|
58
|
+
react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
59
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_address_streetNameAndNumber),
|
|
60
|
+
":",
|
|
61
|
+
" ",
|
|
62
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "streetNameAndNumber",]),
|
|
63
|
+
", ",
|
|
64
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "postalZone"]),
|
|
65
|
+
" ",
|
|
66
|
+
props.form.getFieldValue(["invoice", "supplier", "address", "city"])),
|
|
67
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" },
|
|
68
|
+
props.intl.formatMessage(index_1.translationMessages.supplier_contact_phoneNumber),
|
|
69
|
+
":",
|
|
70
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "telephone"]))),
|
|
71
|
+
props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"]) && (react_1.default.createElement(antd_1.Typography.Text, { type: "secondary" }, props.form.getFieldValue(["invoice", "supplier", "contact", "electronicMail"])))))));
|
|
72
|
+
};
|
|
73
|
+
exports.default = (0, react_intl_1.injectIntl)(InvoicePreviewCustomerSupplierInfoBox);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormInstance } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { WrappedComponentProps } from "react-intl";
|
|
4
|
+
interface Props extends WrappedComponentProps {
|
|
5
|
+
form: FormInstance;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
|
|
8
|
+
forwardedRef?: React.Ref<any>;
|
|
9
|
+
} & React.RefAttributes<any>> & {
|
|
10
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|