Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b45be9fafd | |||
| a3af650036 | |||
| 26d2ddf719 | |||
| 60ed2324d4 | |||
| 2afbbe305d | |||
| cf53cf028a |
+2
-2
@@ -1,4 +1,4 @@
|
||||
import Toaster from "./components/Helpers/Toaster";
|
||||
// import Toaster from "./components/Helpers/Toaster";
|
||||
import Routers from "./Routers";
|
||||
import Default from "./components/Partials/Default";
|
||||
|
||||
@@ -7,7 +7,7 @@ function App() {
|
||||
<Default>
|
||||
<>
|
||||
<Routers />
|
||||
<Toaster />
|
||||
{/* <Toaster /> */}
|
||||
</>
|
||||
</Default>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import activeAidsBanner from "../../assets/images/active-aids-banner.jpg";
|
||||
import HeroUser from "../../assets/images/hero-user.png";
|
||||
import CountDown from "../Helpers/CountDown";
|
||||
@@ -10,10 +10,8 @@ export default function OverviewSection({ className }) {
|
||||
const favoriteHandler = () => {
|
||||
if (!addFavorite) {
|
||||
setValue(true);
|
||||
toast.success("Added to Favorite List");
|
||||
} else {
|
||||
setValue(false);
|
||||
toast.warn("Remove to Favorite List");
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -45,7 +45,10 @@ export default function Login() {
|
||||
// if (email === "support@mermsemr.com") {
|
||||
if (loginResult.data.status > 0 && loginResult.data.session_token !='') { // just for a start
|
||||
localStorage.setItem("email", `${email}`);
|
||||
localStorage.setItem("member_id", `${JSON.stringify(loginResult.data.member_id)}`);
|
||||
localStorage.setItem("member_uuid", `${JSON.stringify(loginResult.data.member_uuid)}`);
|
||||
localStorage.setItem("session_token", `${loginResult.data.session_token}`);
|
||||
localStorage.setItem("status", `${JSON.stringify(loginResult.data.status)}`);
|
||||
localStorage.setItem("profile", `${JSON.stringify(loginResult.data.profile)}`);
|
||||
setLoginLoading(true);
|
||||
// userApi.getUserReminders(); //testing
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import localImgLoad from "../../lib/localImgLoad";
|
||||
import CountDown from "../Helpers/CountDown";
|
||||
import Icons from "../Helpers/Icons";
|
||||
@@ -11,10 +11,8 @@ export default function ProductCardStyleOne({ datas, hidden = false }) {
|
||||
const favoriteHandler = () => {
|
||||
if (!addFavorite) {
|
||||
setValue(true);
|
||||
toast.success("Added to Favorite List");
|
||||
} else {
|
||||
setValue(false);
|
||||
toast.warn("Remove to Favorite List");
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import localImgLoad from "../../lib/localImgLoad";
|
||||
import Icons from "../Helpers/Icons";
|
||||
|
||||
@@ -14,10 +14,8 @@ export default function ProductCardStyleTwo({
|
||||
const favoriteHandler = () => {
|
||||
if (!addFavorite) {
|
||||
setValue(true);
|
||||
toast.success("Added to Favorite List");
|
||||
} else {
|
||||
setValue(false);
|
||||
toast.warn("Remove to Favorite List");
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import heroBg from "../../assets/images/hero-bg.svg";
|
||||
import heroUser from "../../assets/images/hero-user.png";
|
||||
import slider1 from "../../assets/images/slider-1.jpg";
|
||||
@@ -21,10 +21,8 @@ export default function Hero({ className }) {
|
||||
const favoriteHandler = () => {
|
||||
if (!addFavorite) {
|
||||
setValue(true);
|
||||
toast.success("Added to Favorite List");
|
||||
} else {
|
||||
setValue(false);
|
||||
toast.warn("Remove to Favorite List");
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
import useToggle from "../../hooks/useToggle";
|
||||
import { drawerToggle } from "../../store/drawer";
|
||||
import ModalCom from "../Helpers/ModalCom";
|
||||
@@ -21,10 +21,14 @@ export default function Layout({ children }) {
|
||||
const navigate = useNavigate();
|
||||
const logOut = () => {
|
||||
localStorage.removeItem("email");
|
||||
localStorage.removeItem('profile');
|
||||
localStorage.removeItem('member_id');
|
||||
localStorage.removeItem('member_uuid');
|
||||
localStorage.removeItem('session_token');
|
||||
toast.success("Come Back Soon", {
|
||||
icon: `🙂`,
|
||||
});
|
||||
localStorage.removeItem('status');
|
||||
// toast.success("Come Back Soon", {
|
||||
// icon: `🙂`,
|
||||
// });
|
||||
|
||||
navigate("/login", { replace: true });
|
||||
};
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
import React, { useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import dataImage1 from "../../assets/images/data-table-user-1.png";
|
||||
import dataImage2 from "../../assets/images/data-table-user-2.png";
|
||||
import dataImage3 from "../../assets/images/data-table-user-3.png";
|
||||
import dataImage4 from "../../assets/images/data-table-user-4.png";
|
||||
import usersService from "../../services/UsersService";
|
||||
import SelectBox from "../Helpers/SelectBox";
|
||||
|
||||
export default function ReminderTable({ className }) {
|
||||
const [userReminders, setUserReminders] = useState([]);
|
||||
|
||||
const api = new usersService();
|
||||
useEffect(() => {
|
||||
getUserReminders();
|
||||
}, []);
|
||||
|
||||
const getUserReminders = async () => {
|
||||
try {
|
||||
const res = await api.getUserReminders();
|
||||
|
||||
setUserReminders(res.data.reminders);
|
||||
console.log("res", res);
|
||||
|
||||
} catch (error) {
|
||||
console.log("Error from User Reminders", error);
|
||||
}
|
||||
};
|
||||
|
||||
const filterCategories = ["All Categories", "Doctors Visit", "Medications"];
|
||||
const [selectedCategory, setCategory] = useState(filterCategories[0]);
|
||||
return (
|
||||
@@ -39,8 +56,62 @@ export default function ReminderTable({ className }) {
|
||||
</tr>
|
||||
|
||||
{selectedCategory === "All Categories" ? (
|
||||
|
||||
<>
|
||||
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
{userReminders.map((reminders, index) => (
|
||||
|
||||
<tr key={reminders.id} className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
<td className=" py-4">
|
||||
<div className="flex space-x-2 items-center">
|
||||
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
|
||||
<img
|
||||
src={dataImage1}
|
||||
alt="data"
|
||||
className="w-full h-full"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
Pizza Testing Appointament
|
||||
</h1>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
|
||||
Added <span className="text-purple">{reminders.added}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-center py-4 px-2">
|
||||
<div className="flex space-x-1 items-center justify-center">
|
||||
|
||||
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
|
||||
{reminders.start_date}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-center py-4 px-2">
|
||||
<div className="flex space-x-1 items-center justify-center">
|
||||
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
|
||||
{reminders.end_date}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-right py-4 px-2">
|
||||
<span className="text-base text-thin-light-gray whitespace-nowrap">
|
||||
{reminders.reminder}
|
||||
</span>
|
||||
</td>
|
||||
<td className="text-right py-4 px-2">
|
||||
<button
|
||||
type="button"
|
||||
className="text-sm text-white bg-purple px-2.5 py-1.5 rounded-full"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{/* <tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
<td className=" py-4">
|
||||
<div className="flex space-x-2 items-center">
|
||||
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
|
||||
@@ -186,57 +257,9 @@ export default function ReminderTable({ className }) {
|
||||
Edit
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
<td className=" py-4">
|
||||
<div className="flex space-x-2 items-center">
|
||||
<div className="w-[60px] h-[60px] rounded-full overflow-hidden flex justify-center items-center">
|
||||
<img
|
||||
src={dataImage1}
|
||||
alt="data"
|
||||
className="w-full h-full"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
Pizza Testing Appointament
|
||||
</h1>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
Added <span className="text-purple">10-10-2025</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-center py-4 px-2">
|
||||
<div className="flex space-x-1 items-center justify-center">
|
||||
|
||||
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
|
||||
12-01-25 : 6:30 PM
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-center py-4 px-2">
|
||||
<div className="flex space-x-1 items-center justify-center">
|
||||
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
|
||||
12-01-28 : 6:30 PM
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td className="text-right py-4 px-2">
|
||||
<span className="text-base text-thin-light-gray whitespace-nowrap">
|
||||
4
|
||||
</span>
|
||||
</td>
|
||||
<td className="text-right py-4 px-2">
|
||||
<button
|
||||
type="button"
|
||||
className="text-sm text-white bg-purple px-2.5 py-1.5 rounded-full"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tr> */}
|
||||
</>
|
||||
|
||||
) : selectedCategory === "Doctors Visit" ? (
|
||||
<>
|
||||
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {useEffect} from "react";
|
||||
import { Navigate, Outlet, useNavigate } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
// import { toast } from "react-toastify";
|
||||
|
||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
const isLogin = localStorage.getItem("email");
|
||||
@@ -19,9 +19,6 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
useEffect(()=>{
|
||||
setTimeout(()=>{
|
||||
expireSession()
|
||||
toast.success("Opps, session has expired", {
|
||||
icon: `🙂`,
|
||||
});
|
||||
}, 300000) //expires user login session after 5 minutes
|
||||
},[])
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import Axios from "axios";
|
||||
|
||||
class usersService {
|
||||
@@ -24,7 +23,7 @@ class usersService {
|
||||
//---------------------------------------- -----
|
||||
//---------------------------------------- -----
|
||||
getAuxEnd(uri, reqData) {
|
||||
debugger;
|
||||
// debugger;
|
||||
const session_token = localStorage.getItem("session_token");
|
||||
let axiosConfig = {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user