eleven-solutions-common-website-unique-web 6.0.6 → 6.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -40,8 +40,6 @@ const TaxonomyForm = () => {
|
|
40
40
|
};
|
41
41
|
const queryParams = new URLSearchParams(window.location.search);
|
42
42
|
const id = queryParams.get("id");
|
43
|
-
console.log(id, type);
|
44
|
-
console.log(isEditMode, isMultiple, isSimilarTaxonomyOpen);
|
45
43
|
// Fetch taxonomy data if id exists
|
46
44
|
useEffect(() => {
|
47
45
|
if (id) {
|
@@ -253,6 +251,11 @@ const TaxonomyForm = () => {
|
|
253
251
|
console.error("Error deleting Taxonomy:", error);
|
254
252
|
}
|
255
253
|
});
|
254
|
+
useEffect(() => {
|
255
|
+
similarTaxonomies.forEach((taxonomy) => {
|
256
|
+
console.log("Parent ID:", taxonomy.parentId);
|
257
|
+
});
|
258
|
+
}, [similarTaxonomies]);
|
256
259
|
return (_jsxs("div", { className: `${isEditMode && isMultiple ? "w-full" : "max-w-4xl"} p-6 mx-auto dark:bg-gray-800`, children: [_jsxs("div", { className: `transition duration-300 ${isModalOpen ? "filter blur-sm" : ""}`, children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit Taxonomy" : "Add Taxonomy" }), _jsx("h1", { className: "text-2xl text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? `Taxonomy Type: ${type}` : "" }), !isMultiple && (_jsxs("form", { children: [!isEditMode && (_jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Type ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: inputType, onChange: (e) => setInputType(e.target.value), type: "text", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Type" })] })), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Code ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: code, onChange: (e) => setCode(e.target.value === "" ? "" : Number(e.target.value)), type: "number", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Code", disabled: similarTaxonomies.some((taxonomy) => taxonomy.isEdit === false) })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Value ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: value, onChange: (e) => setValue(e.target.value), type: "text", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Value", disabled: similarTaxonomies.some((taxonomy) => taxonomy.isEdit === false) })] }), _jsxs("div", { className: "flex space-x-4 mt-6 justify-between", children: [_jsx("div", { children: isEditMode && (_jsx("div", { children: similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("button", { type: "button", onClick: () => {
|
257
260
|
handleDeleteClick(id);
|
258
261
|
window.location.href = "/admin/taxinomies";
|
package/package.json
CHANGED
@@ -65,10 +65,6 @@ const TaxonomyForm = () => {
|
|
65
65
|
const queryParams = new URLSearchParams(window.location.search);
|
66
66
|
const id = queryParams.get("id");
|
67
67
|
|
68
|
-
console.log(id, type);
|
69
|
-
|
70
|
-
console.log(isEditMode, isMultiple, isSimilarTaxonomyOpen);
|
71
|
-
|
72
68
|
// Fetch taxonomy data if id exists
|
73
69
|
useEffect(() => {
|
74
70
|
if (id) {
|
@@ -318,6 +314,12 @@ const TaxonomyForm = () => {
|
|
318
314
|
}
|
319
315
|
};
|
320
316
|
|
317
|
+
useEffect(() => {
|
318
|
+
similarTaxonomies.forEach((taxonomy) => {
|
319
|
+
console.log("Parent ID:", taxonomy.parentId);
|
320
|
+
});
|
321
|
+
}, [similarTaxonomies]);
|
322
|
+
|
321
323
|
return (
|
322
324
|
<div
|
323
325
|
className={`${
|