eleven-solutions-common-website-unique-web 21.0.43 → 21.0.45

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.
@@ -63,12 +63,6 @@ const TaxonomyForm = ({ url }) => {
63
63
  }
64
64
  });
65
65
  const [editTaxonomyItem, setEditTaxonomyItem] = useState(null);
66
- // const [editTempTaxonomyItem, setEditTempTaxonomyItem] = useState<{
67
- // id: string;
68
- // type: string;
69
- // code: string | number;
70
- // value: string;
71
- // } | null>(null);
72
66
  const [selectedTaxonomyId, setSelectedTaxonomyId] = useState("");
73
67
  const queryParams = new URLSearchParams(window.location.search);
74
68
  const id = queryParams.get("id");
@@ -179,6 +173,8 @@ const TaxonomyForm = ({ url }) => {
179
173
  console.error(`Error ${editTaxonomyItem ? "editing" : "adding"} SubType:`, error);
180
174
  const errorMessage = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.statusText) || error.message;
181
175
  alert(`Error while ${editTaxonomyItem ? "editing" : "adding"} SubType: ${errorMessage}`);
176
+ setNewCode("");
177
+ setNewValue("");
182
178
  }
183
179
  setIsModalOpen(false);
184
180
  setSubCode("");
@@ -215,6 +211,8 @@ const TaxonomyForm = ({ url }) => {
215
211
  console.error(editTaxonomyItem ? "Error updating Taxonomy:" : "Error adding value:", error);
216
212
  const errorMessage = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.statusText) || error.message;
217
213
  alert(`Error while ${editTaxonomyItem ? "editing" : "adding"} SubType: ${errorMessage}`);
214
+ setNewCode("");
215
+ setNewValue("");
218
216
  }
219
217
  setIsModalOpen(false);
220
218
  setNewCode("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "21.0.43",
3
+ "version": "21.0.45",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -84,13 +84,6 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
84
84
  value: string;
85
85
  } | null>(null);
86
86
 
87
- // const [editTempTaxonomyItem, setEditTempTaxonomyItem] = useState<{
88
- // id: string;
89
- // type: string;
90
- // code: string | number;
91
- // value: string;
92
- // } | null>(null);
93
-
94
87
  const [selectedTaxonomyId, setSelectedTaxonomyId] = useState<string>("");
95
88
 
96
89
  const queryParams = new URLSearchParams(window.location.search);
@@ -242,6 +235,8 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
242
235
  editTaxonomyItem ? "editing" : "adding"
243
236
  } SubType: ${errorMessage}`
244
237
  );
238
+ setNewCode("");
239
+ setNewValue("");
245
240
  }
246
241
 
247
242
  setIsModalOpen(false);
@@ -302,6 +297,8 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
302
297
  editTaxonomyItem ? "editing" : "adding"
303
298
  } SubType: ${errorMessage}`
304
299
  );
300
+ setNewCode("");
301
+ setNewValue("");
305
302
  }
306
303
 
307
304
  setIsModalOpen(false);