eleven-solutions-common-website-unique-web 7.0.1 → 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -246,6 +246,7 @@ const TaxonomyForm = () => {
|
|
246
246
|
catch (error) {
|
247
247
|
console.error("Error adding SubType:", error);
|
248
248
|
}
|
249
|
+
setEditTaxonomyItem(null);
|
249
250
|
setIsModalOpen(false);
|
250
251
|
setSubType("");
|
251
252
|
setSubCode("");
|
@@ -344,9 +345,7 @@ const TaxonomyForm = () => {
|
|
344
345
|
: "Add SubType"
|
345
346
|
: editTaxonomyItem
|
346
347
|
? "Edit Values"
|
347
|
-
: "Add Values" }), _jsx("button", { onClick: handleCloseModal, className: "text-xl text-gray-600 dark:text-gray-400 h-6 w-6", children: "\u00D7" })] }), isAddingSubType ? (_jsxs(_Fragment, { children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Type" }), _jsx("input", { type: "text", value: subType, onChange: (e) => setSubType(e.target.value), placeholder: "Enter Type", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Code" }), _jsx("input", { type: "number", value: subCode, onChange: (e) => setSubCode(e.target.value), placeholder: "Enter Code", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Value" }), _jsx("input", { type: "text", value: subValue, onChange: (e) => setSubValue(e.target.value), placeholder: "Enter Value", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsxs("div", { className: "flex space-x-4 justify-end", children: [_jsx("button", { onClick: handleCloseModal, className: "px-8 py-2.5 leading-5 bg-gray-300 rounded-md", children: "Cancel" }), _jsx("button", {
|
348
|
-
// onClick={handleSubTypeAddClick}
|
349
|
-
onClick: editTaxonomyItem
|
348
|
+
: "Add Values" }), _jsx("button", { onClick: handleCloseModal, className: "text-xl text-gray-600 dark:text-gray-400 h-6 w-6", children: "\u00D7" })] }), isAddingSubType ? (_jsxs(_Fragment, { children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Type" }), _jsx("input", { type: "text", value: subType, onChange: (e) => setSubType(e.target.value), placeholder: "Enter Type", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Code" }), _jsx("input", { type: "number", value: subCode, onChange: (e) => setSubCode(e.target.value), placeholder: "Enter Code", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Value" }), _jsx("input", { type: "text", value: subValue, onChange: (e) => setSubValue(e.target.value), placeholder: "Enter Value", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsxs("div", { className: "flex space-x-4 justify-end", children: [_jsx("button", { onClick: handleCloseModal, className: "px-8 py-2.5 leading-5 bg-gray-300 rounded-md", children: "Cancel" }), _jsx("button", { onClick: editTaxonomyItem
|
350
349
|
? handleSubTypeEditClick
|
351
350
|
: handleSubTypeAddClick, className: "px-8 py-2.5 leading-5 text-white transition-colors duration-300 transform bg-blue-600 rounded-md hover:bg-blue-500 focus:outline-none focus:bg-gray-600", children: editTaxonomyItem ? "Edit SubType" : "Add SubType" })] })] })) : (_jsxs(_Fragment, { children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Code" }), _jsx("input", { type: "number", value: newCode, onChange: (e) => setNewCode(e.target.value), placeholder: "Enter Code", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Value" }), _jsx("input", { type: "text", value: newValue, onChange: (e) => setNewValue(e.target.value), placeholder: "Enter Value", className: "w-full px-4 py-2 mt-2 mb-4 border border-gray-300 rounded-md" }), _jsxs("div", { className: "flex space-x-4 justify-end", children: [_jsx("button", { onClick: handleCloseModal, className: "px-8 py-2.5 leading-5 bg-gray-300 rounded-md", children: "Cancel" }), _jsx("button", { onClick: editTaxonomyItem ? handleEditTaxClick : handleAddClick, className: "px-8 py-2.5 leading-5 text-white transition-colors duration-300 transform bg-blue-600 rounded-md hover:bg-blue-500 focus:outline-none focus:bg-gray-600", children: editTaxonomyItem || editTempTaxonomyItem ? "Edit" : "Add" })] })] }))] }) })] }));
|
352
351
|
};
|
package/package.json
CHANGED
@@ -302,6 +302,7 @@ const TaxonomyForm = () => {
|
|
302
302
|
} catch (error) {
|
303
303
|
console.error("Error adding SubType:", error);
|
304
304
|
}
|
305
|
+
setEditTaxonomyItem(null);
|
305
306
|
setIsModalOpen(false);
|
306
307
|
setSubType("");
|
307
308
|
setSubCode("");
|
@@ -929,11 +930,6 @@ const TaxonomyForm = () => {
|
|
929
930
|
<div className="p-6">
|
930
931
|
<div className="flex justify-between">
|
931
932
|
<h2 className="text-xl font-bold text-blue-600 mb-4 ">
|
932
|
-
{/* {isAddingSubType
|
933
|
-
? "Add SubType"
|
934
|
-
: editTaxonomyItem || editTempTaxonomyItem
|
935
|
-
? "Edit Values"
|
936
|
-
: "Add Values"} */}
|
937
933
|
{isAddingSubType
|
938
934
|
? editTaxonomyItem
|
939
935
|
? "Edit SubType"
|
@@ -990,7 +986,6 @@ const TaxonomyForm = () => {
|
|
990
986
|
Cancel
|
991
987
|
</button>
|
992
988
|
<button
|
993
|
-
// onClick={handleSubTypeAddClick}
|
994
989
|
onClick={
|
995
990
|
editTaxonomyItem
|
996
991
|
? handleSubTypeEditClick
|