eleven-solutions-common-website-unique-web 10.0.3 → 10.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,7 +61,9 @@ const Taxionomies = () => {
61
61
  window.history.pushState({ id, type }, "", fullPath);
62
62
  window.dispatchEvent(new PopStateEvent("popstate"));
63
63
  };
64
- return (_jsxs("div", { className: "container px-4 mx-auto mt-6 h-full", children: [_jsx("div", { className: "w-3/4", children: _jsx("h1", { className: "text-3xl font-bold text-blue-600 mb-5", children: "Taxonomy" }) }), _jsx("div", { className: "flex-grow ml-0 w-full mt-10", children: _jsxs("form", { className: "w-full ", children: [_jsx("label", { htmlFor: "default-search", className: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white", children: "Search" }), _jsxs("div", { className: "relative w-full", children: [_jsx("div", { className: "absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none", children: _jsx("svg", { className: "w-4 h-4 text-gray-500 dark:text-gray-400", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", children: _jsx("path", { stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" }) }) }), _jsx("input", { type: "search", id: "default-search", className: "inline-block min-w-full p-3 ps-10 outline-none text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", placeholder: "Search Taxonomies", required: true }), _jsx("button", { type: "submit", className: "text-white absolute end-1.5 bottom-1.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", children: "Search" })] })] }) }), _jsx("div", { className: "flex-grow ml-0 w-3/4", children: _jsx("form", { className: "w-auto" }) }), _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", style: { width: "200px" }, children: "Actions" }), _jsx("th", { scope: "col", className: "py-3.5 px-4 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Type" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200 dark:divide-gray-700 dark:bg-gray-900", children: paginatedTaxonomies.map((taxonomy, index) => (_jsxs("tr", { children: [_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsx("div", { className: "flex items-center gap-x-6", children: taxonomy.isEdit ? (_jsx("button", { type: "button", onClick: (event) => {
64
+ return (_jsxs("div", { className: "container px-4 mx-auto mt-6 h-full", children: [_jsx("div", { className: "w-3/4", children: _jsx("h1", { className: "text-3xl font-bold text-blue-600 mb-5", children: "Taxonomy" }) }), _jsx("div", { className: "flex-grow ml-0 w-full mt-10", children: _jsxs("form", { className: "w-full ", children: [_jsx("label", { htmlFor: "default-search", className: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white", children: "Search" }), _jsxs("div", { className: "relative w-full", children: [_jsx("div", { className: "absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none", children: _jsx("svg", { className: "w-4 h-4 text-gray-500 dark:text-gray-400", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", children: _jsx("path", { stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" }) }) }), _jsx("input", { type: "search", id: "default-search", className: "inline-block min-w-full p-3 ps-10 outline-none text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", placeholder: "Search Taxonomies", required: true }), _jsx("button", { type: "submit", className: "text-white absolute end-1.5 bottom-1.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", children: "Search" })] })] }) }), _jsx("div", { className: "flex-grow ml-0 w-3/4", children: _jsx("form", { className: "w-auto" }) }), _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", style: { width: "200px" }, children: "Actions" }), _jsx("th", { scope: "col", className: "py-3.5 px-4 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Type" })] }) }), _jsx("tbody", { className: "bg-white divide-y divide-gray-200 dark:divide-gray-700 dark:bg-gray-900", children: paginatedTaxonomies
65
+ .filter((taxonomy) => !taxonomy.isView)
66
+ .map((taxonomy, index) => (_jsxs("tr", { children: [_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsx("div", { className: "flex items-center gap-x-6", children: taxonomy.isEdit ? (_jsx("button", { type: "button", onClick: (event) => {
65
67
  handleViewClick(event, "/admin/taxinomies/taxonomyform?", taxonomy.id, taxonomy.type);
66
68
  }, 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" }) }) })) : taxonomy.isView ? (_jsx("button", { onClick: (event) => {
67
69
  handleViewClick(event, "/admin/taxinomies/taxonomyform?", taxonomy.id, taxonomy.type);
@@ -23,7 +23,6 @@ const Header = ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name
23
23
  const [isOpen, setIsOpen] = useState(false);
24
24
  const [usermodalopen, setusermodalopen] = useState(false);
25
25
  const [showUserCard, setShowUserCard] = useState(false);
26
- console.log(userType);
27
26
  const handleNavigation = (event, path) => {
28
27
  event.preventDefault();
29
28
  window.history.pushState({}, "", path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleven-solutions-common-website-unique-web",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "main": "./dist/index.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -152,88 +152,90 @@ const Taxionomies = () => {
152
152
  </tr>
153
153
  </thead>
154
154
  <tbody className="bg-white divide-y divide-gray-200 dark:divide-gray-700 dark:bg-gray-900">
155
- {paginatedTaxonomies.map((taxonomy, index) => (
156
- <tr key={taxonomy.id || index}>
157
- <td className="px-4 py-4 text-sm whitespace-nowrap">
158
- <div className="flex items-center gap-x-6">
159
- {taxonomy.isEdit ? (
160
- <button
161
- type="button"
162
- onClick={(event) => {
163
- handleViewClick(
164
- event,
165
- "/admin/taxinomies/taxonomyform?",
166
- taxonomy.id,
167
- taxonomy.type
168
- );
169
- }}
170
- className="text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none"
171
- >
172
- {/* Edit icon */}
173
- <svg
174
- xmlns="http://www.w3.org/2000/svg"
175
- fill="none"
176
- viewBox="0 0 24 24"
177
- stroke-width="1.5"
178
- stroke="currentColor"
179
- className="w-5 h-5"
155
+ {paginatedTaxonomies
156
+ .filter((taxonomy) => !taxonomy.isView)
157
+ .map((taxonomy, index) => (
158
+ <tr key={taxonomy.id || index}>
159
+ <td className="px-4 py-4 text-sm whitespace-nowrap">
160
+ <div className="flex items-center gap-x-6">
161
+ {taxonomy.isEdit ? (
162
+ <button
163
+ type="button"
164
+ onClick={(event) => {
165
+ handleViewClick(
166
+ event,
167
+ "/admin/taxinomies/taxonomyform?",
168
+ taxonomy.id,
169
+ taxonomy.type
170
+ );
171
+ }}
172
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none"
180
173
  >
181
- <path
182
- stroke-linecap="round"
183
- stroke-linejoin="round"
184
- 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"
185
- />
186
- </svg>
187
- </button>
188
- ) : taxonomy.isView ? (
189
- <button
190
- onClick={(event) => {
191
- handleViewClick(
192
- event,
193
- "/admin/taxinomies/taxonomyform?",
194
- taxonomy.id,
195
- taxonomy.type
196
- );
197
- }}
198
- className="text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
199
- >
200
- {/* Eye icon */}
201
- <svg
202
- xmlns="http://www.w3.org/2000/svg"
203
- fill="none"
204
- viewBox="0 0 24 24"
205
- stroke-width="1.5"
206
- stroke="currentColor"
207
- className="w-5 h-5"
174
+ {/* Edit icon */}
175
+ <svg
176
+ xmlns="http://www.w3.org/2000/svg"
177
+ fill="none"
178
+ viewBox="0 0 24 24"
179
+ stroke-width="1.5"
180
+ stroke="currentColor"
181
+ className="w-5 h-5"
182
+ >
183
+ <path
184
+ stroke-linecap="round"
185
+ stroke-linejoin="round"
186
+ 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"
187
+ />
188
+ </svg>
189
+ </button>
190
+ ) : taxonomy.isView ? (
191
+ <button
192
+ onClick={(event) => {
193
+ handleViewClick(
194
+ event,
195
+ "/admin/taxinomies/taxonomyform?",
196
+ taxonomy.id,
197
+ taxonomy.type
198
+ );
199
+ }}
200
+ className="text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
208
201
  >
209
- <path
210
- stroke-linecap="round"
211
- stroke-linejoin="round"
212
- d="M12 4.5c4.142 0 7.788 2.93 9 7.5-1.212 4.57-4.858 7.5-9 7.5s-7.788-2.93-9-7.5c1.212-4.57 4.858-7.5 9-7.5z"
213
- />
214
- <path
215
- stroke-linecap="round"
216
- stroke-linejoin="round"
217
- d="M12 9a3 3 0 100 6 3 3 0 000-6z"
218
- />
219
- </svg>
220
- </button>
221
- ) : null}
222
- </div>
223
- </td>
224
- <td className="px-4 py-4 text-sm font-medium text-gray-700 whitespace-nowrap">
225
- <div className="inline-flex items-center gap-x-3">
226
- <div className="flex items-center gap-x-2">
227
- <div>
228
- <h2 className=" text-sm font-medium text-gray-800 dark:text-white ">
229
- {taxonomy.type}
230
- </h2>
202
+ {/* Eye icon */}
203
+ <svg
204
+ xmlns="http://www.w3.org/2000/svg"
205
+ fill="none"
206
+ viewBox="0 0 24 24"
207
+ stroke-width="1.5"
208
+ stroke="currentColor"
209
+ className="w-5 h-5"
210
+ >
211
+ <path
212
+ stroke-linecap="round"
213
+ stroke-linejoin="round"
214
+ d="M12 4.5c4.142 0 7.788 2.93 9 7.5-1.212 4.57-4.858 7.5-9 7.5s-7.788-2.93-9-7.5c1.212-4.57 4.858-7.5 9-7.5z"
215
+ />
216
+ <path
217
+ stroke-linecap="round"
218
+ stroke-linejoin="round"
219
+ d="M12 9a3 3 0 100 6 3 3 0 000-6z"
220
+ />
221
+ </svg>
222
+ </button>
223
+ ) : null}
224
+ </div>
225
+ </td>
226
+ <td className="px-4 py-4 text-sm font-medium text-gray-700 whitespace-nowrap">
227
+ <div className="inline-flex items-center gap-x-3">
228
+ <div className="flex items-center gap-x-2">
229
+ <div>
230
+ <h2 className=" text-sm font-medium text-gray-800 dark:text-white ">
231
+ {taxonomy.type}
232
+ </h2>
233
+ </div>
231
234
  </div>
232
235
  </div>
233
- </div>
234
- </td>
235
- </tr>
236
- ))}
236
+ </td>
237
+ </tr>
238
+ ))}
237
239
  </tbody>
238
240
  </table>
239
241
  </div>
@@ -39,9 +39,6 @@ const Header = ({
39
39
  const [isOpen, setIsOpen] = useState(false);
40
40
  const [usermodalopen, setusermodalopen] = useState(false);
41
41
  const [showUserCard, setShowUserCard] = useState(false);
42
-
43
- console.log(userType);
44
-
45
42
  const handleNavigation = (event, path) => {
46
43
  event.preventDefault();
47
44
  window.history.pushState({}, "", path);