Compare commits

...

18 Commits

Author SHA1 Message Date
Chukwumdiebube b45be9fafd All unwanted pop-ups removed 2023-02-02 10:42:03 +01:00
tokslaw a3af650036 Merge branch 'task-7-implement-reminders' of MyFit/users-myfit into master 2023-02-01 23:23:18 +00:00
tokslaw 26d2ddf719 Merge branch 'successful_login_definition' of MyFit/users-myfit into master 2023-02-01 23:18:56 +00:00
DESKTOP-QHP1O2H\MIKE 60ed2324d4 implemented reminders list api 2023-02-01 16:30:46 -05:00
victorAnumudu 2afbbe305d sets local storage values on successful login and clears those values when user logs out 2023-02-01 19:41:59 +01:00
tokslaw cf53cf028a Merge branch 'expires_user_login_session' of MyFit/users-myfit into master 2023-02-01 12:10:15 +00:00
victorAnumudu 33b1571929 Expires user login session after 5 minutes 2023-02-01 07:18:03 +01:00
tokslaw 1f8a6d0d30 Merge branch 'removing-toasts-ebube' of MyFit/users-myfit into master 2023-01-31 15:48:26 +00:00
Chukwumdiebube 730491dba5 Merge branch 'removing-toasts-ebube' of https://gitlab.chiefsoft.net/MyFit/users-myfit into unwanted-popups-ebube 2023-01-31 16:33:08 +01:00
Chukwumdiebube 4a6c57a777 Toasts removed! 2023-01-31 16:32:41 +01:00
Chukwumdiebube 001540b595 Merge branch 'master' of https://gitlab.chiefsoft.net/MyFit/users-myfit into unwanted-popups-ebube 2023-01-31 14:41:04 +01:00
tokslaw 190ec5eff4 Merge branch 'Ts&Cs-ebube' of MyFit/users-myfit into master 2023-01-31 13:27:37 +00:00
tokslaw c11245d157 Merge branch 'faq-implementation-ebube' of MyFit/users-myfit into master 2023-01-31 13:27:19 +00:00
tokslaw b740b43c37 Merge branch 'user_profile_details' of MyFit/users-myfit into master 2023-01-31 12:42:29 +00:00
Chukwumdiebube 293559c02b Toasts removed! 2023-01-30 23:21:07 +01:00
Chukwumdiebube df3710ec8d faq content updated 2023-01-30 16:19:48 +01:00
Chukwumdiebube 3dfbcdfe48 Updated Texts 2023-01-30 15:58:46 +01:00
Chukwumdiebube d71a810ed2 grammar fixes 2023-01-30 13:50:17 +01:00
18 changed files with 1266 additions and 170 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
},
"[javascriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": null
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"javascript.validate.enable": false, //disable all built-in syntax checking
"editor.codeActionsOnSave": {
+2 -2
View File
@@ -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 (
+5 -4
View File
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";
import { toast } from "react-toastify";
// import { toast } from "react-toastify";
import googleLogo from "../../../assets/images/google-logo.svg";
// import titleShape from "../../../assets/images/shape/title-shape.svg";
import titleShape from "../../../assets/images/shape/login_straight_underline.svg";
@@ -45,18 +45,19 @@ 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
setTimeout(() => {
toast.success("Login Successfully");
setTimeout(() => {
navigate("/", { replace: true });
setLoginLoading(false);
dispatch(updateUserInfo(loginResult.data.profile))
}, 2000);
} else {
// toast.error("Invalid Credential");
setLoginError(true)
}
}
+1 -3
View File
@@ -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 -3
View File
@@ -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 (
+2 -2
View File
@@ -26,7 +26,7 @@ export default function Accordion({ datas }) {
</span>
</div>
<div className="accordion-title w-full">
<p className="text-18 tracking-wide text-dark-gray dark:text-white">
<p className="text-18 tracking-wide text-dark-gray dark:text-white cursor-default">
{datas.title}
</p>
</div>
@@ -35,7 +35,7 @@ export default function Accordion({ datas }) {
<div className="accordion-body-content flex space-x-4 sm:pl-10 pl-5 pt-5">
<div className="w-[3px] h-auto bg-purple rounded-[28px]"></div>
<div className="flex-1">
<p className="text-base text-thin-light-gray tracking-wide">
<p className="text-base text-thin-light-gray tracking-wide cursor-default">
{datas.content}
</p>
</div>
+1 -3
View File
@@ -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 (
+8 -4
View File
@@ -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 });
};
+78 -55
View File
@@ -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">
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -95,7 +95,7 @@ export default function Settings() {
<div className="content-container w-full pt-10 rounded-2xl bg-white dark:bg-dark-white ">
<div className="content-heading w-full mb-8 lg:px-10 px-4">
<h1 className="text-xl font-bold text-dark-gray dark:text-white antialiased">
Parsonal Informaiton
Personal Information
</h1>
</div>
<div className="content-body w-full lg:flex lg:px-10 px-4">
@@ -144,7 +144,7 @@ export default function Settings() {
</div>
<div>
<p className="text-18 tracking-wide">
Notifiction Setting
Notification Settings
</p>
</div>
</li>
+12 -17
View File
@@ -2,38 +2,33 @@
"datas": [
{
"id": 0,
"title": "Can I resell an NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game. What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game"
"title": "What is myFit App?",
"content": "myFit is your personal health care concierge. this app helps you to manage the intricacies of your daily and long term health activities. With myFit, your health record is yours at all point, you decide your provider access as needed from time to time."
},
{
"id": 1,
"title": "What can you do with an NFT after buying it?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
"title": "How can I manage my health plan with myFit?",
"content": "myFit learns and help You to keep track of all aspects of your health - physical, mental and emotional. It bestow your unique lifestyle, needs and comprehensive well-being."
},
{
"id": 2,
"title": "Can you lose money on NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
"title": "What can I track with myFit?",
"content": "myFit automatically keeps track of physical activities, medical status & visits , schedules ,view and cancel appointments. myFit keeps your health in one place and connects you to support a healthier lifestyle."
},
{
"id": 3,
"title": "How does NFT prove ownership?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
"title": "How can I track with myFit?",
"content": "Open myFit app , add information about your health, goals and save.Under each category of your choosing, select Activity, set a goal , see your progress."
},
{
"id": 4,
"title": "How can you tell if someone owns an NFT?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
"title": "How secure is myFit App?",
"content": "myFit technology works synchronously with information you choose to share and will be encrypted and stored on a dedicated server so that MyFit can provide you with personalized, healthy decisions. MyFit is built to keep your data secure and protect your privacy. Your data is encrypted and you are always in control of your information."
},
{
"id": 5,
"title": "Can you lose more than you invest in NFTs?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
},
{
"id": 6,
"title": "What can you do with an NFT after buying it?",
"content": "What you do own when you buy an NFT are the keys to a non-fungible perhaps unique token. That token is yours to trade or hold or display in Decentraland. But the digital file associated with an NFT is just as easy to copy and paste and download as any other the Finally, players lose their NFTs sometimes according to the rules and regulations of the NFT game."
"title": "What kind of device do I need?",
"content": "All you need is iPhone or Android device to enjoy all personalized metrics for personal use. Instant free download from apple and play store."
}
]
}
+19 -1
View File
@@ -1,9 +1,27 @@
import { Navigate, Outlet } from "react-router-dom";
import React, {useEffect} from "react";
import { Navigate, Outlet, useNavigate } from "react-router-dom";
// import { toast } from "react-toastify";
const AuthRoute = ({ redirectPath = "/login", children }) => {
const isLogin = localStorage.getItem("email");
const profile = localStorage.getItem("profile")
const navigate = useNavigate();
//FUNCTION TO EXPIRE SESSION AFETR 5 MINUTES
const expireSession = () => {
localStorage.removeItem("email");
localStorage.removeItem('session_token');
localStorage.removeItem('profile');
// navigate("/login", { replace: true });
};
useEffect(()=>{
setTimeout(()=>{
expireSession()
}, 300000) //expires user login session after 5 minutes
},[])
if (!isLogin || !profile || (typeof JSON.parse(profile) == 'object' && JSON.parse(profile).firstname == undefined)) {
return <Navigate to={redirectPath} replace />;
}
+1 -2
View File
@@ -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: {
+1 -1
View File
@@ -1,7 +1,7 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
userInfo: JSON.parse(localStorage.getItem("profile"))
userInfo: localStorage.getItem('profile') && JSON.parse(localStorage.getItem("profile"))
};
export const userSlice = createSlice({
+1 -19
View File
@@ -1,29 +1,11 @@
import React, {useEffect} from "react";
import Home from "../components/Home";
import { useNavigate } from "react-router-dom";
import { useDispatch, useSelector } from "react-redux";
import { toast } from "react-toastify";
// import { toast } from "react-toastify";
export default function HomePages() {
const { drawer } = useSelector((state) => state.drawer);
const dispatch = useDispatch();
const navigate = useNavigate();
const logOut = () => {
localStorage.removeItem("email");
localStorage.removeItem('session_token');
toast.success("Come Back Soon", {
icon: `🙂`,
});
navigate("/login", { replace: true });
};
useEffect(()=>{
setTimeout(()=>{
logOut()
}, 300000) //expires user login session after 5 minutes
},[])
return (
<>
<Home />
+3
View File
@@ -19,6 +19,9 @@ module.exports = {
"dark-light-purple":"#5356fb29"
},
},
listStyleType: {
roman: 'upper-roman'
},
},
plugins: [require("@tailwindcss/line-clamp")],
};