eleven-solutions-common-website-unique-web 4.0.0 → 4.0.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.
@@ -28,7 +28,7 @@ const TaxonomyForm = () => {
28
28
  const [selectedTaxonomyId, setSelectedTaxonomyId] = useState("");
29
29
  const [isMultiple, setIsMultiple] = useState(false);
30
30
  const validateForm = () => {
31
- if (!type || !code || !value) {
31
+ if (!inputType || !code || !value) {
32
32
  alert("Please fill in all required fields: Type, Code, and Value.");
33
33
  return false;
34
34
  }
@@ -106,7 +106,7 @@ const TaxonomyForm = () => {
106
106
  alert("Taxonomies added successfully");
107
107
  }
108
108
  else {
109
- yield addTaxonomyApi(type, Number(code), value);
109
+ yield addTaxonomyApi(inputType, Number(code), value);
110
110
  alert("Taxonomy added successfully");
111
111
  }
112
112
  window.history.pushState({}, "", "/admin/users");
@@ -124,11 +124,11 @@ const TaxonomyForm = () => {
124
124
  return;
125
125
  try {
126
126
  if (isEditMode) {
127
- yield updateTaxonomyApi(id, type, Number(code), value);
127
+ yield updateTaxonomyApi(id, inputType, Number(code), value);
128
128
  alert("Taxonomy updated successfully");
129
129
  }
130
130
  else {
131
- yield addTaxonomyApi(type, Number(code), value);
131
+ yield addTaxonomyApi(inputType, Number(code), value);
132
132
  alert("Taxonomy added successfully");
133
133
  }
134
134
  window.location.href = "/admin/taxinomies";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -48,7 +48,7 @@ const TaxonomyForm = () => {
48
48
  const [isMultiple, setIsMultiple] = useState(false);
49
49
 
50
50
  const validateForm = () => {
51
- if (!type || !code || !value) {
51
+ if (!inputType || !code || !value) {
52
52
  alert("Please fill in all required fields: Type, Code, and Value.");
53
53
  return false;
54
54
  }
@@ -141,7 +141,7 @@ const TaxonomyForm = () => {
141
141
  setTempTaxonomy([]);
142
142
  alert("Taxonomies added successfully");
143
143
  } else {
144
- await addTaxonomyApi(type, Number(code), value);
144
+ await addTaxonomyApi(inputType, Number(code), value);
145
145
  alert("Taxonomy added successfully");
146
146
  }
147
147
  window.history.pushState({}, "", "/admin/users");
@@ -159,10 +159,10 @@ const TaxonomyForm = () => {
159
159
 
160
160
  try {
161
161
  if (isEditMode) {
162
- await updateTaxonomyApi(id, type, Number(code), value);
162
+ await updateTaxonomyApi(id, inputType, Number(code), value);
163
163
  alert("Taxonomy updated successfully");
164
164
  } else {
165
- await addTaxonomyApi(type, Number(code), value);
165
+ await addTaxonomyApi(inputType, Number(code), value);
166
166
  alert("Taxonomy added successfully");
167
167
  }
168
168
  window.location.href = "/admin/taxinomies";