eleven-solutions-common-website-unique-web 6.0.9 → 6.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,6 @@ const TaxonomyForm = () => {
40
40
  };
41
41
  const queryParams = new URLSearchParams(window.location.search);
42
42
  const id = queryParams.get("id");
43
- // Fetch taxonomy data if id exists
44
43
  useEffect(() => {
45
44
  if (id) {
46
45
  const fetchTaxonomyData = () => __awaiter(void 0, void 0, void 0, function* () {
@@ -95,10 +94,8 @@ const TaxonomyForm = () => {
95
94
  yield addTaxonomyApi(inputType, Number(code), value);
96
95
  alert("Taxonomy added successfully");
97
96
  }
98
- console.log("Navigating to /admin/taxinomies");
99
97
  window.history.pushState({}, "", "/admin/taxinomies");
100
98
  window.dispatchEvent(new PopStateEvent("popstate"));
101
- console.log("Navigation event dispatched");
102
99
  }
103
100
  catch (error) {
104
101
  console.error("Error adding/updating Taxonomy:", error);
@@ -253,6 +250,7 @@ const TaxonomyForm = () => {
253
250
  });
254
251
  useEffect(() => {
255
252
  similarTaxonomies.forEach((taxonomy) => {
253
+ console.log("Taxonomy:", taxonomy);
256
254
  console.log("Parent ID:", taxonomy.parentId);
257
255
  });
258
256
  }, [similarTaxonomies]);
@@ -260,11 +258,10 @@ const TaxonomyForm = () => {
260
258
  handleDeleteClick(id);
261
259
  window.location.href = "/admin/taxinomies";
262
260
  }, 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: "Delete" })) })) }), _jsxs("div", { className: "flex space-x-4 justify-end", children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("button", { type: "submit", onClick: handleSave, 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: isEditMode ? "Save" : "Add" })), !similarTaxonomies.some((taxonomy) => taxonomy.isEdit) &&
263
- !isEditMode && (_jsx("button", { type: "submit", onClick: handleSave, 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: isEditMode ? "Save" : "Add" })), _jsx("button", { onClick: handleCancelClick, type: "button", 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: "Cancel" })] })] })] })), isSimilarTaxonomyOpen && isMultiple && isEditMode && (_jsxs("div", { className: "flex-grow ml-0 mt-4 w-full", children: [_jsx("div", { className: "overflow-hidden border border-gray-200 dark:border-gray-700 md:rounded-lg mt-6", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Actions" })), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Code" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: similarTaxonomies.map((taxonomy, index) => (_jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => handleDeleteClick(taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-red-600 dark:text-gray-300 hover:text-red-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" }) }) }), _jsx("button", { type: "button", onClick: () => {
264
- handleEditClick(index, taxonomy.id);
265
- }, className: "text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" }) }) }), _jsx("button", { type: "button", onClick: () => {
266
- handleAddSubType(index, taxonomy.id);
267
- }, className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 4.5v15m7.5-7.5h-15" }) }) })] }) })), _jsx("td", { className: "px-4 py-4 text-sm text-gray-500 dark:text-gray-400", children: taxonomy.code }), _jsx("td", { className: "px-4 py-4 text-sm font-medium text-gray-900 dark:text-white", children: _jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { children: taxonomy.value }), taxonomy.parentId !== null && (_jsx("button", { type: "button", className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) }) }))] }) })] }, index))) })] }) }), similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("div", { className: "flex space-x-4 mt-6 justify-start", children: _jsxs("button", { type: "button", onClick: handleOpenModal, className: "flex items-center justify-center px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80", children: [_jsx(FaPlus, { className: "mr-2 font-medium" }), "Add Multiple Values"] }) }))] })), isEditMode && (_jsx(_Fragment, { children: tempTaxonomy.length > 0 && (_jsxs("div", { className: "flex-grow ml-0 mt-4 w-full", children: [_jsx("div", { className: "overflow-hidden border border-gray-200 dark:border-gray-700 md:rounded-lg mt-6", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Edit/Delete" }), _jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left text-gray-500 dark:text-gray-400", children: "Code" }), _jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-gray-700", children: [...tempTaxonomy].map((item, index) => (_jsxs("tr", { children: [_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => {
261
+ !isEditMode && (_jsx("button", { type: "submit", onClick: handleSave, 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: isEditMode ? "Save" : "Add" })), _jsx("button", { onClick: handleCancelClick, type: "button", 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: "Cancel" })] })] })] })), isSimilarTaxonomyOpen && isMultiple && isEditMode && (_jsxs("div", { className: "flex-grow ml-0 mt-4 w-full", children: [_jsx("div", { className: "overflow-hidden border border-gray-200 dark:border-gray-700 md:rounded-lg mt-6", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Actions" })), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Code" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: similarTaxonomies.map((taxonomy, index) => {
262
+ const isParent = similarTaxonomies.some((t) => t.parentId === taxonomy.id);
263
+ return (_jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => handleDeleteClick(taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-red-600 dark:text-gray-300 hover:text-red-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" }) }) }), _jsx("button", { type: "button", onClick: () => handleEditClick(index, taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" }) }) }), _jsx("button", { type: "button", onClick: () => handleAddSubType(index, taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }) })] }) })), _jsx("td", { className: "px-4 py-4 text-sm text-gray-500 dark:text-gray-400", children: taxonomy.code }), _jsx("td", { className: "px-4 py-4 text-sm font-medium text-gray-900 dark:text-white", children: _jsxs("div", { className: "flex justify-between items-center", children: [_jsx("span", { children: taxonomy.value }), isParent && (_jsx("button", { type: "button", className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) }) }))] }) })] }, index));
264
+ }) })] }) }), similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("div", { className: "flex space-x-4 mt-6 justify-start", children: _jsxs("button", { type: "button", onClick: handleOpenModal, className: "flex items-center justify-center px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80", children: [_jsx(FaPlus, { className: "mr-2 font-medium" }), "Add Multiple Values"] }) }))] })), isEditMode && (_jsx(_Fragment, { children: tempTaxonomy.length > 0 && (_jsxs("div", { className: "flex-grow ml-0 mt-4 w-full", children: [_jsx("div", { className: "overflow-hidden border border-gray-200 dark:border-gray-700 md:rounded-lg mt-6", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Edit/Delete" }), _jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left text-gray-500 dark:text-gray-400", children: "Code" }), _jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-gray-700", children: [...tempTaxonomy].map((item, index) => (_jsxs("tr", { children: [_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => {
268
265
  const newTempTaxonomy = [...tempTaxonomy];
269
266
  newTempTaxonomy.splice(index, 1);
270
267
  setTempTaxonomy(newTempTaxonomy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "6.0.9",
3
+ "version": "6.0.11",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -65,7 +65,6 @@ const TaxonomyForm = () => {
65
65
  const queryParams = new URLSearchParams(window.location.search);
66
66
  const id = queryParams.get("id");
67
67
 
68
- // Fetch taxonomy data if id exists
69
68
  useEffect(() => {
70
69
  if (id) {
71
70
  const fetchTaxonomyData = async () => {
@@ -128,10 +127,8 @@ const TaxonomyForm = () => {
128
127
  await addTaxonomyApi(inputType, Number(code), value);
129
128
  alert("Taxonomy added successfully");
130
129
  }
131
- console.log("Navigating to /admin/taxinomies");
132
130
  window.history.pushState({}, "", "/admin/taxinomies");
133
131
  window.dispatchEvent(new PopStateEvent("popstate"));
134
- console.log("Navigation event dispatched");
135
132
  } catch (error) {
136
133
  console.error("Error adding/updating Taxonomy:", error);
137
134
  alert("Failed to add/update Taxonomy");
@@ -316,6 +313,7 @@ const TaxonomyForm = () => {
316
313
 
317
314
  useEffect(() => {
318
315
  similarTaxonomies.forEach((taxonomy) => {
316
+ console.log("Taxonomy:", taxonomy);
319
317
  console.log("Parent ID:", taxonomy.parentId);
320
318
  });
321
319
  }, [similarTaxonomies]);
@@ -463,7 +461,7 @@ const TaxonomyForm = () => {
463
461
  </tr>
464
462
  </thead>
465
463
  <tbody className="divide-y divide-gray-200">
466
- {similarTaxonomies.map((taxonomy, index) => (
464
+ {/* {similarTaxonomies.map((taxonomy, index) => (
467
465
  <tr key={index}>
468
466
  {similarTaxonomies.some(
469
467
  (taxonomy) => taxonomy.isEdit
@@ -548,31 +546,146 @@ const TaxonomyForm = () => {
548
546
  <div className="flex justify-between items-center">
549
547
  <span>{taxonomy.value}</span>
550
548
 
551
- {taxonomy.parentId !== null && (
552
- <button
553
- type="button"
554
- className="text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
549
+ <button
550
+ type="button"
551
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
552
+ >
553
+ <svg
554
+ xmlns="http://www.w3.org/2000/svg"
555
+ fill="none"
556
+ viewBox="0 0 24 24"
557
+ strokeWidth="1.5"
558
+ stroke="currentColor"
559
+ className="w-5 h-5"
555
560
  >
556
- <svg
557
- xmlns="http://www.w3.org/2000/svg"
558
- fill="none"
559
- viewBox="0 0 24 24"
560
- strokeWidth="1.5"
561
- stroke="currentColor"
562
- className="w-5 h-5"
563
- >
564
- <path
565
- strokeLinecap="round"
566
- strokeLinejoin="round"
567
- d="M19.5 8.25l-7.5 7.5-7.5-7.5"
568
- />
569
- </svg>
570
- </button>
571
- )}
561
+ <path
562
+ strokeLinecap="round"
563
+ strokeLinejoin="round"
564
+ d="M19.5 8.25l-7.5 7.5-7.5-7.5"
565
+ />
566
+ </svg>
567
+ </button>
572
568
  </div>
573
569
  </td>
574
570
  </tr>
575
- ))}
571
+ ))} */}
572
+
573
+ {similarTaxonomies.map((taxonomy, index) => {
574
+ const isParent = similarTaxonomies.some(
575
+ (t) => t.parentId === taxonomy.id
576
+ );
577
+
578
+ return (
579
+ <tr key={index}>
580
+ {similarTaxonomies.some(
581
+ (taxonomy) => taxonomy.isEdit
582
+ ) && (
583
+ <td className="px-4 py-4 text-sm whitespace-nowrap">
584
+ <div className="flex items-center gap-x-6">
585
+ <button
586
+ type="button"
587
+ onClick={() => handleDeleteClick(taxonomy.id)}
588
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-red-600 dark:text-gray-300 hover:text-red-500 focus:outline-none"
589
+ >
590
+ <svg
591
+ xmlns="http://www.w3.org/2000/svg"
592
+ fill="none"
593
+ viewBox="0 0 24 24"
594
+ strokeWidth="1.5"
595
+ stroke="currentColor"
596
+ className="w-5 h-5"
597
+ >
598
+ <path
599
+ strokeLinecap="round"
600
+ strokeLinejoin="round"
601
+ d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
602
+ />
603
+ </svg>
604
+ </button>
605
+
606
+ <button
607
+ type="button"
608
+ onClick={() =>
609
+ handleEditClick(index, taxonomy.id)
610
+ }
611
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none"
612
+ >
613
+ <svg
614
+ xmlns="http://www.w3.org/2000/svg"
615
+ fill="none"
616
+ viewBox="0 0 24 24"
617
+ strokeWidth="1.5"
618
+ stroke="currentColor"
619
+ className="w-5 h-5"
620
+ >
621
+ <path
622
+ strokeLinecap="round"
623
+ strokeLinejoin="round"
624
+ d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
625
+ />
626
+ </svg>
627
+ </button>
628
+
629
+ <button
630
+ type="button"
631
+ onClick={() =>
632
+ handleAddSubType(index, taxonomy.id)
633
+ }
634
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-blue-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
635
+ >
636
+ <svg
637
+ xmlns="http://www.w3.org/2000/svg"
638
+ fill="none"
639
+ viewBox="0 0 24 24"
640
+ strokeWidth="1.5"
641
+ stroke="currentColor"
642
+ className="w-5 h-5"
643
+ >
644
+ <path
645
+ strokeLinecap="round"
646
+ strokeLinejoin="round"
647
+ d="M12 4.5v15m7.5-7.5h-15"
648
+ />
649
+ </svg>
650
+ </button>
651
+ </div>
652
+ </td>
653
+ )}
654
+
655
+ <td className="px-4 py-4 text-sm text-gray-500 dark:text-gray-400">
656
+ {taxonomy.code}
657
+ </td>
658
+
659
+ <td className="px-4 py-4 text-sm font-medium text-gray-900 dark:text-white">
660
+ <div className="flex justify-between items-center">
661
+ <span>{taxonomy.value}</span>
662
+
663
+ {isParent && (
664
+ <button
665
+ type="button"
666
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
667
+ >
668
+ <svg
669
+ xmlns="http://www.w3.org/2000/svg"
670
+ fill="none"
671
+ viewBox="0 0 24 24"
672
+ strokeWidth="1.5"
673
+ stroke="currentColor"
674
+ className="w-5 h-5"
675
+ >
676
+ <path
677
+ strokeLinecap="round"
678
+ strokeLinejoin="round"
679
+ d="M19.5 8.25l-7.5 7.5-7.5-7.5"
680
+ />
681
+ </svg>
682
+ </button>
683
+ )}
684
+ </div>
685
+ </td>
686
+ </tr>
687
+ );
688
+ })}
576
689
  </tbody>
577
690
  </table>
578
691
  </div>