@7365admin1/module-hygiene 3.0.0 → 4.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @7365admin1/module-hygiene
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Change import logic to expect AREA instead of NAME in area import, and UNIT instead of NAME in unit import (breaking change to Excel import format).
8
+
3
9
  ## 3.0.0
4
10
 
5
11
  ### Major Changes
package/dist/index.js CHANGED
@@ -1111,12 +1111,12 @@ function useAreaService() {
1111
1111
  skippedRows.push(i + 1);
1112
1112
  continue;
1113
1113
  }
1114
- if (!row?.NAME) {
1115
- import_node_server_utils5.logger.warn(`Skipping row ${i + 1} with missing NAME:`, row);
1114
+ if (!row?.AREA) {
1115
+ import_node_server_utils5.logger.warn(`Skipping row ${i + 1} with missing AREA:`, row);
1116
1116
  skippedRows.push(i + 1);
1117
1117
  continue;
1118
1118
  }
1119
- const areaName = String(row.NAME).trim();
1119
+ const areaName = String(row.AREA).trim();
1120
1120
  if (!areaName) {
1121
1121
  import_node_server_utils5.logger.warn(`Skipping row ${i + 1} with empty ${areaType} area name`);
1122
1122
  skippedRows.push(i + 1);
@@ -1642,12 +1642,12 @@ function useUnitService() {
1642
1642
  try {
1643
1643
  for (let i = 0; i < dataArray.length; i++) {
1644
1644
  const row = dataArray[i];
1645
- if (!row?.NAME) {
1646
- import_node_server_utils9.logger.warn(`Skipping row ${i + 1} with missing NAME:`, row);
1645
+ if (!row?.UNIT) {
1646
+ import_node_server_utils9.logger.warn(`Skipping row ${i + 1} with missing UNIT:`, row);
1647
1647
  skippedRows.push(i + 1);
1648
1648
  continue;
1649
1649
  }
1650
- const unitName = String(row.NAME).trim();
1650
+ const unitName = String(row.UNIT).trim();
1651
1651
  if (!unitName) {
1652
1652
  import_node_server_utils9.logger.warn(`Skipping row ${i + 1} with empty unit name`);
1653
1653
  skippedRows.push(i + 1);