@unimaze/billing 0.11.0 → 0.11.2

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.
@@ -23,13 +23,13 @@ var translationMessages = react_intl_1.defineMessages({
23
23
  },
24
24
  attachment_tooltip_title: {
25
25
  id: "attachment_tooltip_title",
26
- defaultMessage: "The maximum size is {uploadSizeLimit}KB. Enclosed documents can be a copy of the original invoice, or timesheets for example."
26
+ defaultMessage: "The maximum size is {uploadSizeLimit}KB. Accepted file formats are JPG, PNG, PDF, CSV, XLSX and ODS.. Enclosed documents can be a copy of the original invoice, or timesheets for example."
27
27
  },
28
28
  });
29
29
  var AttachmentsGroup = function (props) {
30
30
  var tooltipTitle = (props.languageString === "en" || props.languageString === "is") && props.attachmentTooltipText
31
31
  ? props.attachmentTooltipText[props.languageString]
32
- : props.intl.formatMessage(translationMessages.attachment_tooltip_title, { uploadSizeLimit: props.uploadSizeLimit });
32
+ : props.intl.formatMessage(translationMessages.attachment_tooltip_title, { uploadSizeLimit: props.uploadSizeLimit / 1024 });
33
33
  var attachmentLabelNode = (React.createElement(antd_1.Tooltip, { title: tooltipTitle, placement: "right" },
34
34
  React.createElement("span", null,
35
35
  props.intl.formatMessage(translationMessages.attachment_title),
@@ -96,6 +96,7 @@ var Supplier = function (props) {
96
96
  };
97
97
  react_1.useEffect(function () {
98
98
  if (participantInfo !== null && participantInfo !== undefined) {
99
+ // TODO: this will override the Form Initial values. consider changing so that it only overrides if there is a value
99
100
  props.form.setFieldsValue({
100
101
  invoice: {
101
102
  supplier: {
@@ -104,7 +105,6 @@ var Supplier = function (props) {
104
105
  streetNameAndNumber: participantInfo.streetAndNumber,
105
106
  postalZone: participantInfo.postalCode,
106
107
  city: participantInfo.city,
107
- countryCode: participantInfo.country
108
108
  },
109
109
  }
110
110
  },
@@ -5,7 +5,7 @@
5
5
  "attachment_labels_Description_requiredMessage": "Vinsamlega sláið inn lýsingu",
6
6
  "attachment_labels_File": "Skrá",
7
7
  "attachment_title": "Viðhengi",
8
- "attachment_tooltip_title": "Hámarks stærð er {uploadSizeLimit}KB. Fylgigögn reiknings geta verið afrit af upprunalega reikningnum eða fylgigögn, svo sem tímaskýrslur",
8
+ "attachment_tooltip_title": "Hámarks stærð er {uploadSizeLimit}KB. Samþykkt skrárform eru JPG, PNG, PDF, CSV, XLSX and ODS. Fylgigögn reiknings geta verið afrit af upprunalega reikningnum eða fylgigögn, svo sem tímaskýrslur",
9
9
  "attachment_error_fileTooLarge": "Skrárstærð þarf að vera minni en {uploadSizeLimit}KB",
10
10
  "attachment_error_fileWrongType": "Röng skrárgerð",
11
11
  "attachment_error_fileFailedToUpload": "Mistókst að hlaða upp skrá",
@@ -85,13 +85,13 @@ var convertToInvoiceMetadataInput = function (formValues, billingLines, paymentM
85
85
  : null
86
86
  : null;
87
87
  var getMessageHandling = function (partyMetadata) {
88
- if (!(partyMetadata && partyMetadata.identifier && partyMetadata.contact && partyMetadata.contact.electronicMail)) {
88
+ if (!partyMetadata) {
89
89
  antd_1.message.error("There is an error in the configuration file for the receiver information");
90
90
  throw new Error("There is an error in the configuration file for the receiver information");
91
91
  }
92
92
  return {
93
93
  receiverIdentifier: partyMetadata.identifier,
94
- fallbackEmailAddress: partyMetadata.contact.electronicMail,
94
+ fallbackEmailAddress: partyMetadata.contact && partyMetadata.contact.electronicMail ? partyMetadata.contact.electronicMail : "",
95
95
  fallbackContactName: partyMetadata.name
96
96
  };
97
97
  };
@@ -5,9 +5,9 @@ var reportIfFileIsValid = function (file, uploadSizeLimit, errorMessages) {
5
5
  var isFileCorrectType = (file.type === "application/pdf"
6
6
  || file.type === "image/jpeg"
7
7
  || file.type === "image/png"
8
- || file.type === "image/gif"
9
- || file.type === "image/tiff"
10
- || file.type === "text/plain");
8
+ || file.type === "text/csv"
9
+ || file.type === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
10
+ || file.type === "application/vnd.oasis.opendocument.spreadsheet");
11
11
  var isFileCorrectSize = (file.size <= uploadSizeLimit);
12
12
  if (!isFileCorrectType) {
13
13
  antd_1.notification.error({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",