eleven-solutions-common-website-unique-web 21.0.56 → 22.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/App.d.ts +0 -3
  2. package/dist/App.js +0 -2
  3. package/dist/components/admin/Sidebar.d.ts +0 -1
  4. package/dist/components/admin/Sidebar.js +2 -2
  5. package/dist/components/admin/UserForm.js +6 -5
  6. package/dist/components/admin/Users.js +4 -3
  7. package/dist/components/footer/Footer.d.ts +3 -2
  8. package/dist/components/footer/Footer.js +2 -3
  9. package/dist/components/index.d.ts +3 -2
  10. package/dist/components/index.js +3 -2
  11. package/dist/components/login/GoogleButton.js +4 -1
  12. package/dist/components/login/Header.d.ts +3 -1
  13. package/dist/components/login/Header.js +135 -31
  14. package/dist/components/login/Login.d.ts +2 -1
  15. package/dist/components/login/Login.js +15 -65
  16. package/dist/components/login/Setcookie.d.ts +2 -0
  17. package/dist/components/login/Setcookie.js +7 -0
  18. package/dist/components/redux/slices/types/types.d.ts +3 -0
  19. package/dist/components/redux/slices/types/types.js +1 -0
  20. package/dist/components/redux/slices/userSlice.d.ts +20 -0
  21. package/dist/components/redux/slices/userSlice.js +90 -0
  22. package/dist/components/useraccount/UpdateUserDetails.d.ts +1 -0
  23. package/dist/components/useraccount/UpdateUserDetails.js +15 -22
  24. package/package.json +9 -4
  25. package/.github/workflows/main.yml +0 -22
  26. package/azure-pipelines.yml +0 -20
  27. package/dist/components/Navbar.d.ts +0 -6
  28. package/dist/components/Navbar.js +0 -5
  29. package/dist/components/login/View.d.ts +0 -2
  30. package/dist/components/login/View.js +0 -10
  31. package/dist/components/useraccount/AddMissingDetails.d.ts +0 -9
  32. package/dist/components/useraccount/AddMissingDetails.js +0 -56
  33. package/dist/components/useraccount/AddUserDetails.d.ts +0 -9
  34. package/dist/components/useraccount/AddUserDetails.js +0 -21
  35. package/src/App.tsx +0 -21
  36. package/src/components/Navbar.tsx +0 -21
  37. package/src/components/admin/Dashboard.tsx +0 -7
  38. package/src/components/admin/Editor.tsx +0 -25
  39. package/src/components/admin/Sidebar.tsx +0 -102
  40. package/src/components/admin/Taxionomies.tsx +0 -314
  41. package/src/components/admin/TaxonomyForm.tsx +0 -744
  42. package/src/components/admin/Template.tsx +0 -304
  43. package/src/components/admin/TemplateForm.tsx +0 -141
  44. package/src/components/admin/UserForm.tsx +0 -231
  45. package/src/components/admin/Users.tsx +0 -479
  46. package/src/components/api/api.ts +0 -59
  47. package/src/components/api/taxonomy.ts +0 -201
  48. package/src/components/api/template.ts +0 -114
  49. package/src/components/api/updateuser.ts +0 -53
  50. package/src/components/api/user.ts +0 -133
  51. package/src/components/footer/Footer.tsx +0 -128
  52. package/src/components/footer/Privacy.tsx +0 -82
  53. package/src/components/footer/Terms.tsx +0 -156
  54. package/src/components/index.ts +0 -19
  55. package/src/components/login/GoogleButton.tsx +0 -85
  56. package/src/components/login/Header.tsx +0 -340
  57. package/src/components/login/Login.tsx +0 -277
  58. package/src/components/useraccount/AddUserDetails.tsx +0 -136
  59. package/src/components/useraccount/UpdateUserDetails.tsx +0 -214
  60. package/src/index.ts +0 -1
  61. package/tsconfig.json +0 -15
package/dist/App.d.ts CHANGED
@@ -1,6 +1,3 @@
1
1
  import React from "react";
2
- import Navbar from "./components/Navbar";
3
- import Footer from "./components/footer/Footer";
4
2
  declare const App: React.FC;
5
- export { Navbar, Footer };
6
3
  export default App;
package/dist/App.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { BrowserRouter, Routes, Route } from "react-router-dom";
3
- import Navbar from "./components/Navbar"; // Ensure correct path to your Navbar
4
3
  import Footer from "./components/footer/Footer"; // Ensure correct path to your Footer
5
4
  const App = () => {
6
5
  return (_jsx(BrowserRouter, { children: _jsx(Routes, { children: _jsx(Route, { path: "/footer", element: _jsx(Footer, {}) }) }) }));
7
6
  };
8
7
  // Named exports for Navbar and Footer
9
- export { Navbar, Footer };
10
8
  export default App;
