@unimaze/billing 0.21.68 → 0.21.70
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/AttachmentList.d.ts +10 -0
- package/lib/common/components/attachments/AttachmentList.js +143 -0
- package/lib/common/components/attachments/AttachmentModal.d.ts +44 -5
- package/lib/common/components/attachments/AttachmentModal.js +54 -80
- package/lib/common/components/attachments/index.d.ts +20 -6
- package/lib/common/components/attachments/index.js +25 -206
- package/lib/common/components/billing-lines/SingleBillingLine.js +12 -3
- package/lib/common/components/form-item/index.d.ts +4 -0
- package/lib/common/components/form-item/index.js +4 -0
- package/lib/common/consts/validationRules.d.ts +2 -0
- package/lib/common/consts/validationRules.js +18 -1
- package/lib/create-invoice/index.js +121 -120
- package/lib/translations/locales/en.json +1 -0
- package/lib/translations/locales/is.json +1 -0
- package/lib/translations/locales.d.ts +2 -0
- package/lib/utils/ApiUtility.js +85 -13
- package/lib/utils/AttachmentsUtility.d.ts +13 -2
- package/lib/utils/AttachmentsUtility.js +98 -11
- package/lib/utils/BillingLineUtility.d.ts +1 -1
- package/lib/utils/BillingLineUtility.js +2 -2
- package/lib/utils/FileUploadUtility.d.ts +2 -1
- package/lib/utils/FileUploadUtility.js +10 -1
- package/package.json +2 -1
|
@@ -113,12 +113,12 @@ var generateTaxCategoryLabel = function (taxCategoryType, taxCategoryTypeTransla
|
|
|
113
113
|
return taxCategoryType ? "".concat(taxCategoryTypeTranslated, " (").concat((0, exports.calculateTaxPercentage)(taxCategoryType), "%)") : "";
|
|
114
114
|
};
|
|
115
115
|
exports.generateTaxCategoryLabel = generateTaxCategoryLabel;
|
|
116
|
-
var getCorrectInputNode = function (dataIdx, intl, placeholder, required, addonAfter, mobile, value) {
|
|
116
|
+
var getCorrectInputNode = function (dataIdx, intl, placeholder, required, addonAfter, mobile, value, min) {
|
|
117
117
|
switch (dataIdx) {
|
|
118
118
|
case "quantity":
|
|
119
119
|
case "unitPriceAmount":
|
|
120
120
|
case "discountValue":
|
|
121
|
-
return (react_1.default.createElement(antd_1.InputNumber, { prefix: required ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, step: 1, style: { width: "100%" }, placeholder: placeholder, addonAfter: addonAfter, value: value, min:
|
|
121
|
+
return (react_1.default.createElement(antd_1.InputNumber, { prefix: required ? react_1.default.createElement(antd_1.Typography.Text, { type: "danger" }, "*") : null, step: 1, style: { width: "100%" }, placeholder: placeholder, addonAfter: addonAfter, value: value, min: min }));
|
|
122
122
|
case "unitOfMeasure":
|
|
123
123
|
return (react_1.default.createElement(antd_1.Select, { popupMatchSelectWidth: false, placeholder: placeholder, style: { width: "auto" } }, Object.keys(api_1.Units).map(function (unitOfMeasure) {
|
|
124
124
|
if (unitOfMeasure !== "Rec20" && unitOfMeasure !== "Rec21")
|
|
@@ -6,4 +6,5 @@ declare const reportIfFileIsValid: (file: UploadFile, uploadSizeLimit: number, e
|
|
|
6
6
|
uploadErrorToLarge: string;
|
|
7
7
|
}) => boolean;
|
|
8
8
|
declare const getBase64: (file: Blob) => Promise<string | ArrayBuffer | null>;
|
|
9
|
-
|
|
9
|
+
declare const getFileListFromEvent: (e: any) => any;
|
|
10
|
+
export { validFileTypes, reportIfFileIsValid, getBase64, getFileListFromEvent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBase64 = exports.reportIfFileIsValid = exports.validFileTypes = void 0;
|
|
3
|
+
exports.getFileListFromEvent = exports.getBase64 = exports.reportIfFileIsValid = exports.validFileTypes = void 0;
|
|
4
4
|
var antd_1 = require("antd");
|
|
5
5
|
var validFileTypes = [
|
|
6
6
|
"application/pdf",
|
|
@@ -43,3 +43,12 @@ var getBase64 = function (file) {
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
exports.getBase64 = getBase64;
|
|
46
|
+
var getFileListFromEvent = function (e) {
|
|
47
|
+
if (!e)
|
|
48
|
+
return;
|
|
49
|
+
if (Array.isArray(e)) {
|
|
50
|
+
return e;
|
|
51
|
+
}
|
|
52
|
+
return e.fileList;
|
|
53
|
+
};
|
|
54
|
+
exports.getFileListFromEvent = getFileListFromEvent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unimaze/billing",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.70",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"@ant-design/compatible": "latest",
|
|
12
12
|
"@unimaze/api-clients": "3.2.0",
|
|
13
13
|
"antd-mask-input": "^0.1.13",
|
|
14
|
+
"chardet": "^2.2.0",
|
|
14
15
|
"dayjs": "^1.11.10",
|
|
15
16
|
"lodash": "^4.17.21",
|
|
16
17
|
"react-hot-loader": "^4.12.20",
|