Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e6ba42afcd |
@@ -12,3 +12,6 @@ REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfitu
|
||||
# REACT_APP_PASSWORD_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser/resetpass"
|
||||
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES = 5
|
||||
|
||||
REACT_APP_TRACKING = "Tracking"
|
||||
REACT_APP_RESOURCES = "Resources"
|
||||
@@ -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>
|
||||
|
||||
@@ -168,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>
|
||||
@@ -208,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>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import dataImage1 from "../../assets/images/data-table-user-1.png";
|
||||
import usersService from "../../services/UsersService";
|
||||
import SelectBox from "../Helpers/SelectBox";
|
||||
|
||||
|
||||
export default function ReminderTable({ className }) {
|
||||
const [userReminders, setUserReminders] = useState([]);
|
||||
const filterCategories = ["All Categories", "Appointments","Exercise/Gym", "Medication"];
|
||||
|
||||
const api = new usersService();
|
||||
useEffect(() => {
|
||||
getUserReminders();
|
||||
@@ -16,13 +14,16 @@ export default function ReminderTable({ className }) {
|
||||
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 (
|
||||
<div
|
||||
@@ -43,21 +44,6 @@ export default function ReminderTable({ className }) {
|
||||
contentBodyClasses="w-auto min-w-max"
|
||||
/>
|
||||
</div>
|
||||
{userReminders.map((reminders, index) =>{
|
||||
if (userReminders.length < 1 ) {
|
||||
return(
|
||||
<div className="lg:flex justify-center">
|
||||
<div style={{ transform: 'translateY(150px)' }}>
|
||||
<Link
|
||||
to="/add-reminder"
|
||||
className="btn-gradient lg:flex hidden w-[300px] h-[50px] rounded-full text-white justify-center items-center"
|
||||
>
|
||||
0 Reminders Start Reminder
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)} else{
|
||||
return (
|
||||
<div className="relative w-full overflow-x-auto sm:rounded-lg">
|
||||
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
|
||||
<tbody>
|
||||
@@ -86,7 +72,7 @@ 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">
|
||||
{reminders.description.substring(0,30) + "..."}
|
||||
{reminders.description}
|
||||
</h1>
|
||||
<span className="text-sm text-thin-light-gray">
|
||||
|
||||
@@ -334,22 +320,6 @@ export default function ReminderTable({ className }) {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
}
|
||||
})}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user