Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e6ba42afcd | |||
| 63ef5d6699 | |||
| 7840e7b13d | |||
| 41c56445fd | |||
| fcd6afbf1b | |||
| 0138119953 | |||
| 39995b637b | |||
| 153499fa31 | |||
| ddf15feb62 | |||
| 3789a8d9cb | |||
| 3476a8e7f0 | |||
| b45be9fafd | |||
| a3af650036 | |||
| 26d2ddf719 | |||
| 2afbbe305d | |||
| 590293d561 |
@@ -9,5 +9,9 @@ REACT_APP_APPSITE=" https://myfitapp.mermsemr.com"
|
||||
|
||||
REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit"
|
||||
REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||
# REACT_APP_PASSWORD_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser/resetpass"
|
||||
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES = 5
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES = 5
|
||||
|
||||
REACT_APP_TRACKING = "Tracking"
|
||||
REACT_APP_RESOURCES = "Resources"
|
||||
Generated
+24
@@ -3348,6 +3348,11 @@
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"@wojtekmaj/date-utils": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@wojtekmaj/date-utils/-/date-utils-1.1.2.tgz",
|
||||
"integrity": "sha512-06PQad/6pyYDjInBW2ih4Oy30EAg0mtXTCz+b/fGwzN2JB2X2Zsa4QtHl4I8M+IaCKN8bwj61OW3XAWxh+D9hA=="
|
||||
},
|
||||
"@xtuc/ieee754": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
|
||||
@@ -6490,6 +6495,14 @@
|
||||
"get-intrinsic": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"get-user-locale": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/get-user-locale/-/get-user-locale-1.5.1.tgz",
|
||||
"integrity": "sha512-WiNpoFRcHn1qxP9VabQljzGwkAQDrcpqUtaP0rNBEkFxJdh4f3tik6MfZsMYZc+UgQJdGCxWEjL9wnCUlRQXag==",
|
||||
"requires": {
|
||||
"lodash.memoize": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
@@ -11049,6 +11062,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-calendar": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/react-calendar/-/react-calendar-4.0.0.tgz",
|
||||
"integrity": "sha512-y9Q5Oo3Mq869KExbOCP3aJ3hEnRZKZ0TqUa9QU1wJGgDZFrW1qTaWp5v52oZpmxTTrpAMTUcUGaC0QJcO1f8Nw==",
|
||||
"requires": {
|
||||
"@wojtekmaj/date-utils": "^1.0.2",
|
||||
"clsx": "^1.2.1",
|
||||
"get-user-locale": "^1.2.0",
|
||||
"prop-types": "^15.6.0"
|
||||
}
|
||||
},
|
||||
"react-chartjs-2": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-4.3.1.tgz",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"cors": "^2.8.5",
|
||||
"faker": "^6.6.6",
|
||||
"react": "^18.0.0",
|
||||
"react-calendar": "^4.0.0",
|
||||
"react-chartjs-2": "^4.1.0",
|
||||
"react-countup": "^6.2.0",
|
||||
"react-dom": "^18.0.0",
|
||||
|
||||
+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>
|
||||
);
|
||||
|
||||
@@ -24,6 +24,7 @@ import UserProfilePage from "./views/UserProfilePage";
|
||||
import VerifyYouPages from "./views/VerifyYouPages";
|
||||
|
||||
import RemindersPage from './views/RemindersPage';
|
||||
import RemindersAddPage from './views/RemindersAddPage';
|
||||
import TrackingPage from "./views/TrackingPage";
|
||||
import CalendarPage from "./views/CalendarPage";
|
||||
import ResourcePage from "./views/ResourcePage";
|
||||
@@ -57,6 +58,7 @@ export default function Routers() {
|
||||
<Route exact path="/my-wallet" element={<MyWalletPage />} />
|
||||
<Route exact path="/my-collection" element={<MyCollection />} />*/}
|
||||
<Route exact path="/reminders" element={<RemindersPage />} />
|
||||
<Route exact path="/add-reminder" element={<RemindersAddPage />} />
|
||||
<Route exact path="/tracking" element={<TrackingPage />} />
|
||||
<Route exact path="/calendar" element={<CalendarPage />} />
|
||||
<Route exact path="/resources" element={<ResourcePage />} />
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -1,10 +1,40 @@
|
||||
import React from "react";
|
||||
import { Link } from 'react-router-dom';
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import titleShape from "../../../assets/images/shape/title-shape-two.svg";
|
||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||
import AuthLayout from "../AuthLayout";
|
||||
|
||||
export default function ForgotPassword() {
|
||||
|
||||
const navigate = useNavigate();
|
||||
const [validation, setValidation] = useState("")
|
||||
const [buttonDisabled, setButtonDisabled] = useState(true)
|
||||
|
||||
// email
|
||||
const [email, setEmail] = useState("");
|
||||
const handleEmail = (e) => {
|
||||
setEmail(e.target.value);
|
||||
};
|
||||
|
||||
|
||||
function validationChecker(email) {
|
||||
const emailCheck = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/;
|
||||
if (email === "") {
|
||||
setValidation("email is required");
|
||||
|
||||
} else if (!email.match(emailCheck)) {
|
||||
setValidation('Please input a valid email address');
|
||||
|
||||
} else {
|
||||
setValidation("");
|
||||
setButtonDisabled(false)
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
validationChecker(email)
|
||||
}, [email])
|
||||
|
||||
return (
|
||||
<>
|
||||
<AuthLayout
|
||||
@@ -28,19 +58,24 @@ export default function ForgotPassword() {
|
||||
name="email"
|
||||
type="email"
|
||||
iconName="message"
|
||||
inputHandler={handleEmail}
|
||||
value={email}
|
||||
/>
|
||||
{validation && <p className="my-5 font-bold text-red-500">{validation}</p>}
|
||||
</div>
|
||||
|
||||
<div className="signin-area mb-3.5">
|
||||
<a
|
||||
href="/verify-you"
|
||||
|
||||
<button
|
||||
className="w-full rounded-[50px] mb-5 h-[58px] text-xl text-white font-bold flex justify-center bg-purple items-center"
|
||||
disabled={buttonDisabled}
|
||||
onClick={() => navigate("/verify-you")}
|
||||
>
|
||||
Send Code
|
||||
</a>
|
||||
|
||||
</button>
|
||||
|
||||
<Link to="/"
|
||||
className=" my-40 font-bold flex justify-center text-red-500 items-center"
|
||||
className="my-40 font-bold flex justify-center text-red-500 items-center"
|
||||
>
|
||||
Back to Home
|
||||
</Link>
|
||||
|
||||
@@ -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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 });
|
||||
};
|
||||
|
||||
@@ -111,8 +111,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
|
||||
<Icons name="market" />
|
||||
</span>
|
||||
<span className="item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium active flex-1">
|
||||
Tracking
|
||||
|
||||
{process.env.REACT_APP_TRACKING}
|
||||
</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
@@ -138,7 +137,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
|
||||
<Icons name="star" />
|
||||
</span>
|
||||
<span className="item-content group-hover:text-purple text-[18px] transition-all duration-300 ease-in-out text-lighter-gray relative font-medium active flex-1">
|
||||
Resources
|
||||
{process.env.REACT_APP_RESOURCES}
|
||||
</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
|
||||
@@ -201,7 +201,7 @@ export default function RightSideBar() {
|
||||
{/* name */}
|
||||
<div>
|
||||
<p className="text-thin-light-gray text-base font-medium">
|
||||
OpenSea
|
||||
Add Reminder
|
||||
</p>
|
||||
</div>
|
||||
{/* action */}
|
||||
@@ -232,88 +232,12 @@ export default function RightSideBar() {
|
||||
{/* name */}
|
||||
<div>
|
||||
<p className="text-thin-light-gray text-base font-medium">
|
||||
Rarible
|
||||
Add Tracking
|
||||
</p>
|
||||
</div>
|
||||
{/* action */}
|
||||
</div>
|
||||
<div className="item flex space-x-3 items-center mb-4">
|
||||
{/* image */}
|
||||
<div className="w-8 h-8 rounded-full">
|
||||
<svg
|
||||
width="40"
|
||||
height="41"
|
||||
viewBox="0 0 40 41"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<ellipse
|
||||
cx="20"
|
||||
cy="20.4043"
|
||||
rx="20"
|
||||
ry="19.9392"
|
||||
fill="url(#paint0_linear_249_2794)"
|
||||
/>
|
||||
<path
|
||||
d="M16.7403 14.4243C17.8836 14.4243 19.0272 14.4261 20.1705 14.4233C20.5666 14.4226 20.9612 14.4431 21.3489 14.5184C22.272 14.698 23.0864 15.0843 23.742 15.7545C23.8172 15.8312 23.8625 15.8401 23.9512 15.7762C24.8988 15.091 25.9527 14.6419 27.1244 14.484C27.8811 14.3821 28.6353 14.4115 29.3836 14.5947C30.3403 14.829 31.1613 15.277 31.8103 16.0013C32.413 16.674 32.7934 17.4511 32.9361 18.3386C33.054 19.0731 32.9989 19.7955 32.8499 20.5197C32.6718 21.3867 32.5167 22.2578 32.3477 23.1265C32.1933 23.92 32.0337 24.7123 31.8768 25.5054C31.7749 26.0202 31.6807 26.5367 31.5694 27.0493C31.5198 27.2772 31.3745 27.371 31.1365 27.3713C29.9446 27.3727 28.7528 27.3742 27.561 27.3745C27.2971 27.3745 27.1996 27.273 27.2463 27.0252C27.3872 26.2776 27.5365 25.5313 27.6807 24.7844C27.8136 24.095 27.9428 23.4052 28.076 22.7158C28.2148 21.9976 28.356 21.2798 28.4958 20.5616C28.5601 20.2311 28.6272 19.9038 28.5196 19.5662C28.3527 19.0422 27.8877 18.7075 27.3171 18.667C26.2023 18.5882 25.2894 19.4682 25.1459 20.415C25.0269 21.2017 24.844 21.9788 24.6918 22.7609C24.5703 23.386 24.4546 24.0126 24.3319 24.6378C24.1727 25.4483 24.0125 26.2587 23.8446 27.0674C23.8026 27.2694 23.65 27.3749 23.4365 27.3752C22.2322 27.377 21.028 27.3774 19.8237 27.3763C19.5956 27.3759 19.4854 27.2393 19.5292 27.0142C19.6609 26.3365 19.7956 25.6591 19.9278 24.9814C20.0869 24.1649 20.2446 23.3481 20.4031 22.5312C20.5549 21.7495 20.7017 20.9671 20.8604 20.1868C21.013 19.4359 20.4038 18.7124 19.6179 18.6688C18.5688 18.6102 17.6843 19.3695 17.4934 20.2162C17.3587 20.8144 17.2583 21.42 17.1415 22.0225C16.9389 23.0648 16.7359 24.1067 16.5322 25.1486C16.4114 25.7681 16.2895 26.3873 16.1683 27.0067C16.1187 27.2602 15.9832 27.3798 15.7197 27.3802C13.4145 27.3816 11.1097 27.3816 8.8045 27.3795C8.47305 27.3791 8.20621 27.1083 8.20548 26.7866C8.20475 26.471 8.48911 26.192 8.82823 26.1902C9.56414 26.186 10.3 26.1916 11.0359 26.1863C11.4995 26.1828 11.7854 25.749 11.5864 25.3581C11.5003 25.1888 11.3524 25.0904 11.1641 25.0503C11.0078 25.0169 10.8491 25.0304 10.6914 25.0301C9.77293 25.029 8.85451 25.0304 7.93645 25.0287C7.58712 25.0279 7.36408 24.893 7.27063 24.636C7.12754 24.242 7.42395 23.8444 7.87878 23.8323C8.18869 23.8241 8.49897 23.8305 8.80925 23.8305C9.95253 23.8302 11.0962 23.8312 12.2395 23.8287C12.5326 23.828 12.7702 23.6388 12.8148 23.3814C12.867 23.0807 12.7301 22.839 12.4494 22.7243C12.3493 22.6835 12.2468 22.6885 12.1442 22.6885C11.2805 22.687 10.4169 22.687 9.55318 22.6863C9.25933 22.686 9.03557 22.5749 8.91766 22.3001C8.76471 21.944 8.9998 21.5713 9.39257 21.5209C10.0653 21.4346 10.7403 21.5028 11.4138 21.4793C11.5171 21.4758 11.6207 21.4804 11.7237 21.4719C12.0642 21.4435 12.2891 21.206 12.2814 20.8886C12.2741 20.5943 12.0037 20.3351 11.6861 20.3277C11.4127 20.3213 11.1385 20.3316 10.8651 20.3231C10.5895 20.3142 10.3292 20.098 10.2884 19.8601C10.2362 19.5556 10.365 19.3056 10.633 19.1849C10.7487 19.1327 10.871 19.1402 10.9914 19.1398C11.7211 19.1367 12.4512 19.1388 13.1809 19.1342C13.5488 19.1317 13.7376 19.0099 13.8482 18.7444C13.9891 18.4064 13.6992 18.0148 13.3919 17.9829C13.1791 17.9609 12.967 17.9687 12.7549 17.9683C11.8124 17.9673 10.8699 17.9729 9.92734 17.9744C9.65539 17.9747 9.39002 17.6992 9.37468 17.4074C9.35899 17.1096 9.62181 16.8153 9.93318 16.7865C10.0117 16.7794 10.0912 16.7826 10.1701 16.7826C11.5689 16.7823 12.9677 16.783 14.3665 16.7819C14.6666 16.7816 14.8754 16.6342 14.9535 16.3754C15.0312 16.1184 14.9316 15.8546 14.702 15.7112C14.5728 15.6303 14.4264 15.625 14.28 15.6246C13.8055 15.6235 13.3313 15.6285 12.8567 15.6221C12.4822 15.6171 12.2252 15.4088 12.1876 15.0964C12.1435 14.7271 12.4253 14.4282 12.8359 14.4254C13.5963 14.4204 14.3563 14.4236 15.1167 14.4236C15.658 14.4236 16.1993 14.4236 16.7407 14.4236C16.7403 14.424 16.7403 14.424 16.7403 14.4243Z"
|
||||
fill="white"
|
||||
/>
|
||||
<defs>
|
||||
<linearGradient
|
||||
id="paint0_linear_249_2794"
|
||||
x1="3"
|
||||
y1="16.4165"
|
||||
x2="26.9783"
|
||||
y2="26.4379"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
>
|
||||
<stop stopColor="#E100C5" />
|
||||
<stop offset="1" stopColor="#FF812B" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
{/* name */}
|
||||
<div>
|
||||
<p className="text-thin-light-gray text-base font-medium">
|
||||
Myth Market
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="item flex space-x-3 items-center mb-4">
|
||||
{/* image */}
|
||||
<div className="w-8 h-8 rounded-full">
|
||||
<svg
|
||||
width="40"
|
||||
height="41"
|
||||
viewBox="0 0 40 41"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<ellipse
|
||||
cx="20"
|
||||
cy="20.2341"
|
||||
rx="20"
|
||||
ry="19.9392"
|
||||
fill="#5165FF"
|
||||
/>
|
||||
<path
|
||||
d="M26.1647 27.2085C22.5316 27.2448 19.3317 24.2111 19.3359 20.2195C19.3402 16.4128 22.3393 13.2525 26.1704 13.2554C30.0813 13.2583 33.012 16.5264 33.0006 20.2501C32.9892 24.1456 29.8505 27.2492 26.1647 27.2085Z"
|
||||
fill="white"
|
||||
/>
|
||||
<path
|
||||
d="M20.5815 27.1983C20.5217 27.2245 20.4405 27.207 20.3607 27.207C16.0039 27.2085 11.647 27.2085 7.29019 27.2085C7.25742 27.2085 7.22465 27.2099 7.1933 27.2085C7.01094 27.2026 7.00951 27.2026 7.00381 27.0076C7.00239 26.9581 7.00381 26.9086 7.00381 26.8576C7.00381 22.4395 7.00381 18.0214 7.00381 13.6033C7.00381 13.5072 6.99099 13.4082 7.01236 13.334C11.5373 17.9559 16.0566 22.5749 20.5815 27.1983Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
{/* name */}
|
||||
<div>
|
||||
<p className="text-thin-light-gray text-base font-medium">
|
||||
KnownOrigin
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
import React, { useContext, useEffect } from "react";
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import logo from "../../assets/images/myfit-logo-2.png"; //logo-2.svg";
|
||||
import logo3 from "../../assets/images/myfit-logo-2.png"; //logo-3.svg";
|
||||
import { default as logo, default as logo3 } from "../../assets/images/myfit-logo-2.png"; //logo-2.svg";
|
||||
import usersService from "../../services/UsersService";
|
||||
import DarkModeContext from "../Contexts/DarkModeContext";
|
||||
import Icons from "../Helpers/Icons";
|
||||
|
||||
export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
const darkMode = useContext(DarkModeContext);
|
||||
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);
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
const title = document.querySelectorAll(".menu-setting-items .heading");
|
||||
if (sidebar) {
|
||||
@@ -131,7 +147,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
>
|
||||
Reminders
|
||||
<span className="absolute left-24 -top-1 text-sm flex justify-center items-center w-5 h-5 primary-gradient rounded-full text-white">
|
||||
0
|
||||
{userReminders.length > 0 && userReminders.length}
|
||||
</span>
|
||||
</span>
|
||||
</NavLink>
|
||||
@@ -152,7 +168,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
sidebar ? "active flex-1" : "w-0"
|
||||
}`}
|
||||
>
|
||||
Tracking
|
||||
{process.env.REACT_APP_TRACKING}
|
||||
</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
@@ -192,7 +208,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
sidebar ? "active flex-1" : "w-0"
|
||||
}`}
|
||||
>
|
||||
Resources
|
||||
{process.env.REACT_APP_RESOURCES}
|
||||
</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
import React from 'react'
|
||||
import Layout from '../Partials/Layout'
|
||||
import { Link } from 'react-router-dom'
|
||||
import InputCom from "../Helpers/Inputs/InputCom";
|
||||
|
||||
|
||||
export default function AddEditReminder({ className }) {
|
||||
return (
|
||||
<>
|
||||
<Layout>
|
||||
<div className="content-wrapper-profile-only w-full mb-6">
|
||||
<div className="history-wrapper w-full mb-10">
|
||||
|
||||
<div
|
||||
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow min-h-[520px] ${
|
||||
className || ""
|
||||
}`}
|
||||
>
|
||||
|
||||
<div className="fields w-full">
|
||||
{/*description */}
|
||||
<div className="field w-full mb-6">
|
||||
<InputCom
|
||||
label="Description"
|
||||
type="text"
|
||||
name="description"
|
||||
placeholder="Describe the Reminder"
|
||||
value={''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* first name and last name */}
|
||||
<div className="xl:flex xl:space-x-7 mb-6">
|
||||
<div className="field w-full mb-6 xl:mb-0">
|
||||
<InputCom
|
||||
label="Reminder Type"
|
||||
type="text"
|
||||
name="remType"
|
||||
placeholder="Drop down of Category"
|
||||
value={''}
|
||||
/>
|
||||
</div>
|
||||
<div className="field w-full">
|
||||
<InputCom
|
||||
label="Mode"
|
||||
type="text"
|
||||
name="remMode"
|
||||
placeholder="Drop down of Modes"
|
||||
value={''}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="xl:flex xl:space-x-7 mb-6">
|
||||
<div className="field w-full mb-6 xl:mb-0">
|
||||
<InputCom
|
||||
label="Start Date"
|
||||
type="text"
|
||||
name="startDate"
|
||||
placeholder="10-10-2021"
|
||||
value={''}
|
||||
/>
|
||||
</div>
|
||||
<div className="field w-full">
|
||||
<InputCom
|
||||
label="End Date"
|
||||
type="text"
|
||||
name="endDate"
|
||||
placeholder="10-20-2034"
|
||||
value={''}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* bio */}
|
||||
<div className="field w-full mb-6">
|
||||
<h1 className="field-title">Optional Details </h1>
|
||||
<div className="input-field mt-2">
|
||||
<div className="input-wrapper w-full ">
|
||||
<textarea
|
||||
value={''}
|
||||
placeholder="provide a detailed description of your item."
|
||||
rows="7"
|
||||
className="w-full h-full px-7 py-4 border border-light-purple dark:border-[#5356fb29] rounded-[20px] text-dark-gray dark:text-white bg-[#FAFAFA] dark:bg-[#11131F] focus:ring-0 focus:outline-none"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
{/* border line */}
|
||||
<div className="w-full h-[120px] border-t border-light-purple dark:border-[#5356fb29] flex justify-end items-center">
|
||||
<div className="flex space-x-4 mr-9">
|
||||
<button
|
||||
type="button"
|
||||
className="text-18 text-light-red tracking-wide "
|
||||
>
|
||||
<span className="border-b dark:border-[#5356fb29] border-light-red">
|
||||
{" "}
|
||||
Cancel
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="w-[152px] h-[46px] flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||
>
|
||||
Upadate
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -72,11 +72,11 @@ export default function ReminderTable({ className }) {
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
|
||||
Pizza Testing Appointament
|
||||
{reminders.description}
|
||||
</h1>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
|
||||
Added <span className="text-purple">{reminders.added}</span>
|
||||
Added <span className="text-purple">{new Date(reminders.added).toLocaleString()}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,14 +85,14 @@ export default function ReminderTable({ className }) {
|
||||
<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}
|
||||
{new Date(reminders.start_date).toLocaleString()}
|
||||
</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}
|
||||
{new Date(reminders.end_date).toLocaleString()}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
@@ -111,153 +111,7 @@ export default function ReminderTable({ className }) {
|
||||
</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 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 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> */}
|
||||
|
||||
</>
|
||||
|
||||
) : selectedCategory === "Doctors Visit" ? (
|
||||
|
||||
@@ -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
|
||||
},[])
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class usersService {
|
||||
return this.postAuxEnd("/login", reqData);
|
||||
}
|
||||
|
||||
|
||||
getUserReminders(){
|
||||
return this.getAuxEnd("/reminders", null);
|
||||
}
|
||||
@@ -54,14 +55,16 @@ class usersService {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
postAuxEnd(uri, reqData) {
|
||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||
const session_token = localStorage.getItem("session_token");
|
||||
const token = '..your token..'
|
||||
let axiosConfig = {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
'Authorization': `Basic ${session_token}`,
|
||||
'Authorization': `Basic ${token}`,
|
||||
}
|
||||
};
|
||||
//Access-Control-Allow-Origin
|
||||
@@ -71,7 +74,7 @@ class usersService {
|
||||
};
|
||||
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
|
||||
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
|
||||
return Axios.post(endPoint, reqData,axiosConfig)
|
||||
return Axios.post(endPoint, reqData)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
// res = response;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import React from "react";
|
||||
import AddEditReminder from "../components/Reminders/AddEditReminder";
|
||||
|
||||
export default function RemindersAddPage() {
|
||||
return (
|
||||
<>
|
||||
<AddEditReminder />
|
||||
</>
|
||||
);
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ module.exports = {
|
||||
extend: {
|
||||
colors: {
|
||||
pink: "#F539F8",
|
||||
purple: "#5356FB",
|
||||
purple: "#1a3544",
|
||||
"light-gray": "#E5E5E5",
|
||||
"thin-light-gray": "#858D98",
|
||||
"dark-gray": "#374557",
|
||||
|
||||
Reference in New Issue
Block a user