diff --git a/.env b/.env index 0e6fae4..0f30f4d 100644 --- a/.env +++ b/.env @@ -5,6 +5,12 @@ REACT_APP_MAIN_API="https://devapi.mermsemr.com" REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com" REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com" +# login footer links +REACT_APP_HOME_LINK='https://dev-www.mermsemr.com/' +REACT_APP_ABOUT_LINK='https://dev-www.mermsemr.com/about' +REACT_APP_CONTACTS_LINK='https://dev-www.mermsemr.com/contacts' +REACT_APP_TERMS_LINK='https://dev-www.mermsemr.com/terms' + # Inactivity timeout/logout AT 10MINS REACT_APP_TIMEOUT=600000 diff --git a/.env.development b/.env.development index 76f8ff5..8944f91 100644 --- a/.env.development +++ b/.env.development @@ -5,5 +5,11 @@ REACT_APP_MAIN_API="https://devapi.mermsemr.com" REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com" REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com" +# login footer links +REACT_APP_HOME_LINK='https://dev-www.mermsemr.com/' +REACT_APP_ABOUT_LINK='https://dev-www.mermsemr.com/about' +REACT_APP_CONTACTS_LINK='https://dev-www.mermsemr.com/contacts' +REACT_APP_TERMS_LINK='https://dev-www.mermsemr.com/terms' + # Inactivity timeout/logout AT 10MINS REACT_APP_TIMEOUT=600000 diff --git a/.env.production b/.env.production index 38699d4..2e40b69 100644 --- a/.env.production +++ b/.env.production @@ -4,5 +4,11 @@ REACT_APP_SOCKET_URL="https://socket.mermsemr.com" REACT_APP_MAIN_API="https://api.mermsemr.com" REACT_APP_MEDIA_SERVER="https://media.mermsemr.com" +# login footer links +REACT_APP_HOME_LINK='https://www.mermsemr.com/' +REACT_APP_ABOUT_LINK='https://www.mermsemr.com/about' +REACT_APP_CONTACTS_LINK='https://www.mermsemr.com/contacts' +REACT_APP_TERMS_LINK='https://www.mermsemr.com/terms' + # Inactivity timeout/logout AT 10MINS REACT_APP_TIMEOUT=600000 \ No newline at end of file diff --git a/src/App.css b/src/App.css index b389f38..fff2b0b 100644 --- a/src/App.css +++ b/src/App.css @@ -8,4 +8,27 @@ background-image: url('./assets/bg/signup_bg.jpg') !important; background-size: cover; background-repeat: no-repeat; +} + +.login-links{ + margin-top: 20px; + display: flex; + flex-direction: row; + justify-content: center; +} + +.login-links a { + font-size: 15px; + font-weight: 700; + padding: 0px 20px; + border-right: 2px solid; + cursor: pointer; +} + +.login-links a:nth-of-type(1){ + padding-left: 0px; +} + +.login-links a:last-child{ + border: 0px; } \ No newline at end of file diff --git a/src/App.js b/src/App.js index 5f0b727..85a27bb 100644 --- a/src/App.js +++ b/src/App.js @@ -11,7 +11,7 @@ function App() { refetchOnWindowFocus: false, retry: 3, // refetchOnMount: false, - staleTime: 3000 + staleTime: Infinity // can also be a number in millisecond }, }, }) diff --git a/src/component/auth/Login2.jsx b/src/component/auth/Login2.jsx index 597a2c9..398602a 100644 --- a/src/component/auth/Login2.jsx +++ b/src/component/auth/Login2.jsx @@ -132,6 +132,13 @@ export default function Login() { + +
+ Home + About + Contact + Terms +
diff --git a/src/component/calendar/Calendar.jsx b/src/component/calendar/Calendar.jsx index 6b0de96..cf427c6 100644 --- a/src/component/calendar/Calendar.jsx +++ b/src/component/calendar/Calendar.jsx @@ -85,6 +85,7 @@ export default function Calendar(){ {category.map((item, index) => { let color = item?.cid == '1' ? 'fc-event-success' : item?.cid == '2' ? 'fc-event-danger' : item?.cid == '3' ? 'fc-event-warning' : 'fc-event-primary' + let circleColor = item?.cid == '1' ? 'text-success' : item?.cid == '2' ? 'text-danger' : item?.cid == '3' ? 'text-warning' : 'text-primary' return ( //
// {item.description} //
-
- handleActiveCategory(item.cid)} /> - + + //
+ // handleActiveCategory(item.cid)} /> + // + //
+ +
handleActiveCategory(item.cid)} style={{cursor: 'pointer'}}> +
+ + + + + + {item?.description} + + +
) } diff --git a/src/component/contacts/Contacts.js b/src/component/contacts/Contacts.js index e64ef80..1b9ba10 100644 --- a/src/component/contacts/Contacts.js +++ b/src/component/contacts/Contacts.js @@ -14,18 +14,34 @@ export default function Contacts(){ queryFn: () => contactData() }) - const contactsData = contacts?.data?.calendar_data?.contacts + const contactsData = contacts?.data?.calendar_data?.contacts // LIST OF CONTACTS + const contactsCategory = contacts?.data?.calendar_data?.category // LIST OF CATEGORY + + const [activeCategoryUID, setActiveCategoryUID] = useState('0') // HOLDS VALUE OF THE ACTIVE CATEGORY const [activeContactUID, setActiveContactUID] = useState(null) - const [activeDetail, setActiveDetail] = useState(null) + const [filteredContactData, setFiltererdContactData] = useState(null) + const changeActiveUID = (uid) => { setActiveContactUID(uid) let detail = contactsData.filter(item => item.uid == uid) setActiveDetail(detail) } + const changeActiveCategoryUID = (id) => { + let filteredConData = [] + setActiveCategoryUID(id) + if(id == '0'){ + filteredConData = contactsData + }else{ + filteredConData = contactsData.filter(item => item.category == id) + } + setFiltererdContactData(filteredConData) + changeActiveUID(filteredConData[0]?.uid) + } + return( <> @@ -53,16 +69,16 @@ export default function Contacts(){
-
- {contactsData && contactsData.map((contact, index)=> { + {contactsData && (filteredContactData || contactsData).map((contact, index)=> { const isActive = (contact.uid == activeContactUID) || (!activeContactUID && index == 0) return (
changeActiveUID(contact.uid)} className={`mail-msg-item ${isActive && 'bg-light'}`}> @@ -161,11 +192,16 @@ export default function Contacts(){

{contact.sender}

{/*

06:59 PM

*/} -

{getCustomTime(contact.added)}

+

{new Date(contact.added).toDateString()}

{contact.title}
-

{contact.message.length < 150 ? contact.message : contact.message.substring(0,151) + '...' }

-

{getCustomTime(contact.added)}

+

{contact.message.length < 100 ? contact.message : contact.message.substring(0,101) + ' ...' }

+

+ + {new Date(contact.added).toDateString()} + {/* {getCustomTime(contact.added)} */} + +

@@ -184,7 +220,7 @@ export default function Contacts(){

{activeContactUID ? activeDetail[0].sender : contactsData[0].sender}

-

{activeContactUID ? getCustomTime(activeDetail[0].added) : getCustomTime(contactsData[0].added)}

+

{activeContactUID ? new Date(activeDetail[0].added).toDateString() : new Date(contactsData[0].added).toDateString()}

@@ -212,7 +248,7 @@ export default function Contacts(){

Click here to ReplyorForward

- +