@unimaze/billing 0.8.3-rc.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +3 -1
- package/lib/common/components/base-information/ReferenceIdentifiers.js +20 -15
- package/lib/common/components/base-information/index.d.ts +3 -1
- package/lib/common/components/base-information/index.js +11 -8
- package/lib/common/components/billing-lines/BillingTaxSummary.js +4 -0
- package/lib/common/components/billing-lines/NewBillingLines.d.ts +2 -2
- package/lib/common/components/billing-lines/NewBillingLines.js +2 -1
- package/lib/common/components/billing-lines/index.d.ts +3 -3
- package/lib/common/components/editable-cell/index.d.ts +1 -1
- package/lib/common/components/editable-cell/index.js +5 -1
- package/lib/common/components/form-item/index.js +3 -2
- package/lib/common/components/payment-method/index.d.ts +1 -1
- package/lib/common/components/payment-method/index.js +106 -81
- package/lib/common/components/supplier/index.js +15 -12
- package/lib/common/types/BillingLineMetadataOverride.d.ts +1 -1
- package/lib/common/types/CommonProps.d.ts +1 -0
- package/lib/create-invoice/IntlLoader.d.ts +2 -0
- package/lib/create-invoice/IntlLoader.js +1 -1
- package/lib/create-invoice/index.d.ts +3 -1
- package/lib/create-invoice/index.js +20 -8
- package/lib/translations/locales/is.json +12 -8
- package/lib/translations/locales.d.ts +6 -2
- package/lib/utils/ApiUtility.d.ts +2 -1
- package/lib/utils/ApiUtility.js +3 -3
- package/lib/utils/BillingLineUtility.js +3 -3
- package/lib/utils/ConversionUtility.js +6 -5
- package/lib/utils/RequirementsUtility.d.ts +1 -0
- package/lib/utils/RequirementsUtility.js +14 -0
- package/package.json +2 -2
- package/lib/example/src/index.d.ts +0 -1
- package/lib/src/common/components/attachments/Attachment.d.ts +0 -18
- package/lib/src/common/components/attachments/index.d.ts +0 -6
- package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +0 -18
- package/lib/src/common/components/base-information/index.d.ts +0 -13
- package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +0 -11
- package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +0 -10
- package/lib/src/common/components/billing-lines/index.d.ts +0 -28
- package/lib/src/common/components/component-container/Content.d.ts +0 -7
- package/lib/src/common/components/component-container/Header.d.ts +0 -9
- package/lib/src/common/components/component-container/index.d.ts +0 -11
- package/lib/src/common/components/customer/index.d.ts +0 -18
- package/lib/src/common/components/delivery-location/index.d.ts +0 -10
- package/lib/src/common/components/editable-cell/index.d.ts +0 -15
- package/lib/src/common/components/editable-row/index.d.ts +0 -5
- package/lib/src/common/components/form-item/index.d.ts +0 -28
- package/lib/src/common/components/index.d.ts +0 -10
- package/lib/src/common/components/payment-method/index.d.ts +0 -11
- package/lib/src/common/components/payment-method/paymentMethodForConversion.d.ts +0 -9
- package/lib/src/common/components/supplier/index.d.ts +0 -12
- package/lib/src/common/consts/formLayout.d.ts +0 -74
- package/lib/src/common/consts/validationRules.d.ts +0 -6
- package/lib/src/common/types/ReceiverRequirements.d.ts +0 -80
- package/lib/src/create-invoice/IntlLoader.d.ts +0 -14
- package/lib/src/create-invoice/index.d.ts +0 -11
- package/lib/src/translations/locales.d.ts +0 -142
- package/lib/src/utils/ApiUtility.d.ts +0 -21
- package/lib/src/utils/BillingLineUtility.d.ts +0 -10
- package/lib/src/utils/ConversionUtility.d.ts +0 -8
- package/lib/src/utils/IntlUtility.d.ts +0 -4
- package/lib/src/utils/RequirementsUtility.d.ts +0 -6
- package/lib/src/utils/index.d.ts +0 -2
|
@@ -44,6 +44,6 @@ var CreateInvoice = function (props) {
|
|
|
44
44
|
react_intl_1.addLocaleData(en_1.default.concat(sr_1.default, is_1.default));
|
|
45
45
|
return (react_1.default.createElement(antd_1.ConfigProvider, { locale: andLocale, componentSize: "small" },
|
|
46
46
|
react_1.default.createElement(react_intl_1.IntlProvider, { locale: languageString, defaultLocale: "en", key: languageString, messages: locales_1.default[languageString] },
|
|
47
|
-
react_1.default.createElement(index_1.default, { customers: props.customers, language: languageString, mapiBaseUrl: props.mapiBaseUrl, rapiBaseUrl: props.rapiBaseUrl, receiverRequirements: props.receiverRequirements, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, legalIdentifier: props.legalIdentifier, uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText }))));
|
|
47
|
+
react_1.default.createElement(index_1.default, { customers: props.customers, language: languageString, mapiBaseUrl: props.mapiBaseUrl, rapiBaseUrl: props.rapiBaseUrl, receiverRequirements: props.receiverRequirements, getReceiverRequirements: props.getReceiverRequirements, updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, legalIdentifier: props.legalIdentifier, uploadSizeLimit: props.uploadSizeLimit, attachmentTooltipText: props.attachmentTooltipText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText }))));
|
|
48
48
|
};
|
|
49
49
|
exports.default = CreateInvoice;
|
|
@@ -4,8 +4,10 @@ import { InjectedIntlProps } from "react-intl";
|
|
|
4
4
|
import { CommonProps } from "../common/types/CommonProps";
|
|
5
5
|
interface Props extends CommonProps, InjectedIntlProps {
|
|
6
6
|
customers: ProfileOutputWithApiKey[];
|
|
7
|
+
referenceIdentifiersHelpText?: string;
|
|
8
|
+
referenceIdentifiersLabelText?: string;
|
|
7
9
|
}
|
|
8
|
-
declare const _default: React.ComponentClass<Pick<Props, "uploadSizeLimit" | "attachmentTooltipText" | "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "legalIdentifier" | "customers" | "language" | "mapiBaseUrl">, any> & {
|
|
10
|
+
declare const _default: React.ComponentClass<Pick<Props, "uploadSizeLimit" | "attachmentTooltipText" | "receiverRequirements" | "updateReceiverRequirementsProp" | "rapiBaseUrl" | "legalIdentifier" | "referenceIdentifiersLabelText" | "referenceIdentifiersHelpText" | "customers" | "language" | "mapiBaseUrl" | "getReceiverRequirements">, any> & {
|
|
9
11
|
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
10
12
|
};
|
|
11
13
|
export default _default;
|
|
@@ -22,7 +22,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
var mapi_1 = require("@unimaze/api-clients/lib/mapi");
|
|
25
|
-
var models_1 = require("@unimaze/api-clients/lib/mapi/models");
|
|
26
25
|
var antd_1 = require("antd");
|
|
27
26
|
var formLayout_1 = require("../common/consts/formLayout");
|
|
28
27
|
var components_1 = require("../common/components");
|
|
@@ -81,17 +80,17 @@ var CreateInvoiceConstructor = function (props) {
|
|
|
81
80
|
taxAmount: 0,
|
|
82
81
|
name: props.intl.formatMessage(billing_lines_1.translationMessages.billingLines_placeholders_newItem),
|
|
83
82
|
unitOfMeasure: {
|
|
84
|
-
value:
|
|
83
|
+
value: mapi_1.Units.Piece,
|
|
85
84
|
label: props.intl.formatMessage(editable_cell_1.commonTranslationMessages.unitOfMeasure_labels_Piece)
|
|
86
85
|
},
|
|
87
86
|
unitPriceAmount: 0,
|
|
88
87
|
taxCategoryType: {
|
|
89
|
-
value:
|
|
90
|
-
label: props.intl.formatMessage(editable_cell_1.commonTranslationMessages.
|
|
88
|
+
value: mapi_1.TaxCategoryTypeEnum.OutsideTaxScope,
|
|
89
|
+
label: props.intl.formatMessage(editable_cell_1.commonTranslationMessages.taxCategoryType_labels_OutsideTaxScope) + " (0%)"
|
|
91
90
|
},
|
|
92
91
|
discountValue: "0",
|
|
93
92
|
taxableAmount: 0,
|
|
94
|
-
taxPercentage:
|
|
93
|
+
taxPercentage: 0
|
|
95
94
|
};
|
|
96
95
|
var _f = react_1.useState([__assign({}, initialBillingLineData, { key: 0 })]), billingLinesDataSource = _f[0], setBillingLinesDataSource = _f[1];
|
|
97
96
|
// BILLING LINES
|
|
@@ -114,8 +113,8 @@ var CreateInvoiceConstructor = function (props) {
|
|
|
114
113
|
newData.splice(index, 1, __assign({}, item, row));
|
|
115
114
|
var billingLineMetadata = newData.map(function (current) {
|
|
116
115
|
return __assign({}, current, { unitOfMeasure: {
|
|
117
|
-
unit:
|
|
118
|
-
}, taxCategoryType:
|
|
116
|
+
unit: mapi_1.Units[current.unitOfMeasure.value],
|
|
117
|
+
}, taxCategoryType: mapi_1.TaxCategoryTypeEnum[current.taxCategoryType.value] });
|
|
119
118
|
});
|
|
120
119
|
setBillingLinesDataSource(newData);
|
|
121
120
|
handleSetBillingLineMetadata(formInstance, billingLineMetadata);
|
|
@@ -235,6 +234,19 @@ var CreateInvoiceConstructor = function (props) {
|
|
|
235
234
|
console.log(error.config);
|
|
236
235
|
});
|
|
237
236
|
};
|
|
237
|
+
react_1.useEffect(function () {
|
|
238
|
+
getReceiverRequirements();
|
|
239
|
+
}, [chosenCustomer]);
|
|
240
|
+
var getReceiverRequirements = function () {
|
|
241
|
+
if (chosenCustomer) {
|
|
242
|
+
form.resetFields([
|
|
243
|
+
["invoice", "referenceIdentifiers"],
|
|
244
|
+
["invoice", "customer", "locationIdentifier"],
|
|
245
|
+
["invoice", "paymentMeans"]
|
|
246
|
+
]);
|
|
247
|
+
props.getReceiverRequirements(props.rapiBaseUrl, chosenCustomer.identifier);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
238
250
|
var defaultCustomer;
|
|
239
251
|
if (props.customers.length === 1 && !chosenCustomer) {
|
|
240
252
|
defaultCustomer = props.customers[0];
|
|
@@ -276,7 +288,7 @@ var CreateInvoiceConstructor = function (props) {
|
|
|
276
288
|
} }),
|
|
277
289
|
react_1.default.createElement(antd_1.Row, { gutter: [16, 16] },
|
|
278
290
|
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
279
|
-
react_1.default.createElement(components_1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.legalIdentifier })),
|
|
291
|
+
react_1.default.createElement(components_1.BaseInformation, { receiverRequirements: props.receiverRequirements, form: form, documentType: "invoice", updateReceiverRequirementsProp: props.updateReceiverRequirementsProp, rapiBaseUrl: props.rapiBaseUrl, legalIdentifier: props.legalIdentifier, referenceIdentifiersLabelText: props.referenceIdentifiersLabelText, referenceIdentifiersHelpText: props.referenceIdentifiersHelpText })),
|
|
280
292
|
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
281
293
|
react_1.default.createElement(components_1.Supplier, { receiverRequirements: props.receiverRequirements, billingLinesDataSource: billingLinesDataSource })),
|
|
282
294
|
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"baseInformation_issueDate_title": "Útgáfudagsetning stjórnar á hvaða uppgjörstímabili færslan skráist",
|
|
16
16
|
"baseInformation_dueDate": "Gjalddagi",
|
|
17
17
|
"baseInformation_dueDate_title": "Eindagi skal vera sá sami og gjalddagi",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"baseInformation_buyerReferenceLabel": "Tilvísun kaupanda",
|
|
19
|
+
"baseInformation_buyerReferenceLabel_helpText": "Tilvísun sem kaupandi hefur óskað sé sett á reikning, oft kallað \"þín tilvísun\" (your ref.), Notað í innri flokkun/samþykkt hjá kaupanda. Ef kaupandi hefur ekki tilgreint þetta sérstaklega, þá má setja hér inn nafn þess aðila sem pantaði (umbeðið).",
|
|
20
20
|
"baseInformation_notes": "Athugasemdir",
|
|
21
21
|
"baseInformation_currencyCode": "Gjaldmiðill",
|
|
22
22
|
"baseInformation_costCenter": "COST CENTER??????",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"billingTaxSummary_taxCategoryType_labels_ReducedRated": "Lækkaður skattur",
|
|
33
33
|
"billingTaxSummary_taxCategoryType_labels_ZeroRated": "Enginn skattur",
|
|
34
34
|
"billingTaxSummary_taxCategoryType_labels_Exempt": "Undaþeginn skatti",
|
|
35
|
+
"billingTaxSummary_taxCategoryType_labels_OutsideTaxScope": "Utan skattumfangs",
|
|
35
36
|
"billingLines_title": "Reikningslínur",
|
|
36
37
|
"billingLines_tooltip_title": "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",
|
|
37
38
|
"billingLines_itemNo": "Vörunr.",
|
|
@@ -56,13 +57,14 @@
|
|
|
56
57
|
"deliveryLocation_countryCode": "Landsnúmer",
|
|
57
58
|
"formItem_required_errorMessage": "Það þarf að fylla út í þennan reit",
|
|
58
59
|
"paymentMethod_title": "Greiðsluháttur",
|
|
59
|
-
"
|
|
60
|
+
"paymentMethod_label": "Reikningsnúmer",
|
|
61
|
+
"paymentMethod_labels_domesticTransfer_bankNo": "Banki",
|
|
60
62
|
"paymentMethod_labels_domesticTransfer_typeNo": "Týpunúmer",
|
|
61
|
-
"paymentMethod_labels_domesticTransfer_accountType": "
|
|
63
|
+
"paymentMethod_labels_domesticTransfer_accountType": "Hb",
|
|
62
64
|
"paymentMethod_labels_domesticTransfer_accountNo": "Reikningsnúmer",
|
|
63
65
|
"paymentMethod_labels_domesticTransfer_paymentReference": "Greiðslutilvísun",
|
|
64
|
-
"paymentMethod_labels_icelandicClaim_bankNo": "
|
|
65
|
-
"paymentMethod_labels_icelandicClaim_claimNo": "
|
|
66
|
+
"paymentMethod_labels_icelandicClaim_bankNo": "Banki",
|
|
67
|
+
"paymentMethod_labels_icelandicClaim_claimNo": "Reikningsnúmer",
|
|
66
68
|
"paymentMethod_labels_methods_undefined": "Óskilgreint",
|
|
67
69
|
"paymentMethod_labels_methods_mutuallyAgreed": "Skv. samkomulagi",
|
|
68
70
|
"paymentMethod_labels_methods_domesticTransfer": "Millifærsla",
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"supplier_name": "Nafn birgja",
|
|
74
76
|
"supplier_identifier": "Kennitala",
|
|
75
77
|
"supplier_vatNumber": "VSK nr.",
|
|
78
|
+
"supplier_vatNumber_mandatory": "Gerð er krafa um VSK númer ef línur í skjali nota aðra skattflokka heldur en 'Utan skattumfangs'",
|
|
76
79
|
"supplier_address_streetNameAndNumber": "Heimilisfang",
|
|
77
80
|
"supplier_address_zip_postalCode": "Póstnúmer",
|
|
78
81
|
"supplier_address_city": "Borg",
|
|
@@ -93,8 +96,8 @@
|
|
|
93
96
|
"customer_contact_email": "Netfang",
|
|
94
97
|
"customer_contact_name": "Nafn tengiliðs",
|
|
95
98
|
"referenceIdentifiers_labels_addButton": "Bætið við tilvísunarnúmeri",
|
|
96
|
-
"referenceIdentifiers_labels_referenceIdentifier": "
|
|
97
|
-
"referenceIdentifiers_labels_referenceIdentifier_title": "
|
|
99
|
+
"referenceIdentifiers_labels_referenceIdentifier": "Viðfang",
|
|
100
|
+
"referenceIdentifiers_labels_referenceIdentifier_title": "Tilvísun í viðfang sem tengt er reikningi, gefið upp af seljanda. Gæti verið áskriftarnúmer, símanúmer, mælistaður, ökutæki, einstaklingur o.fl. eftir því sem við á.",
|
|
98
101
|
"attachment_labels_uploadFileMsg": "Smelltu eða dragðu inn skrá hér til að hlaða upp",
|
|
99
102
|
"attachment_labels_descriptionErrorMsg": "Lýsing má ekki samsvara annarri skráalýsing",
|
|
100
103
|
"baseInformation_currency_ISK": "Íslensk króna (ISK)",
|
|
@@ -109,6 +112,7 @@
|
|
|
109
112
|
"taxCategoryType_labels_ReducedRated": "Lækkaður skattur",
|
|
110
113
|
"taxCategoryType_labels_ZeroRated": "Enginn skattur",
|
|
111
114
|
"taxCategoryType_labels_Exempt": "Undaþeginn skatti",
|
|
115
|
+
"taxCategoryType_labels_OutsideTaxScope": "Utan skattumfangs",
|
|
112
116
|
"unitOfMeasure_labels_Piece": "Stykki",
|
|
113
117
|
"unitOfMeasure_labels_Kilogram": "Kílógramm",
|
|
114
118
|
"unitOfMeasure_labels_Month": "Mánuður",
|
|
@@ -17,8 +17,8 @@ declare const _default: {
|
|
|
17
17
|
"baseInformation_issueDate_title": string;
|
|
18
18
|
"baseInformation_dueDate": string;
|
|
19
19
|
"baseInformation_dueDate_title": string;
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"baseInformation_buyerReferenceLabel": string;
|
|
21
|
+
"baseInformation_buyerReferenceLabel_helpText": string;
|
|
22
22
|
"baseInformation_notes": string;
|
|
23
23
|
"baseInformation_currencyCode": string;
|
|
24
24
|
"baseInformation_costCenter": string;
|
|
@@ -34,6 +34,7 @@ declare const _default: {
|
|
|
34
34
|
"billingTaxSummary_taxCategoryType_labels_ReducedRated": string;
|
|
35
35
|
"billingTaxSummary_taxCategoryType_labels_ZeroRated": string;
|
|
36
36
|
"billingTaxSummary_taxCategoryType_labels_Exempt": string;
|
|
37
|
+
"billingTaxSummary_taxCategoryType_labels_OutsideTaxScope": string;
|
|
37
38
|
"billingLines_title": string;
|
|
38
39
|
"billingLines_tooltip_title": string;
|
|
39
40
|
"billingLines_itemNo": string;
|
|
@@ -58,6 +59,7 @@ declare const _default: {
|
|
|
58
59
|
"deliveryLocation_countryCode": string;
|
|
59
60
|
"formItem_required_errorMessage": string;
|
|
60
61
|
"paymentMethod_title": string;
|
|
62
|
+
"paymentMethod_label": string;
|
|
61
63
|
"paymentMethod_labels_domesticTransfer_bankNo": string;
|
|
62
64
|
"paymentMethod_labels_domesticTransfer_typeNo": string;
|
|
63
65
|
"paymentMethod_labels_domesticTransfer_accountType": string;
|
|
@@ -75,6 +77,7 @@ declare const _default: {
|
|
|
75
77
|
"supplier_name": string;
|
|
76
78
|
"supplier_identifier": string;
|
|
77
79
|
"supplier_vatNumber": string;
|
|
80
|
+
"supplier_vatNumber_mandatory": string;
|
|
78
81
|
"supplier_address_streetNameAndNumber": string;
|
|
79
82
|
"supplier_address_zip_postalCode": string;
|
|
80
83
|
"supplier_address_city": string;
|
|
@@ -111,6 +114,7 @@ declare const _default: {
|
|
|
111
114
|
"taxCategoryType_labels_ReducedRated": string;
|
|
112
115
|
"taxCategoryType_labels_ZeroRated": string;
|
|
113
116
|
"taxCategoryType_labels_Exempt": string;
|
|
117
|
+
"taxCategoryType_labels_OutsideTaxScope": string;
|
|
114
118
|
"unitOfMeasure_labels_Piece": string;
|
|
115
119
|
"unitOfMeasure_labels_Kilogram": string;
|
|
116
120
|
"unitOfMeasure_labels_Month": string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mapi } from "@unimaze/api-clients";
|
|
2
2
|
import { InvoiceMetadataInput, TransactionProcessingMode } from "@unimaze/api-clients/lib/mapi/api";
|
|
3
|
-
import { AxiosPromise } from "axios";
|
|
3
|
+
import { AxiosPromise, CancelToken } from "axios";
|
|
4
4
|
import { LanguageProp } from "../common/types/CommonProps";
|
|
5
5
|
interface CreateSubmitInvoice {
|
|
6
6
|
messageId: string;
|
|
@@ -18,4 +18,5 @@ interface AttachDocument {
|
|
|
18
18
|
}
|
|
19
19
|
declare const submitDocument: (data: any, attachDocument: AttachDocument, mapiBaseUrl: string, apiKey?: string | undefined) => AxiosPromise<mapi.MessageOutput>;
|
|
20
20
|
declare const submitInvoice: (createSubmitInvoice: CreateSubmitInvoice, mapiBaseUrl: string, apiKey?: string | undefined, callName?: string | undefined, language?: LanguageProp) => AxiosPromise<mapi.MessageOutput>;
|
|
21
|
+
export declare const getCancelToken: (callName: string) => CancelToken;
|
|
21
22
|
export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument };
|
package/lib/utils/ApiUtility.js
CHANGED
|
@@ -45,15 +45,15 @@ var submitInvoice = function (createSubmitInvoice, mapiBaseUrl, apiKey, callName
|
|
|
45
45
|
};
|
|
46
46
|
exports.submitInvoice = submitInvoice;
|
|
47
47
|
var createOptions = function (apiKey, callName, language) {
|
|
48
|
-
return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) })) }, (callName && { cancelToken: getCancelToken(callName) }));
|
|
48
|
+
return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) })) }, (callName && { cancelToken: exports.getCancelToken(callName) }));
|
|
49
49
|
};
|
|
50
50
|
var createOptionsData = function (data, apiKey, callName, language) {
|
|
51
|
-
var options = __assign({}, (callName && { cancelToken: getCancelToken(callName) }), { data: data, headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) }), { "Content-Type": "application/octet-stream" }) });
|
|
51
|
+
var options = __assign({}, (callName && { cancelToken: exports.getCancelToken(callName) }), { data: data, headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) }), { "Content-Type": "application/octet-stream" }) });
|
|
52
52
|
// tslint:disable-next-line:no-console
|
|
53
53
|
console.log(options);
|
|
54
54
|
return options;
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
exports.getCancelToken = function (callName) {
|
|
57
57
|
var cancelTokenSource = window[callName];
|
|
58
58
|
if (cancelTokenSource) {
|
|
59
59
|
cancelTokenSource.cancel("only one call allowed. Canceling previous call");
|
|
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var api_1 = require("@unimaze/api-clients/lib/mapi/api");
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var antd_1 = require("antd");
|
|
20
|
-
var models_1 = require("@unimaze/api-clients/lib/mapi/models");
|
|
21
20
|
exports.billingLinesFieldsMetadata = function (formInstance) {
|
|
22
21
|
var billingLinesMetadata = formInstance.getFieldValue("billingLinesMetadata");
|
|
23
22
|
return billingLinesMetadata.map(function (billingLine) {
|
|
@@ -64,6 +63,7 @@ exports.calculateTaxPercentage = function (taxCategoryType) {
|
|
|
64
63
|
return 11;
|
|
65
64
|
case api_1.TaxCategoryTypeEnum.ZeroRated:
|
|
66
65
|
case api_1.TaxCategoryTypeEnum.Exempt:
|
|
66
|
+
case api_1.TaxCategoryTypeEnum.OutsideTaxScope:
|
|
67
67
|
return 0;
|
|
68
68
|
}
|
|
69
69
|
};
|
|
@@ -76,12 +76,12 @@ exports.getCorrectInputNode = function (dataIdx) {
|
|
|
76
76
|
case "unitPriceAmount":
|
|
77
77
|
return react_1.default.createElement(antd_1.InputNumber, { step: 1 });
|
|
78
78
|
case "unitOfMeasure":
|
|
79
|
-
return (react_1.default.createElement(antd_1.Select, { dropdownMatchSelectWidth: false }, Object.keys(
|
|
79
|
+
return (react_1.default.createElement(antd_1.Select, { dropdownMatchSelectWidth: false }, Object.keys(api_1.Units).map(function (unitOfMeasure) {
|
|
80
80
|
if (unitOfMeasure !== "Rec20" && unitOfMeasure !== "Rec21")
|
|
81
81
|
return (react_1.default.createElement(antd_1.Select.Option, { value: unitOfMeasure, title: unitOfMeasure, key: unitOfMeasure }, unitOfMeasure));
|
|
82
82
|
})));
|
|
83
83
|
case "taxCategoryType":
|
|
84
|
-
return (react_1.default.createElement(antd_1.Select, { dropdownMatchSelectWidth: false }, Object.keys(
|
|
84
|
+
return (react_1.default.createElement(antd_1.Select, { dropdownMatchSelectWidth: false }, Object.keys(api_1.Units).map(function (taxCategoryType) {
|
|
85
85
|
return (react_1.default.createElement(antd_1.Select.Option, { value: taxCategoryType, title: taxCategoryType, key: taxCategoryType }, taxCategoryType));
|
|
86
86
|
})));
|
|
87
87
|
default:
|
|
@@ -35,15 +35,16 @@ var isEmpty = function (map) {
|
|
|
35
35
|
};
|
|
36
36
|
var getIdentifierWithPrefix = function (identifier) {
|
|
37
37
|
if (!identifier.startsWith("0196:")) {
|
|
38
|
-
return "0196:" + identifier
|
|
38
|
+
return "0196:" + cleanIdentifier(identifier);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
return
|
|
41
|
+
return cleanIdentifier(identifier);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
//
|
|
44
|
+
var cleanIdentifier = function (identifier) {
|
|
45
|
+
// return identifier.replace(/[^0-9]/g, "") // replace anything that isn't a numeric character
|
|
46
|
+
return identifier.replace("-", ""); // remove the '-'
|
|
47
|
+
};
|
|
47
48
|
var convertToInvoiceMetadataInput = function (formValues, billingLines, paymentMethod, chosenCustomer) {
|
|
48
49
|
var issueDate = convertDates(formValues.invoice.issueDate);
|
|
49
50
|
var dueDate = convertDates(formValues.invoice.dueDate);
|
|
@@ -3,4 +3,5 @@ import { AvailableFields } from "../common/types/ReceiverRequirements";
|
|
|
3
3
|
import { FieldDefinition, NewReceiverRequirements } from "../common/types/NewReceiverRequirements";
|
|
4
4
|
export declare const getFieldRequirements: (receiverRequirements: NewReceiverRequirements, key: AvailableFields) => FieldDefinition | undefined;
|
|
5
5
|
export declare const getFieldLabelOverride: (receiverRequirements: NewReceiverRequirements, key: AvailableFields, defaultLabel: React.ReactNode) => React.ReactNode;
|
|
6
|
+
export declare const getFieldLabelTooltipOverride: (receiverRequirements: NewReceiverRequirements, key: AvailableFields, defaultLabelTooltip: React.ReactNode) => React.ReactNode;
|
|
6
7
|
export declare const getFieldIsRequired: (receiverRequirements: NewReceiverRequirements, key: AvailableFields, defaultIsRequired: boolean) => boolean;
|
|
@@ -30,6 +30,20 @@ exports.getFieldLabelOverride = function (receiverRequirements, key, defaultLabe
|
|
|
30
30
|
var fieldRequirement = exports.getFieldRequirements(receiverRequirements, key);
|
|
31
31
|
return fieldRequirement && fieldRequirement.properties.hasOwnProperty("label") ? fieldRequirement.properties.label : defaultLabel;
|
|
32
32
|
};
|
|
33
|
+
exports.getFieldLabelTooltipOverride = function (receiverRequirements, key, defaultLabelTooltip) {
|
|
34
|
+
var fieldRequirement = exports.getFieldRequirements(receiverRequirements, key);
|
|
35
|
+
if (fieldRequirement && fieldRequirement.properties.hasOwnProperty("handling")) {
|
|
36
|
+
if (fieldRequirement.properties.handling) {
|
|
37
|
+
var handling = JSON.parse(fieldRequirement.properties.handling);
|
|
38
|
+
return handling.helpText ? handling.helpText : defaultLabelTooltip;
|
|
39
|
+
}
|
|
40
|
+
else
|
|
41
|
+
return defaultLabelTooltip;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return defaultLabelTooltip;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
33
47
|
exports.getFieldIsRequired = function (receiverRequirements, key, defaultIsRequired) {
|
|
34
48
|
var fieldRequirement = exports.getFieldRequirements(receiverRequirements, key);
|
|
35
49
|
var fieldCardinality = fieldRequirement && fieldRequirement.properties.hasOwnProperty("cardinality") && fieldRequirement.properties.cardinality;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unimaze/billing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@ant-design/compatible": "latest",
|
|
12
12
|
"@types/react-google-recaptcha": "^2.1.0",
|
|
13
|
-
"@unimaze/api-clients": "2.
|
|
13
|
+
"@unimaze/api-clients": "1.2.1",
|
|
14
14
|
"antd-mask-input": "^0.1.13",
|
|
15
15
|
"react-google-recaptcha": "^2.1.0",
|
|
16
16
|
"react-hot-loader": "^4.12.20",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "antd/dist/antd.compact.css";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { InjectedIntlProps } from "react-intl";
|
|
3
|
-
interface Props extends InjectedIntlProps {
|
|
4
|
-
fieldName: "file1" | "file2" | "file3";
|
|
5
|
-
}
|
|
6
|
-
interface States {
|
|
7
|
-
file: any[];
|
|
8
|
-
}
|
|
9
|
-
declare class Attachment extends React.Component<Props, States> {
|
|
10
|
-
constructor(props: Props);
|
|
11
|
-
handleRemoveFile: () => void;
|
|
12
|
-
normFile: (e: any) => any;
|
|
13
|
-
render(): JSX.Element;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: React.ComponentClass<Pick<Props & React.RefAttributes<Attachment>, "ref" | "key" | "fieldName">, any> & {
|
|
16
|
-
WrappedComponent: React.ComponentType<Props & React.RefAttributes<Attachment> & InjectedIntlProps>;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { InjectedIntlProps } from "react-intl";
|
|
3
|
-
declare const AttachmentGroupIntl: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
|
|
4
|
-
WrappedComponent: React.ComponentType<InjectedIntlProps>;
|
|
5
|
-
};
|
|
6
|
-
export default AttachmentGroupIntl;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { InjectedIntlProps } from "react-intl";
|
|
3
|
-
import { StoreValue } from "rc-field-form/lib/interface";
|
|
4
|
-
interface FieldData {
|
|
5
|
-
name: number;
|
|
6
|
-
key: number;
|
|
7
|
-
fieldKey: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const translationMessages: ReactIntl.Messages<"referenceIdentifiers_labels_addButton" | "referenceIdentifiers_labels_referenceIdentifier" | "referenceIdentifiers_labels_referenceIdentifier_title" | "referenceIdentifiers_labels_carNumber" | "referenceIdentifiers_labels_identifier" | "referenceIdentifiers_labels_propertyNumber">;
|
|
10
|
-
interface Props extends InjectedIntlProps {
|
|
11
|
-
fields: FieldData[];
|
|
12
|
-
add: (defaultValue?: StoreValue) => void;
|
|
13
|
-
remove: (index: number) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: React.ComponentClass<Pick<Props, "remove" | "fields" | "add">, any> & {
|
|
16
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FormInstance } from "antd/es/form";
|
|
3
|
-
import { InjectedIntlProps } from "react-intl";
|
|
4
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
5
|
-
interface Props extends InjectedIntlProps {
|
|
6
|
-
receiverRequirements: NewReceiverRequirements;
|
|
7
|
-
form: FormInstance;
|
|
8
|
-
documentType: "creditNote" | "invoice";
|
|
9
|
-
}
|
|
10
|
-
declare const BaseInformationIntl: React.ComponentClass<Pick<Props, "form" | "receiverRequirements" | "documentType">, any> & {
|
|
11
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
12
|
-
};
|
|
13
|
-
export default BaseInformationIntl;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
3
|
-
import { InjectedIntlProps } from "react-intl";
|
|
4
|
-
interface Props extends InjectedIntlProps {
|
|
5
|
-
billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
|
|
6
|
-
currencyCode: string;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: React.ComponentClass<Pick<Props, "currencyCode" | "billingLinesMetadata">, any> & {
|
|
9
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
3
|
-
import { InjectedIntlProps } from "react-intl";
|
|
4
|
-
interface Props extends InjectedIntlProps {
|
|
5
|
-
billingLines: BillingLineMetadataOverride[] | undefined;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.ComponentClass<Pick<Props, "billingLines">, any> & {
|
|
8
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { BillingLineMetadata } from "@unimaze/api-clients/lib/mapi/models";
|
|
3
|
-
import { InjectedIntlProps } from "react-intl";
|
|
4
|
-
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
5
|
-
import { FormInstance } from "antd/es/form";
|
|
6
|
-
export interface TaxCategoryTypeWithPercentageEnum {
|
|
7
|
-
value: "StandardRated" | "ReducedRated" | "ZeroRated" | "Exempt";
|
|
8
|
-
label: string;
|
|
9
|
-
}
|
|
10
|
-
export interface UnitOfMeasureLabelInValueEnum {
|
|
11
|
-
value: "Piece" | "Kilogram" | "Month" | "Package" | "Year" | "Day" | "Hour" | "Kilometre" | "Metre" | "Litre" | "SquareMetre" | "CubicMetre" | "Tonne" | "KiloWattHour" | "One" | "Rec20" | "Rec21";
|
|
12
|
-
label: string;
|
|
13
|
-
}
|
|
14
|
-
interface Props extends InjectedIntlProps {
|
|
15
|
-
formInstance: FormInstance;
|
|
16
|
-
setBillingLineMetadata: (formInstance: FormInstance, billingLineMetadata: BillingLineMetadata[]) => void;
|
|
17
|
-
dataSource: BillingLineMetadataOverride[];
|
|
18
|
-
handleDelete: (index: number) => void;
|
|
19
|
-
handleAdd: (billingLineToAdd: BillingLineMetadataOverride) => void;
|
|
20
|
-
handleSave: (row: BillingLineMetadataOverride, formInstance: FormInstance) => void;
|
|
21
|
-
initialBillingLineData: BillingLineMetadataOverride;
|
|
22
|
-
editableIndex: number;
|
|
23
|
-
}
|
|
24
|
-
export declare const translationMessages: ReactIntl.Messages<"billingLines_title" | "billingLines_tooltip_title" | "billingLines_itemNo" | "billingLines_name" | "billingLines_quantity" | "billingLines_unitOfMeasure" | "billingLines_unitPriceAmount" | "billingLines_taxCategoryType" | "billingLines_taxCategoryType_title" | "billingLines_taxCategoryPercentage" | "billingLines_discount" | "billingLines_lineAmount" | "billingLines_taxAmount" | "billingLines_button_addRow" | "billingLines_placeholders_itemNo" | "billingLines_placeholders_newItem">;
|
|
25
|
-
declare const BillingLinesIntl: React.ComponentClass<Pick<Props, "formInstance" | "setBillingLineMetadata" | "dataSource" | "handleDelete" | "handleAdd" | "handleSave" | "initialBillingLineData" | "editableIndex">, any> & {
|
|
26
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
27
|
-
};
|
|
28
|
-
export default BillingLinesIntl;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
10
|
-
declare const ComponentContainer: React.FC<Props>;
|
|
11
|
-
export default ComponentContainer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InjectedIntlProps } 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 InjectedIntlProps {
|
|
8
|
-
receiverRequirements: NewReceiverRequirements;
|
|
9
|
-
customers: ProfileOutputWithApiKey[];
|
|
10
|
-
formInstance: FormInstance;
|
|
11
|
-
chosenCustomer: PartyMetadata | undefined;
|
|
12
|
-
setChosenCustomer: (chosenCustomer: PartyMetadata) => void;
|
|
13
|
-
setChosenCustomerApiKey: (chosenCustomerApiKey: string) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const CustomerIntl: React.ComponentClass<Pick<Props, "customers" | "receiverRequirements" | "chosenCustomer" | "setChosenCustomer" | "setChosenCustomerApiKey" | "formInstance">, any> & {
|
|
16
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
17
|
-
};
|
|
18
|
-
export default CustomerIntl;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { InjectedIntlProps } from "react-intl";
|
|
3
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
4
|
-
interface Props extends InjectedIntlProps {
|
|
5
|
-
receiverRequirements: NewReceiverRequirements;
|
|
6
|
-
}
|
|
7
|
-
declare const DeliveryLocationIntl: React.ComponentClass<Pick<Props, "receiverRequirements">, any> & {
|
|
8
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
9
|
-
};
|
|
10
|
-
export default DeliveryLocationIntl;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
3
|
-
import { InjectedIntlProps } from "react-intl";
|
|
4
|
-
export declare const commonTranslationMessages: ReactIntl.Messages<"taxCategoryType_labels_StandardRated" | "taxCategoryType_labels_ReducedRated" | "taxCategoryType_labels_ZeroRated" | "taxCategoryType_labels_Exempt" | "unitOfMeasure_labels_Piece" | "unitOfMeasure_labels_Kilogram" | "unitOfMeasure_labels_Month" | "unitOfMeasure_labels_Package" | "unitOfMeasure_labels_Year" | "unitOfMeasure_labels_Day" | "unitOfMeasure_labels_Hour" | "unitOfMeasure_labels_Kilometre" | "unitOfMeasure_labels_Metre" | "unitOfMeasure_labels_Litre" | "unitOfMeasure_labels_SquareMetre" | "unitOfMeasure_labels_CubicMetre" | "unitOfMeasure_labels_Tonne" | "unitOfMeasure_labels_KiloWattHour" | "unitOfMeasure_labels_One">;
|
|
5
|
-
interface EditableCellProps extends InjectedIntlProps {
|
|
6
|
-
record: BillingLineMetadataOverride;
|
|
7
|
-
handleSave: (billingLineMetadata: BillingLineMetadataOverride) => void;
|
|
8
|
-
dataIndex: keyof Omit<BillingLineMetadataOverride, 'key'>;
|
|
9
|
-
editable: boolean;
|
|
10
|
-
index: number;
|
|
11
|
-
}
|
|
12
|
-
declare const EditableCellIntl: React.ComponentClass<Pick<EditableCellProps, "handleSave" | "record" | "dataIndex" | "editable" | "index">, any> & {
|
|
13
|
-
WrappedComponent: React.ComponentType<EditableCellProps & InjectedIntlProps>;
|
|
14
|
-
};
|
|
15
|
-
export default EditableCellIntl;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AvailableFields } from "../../types/ReceiverRequirements";
|
|
3
|
-
import { NamePath, Rule } from "rc-field-form/lib/interface";
|
|
4
|
-
import { InjectedIntlProps } from "react-intl";
|
|
5
|
-
import { FormItemProps } from "antd/lib/form/FormItem";
|
|
6
|
-
import { NewReceiverRequirements } from "../../types/NewReceiverRequirements";
|
|
7
|
-
export declare const translationMessages: ReactIntl.Messages<"formItem_required_errorMessage">;
|
|
8
|
-
interface StringMap {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
}
|
|
11
|
-
interface Props extends InjectedIntlProps, FormItemProps {
|
|
12
|
-
receiverRequirements: NewReceiverRequirements;
|
|
13
|
-
receiverRequirementsKey: AvailableFields;
|
|
14
|
-
defaultLabel: React.ReactNode | string;
|
|
15
|
-
defaultLabelTooltip?: React.ReactNode;
|
|
16
|
-
defaultIsRequired: boolean;
|
|
17
|
-
fieldName: NamePath;
|
|
18
|
-
additionalRules?: Rule[];
|
|
19
|
-
style?: React.CSSProperties;
|
|
20
|
-
initialValue?: StringMap;
|
|
21
|
-
verticalLabels?: boolean;
|
|
22
|
-
onlyLabelOnFirstInList?: boolean;
|
|
23
|
-
index?: number;
|
|
24
|
-
}
|
|
25
|
-
declare const _default: React.ComponentClass<Pick<Props, "label" | "style" | "children" | "receiverRequirements" | "name" | "prefixCls" | "className" | "id" | "onReset" | "validateTrigger" | "required" | "index" | "dependencies" | "getValueFromEvent" | "normalize" | "rules" | "shouldUpdate" | "trigger" | "validateFirst" | "valuePropName" | "getValueProps" | "messageVariables" | "initialValue" | "isListField" | "htmlFor" | "fieldName" | "receiverRequirementsKey" | "defaultLabel" | "defaultLabelTooltip" | "defaultIsRequired" | "additionalRules" | "verticalLabels" | "onlyLabelOnFirstInList" | "noStyle" | "hasFeedback" | "validateStatus" | "fieldKey" | "colon" | "labelAlign" | "labelCol" | "wrapperCol" | "help" | "extra">, any> & {
|
|
26
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
27
|
-
};
|
|
28
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { default as Attachments } from "./attachments";
|
|
2
|
-
export { default as BaseInformation } from "./base-information";
|
|
3
|
-
export { default as BillingLines } from "./billing-lines";
|
|
4
|
-
export { default as ComponentContainer } from "./component-container";
|
|
5
|
-
export { default as Customer } from "./customer";
|
|
6
|
-
export { default as DeliveryLocation } from "./delivery-location";
|
|
7
|
-
export { default as EditableCell } from "./editable-cell";
|
|
8
|
-
export { default as EditableRow } from "./editable-row";
|
|
9
|
-
export { default as PaymentMethod } from "./payment-method";
|
|
10
|
-
export { default as Supplier } from "./supplier";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InjectedIntlProps } from "react-intl";
|
|
3
|
-
import { FormInstance } from "antd/es/form";
|
|
4
|
-
export declare const translationMessages: ReactIntl.Messages<"paymentMethod_title" | "paymentMethod_labels_domesticTransfer_bankNo" | "paymentMethod_labels_domesticTransfer_accountType" | "paymentMethod_labels_domesticTransfer_accountNo" | "paymentMethod_labels_domesticTransfer_paymentReference" | "paymentMethod_labels_icelandicClaim_bankNo" | "paymentMethod_labels_icelandicClaim_claimNo" | "paymentMethod_labels_methods_undefined" | "paymentMethod_labels_methods_mutuallyAgreed" | "paymentMethod_labels_methods_domesticTransfer" | "paymentMethod_labels_methods_domesticClaim" | "paymentMethod_rules_number" | "paymentMethod_rules_Length">;
|
|
5
|
-
interface Props extends InjectedIntlProps {
|
|
6
|
-
formInstance: FormInstance;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: React.ComponentClass<Pick<Props, "formInstance">, any> & {
|
|
9
|
-
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PaymentMeansType } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
-
import { TransferMetadata, ClaimMetadata } from '@unimaze/api-clients/lib/mapi/models';
|
|
3
|
-
import { Store } from 'antd/es/form/interface';
|
|
4
|
-
export interface IPaymentMeans {
|
|
5
|
-
type: PaymentMeansType;
|
|
6
|
-
domesticTransfer?: TransferMetadata | undefined;
|
|
7
|
-
domesticClaim?: ClaimMetadata | undefined;
|
|
8
|
-
}
|
|
9
|
-
export declare const PaymentMethodFormData: (formData: Store) => IPaymentMeans;
|