eleven-solutions-common-website-unique-web 2.0.31 → 2.0.32
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,6 @@ import { addTaxonomyApi, fetchTaxonomyByIdApi, updateTaxonomyApi, fetchTaxonomie
|
|
13
13
|
import { FaPlus } from "react-icons/fa";
|
14
14
|
const TaxonomyForm = () => {
|
15
15
|
const [type, setType] = useState("");
|
16
|
-
const [inputType, setInputType] = useState("");
|
17
16
|
const [code, setCode] = useState("");
|
18
17
|
const [value, setValue] = useState("");
|
19
18
|
const [isEditMode, setIsEditMode] = useState(false);
|
@@ -226,7 +225,7 @@ const TaxonomyForm = () => {
|
|
226
225
|
console.error("Error deleting Taxonomy:", error);
|
227
226
|
}
|
228
227
|
});
|
229
|
-
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}` : "" }), _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:
|
228
|
+
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}` : "" }), _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: type, onChange: (e) => setType(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 && (
|
230
229
|
// <div>
|
231
230
|
// {similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (
|
232
231
|
// <button
|
package/package.json
CHANGED
@@ -13,7 +13,6 @@ import { FaPlus } from "react-icons/fa";
|
|
13
13
|
|
14
14
|
const TaxonomyForm = () => {
|
15
15
|
const [type, setType] = useState<string>("");
|
16
|
-
const [inputType, setInputType] = useState<string>("");
|
17
16
|
const [code, setCode] = useState<number | string>("");
|
18
17
|
const [value, setValue] = useState<string>("");
|
19
18
|
|
@@ -304,8 +303,8 @@ const TaxonomyForm = () => {
|
|
304
303
|
</label>
|
305
304
|
<input
|
306
305
|
required
|
307
|
-
value={
|
308
|
-
onChange={(e) =>
|
306
|
+
value={type}
|
307
|
+
onChange={(e) => setType(e.target.value)}
|
309
308
|
type="text"
|
310
309
|
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"
|
311
310
|
placeholder="Enter Type"
|