@@ -11,7 +11,6 @@ interface Group {
11
11
  interface DashboardProps {
12
12
  menuGroups: Group[];
13
13
  logo: any;
14
- iconName: string;
15
14
  }
16
15
  declare const Dashboard: React.FC<DashboardProps>;
17
16
  export default Dashboard;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { FiMenu } from "react-icons/fi";
4
- const Dashboard = ({ menuGroups, logo, iconName, }) => {
4
+ const Dashboard = ({ menuGroups, logo, }) => {
5
5
  const [isSidebarOpen, setIsSidebarOpen] = useState(false);
6
6
  const [activeItem, setActiveItem] = useState(null);
7
7
  const toggleSidebar = () => {
@@ -15,7 +15,7 @@ const Dashboard = ({ menuGroups, logo, iconName, }) => {
15
15
  onClick();
16
16
  closeSidebar();
17
17
  };
18
- return (_jsxs("div", { className: "relative h-full md:pr-6 md:py-4", children: [_jsx("button", { className: "block md:hidden p-2 text-gray-600 focus:outline-none", onClick: toggleSidebar, children: _jsx(FiMenu, { size: 24 }) }), isSidebarOpen && (_jsx("div", { className: "fixed inset-0 bg-black opacity-50 md:hidden", onClick: closeSidebar })), _jsxs("div", { className: `absolute md:relative top-0 left-0 z-20 h-full bg-white border-r pr-8 pl-5 overflow-y-auto overflow-x-hidden transform ${isSidebarOpen ? "translate-x-0" : "-translate-x-full"} md:translate-x-0 transition-transform duration-300 ease-in-out`, children: [_jsxs("div", { className: "w-16 h-16 flex cursor-pointer", onClick: () => (window.location.href = "/home"), children: [_jsx("img", { className: "h-full w-full mx-auto", src: logo, alt: "" }), _jsx("h2", { className: "text-2xl ml-1 my-auto font-semibold bg-gradient-to-r from-red-500 to-yellow-400 bg-clip-text text-transparent", children: iconName })] }), menuGroups.map((group, index) => (_jsxs("div", { className: "my-10 space-y-2", children: [_jsx("span", { className: "pl-3 text-sm text-gray-400 uppercase tracking-wider my-3", children: group.heading }), _jsx("ul", { className: "space-y-2", children: group.items.map((item, idx) => (_jsxs("li", { className: `pl-3 flex items-center space-x-3 cursor-pointer py-2 pr-2 rounded-lg transition duration-200 ${activeItem === item.label
18
+ return (_jsxs("div", { className: "relative h-full md:pr-6 md:py-4", children: [_jsx("button", { className: "block md:hidden p-2 text-gray-600 focus:outline-none", onClick: toggleSidebar, children: _jsx(FiMenu, { size: 24 }) }), isSidebarOpen && (_jsx("div", { className: "fixed inset-0 bg-black opacity-50 md:hidden", onClick: closeSidebar })), _jsxs("div", { className: `absolute md:relative top-0 left-0 z-20 h-full bg-white border-r pr-2 pl-3 overflow-y-auto overflow-x-hidden transform ${isSidebarOpen ? "translate-x-0" : "-translate-x-full"} md:translate-x-0 transition-transform duration-300 ease-in-out`, children: [_jsx("div", { className: "w-16 h-16 flex cursor-pointer ml-6", onClick: () => (window.location.href = "/home"), children: _jsx("img", { className: "h-full w-full mx-auto", src: logo, alt: "" }) }), menuGroups.map((group, index) => (_jsxs("div", { className: "my-2 space-y-2", children: [_jsx("span", { className: "pl-3 text-sm text-gray-400 uppercase tracking-wider my-2", children: group.heading }), _jsx("ul", { className: "space-y-2", children: group.items.map((item, idx) => (_jsxs("li", { className: `pl-3 flex items-center space-x-3 cursor-pointer py-1 pr-2 rounded-lg transition duration-200 ${activeItem === item.label
19
19
  ? "bg-gray-300 text-gray-800"
20
20
  : "hover:bg-gray-100 text-gray-700"}`, onClick: () => handleItemClick(item.label, item.onClick), children: [_jsx("span", { className: "text-gray-500 text-lg", children: item.icon }), _jsx("span", { className: "font-medium", children: item.label })] }, idx))) })] }, index)))] })] }));
21
21
  };
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { useState, useEffect } from "react";
12
+ import toast from "react-hot-toast";
12
13
  import { addUserApi, updateUserApi, fetchUserByIdApi } from "../api/user";
13
14
  const UserForm = ({ url }) => {
14
15
  const [userName, setUserName] = useState("");
@@ -20,7 +21,7 @@ const UserForm = ({ url }) => {
20
21
  const [isEditMode, setIsEditMode] = useState(false);
21
22
  const validateForm = () => {
22
23
  if (!userName || !roleType) {
23
- alert("Please fill in all required fields: User Name, Email, and Role Type.");
24
+ toast.error("Please fill in all required fields: User Name, Email, and Role Type.");
24
25
  return false;
25
26
  }
26
27
  return true;
@@ -57,18 +58,18 @@ const UserForm = ({ url }) => {
57
58
  try {
58
59
  if (isEditMode) {
59
60
  yield updateUserApi(url, id, userName, email, mobile, address, roleType, gender);
60
- alert("User updated successfully");
61
+ toast.success("User updated successfully");
61
62
  }
62
63
  else {
63
64
  yield addUserApi(url, userName, email, mobile, address, roleType, gender);
64
- alert("User added successfully");
65
+ toast.success("User added successfully");
65
66
  }
66
67
  window.history.pushState({}, "", "/admin/users");
67
68
  window.dispatchEvent(new PopStateEvent("popstate"));
68
69
  }
69
70
  catch (error) {
70
71
  console.error("Error adding/updating User:", error);
71
- alert(isEditMode ? "Failed to Update the User." : "Failed to Add the User.");
72
+ toast.error(isEditMode ? "Failed to Update the User." : "Failed to Add the User.");
72
73
  }
73
74
  });
74
75
  const handleCancelClick = () => {
@@ -81,6 +82,6 @@ const UserForm = ({ url }) => {
81
82
  window.history.pushState({}, "", "/admin/users");
82
83
  window.dispatchEvent(new PopStateEvent("popstate"));
83
84
  };
84
- return (_jsx("div", { className: "max-w-4xl p-6 mx-auto dark:bg-gray-800", children: _jsx("div", { children: _jsxs("form", { children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit User" : "Add User" }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Name ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: userName, onChange: (e) => setUserName(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 User Name" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Email ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: email, onChange: (e) => setEmail(e.target.value), type: "email", 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 Email" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Mobile Number" }), _jsx("input", { required: true, value: mobile, onChange: (e) => setMobile(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 Mobile Number" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Address" }), _jsx("input", { required: true, value: address, onChange: (e) => setAddress(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: "Address" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Gender" }), _jsxs("select", { required: true, value: gender, onChange: (e) => setGender(e.target.value === "" ? null : e.target.value), 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", children: [_jsx("option", { value: "", children: "Select a Gender" }), _jsx("option", { value: "1", children: "Male" }), _jsx("option", { value: "2", children: "Female" })] })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Role Type ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsxs("select", { required: true, value: roleType, onChange: (e) => setRoleType(e.target.value), 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", children: [_jsx("option", { value: "", children: "Select a Role Type" }), _jsx("option", { value: "1", children: "Guest" }), _jsx("option", { value: "2", children: "Admin" })] })] }), _jsxs("div", { className: "flex space-x-4 mt-6 justify-end", children: [_jsx("button", { type: "submit", onClick: handleSubmit, 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 ? "Edit" : "Add" }), _jsx("button", { type: "button", onClick: handleCancelClick, 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" })] })] }) }) }));
85
+ return (_jsx("div", { className: "max-w-4xl p-6 dark:bg-gray-800", children: _jsx("div", { children: _jsxs("form", { children: [_jsx("h1", { className: "text-3xl font-bold text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit User" : "Add User" }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Name ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: userName, onChange: (e) => setUserName(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 User Name" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Email ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: email, onChange: (e) => setEmail(e.target.value), type: "email", 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 Email" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Mobile Number" }), _jsx("input", { required: true, value: mobile, onChange: (e) => setMobile(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 Mobile Number" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Address" }), _jsx("input", { required: true, value: address, onChange: (e) => setAddress(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: "Address" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Gender" }), _jsxs("select", { required: true, value: gender, onChange: (e) => setGender(e.target.value === "" ? null : e.target.value), 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", children: [_jsx("option", { value: "", children: "Select a Gender" }), _jsx("option", { value: "1", children: "Male" }), _jsx("option", { value: "2", children: "Female" })] })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Role Type ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsxs("select", { required: true, value: roleType, onChange: (e) => setRoleType(e.target.value), 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", children: [_jsx("option", { value: "", children: "Select a Role Type" }), _jsx("option", { value: "1", children: "Guest" }), _jsx("option", { value: "2", children: "Admin" })] })] }), _jsxs("div", { className: "flex space-x-4 mt-6 justify-start", children: [_jsx("button", { type: "submit", onClick: handleSubmit, 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 ? "Edit" : "Save and Close" }), _jsx("button", { type: "button", onClick: handleCancelClick, 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" })] })] }) }) }));
85
86
  };
86
87
  export default UserForm;
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { useState, useEffect } from "react";
12
+ import toast from "react-hot-toast";
12
13
  import { FaPlus } from "react-icons/fa";
13
14
  import { fetchUsersApi, deleteUserApi } from "../api/user";
14
15
  const Users = ({ url }) => {
@@ -70,7 +71,7 @@ const Users = ({ url }) => {
70
71
  const handleDeleteClick = (id) => __awaiter(void 0, void 0, void 0, function* () {
71
72
  try {
72
73
  yield deleteUserApi(url, id);
73
- alert("User deleted successfully");
74
+ toast.success("User deleted successfully");
74
75
  fetchUsersData();
75
76
  }
76
77
  catch (error) {
@@ -101,9 +102,9 @@ const Users = ({ url }) => {
101
102
  day: "2-digit",
102
103
  month: "2-digit",
103
104
  year: "numeric",
104
- }) })] }, user.id || index))) })] }) }), _jsxs("div", { className: "flex items-center justify-between mt-6", children: [_jsxs("button", { onClick: handlePreviousPage, disabled: currentPage === 1, className: "flex items-center px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 bg-white border rounded-md gap-x-2 hover:bg-gray-100 dark:bg-gray-900 dark:text-gray-200 dark:border-gray-700 dark:hover:bg-gray-800", 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 rtl:-scale-x-100", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18" }) }), _jsx("span", { children: "previous" })] }), _jsx("div", { className: "items-center hidden lg:flex gap-x-3", children: Array.from({ length: totalPages }, (_, index) => (_jsx("button", { onClick: () => handlePageClick(index + 1), className: `px-2 py-1 text-sm ${currentPage === index + 1
105
+ }) })] }, user.id || index))) })] }) }), _jsx("div", { className: "flex-grow ml-0 mt-4 w-0", children: _jsxs("button", { type: "button", onClick: (event) => handleNavigation(event, "/admin/users/userform"), 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" }), "User"] }) }), _jsxs("div", { className: "flex items-center justify-between mt-6 ", children: [_jsxs("button", { onClick: handlePreviousPage, disabled: currentPage === 1, className: "flex items-center px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 bg-white border rounded-md gap-x-2 hover:bg-gray-100 dark:bg-gray-900 dark:text-gray-200 dark:border-gray-700 dark:hover:bg-gray-800", 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 rtl:-scale-x-100", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18" }) }), _jsx("span", { children: "previous" })] }), _jsx("div", { className: "items-center hidden lg:flex gap-x-3", children: Array.from({ length: totalPages }, (_, index) => (_jsx("button", { onClick: () => handlePageClick(index + 1), className: `px-2 py-1 text-sm ${currentPage === index + 1
105
106
  ? "text-blue-500 bg-blue-100"
106
- : "text-gray-500 hover:bg-gray-100"} rounded-md`, children: index + 1 }, index + 1))) }), _jsxs("button", { onClick: handleNextPage, disabled: currentPage === totalPages, className: "flex items-center px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 bg-white border rounded-md gap-x-2 hover:bg-gray-100 dark:bg-gray-900 dark:text-gray-200 dark:border-gray-700 dark:hover:bg-gray-800", children: [_jsx("span", { children: "Next" }), _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 rtl:-scale-x-100", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3" }) })] })] }), _jsx("div", { className: "flex-grow ml-0 mt-4 w-0", children: _jsxs("button", { type: "button", onClick: (event) => handleNavigation(event, "/admin/users/userform"), 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" }), "User"] }) })] }), _jsx("div", { className: "inset-0 bg-gray-800 bg-opacity-50 z-50 transition-opacity duration-300", children: _jsxs("div", { className: `fixed top-0 right-0 h-full w-[300px] bg-white p-4 rounded-md shadow-lg transform transition-transform duration-500 ease-in-out
107
+ : "text-gray-500 hover:bg-gray-100"} rounded-md`, children: index + 1 }, index + 1))) }), _jsxs("button", { onClick: handleNextPage, disabled: currentPage === totalPages, className: "flex items-center px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 bg-white border rounded-md gap-x-2 hover:bg-gray-100 dark:bg-gray-900 dark:text-gray-200 dark:border-gray-700 dark:hover:bg-gray-800", children: [_jsx("span", { children: "Next" }), _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 rtl:-scale-x-100", children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3" }) })] })] })] }), _jsx("div", { className: "inset-0 bg-gray-800 bg-opacity-50 z-50 transition-opacity duration-300", children: _jsxs("div", { className: `fixed top-0 right-0 h-full w-[300px] bg-white p-4 rounded-md shadow-lg transform transition-transform duration-500 ease-in-out
107
108
  ${filterModal ? "translate-x-0" : "translate-x-full"}`, children: [_jsx("h1", { className: "text-2xl md:text-3xl font-bold text-blue-600 mb-4 md:mb-6", children: "Filter" }), _jsx("button", { onClick: () => setFilterModal(false), className: "absolute top-1 right-3 text-gray-400 hover:text-gray-600 text-2xl", children: "\u00D7" }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "mb-4 flex flex-col", children: [_jsx("label", { className: "block text-gray-700 mb-2", children: "Role Type" }), _jsx("div", { className: "w-full", children: _jsxs("select", { value: Number(selectedRoleType), onChange: handleRoleTypeChange, required: true, className: "w-full px-4 py-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", children: [_jsx("option", { value: "", children: "All" }), _jsx("option", { value: "1", children: "Guest" }), _jsx("option", { value: "2", children: "Admin" })] }) })] }), _jsx("div", { className: "flex flex-row gap-3", children: _jsx("button", { onClick: resetFilter, className: "mt-2 px-4 py-2 bg-blue-500 text-white rounded-md w-32", children: "Reset" }) })] })] }) })] }));
108
109
  };
109
110
  export default Users;
@@ -1,7 +1,8 @@
1
- import React from "react";
2
1
  interface FooterProps {
3
2
  companyName?: string;
4
3
  isDarkMode?: boolean;
4
+ img?: string;
5
+ name?: string;
5
6
  }
6
- declare const Footer: React.FC<FooterProps>;
7
+ declare const Footer: ({ companyName, isDarkMode, img, name }: FooterProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export default Footer;
@@ -28,16 +28,15 @@ const data = [
28
28
  ],
29
29
  },
30
30
  ];
31
- const Footer = ({ companyName = "Eleven Software Solutions Pvt. Ltd.", isDarkMode = false, }) => {
31
+ const Footer = ({ companyName, isDarkMode, img, name }) => {
32
32
  const handleNavigation = (event, path) => {
33
33
  event.preventDefault();
34
34
  window.history.pushState({}, "", path);
35
35
  window.dispatchEvent(new PopStateEvent("popstate"));
36
36
  };
37
37
  const groups = data.map((group) => (_jsxs("div", { children: [_jsx("h3", { className: `${isDarkMode ? " text-[#ffff]" : " text-[#000000]"} text-lg font-bold mb-3`, children: group.title }), _jsx("ul", { children: group.links.map((link, index) => (_jsx("li", { className: "mb-2", children: _jsx("a", { href: link.link, onClick: (event) => handleNavigation(event, link.link), className: `${isDarkMode ? "text-[#B8B8B8]" : "bg-[#f8f9fa] text-[#b69B96]"} cursor-pointer hover:text-blue-200 hover:underline`, children: link.label }) }, index))) })] }, group.title)));
38
- const thisName = "Barelvi";
39
38
  return (_jsxs("footer", { className: `${isDarkMode
40
39
  ? "bg-[#2e2e2e] lg:border-t lg:border-[#3b3b3b] md:border-t md:border-[#3b3b3b]"
41
- : "bg-[#f8f9fa] border-t border-[#E9ECEF]"} py-8`, children: [_jsxs("div", { className: "container mx-auto px-6 flex flex-col lg:flex-row lg:justify-between items-center", children: [_jsxs("div", { className: "flex flex-col items-center lg:items-start lg:mb-0 ", children: [_jsx("img", { src: "images/BarelviLogo.png", alt: "Logo", className: "w-16 h-16 mb-0" }), _jsx("h2", { className: "text-2xl font-semibold bg-gradient-to-r from-red-500 to-yellow-400 bg-clip-text text-transparent", children: thisName }), _jsx("p", { className: "text-sm text-[#6c8282]", children: "A step towards digitalization for Islamic Learning" })] }), _jsx("div", { className: "hidden md:flex md:flex:row md:mt-4 lg:flex lg:flex-row justify-between w-full lg:w-1/2 ", children: groups })] }), _jsx("div", { className: `${isDarkMode ? "border-t border-[#424242]" : "border-t border-[#e9efec]"} py-4 mt-4 justify-between`, children: _jsxs("div", { className: "container mx-auto text-[#828282] text-sm px-6 text-center lg:flex lg:justify-between md:flex md:justify-between", children: [_jsxs("p", { children: ["\u00A9 2024 ", thisName, ". All rights reserved."] }), _jsxs("p", { children: ["Developed By:", " ", _jsx("a", { href: "http://www.11.Solutions", target: "_blank", rel: "noreferrer", className: "text-blue-300 hover:underline", children: companyName })] })] }) })] }));
40
+ : "bg-[#f8f9fa] border-t border-[#E9ECEF]"} py-8`, children: [_jsxs("div", { className: "container mx-auto px-6 flex flex-col lg:flex-row lg:justify-between items-center", children: [_jsxs("div", { className: "flex flex-col items-center lg:items-start lg:mb-0 ", children: [_jsx("img", { src: img, alt: "Logo", className: "w-16 h-16 mb-0" }), _jsx("span", { className: "text-transparent bg-clip-text font-extrabold text-[18px] ml-2 bg-gradient-to-r from-[#FD6E6A] to-[#FFC600]", children: name })] }), _jsx("div", { className: "hidden md:flex md:flex:row md:mt-4 lg:flex lg:flex-row justify-between w-full lg:w-1/2 ", children: groups })] }), _jsx("div", { className: `${isDarkMode ? "border-t border-[#424242]" : "border-t border-[#e9efec]"} py-4 mt-4 justify-between`, children: _jsxs("div", { className: "container mx-auto text-[#828282] text-sm px-6 text-center lg:flex lg:justify-between md:flex md:justify-between", children: [_jsxs("p", { children: ["\u00A9 2024 ", name, ". All rights reserved."] }), _jsxs("p", { children: ["Developed By:", " ", _jsx("a", { href: "http://www.11.Solutions", target: "_blank", rel: "noreferrer", className: "text-blue-300 hover:underline", children: companyName })] })] }) })] }));
42
41
  };
43
42
  export default Footer;
@@ -1,4 +1,3 @@
1
- export { default as Navbar } from "./Navbar";
2
1
  export { default as Footer } from "./footer/Footer";
3
2
  export { default as Terms } from "./footer/Terms";
4
3
  export { default as Privacy } from "./footer/Privacy";
@@ -9,9 +8,11 @@ export { default as UserForm } from "./admin/UserForm";
9
8
  export { default as Taxionomies } from "./admin/Taxionomies";
10
9
  export { default as TaxonomyForm } from "./admin/TaxonomyForm";
11
10
  export { default as Template } from "./admin/Template";
12
- export { default as TemplateForm } from "./admin/TemplateForm";
11
+ export { default as TemplateFrom } from "./admin/TemplateForm";
13
12
  export { default as Editor } from "./admin/Editor";
14
13
  export { default as AdminSideBar } from "./admin/Sidebar";
15
14
  export { default as Dashboard } from "./admin/Dashboard";
16
15
  export { registerApi, loginApi } from "./api/api";
16
+ export { default as userSlice } from "./redux/slices/userSlice";
17
+ export { getProfileApi, updateProfileApi } from "./api/updateuser";
17
18
  export { default as UpdateUserDetails } from "./useraccount/UpdateUserDetails";
@@ -1,5 +1,4 @@
1
1
  // Exports for components
2
- export { default as Navbar } from "./Navbar";
3
2
  export { default as Footer } from "./footer/Footer";
4
3
  export { default as Terms } from "./footer/Terms";
5
4
  export { default as Privacy } from "./footer/Privacy";
@@ -10,9 +9,11 @@ export { default as UserForm } from "./admin/UserForm";
10
9
  export { default as Taxionomies } from "./admin/Taxionomies";
11
10
  export { default as TaxonomyForm } from "./admin/TaxonomyForm";
12
11
  export { default as Template } from "./admin/Template";
13
- export { default as TemplateForm } from "./admin/TemplateForm";
12
+ export { default as TemplateFrom } from "./admin/TemplateForm";
14
13
  export { default as Editor } from "./admin/Editor";
15
14
  export { default as AdminSideBar } from "./admin/Sidebar";
16
15
  export { default as Dashboard } from "./admin/Dashboard";
17
16
  export { registerApi, loginApi } from "./api/api";
17
+ export { default as userSlice } from "./redux/slices/userSlice";
18
+ export { getProfileApi, updateProfileApi } from "./api/updateuser";
18
19
  export { default as UpdateUserDetails } from "./useraccount/UpdateUserDetails";
@@ -22,6 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import { useGoogleLogin } from "@react-oauth/google";
23
23
  import axios from "axios";
24
24
  import Cookies from "universal-cookie";
25
+ import setCookie from "./Setcookie";
25
26
  function GoogleIcon(props) {
26
27
  return (_jsxs("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid", viewBox: "0 0 256 262", className: "w-4 h-4" }, props, { children: [_jsx("path", { fill: "#4285F4", d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027" }), _jsx("path", { fill: "#34A853", d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1" }), _jsx("path", { fill: "#FBBC05", d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782" }), _jsx("path", { fill: "#EB4335", d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251" })] })));
27
28
  }
@@ -33,7 +34,9 @@ function GoogleButton(_a) {
33
34
  const response = yield axios.post(`${url}/login`, { type: 2 }, { headers: { Authorization: `Bearer ${tokenResponse.access_token}` } });
34
35
  if (response.data.token) {
35
36
  const cookies = new Cookies();
36
- cookies.set("authToken", response.data.token, { maxAge: 86400 });
37
+ // cookies.set("authToken", response.data.token, { maxAge: 86400 });
38
+ // dispatch(loginUser(url, email, password));
39
+ setCookie(response.data.token);
37
40
  window.location.href = "/home";
38
41
  }
39
42
  if (onClose)
@@ -7,6 +7,8 @@ interface HeaderProps {
7
7
  img: string;
8
8
  name: string;
9
9
  userdetails: any;
10
+ menugroups: any;
11
+ donationHistory: any;
10
12
  }
11
- declare const Header: ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name, userdetails, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const Header: ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name, userdetails, menugroups, donationHistory, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
12
14
  export default Header;
@@ -12,88 +12,192 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { CiLight, CiDark } from "react-icons/ci";
14
14
  import { RxPerson } from "react-icons/rx";
15
- import Cookies from "universal-cookie";
16
15
  import { useState } from "react";
17
16
  import UpdateUserDetails from "../useraccount/UpdateUserDetails";
17
+ import { useDispatch } from "react-redux";
18
+ import { clearProfileData } from "../redux/slices/userSlice";
19
+ import { MdArrowDropDown } from "react-icons/md";
20
+ import { MdArrowDropUp } from "react-icons/md";
18
21
  const IconWrapper = (_a) => {
19
22
  var { className } = _a, props = __rest(_a, ["className"]);
20
23
  return (_jsx("div", { className: className, children: _jsx(RxPerson, Object.assign({}, props)) }));
21
24
  };
22
- const Header = ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name, userdetails, }) => {
25
+ const Header = ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name, userdetails, menugroups, donationHistory, }) => {
23
26
  const [isOpen, setIsOpen] = useState(false);
24
27
  const [usermodalopen, setusermodalopen] = useState(false);
25
28
  const [showUserCard, setShowUserCard] = useState(false);
29
+ const [isDepartmentsHovered, setIsDepartmentsHovered] = useState(false);
30
+ const [showJRMCard, setShowJRMCard] = useState(false);
31
+ const [showOnlineCard, setShowOnlineCard] = useState(false);
32
+ const handleDropdownToggle = (event) => {
33
+ event.preventDefault();
34
+ setIsDepartmentsHovered(!isDepartmentsHovered);
35
+ };
26
36
  const handleNavigation = (event, path) => {
27
37
  event.preventDefault();
28
38
  window.history.pushState({}, "", path);
29
39
  window.dispatchEvent(new PopStateEvent("popstate"));
30
40
  };
31
- // console.log("logged", userLogedin);
32
41
  const isActive = (path) => window.location.pathname === path;
33
42
  const handleDark = () => {
34
43
  toggleTheme();
35
44
  };
36
- // console.log("in common", userType.roleType);
45
+ const dispatch = useDispatch();
37
46
  const handleLogout = () => {
38
- const cookies = new Cookies();
39
- const token = cookies.get("authToken");
40
- if (token) {
41
- cookies.remove("authToken", { path: "/" });
42
- window.location.href = "/home";
43
- }
47
+ // const cookies = new Cookies();
48
+ // const token = cookies.get("authToken");
49
+ // if (token) {
50
+ // cookies.remove("authToken", { path: "/" });
51
+ // window.location.href = "/home";
52
+ // }
53
+ dispatch(clearProfileData());
44
54
  };
45
55
  const handleUser = () => {
46
56
  setusermodalopen(true);
47
57
  setIsOpen(false);
48
58
  };
49
- return (_jsxs("header", { className: `relative ${isDarkMode
59
+ return (_jsxs("header", { className: ` ${isDarkMode
50
60
  ? "bg-globalBg border-b border-gray-700"
51
- : "bg-white border-b border-gray-200"}`, children: [_jsx("div", { className: ` pl-4 pr-4 mx-auto ${isDarkMode ? "bg-globalBg " : "bg-[#ffff]"}`, children: _jsxs("div", { className: "flex items-center justify-between ", children: [_jsx("div", { children: _jsxs("a", { href: "/home", onClick: (event) => handleNavigation(event, "/home"), className: "flex items-center justify-between gap-4", children: [_jsx("img", { className: "w-auto h-14 sm:h-10 md:h-14 lg:h-14", src: img, alt: "Logo" }), _jsx("span", { className: "text-2xl font-semibold bg-gradient-to-r from-red-500 to-yellow-400 bg-clip-text text-transparent", children: name })] }) }), _jsx("div", { className: "md:hidden lg:hidden", children: _jsx("button", { onClick: () => setIsOpen(!isOpen), type: "button", className: `${isDarkMode ? " text-white" : "text-black"}`, "aria-label": "toggle menu", children: !isOpen ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 8h16M4 16h16" }) })) : (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })) }) }), _jsx("div", { className: ` ${isOpen ? "translate-x-0" : "translate-x-full md:translate-x-0"}
61
+ : "bg-white border-b border-gray-200"}`, children: [_jsx("div", { className: ` pl-1 pr-2 mx-auto ${isDarkMode ? "bg-globalBg " : "bg-[#ffff]"}`, children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { children: _jsxs("a", { href: "/home", onClick: (event) => handleNavigation(event, "/home"), className: "flex items-center justify-between", children: [_jsx("img", { className: "w-auto h-14 sm:h-10 md:h-14 lg:h-14", src: img, alt: "Logo" }), _jsx("span", { className: "text-transparent bg-clip-text font-extrabold text-[18px] ml-2.5 bg-gradient-to-r from-[#FD6E6A] to-[#FFC600]", children: name })] }) }), _jsx("div", { className: "md:hidden lg:hidden items-center", children: _jsx("button", { onClick: () => setIsOpen(!isOpen), type: "button", className: `${isDarkMode ? " text-white" : "text-black"}`, "aria-label": "toggle menu", children: !isOpen ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-6 h-6 ml-2 ", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 8h16M4 16h16" }) })) : (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-6 h-6 ml-2 ", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }) })) }) }), _jsx("div", { className: ` ${isOpen ? "translate-x-0" : "translate-x-full md:translate-x-0"}
52
62
  transform transition-transform duration-300 ease-in-out w-full md:w-auto mt-20 md:mt-0 fixed md:relative top-0 right-0 md:top-auto md:bg-transparent md:h-auto z-50 md:z-auto ${isOpen
53
63
  ? isDarkMode
54
64
  ? "bg-[#2e2e2e] text-[#ffff]"
55
65
  : "bg-[#ffff] text-black"
56
- : ""}`, children: _jsxs("div", { className: " flex flex-col md:flex-row md:items-center md:space-x-4 p-4 md:p-0 mr-3", children: [_jsx("a", { href: "/home", onClick: (event) => handleNavigation(event, "/home"), className: `px-2 py-1 rounded-md ${isActive("/home")
66
+ : ""}`, children: _jsxs("div", { className: " flex flex-col md:flex-row md:items-center md:space-x-2 md:p-0 ", children: [_jsx("a", { href: "/home", onClick: (event) => {
67
+ setIsOpen(false);
68
+ handleNavigation(event, "/home");
69
+ }, className: `
70
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm ${isActive("/home")
57
71
  ? "bg-blue-500 text-white"
58
72
  : isDarkMode
59
73
  ? "text-white hover:bg-gray-600"
60
- : "text-black hover:bg-gray-200"}`, children: "Home" }), _jsx("a", { href: "/about", onClick: (event) => handleNavigation(event, "/about"), className: `px-2 py-1 rounded-md ${isActive("/about")
74
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Home" }), _jsx("a", { href: "/about", onClick: (event) => {
75
+ setIsOpen(false);
76
+ handleNavigation(event, "/about");
77
+ }, className: `
78
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm ${isActive("/about")
61
79
  ? "bg-blue-500 text-white"
62
80
  : isDarkMode
63
81
  ? "text-white hover:bg-gray-600"
64
- : "text-black hover:bg-gray-200"}`, children: "About Us" }), _jsx("a", { href: "/contact", onClick: (event) => handleNavigation(event, "/contact"), className: `px-2 py-1 rounded-md ${isActive("/contact")
82
+ : "text-[#495057] hover:bg-gray-200"}`, children: "About Us" }), (menugroups === null || menugroups === void 0 ? void 0 : menugroups.length) > 0 && (_jsx("div", { className: "flex flex-col md:flex-row md:gap-2", children: menugroups.map((item, index) => (item.label === "Departments" ? (_jsxs("div", { className: "relative", onMouseEnter: () => setIsDepartmentsHovered(true), children: [_jsxs("a", { className: `py-1 px-2 md:px-1 rounded-[4px] flex justify-between font-semibold text-sm ${isActive("/seealldepartments")
83
+ ? "bg-blue-500 text-white"
84
+ : isDarkMode
85
+ ? "text-white hover:bg-gray-600"
86
+ : "text-[#495057] hover:bg-gray-200"}`, children: [_jsx("a", { href: "/seealldepartments", onClick: (event) => {
87
+ setIsOpen(false);
88
+ handleNavigation(event, "/seealldepartments");
89
+ }, children: item.label }), isDepartmentsHovered ? (_jsx(MdArrowDropUp, { className: "w-6 h-6", onClick: handleDropdownToggle })) : (_jsx(MdArrowDropDown, { className: "w-6 h-6", onClick: handleDropdownToggle }))] }), (isDepartmentsHovered) && (_jsxs("div", { className: `md:absolute md:top-12 md:left-0 relative top-0 left-0 p-0 w-auto md:shadow-lg rounded-lg border border-gray-200 ${isDarkMode
90
+ ? "bg-[#2e2e2e] border-gray-700"
91
+ : "bg-[#ffff] border-gray-200"}`, onMouseEnter: () => setIsDepartmentsHovered(true), onMouseLeave: () => setIsDepartmentsHovered(false), children: [_jsx("p", { onClick: (event) => {
92
+ setIsOpen(false);
93
+ handleNavigation(event, "/jamiaturraza");
94
+ }, className: `cursor-pointer block px-4 py-2 rounded-md font-semibold hover:bg-blue-400 transition-colors duration-200 whitespace-nowrap ${isDarkMode
95
+ ? "text-white hover:bg-gray-600"
96
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Centre of Islamic studies" }), _jsx("p", { onClick: (event) => {
97
+ setIsOpen(false);
98
+ handleNavigation(event, "/sharaeecouncilindia");
99
+ }, className: `cursor-pointer block px-4 py-2 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 whitespace-nowrap ${isDarkMode
100
+ ? "text-white hover:bg-gray-600"
101
+ : "text-[#495057] hover:bg-gray-200"}`, children: "The Shar\u2019ee Council of India" }), _jsxs("div", { className: `relative ${isDarkMode
102
+ ? "bg-[#2e2e2e] border-gray-700"
103
+ : "bg-[#ffff] border-gray-200"}`, children: [_jsxs("p", { className: `relative cursor-pointer px-4 py-2 flex justify-between block font-semibold rounded-md transition-colors duration-200 whitespace-nowrap ${isDarkMode
104
+ ? "text-white hover:bg-gray-600"
105
+ : "text-[#495057] hover:bg-gray-200"}`, children: [_jsx("p", { onClick: (event) => {
106
+ setIsOpen(false);
107
+ handleNavigation(event, "/jamaterazamustafa");
108
+ }, children: "Jamat Raza-e-Mustafa" }), showJRMCard ? (_jsx(MdArrowDropUp, { className: "w-7 h-7", onClick: () => setShowJRMCard(false) })) : (_jsx(MdArrowDropDown, { className: "w-7 h-7", onClick: () => setShowJRMCard(true) }))] }), showJRMCard && (_jsxs("div", { className: `px-4 rounded-lg cursor-pointer block font-semibold rounded-md transition-colors duration-200 whitespace-nowrap ${isDarkMode
109
+ ? "bg-[#2e2e2e] border-gray-700"
110
+ : "bg-[#ffff] border-gray-200"}`, children: [_jsxs("div", { className: `font-semibold flex justify-between rounded-md transition-colors pl-5 py-2 ${isDarkMode
111
+ ? "text-white bg-[#2e2e2e] hover:bg-gray-600"
112
+ : "text-[#495057] bg-[#ffff] hover:bg-gray-200"}`, children: ["online", showOnlineCard ? (_jsx(MdArrowDropUp, { className: "w-7 h-7", onClick: () => setShowOnlineCard(false) })) : (_jsx(MdArrowDropDown, { className: "w-7 h-7", onClick: () => setShowOnlineCard(true) }))] }), showOnlineCard && (_jsx("div", { onClick: (event) => {
113
+ setIsOpen(false);
114
+ handleNavigation(event, "/jrm/online/registration");
115
+ }, className: `font-semibold rounded-md transition-colors px-10 py-2 ${isDarkMode
116
+ ? "text-white bg-[#2e2e2e] hover:bg-gray-600"
117
+ : "text-[#495057] bg-[#ffff] hover:bg-gray-200"}`, children: "Registration" }))] }))] }), _jsx("p", { onClick: (event) => {
118
+ setIsOpen(false);
119
+ handleNavigation(event, "/sunniduniya");
120
+ }, className: `cursor-pointer block px-4 py-2 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 whitespace-nowrap ${isDarkMode
121
+ ? "text-white hover:bg-gray-600"
122
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Monthly Sunni Duniya" }), _jsx("p", { onClick: (event) => {
123
+ setIsOpen(false);
124
+ handleNavigation(event, "/markazidarulifta");
125
+ }, className: `cursor-pointer block px-4 py-2 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 whitespace-nowrap ${isDarkMode
126
+ ? "text-white hover:bg-gray-600"
127
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Markazi Darul Ifta" })] }))] }, index)) : (_jsx("p", { onClick: () => {
128
+ var _a;
129
+ (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
130
+ setIsOpen(false);
131
+ }, className: `cursor-pointer py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm
132
+ ${isActive(item.path)
133
+ ? "bg-blue-500 text-white"
134
+ : isDarkMode
135
+ ? "text-white hover:bg-gray-600"
136
+ : "text-[#495057] hover:bg-gray-200"}`, children: item.label }, index)))) })), _jsx("a", { href: "/contact", onClick: (event) => {
137
+ setIsOpen(false);
138
+ handleNavigation(event, "/contact");
139
+ }, className: `
140
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm ${isActive("/contact")
65
141
  ? "bg-blue-500 text-white"
66
142
  : isDarkMode
67
143
  ? "text-white hover:bg-gray-600"
68
- : "text-black hover:bg-gray-200"}`, children: "Contact Us" }), userLogedin ? (_jsxs("div", { className: "relative", children: [_jsx("div", { className: `px-3 py-1 h-20 rounded-md md:flex items-center ${isDarkMode ? "text-white" : "text-black"} hidden `, onMouseEnter: () => setShowUserCard(true), children: _jsx("div", { className: "w-6 h-6 flex items-center justify-center", children: _jsx(IconWrapper, { style: { width: "50px", height: "20px" } }) }) }), showUserCard && (_jsxs("div", { className: `absolute top-16 right-0 p-2 w-52 shadow-lg rounded-lg border border-gray-200 hidden sm:block ${isDarkMode
144
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Contact Us" }), userLogedin ? (_jsxs("div", { children: [_jsx("div", { className: `p-1 rounded-md md:flex items-center ${isDarkMode ? "text-white" : "text-black"} hidden `, onMouseEnter: () => setShowUserCard(true), children: _jsx("div", { className: "w-6 h-6 flex items-center justify-center", children: _jsx(IconWrapper, { style: { width: "50px", height: "20px" } }) }) }), showUserCard && (_jsxs("div", { className: `absolute top-12 right-0 p-2 w-52 shadow-lg rounded-lg border border-gray-200 hidden sm:block ${isDarkMode
69
145
  ? "bg-[#2e2e2e] border-gray-700"
70
- : "bg-[#ffff] border-gray-200"}`, onMouseEnter: () => setShowUserCard(true), onMouseLeave: () => setShowUserCard(false), children: [userType === 2 && (_jsx("p", { onClick: (event) => {
146
+ : "bg-[#ffff] border-gray-200"}`, onMouseEnter: () => setShowUserCard(true), onMouseLeave: () => setShowUserCard(false), children: [(userdetails === null || userdetails === void 0 ? void 0 : userdetails.roleType) === 2 && (_jsx("p", { onClick: (event) => {
71
147
  handleNavigation(event, "/admin");
72
148
  event.currentTarget.parentElement.classList.add("hidden");
73
- }, className: `cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
149
+ }, className: `cursor-pointer block px-2 py-1 rounded-md font-semibold hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
74
150
  ? "text-white hover:bg-gray-600"
75
- : "text-black hover:bg-gray-200"}`, children: "Admin" })), _jsx("p", { onClick: (event) => {
151
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Admin" })), _jsx("p", { onClick: (event) => {
76
152
  setusermodalopen(true);
77
153
  event.currentTarget.parentElement.classList.add("hidden");
78
- }, className: `cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
154
+ }, className: `cursor-pointer block px-2 py-1 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
79
155
  ? "text-white hover:bg-gray-600"
80
- : "text-black hover:bg-gray-200"}`, children: "Update Details" }), _jsx("p", { onClick: (event) => {
81
- handleLogout();
82
- event.currentTarget.parentElement.classList.add("hidden");
83
- }, className: `cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
156
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Update Details" }), (donationHistory === null || donationHistory === void 0 ? void 0 : donationHistory.label) && (_jsx("p", { onClick: donationHistory.onClick, className: `cursor-pointer block px-2 py-1 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
157
+ ? "text-white hover:bg-gray-600"
158
+ : "text-[#495057] hover:bg-gray-200"}`, children: donationHistory.label })), _jsx("p", { onClick: handleLogout, className: `cursor-pointer block px-2 py-1 font-semibold rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
84
159
  ? "text-white hover:bg-gray-600"
85
- : "text-black hover:bg-gray-200"}`, children: "Logout" })] })), _jsxs("div", { className: "sm:hidden", children: [userType === 2 && (_jsx("p", { onClick: (event) => handleNavigation(event, "/admin"), className: `cursor-pointer block pl-2 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
160
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Logout" })] })), _jsxs("div", { className: "sm:hidden", children: [(userdetails === null || userdetails === void 0 ? void 0 : userdetails.roleType) === 2 && (_jsx("p", { onClick: (event) => {
161
+ setIsOpen(false);
162
+ handleNavigation(event, "/admin");
163
+ }, className: `
164
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm
165
+ ? "bg-blue-500 text-white"
166
+ ${isDarkMode
86
167
  ? "text-white hover:bg-gray-600"
87
- : "text-black hover:bg-gray-200"}`, children: "Admin" })), _jsx("p", { onClick: handleUser, className: `cursor-pointer block pl-2 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
168
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Admin" })), _jsx("p", { onClick: handleUser, className: `
169
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm
170
+ ? "bg-blue-500 text-white"
171
+ ${isDarkMode
88
172
  ? "text-white hover:bg-gray-600"
89
- : "text-black hover:bg-gray-200"}`, children: "Update Details" }), _jsx("p", { onClick: handleLogout, className: `cursor-pointer block pl-2 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
173
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Update Details" }), (donationHistory === null || donationHistory === void 0 ? void 0 : donationHistory.label) && (_jsx("p", { onClick: () => {
174
+ var _a;
175
+ (_a = donationHistory.onClick) === null || _a === void 0 ? void 0 : _a.call(donationHistory);
176
+ setIsOpen(false);
177
+ }, className: `
178
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm
179
+ ${isActive(donationHistory.path)
180
+ ? "bg-blue-500 text-white"
181
+ : isDarkMode
182
+ ? "text-white hover:bg-gray-600"
183
+ : "text-[#495057] hover:bg-gray-200"}`, children: donationHistory.label })), _jsx("p", { onClick: handleLogout, className: `
184
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm
185
+ ? "bg-blue-500 text-white"
186
+ ${isDarkMode
90
187
  ? "text-white hover:bg-gray-600"
91
- : "text-black hover:bg-gray-200"}`, children: "Logout" })] })] })) : (_jsx("a", { href: "/login", onClick: (event) => handleNavigation(event, "/login"), className: `px-2 py-1 rounded-md ${isActive("/login")
188
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Logout" })] })] })) : (_jsx("a", { href: "/login", onClick: (event) => {
189
+ setIsOpen(false);
190
+ handleNavigation(event, "/login");
191
+ }, className: `
192
+ py-1 px-2 md:px-1 rounded-[4px] font-semibold text-sm ${isActive("/login")
92
193
  ? "bg-blue-500 text-white"
93
194
  : isDarkMode
94
195
  ? "text-white hover:bg-gray-600"
95
- : "text-black hover:bg-gray-200"}`, children: "Login" })), _jsx("button", { onClick: () => handleDark(), className: `md:px-3 pl-1 py-1 md:border-2 rounded-md transition-transform transform hover:scale-95 duration-300 ${isDarkMode
96
- ? "text-white border-white"
97
- : "text-black border-black"}`, children: isDarkMode ? _jsx(CiDark, {}) : _jsx(CiLight, {}) })] }) })] }) }), _jsx(UpdateUserDetails, { usermodalopen: usermodalopen, closeusermodal: () => setusermodalopen(false), url: url, isDarkMode: isDarkMode })] }));
196
+ : "text-[#495057] hover:bg-gray-200"}`, children: "Login" })), _jsx("button", { onClick: () => {
197
+ toggleTheme();
198
+ setIsOpen(false);
199
+ }, className: ` ml-2 lg:px-1 lg:py-1 md:border rounded-[4.5px] transition-transform transform hover:scale-95 duration-300 ${isDarkMode
200
+ ? "text-white border-yellow-500 "
201
+ : "text-black border-blue-500"} `, children: isDarkMode ? (_jsx(CiLight, { size: 20, color: "yellow" })) : (_jsx(CiDark, { size: 20, color: "blue" })) })] }) })] }) }), _jsx(UpdateUserDetails, { usermodalopen: usermodalopen, closeusermodal: () => setusermodalopen(false), url: url, isDarkMode: isDarkMode, userdetails: userdetails })] }));
98
202
  };
99
203
  export default Header;
@@ -3,6 +3,7 @@ interface LoginProps {
3
3
  closeModal: () => void;
4
4
  url: string;
5
5
  isDarkMode: boolean;
6
+ img: string;
6
7
  }
7
- declare const Login: ({ ModalOpen, closeModal, url, isDarkMode }: LoginProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const Login: ({ ModalOpen, closeModal, url, isDarkMode, img }: LoginProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default Login;