mario-core 2.10.11-release → 2.10.12-release

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/dist/index.js CHANGED
@@ -49745,7 +49745,7 @@ var useCSVImportTab = function useCSVImportTab() {
49745
49745
  return row.trim();
49746
49746
  });
49747
49747
  var headerIndex = rows.findIndex(function (row) {
49748
- return row.split(",").includes("FirstName");
49748
+ return row.split(",").includes("First Name");
49749
49749
  });
49750
49750
 
49751
49751
  if (headerIndex === 0) {
@@ -49759,6 +49759,17 @@ var useCSVImportTab = function useCSVImportTab() {
49759
49759
  });
49760
49760
  var header = parsedData.meta.fields;
49761
49761
  var dataRows = parsedData.data;
49762
+
49763
+ if (!!!dataRows.length) {
49764
+ dispatch(setLoading(false));
49765
+ dispatch(setAlert({
49766
+ type: "danger",
49767
+ message: 'The file has no data or some column names are misformed.'
49768
+ }));
49769
+ _exit2 = true;
49770
+ return;
49771
+ }
49772
+
49762
49773
  var chunkSize = 10;
49763
49774
  var chunks = [];
49764
49775
 
@@ -49769,12 +49780,6 @@ var useCSVImportTab = function useCSVImportTab() {
49769
49780
  return (v != null ? v : "").toString().trim();
49770
49781
  });
49771
49782
  });
49772
- console.log({
49773
- valuesOnly: valuesOnly
49774
- });
49775
- console.log({
49776
- chunkData: chunkData
49777
- });
49778
49783
 
49779
49784
  if (header) {
49780
49785
  valuesOnly.unshift(header);
@@ -49786,13 +49791,6 @@ var useCSVImportTab = function useCSVImportTab() {
49786
49791
  chunks.push(valuesOnly);
49787
49792
  }
49788
49793
 
49789
- console.log({
49790
- chunks: chunks
49791
- });
49792
- console.log({
49793
- header: header
49794
- });
49795
-
49796
49794
  var _temp5 = _forTo(chunks, function (i) {
49797
49795
  return Promise.resolve(importChunkFileUsers({
49798
49796
  chunks: chunks[i]