@unimaze/billing 0.2.5 → 0.2.6
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/attachments/Attachment.js +1 -4
- package/lib/common/components/attachments/index.js +3 -3
- package/lib/common/components/customer/index.js +1 -1
- package/lib/common/types/ReceiverRequirements.js +1 -1
- package/lib/create-invoice/index.js +3 -4
- package/lib/src/utils/ConversionUtility.d.ts +2 -1
- package/lib/utils/ConversionUtility.d.ts +2 -1
- package/lib/utils/ConversionUtility.js +4 -0
- package/package.json +1 -1
|
@@ -35,7 +35,6 @@ var React = __importStar(require("react"));
|
|
|
35
35
|
// import '@ant-design/compatible/assets/index.css';
|
|
36
36
|
var antd_1 = require("antd");
|
|
37
37
|
var react_intl_1 = require("react-intl");
|
|
38
|
-
var icons_1 = require("@ant-design/icons");
|
|
39
38
|
var formLayout_1 = require("../../consts/formLayout");
|
|
40
39
|
var translationMessages = react_intl_1.defineMessages({
|
|
41
40
|
attachment_labels_Reference: {
|
|
@@ -95,9 +94,7 @@ var Attachment = /** @class */ (function (_super) {
|
|
|
95
94
|
// this.props.intl.formatMessage(translationMessages.attachment_labels_File)
|
|
96
95
|
label: "Skrá", name: ["attachments", "" + fieldName, "file"], valuePropName: "fileList", getValueFromEvent: this.normFile }),
|
|
97
96
|
React.createElement(antd_1.Upload.Dragger, { name: "attachment:" + fieldName, multiple: false, onRemove: this.handleRemoveFile, beforeUpload: function () { return false; } },
|
|
98
|
-
React.createElement("p",
|
|
99
|
-
React.createElement(icons_1.InboxOutlined, null)),
|
|
100
|
-
React.createElement("p", { style: { padding: "1em" } }, "Smelltu e\u00F0a drag\u00F0u inn skr\u00E1 h\u00E9r til a\u00F0 hla\u00F0a upp"))),
|
|
97
|
+
React.createElement("p", null, "Smelltu e\u00F0a drag\u00F0u inn skr\u00E1 h\u00E9r til a\u00F0 hla\u00F0a upp"))),
|
|
101
98
|
React.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemLayout, {
|
|
102
99
|
// this.props.intl.formatMessage(translationMessages.attachment_labels_Description)
|
|
103
100
|
label: "Lýsing", name: ["attachments", "" + fieldName, "description"], rules: [
|
|
@@ -26,11 +26,11 @@ var AttachmentsGroup = function (props) {
|
|
|
26
26
|
// props.intl.formatMessage(translationMessages.attachment_title)}
|
|
27
27
|
React.createElement(components_1.ComponentContainer, { title: "Viðhengi" },
|
|
28
28
|
React.createElement(antd_1.Row, null,
|
|
29
|
-
React.createElement(antd_1.Col, { span:
|
|
29
|
+
React.createElement(antd_1.Col, { span: 24 },
|
|
30
30
|
React.createElement(Attachment_1.default, { key: "attachment1", fieldName: "file1" })),
|
|
31
|
-
React.createElement(antd_1.Col, { span:
|
|
31
|
+
React.createElement(antd_1.Col, { span: 24 },
|
|
32
32
|
React.createElement(Attachment_1.default, { key: "attachment2", fieldName: "file2" })),
|
|
33
|
-
React.createElement(antd_1.Col, { span:
|
|
33
|
+
React.createElement(antd_1.Col, { span: 24 },
|
|
34
34
|
React.createElement(Attachment_1.default, { key: "attachment3", fieldName: "file3" })))));
|
|
35
35
|
};
|
|
36
36
|
var AttachmentGroupIntl = react_intl_1.injectIntl(AttachmentsGroup);
|
|
@@ -77,7 +77,7 @@ var Customer = function (props) {
|
|
|
77
77
|
onCustomerChange(value);
|
|
78
78
|
} }, props.customers.map(function (customer, index) { return (react_1.default.createElement(antd_1.Select.Option, { key: index, value: index }, customer.name)); }))),
|
|
79
79
|
react_1.default.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemLayout, { label: "Nafn" }), chosenCustomer && chosenCustomer.name),
|
|
80
|
-
react_1.default.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemLayout, { label: "Kennitala" }), chosenCustomer && chosenCustomer.identifier),
|
|
80
|
+
react_1.default.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemLayout, { label: "Kennitala" }), chosenCustomer && ConversionUtility_1.convertToReadableKennitala(chosenCustomer.identifier)),
|
|
81
81
|
react_1.default.createElement(antd_1.Form.Item, __assign({}, formLayout_1.formItemLayout, { label: "Heimilisfang" }), chosenCustomer && chosenCustomer.address
|
|
82
82
|
? react_1.default.createElement(react_1.default.Fragment, null,
|
|
83
83
|
chosenCustomer.address.streetNameAndNumber,
|
|
@@ -179,12 +179,11 @@ var CreateInvoice = function (props) {
|
|
|
179
179
|
react_1.default.createElement(components_1.Customer, { formInstance: form, customers: props.customers, chosenCustomer: chosenCustomer, setChosenCustomer: setChosenCustomer })),
|
|
180
180
|
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 24 } },
|
|
181
181
|
react_1.default.createElement(components_1.BillingLines, { setBillingLineMetadata: handleSetBillingLineMetadata, formInstance: form, dataSource: billingLinesDataSource, editableIndex: billingLinesEditableIndex, handleAdd: handleBillingLinesAdd, initialBillingLineData: initialBillingLineData, handleDelete: handleBillingLinesDelete, handleSave: handleBillingLinesSave })),
|
|
182
|
-
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span:
|
|
182
|
+
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
183
183
|
react_1.default.createElement(components_1.BaseInformation, { form: form, documentType: "invoice" })),
|
|
184
|
-
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span:
|
|
185
|
-
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 12 } },
|
|
184
|
+
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
186
185
|
react_1.default.createElement(components_1.PaymentMethod, null)),
|
|
187
|
-
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span:
|
|
186
|
+
react_1.default.createElement(antd_1.Col, { xs: { span: 24 }, md: { span: 8 } },
|
|
188
187
|
react_1.default.createElement(components_1.Attachments /*handleAddFile={handleAddFile}*/, null)),
|
|
189
188
|
react_1.default.createElement(antd_1.Col, { span: 24 },
|
|
190
189
|
react_1.default.createElement(antd_1.Form.Item, null,
|
|
@@ -4,4 +4,5 @@ import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
|
4
4
|
import { PaymentMeansMetadata } from "@unimaze/api-clients/lib/mapi/api";
|
|
5
5
|
declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, chosenCustomer: PartyMetadata) => InvoiceMetadataInput;
|
|
6
6
|
declare const profileOutputToPartyMetadata: (profileOutput: ProfileOutput) => PartyMetadata;
|
|
7
|
-
|
|
7
|
+
declare const convertToReadableKennitala: (isoIdentifier: string) => string;
|
|
8
|
+
export { convertToInvoiceMetadataInput, profileOutputToPartyMetadata, convertToReadableKennitala };
|
|
@@ -4,4 +4,5 @@ import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
|
4
4
|
import { PaymentMeansMetadata } from "@unimaze/api-clients/lib/mapi/api";
|
|
5
5
|
declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, chosenCustomer: PartyMetadata) => InvoiceMetadataInput;
|
|
6
6
|
declare const profileOutputToPartyMetadata: (profileOutput: ProfileOutput) => PartyMetadata;
|
|
7
|
-
|
|
7
|
+
declare const convertToReadableKennitala: (isoIdentifier: string) => string;
|
|
8
|
+
export { convertToInvoiceMetadataInput, profileOutputToPartyMetadata, convertToReadableKennitala };
|
|
@@ -153,3 +153,7 @@ var profileOutputToPartyMetadata = function (profileOutput) {
|
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
155
|
exports.profileOutputToPartyMetadata = profileOutputToPartyMetadata;
|
|
156
|
+
var convertToReadableKennitala = function (isoIdentifier) {
|
|
157
|
+
return isoIdentifier.substr(5, 6) + "-" + isoIdentifier.substr(11);
|
|
158
|
+
};
|
|
159
|
+
exports.convertToReadableKennitala = convertToReadableKennitala;
|