Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d984773e08 | |||
| 63ef5d6699 | |||
| 7840e7b13d | |||
| 41c56445fd | |||
| fcd6afbf1b | |||
| 0138119953 | |||
| 39995b637b | |||
| b45be9fafd | |||
| 590293d561 |
@@ -9,5 +9,6 @@ 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
|
||||
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>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
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";
|
||||
@@ -26,9 +26,9 @@ export default function Layout({ children }) {
|
||||
localStorage.removeItem('member_uuid');
|
||||
localStorage.removeItem('session_token');
|
||||
localStorage.removeItem('status');
|
||||
toast.success("Come Back Soon", {
|
||||
icon: `🙂`,
|
||||
});
|
||||
// toast.success("Come Back Soon", {
|
||||
// icon: `🙂`,
|
||||
// });
|
||||
|
||||
navigate("/login", { replace: true });
|
||||
};
|
||||
@@ -95,7 +95,7 @@ export default function Layout({ children }) {
|
||||
{logoutModal && (
|
||||
<ModalCom action={logoutModalHandler} situation={logoutModal}>
|
||||
<div className="logout-modal-wrapper lg:w-[460px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
||||
<div className="logout-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] ">
|
||||
<div className="logout-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b border-light-purple dark:border-[#5356fb29] ">
|
||||
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
|
||||
Confirm
|
||||
</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import topCreator1 from "../../assets/images/top-creator-1.png";
|
||||
import topCreator2 from "../../assets/images/top-creator-2.png";
|
||||
import topCreator3 from "../../assets/images/top-creator-3.png";
|
||||
@@ -177,13 +178,15 @@ export default function RightSideBar() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="platform-list">
|
||||
<div className="item flex space-x-3 items-center mb-4">
|
||||
<div className="platform-list flex flex-col gap-4">
|
||||
<Link to="/add-reminder" className="cursor-pointer p-2 md:hover:shadow-md transition md:hover:duration-300 rounded-md">
|
||||
<div className="item flex space-x-3 items-center">
|
||||
{/* image */}
|
||||
<div className="w-8 h-8 rounded-full">
|
||||
<svg
|
||||
width="40"
|
||||
height="41"
|
||||
className="w-[100%]"
|
||||
// width="40"
|
||||
// height="41"
|
||||
viewBox="0 0 40 41"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -206,12 +209,15 @@ export default function RightSideBar() {
|
||||
</div>
|
||||
{/* action */}
|
||||
</div>
|
||||
<div className="item flex space-x-3 items-center mb-4">
|
||||
</Link>
|
||||
<Link to="/#" className="cursor-pointer p-2 md:hover:shadow-md transition md:hover:duration-300 rounded-md">
|
||||
<div className="item flex space-x-3 items-center">
|
||||
{/* image */}
|
||||
<div className="w-8 h-8 rounded-full">
|
||||
<svg
|
||||
width="40"
|
||||
height="41"
|
||||
className="w-[100%]"
|
||||
// width="40"
|
||||
// height="41"
|
||||
viewBox="0 0 40 41"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -237,7 +243,7 @@ export default function RightSideBar() {
|
||||
</div>
|
||||
{/* action */}
|
||||
</div>
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
|
||||
+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