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

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,9 @@ 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
+ setIsModalOpen(false);
177
+ setNewCode("");
178
+ setNewValue("");
182
179
  }
183
180
  setIsModalOpen(false);
184
181
  setSubCode("");
@@ -215,6 +212,9 @@ const TaxonomyForm = ({ url }) => {
215
212
  console.error(editTaxonomyItem ? "Error updating Taxonomy:" : "Error adding value:", error);
216
213
  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
214
  alert(`Error while ${editTaxonomyItem ? "editing" : "adding"} SubType: ${errorMessage}`);
215
+ setIsModalOpen(false);
216
+ setNewCode("");
217
+ setNewValue("");
218
218
  }
219
219
  setIsModalOpen(false);
220
220
  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.44",
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,9 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
242
235
  editTaxonomyItem ? "editing" : "adding"
243
236
  } SubType: ${errorMessage}`
244
237
  );
238
+ setIsModalOpen(false);
239
+ setNewCode("");
240
+ setNewValue("");
245
241
  }
246
242
 
247
243
  setIsModalOpen(false);
@@ -302,6 +298,9 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
302
298
  editTaxonomyItem ? "editing" : "adding"
303
299
  } SubType: ${errorMessage}`
304
300
  );
301
+ setIsModalOpen(false);
302
+ setNewCode("");
303
+ setNewValue("");
305
304
  }
306
305
 
307
306
  setIsModalOpen(false);