Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 08665d51a7 | |||
| dff0bd72ed | |||
| 823ff83f88 | |||
| 82f0efe6e5 | |||
| 3eaf99f212 | |||
| 5d93817555 | |||
| 4505a6fbcd | |||
| 4367364d4f | |||
| b2b0bf8af6 | |||
| fcde22d4cb | |||
| 56125b427d | |||
| 16066d030b |
@@ -5,6 +5,12 @@ REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
|||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.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
|
# Inactivity timeout/logout AT 10MINS
|
||||||
REACT_APP_TIMEOUT=600000
|
REACT_APP_TIMEOUT=600000
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,11 @@ REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
|||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.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
|
# Inactivity timeout/logout AT 10MINS
|
||||||
REACT_APP_TIMEOUT=600000
|
REACT_APP_TIMEOUT=600000
|
||||||
|
|||||||
@@ -4,5 +4,11 @@ REACT_APP_SOCKET_URL="https://socket.mermsemr.com"
|
|||||||
REACT_APP_MAIN_API="https://api.mermsemr.com"
|
REACT_APP_MAIN_API="https://api.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://media.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
|
# Inactivity timeout/logout AT 10MINS
|
||||||
REACT_APP_TIMEOUT=600000
|
REACT_APP_TIMEOUT=600000
|
||||||
+27
@@ -9,3 +9,30 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.register{
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-links{
|
||||||
|
margin-top: 50px;
|
||||||
|
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;
|
||||||
|
}
|
||||||
+1
-1
@@ -11,7 +11,7 @@ function App() {
|
|||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
retry: 3,
|
retry: 3,
|
||||||
// refetchOnMount: false,
|
// refetchOnMount: false,
|
||||||
staleTime: 3000
|
staleTime: Infinity // can also be a number in millisecond
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function Login() {
|
|||||||
<div className="row no-gutters justify-content-center">
|
<div className="row no-gutters justify-content-center">
|
||||||
<div className="col-11 col-sm-6 col-lg-5 col-xxl-3 align-self-center order-2 order-sm-1">
|
<div className="col-11 col-sm-6 col-lg-5 col-xxl-3 align-self-center order-2 order-sm-1">
|
||||||
<div className="mt-5 d-flex">
|
<div className="mt-5 d-flex">
|
||||||
<div className="bg-white register p-5">
|
<div className="bg-white register px-5 pt-5 pb-3">
|
||||||
<h1 className="mb-2">MERMS Panel</h1>
|
<h1 className="mb-2">MERMS Panel</h1>
|
||||||
<p>Welcome back, please login to your account.</p>
|
<p>Welcome back, please login to your account.</p>
|
||||||
<form className="mt-3 mt-sm-5">
|
<form className="mt-3 mt-sm-5">
|
||||||
@@ -132,6 +132,13 @@ export default function Login() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="login-links">
|
||||||
|
<a href={process.env.REACT_APP_HOME_LINK}>Home</a>
|
||||||
|
<a href={process.env.REACT_APP_ABOUT_LINK}>About</a>
|
||||||
|
<a href={process.env.REACT_APP_CONTACTS_LINK}>Contact</a>
|
||||||
|
<a href={process.env.REACT_APP_TERMS_LINK}>Terms</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useCallback, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
|
|
||||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
@@ -25,14 +25,7 @@ export default function Calendar(){
|
|||||||
const category = receievedEvents?.category //EVENT CATEGORIES FROM API
|
const category = receievedEvents?.category //EVENT CATEGORIES FROM API
|
||||||
const eventList = receievedEvents?.list //EVENT LIST FROM API
|
const eventList = receievedEvents?.list //EVENT LIST FROM API
|
||||||
|
|
||||||
const events = [
|
const [activeCategory, setActiveCategory] = useState('1')
|
||||||
{id: '1111', title: 'Family Vacation', color: 'fc-event-primary', start: new Date('2025-01-18')},
|
|
||||||
{id: '2222', title: 'Meeting In Office', color: 'fc-event-warning', start: new Date('2025-01-19')},
|
|
||||||
{id: '3333', title: 'Client Call', color: 'fc-event-danger', start: new Date('2025-01-22')},
|
|
||||||
{id: '4444', title: 'Interview', color: 'fc-event-success', start: new Date('2025-01-1')}
|
|
||||||
]
|
|
||||||
|
|
||||||
const [dummyEvents, setDummyEvents] = useState(events)
|
|
||||||
|
|
||||||
const [removeAfterDrop, setRemoveAfterDrop] = useState(false)
|
const [removeAfterDrop, setRemoveAfterDrop] = useState(false)
|
||||||
|
|
||||||
@@ -47,11 +40,14 @@ export default function Calendar(){
|
|||||||
const handleAddNewEvent = () => {
|
const handleAddNewEvent = () => {
|
||||||
if(newEvent.title && newEvent.color){
|
if(newEvent.title && newEvent.color){
|
||||||
const eventToAdd = {...newEvent}
|
const eventToAdd = {...newEvent}
|
||||||
setDummyEvents(prev => ([...prev, eventToAdd]))
|
// setDefaultCategory(prev => ([...prev, eventToAdd]))
|
||||||
setNewEvent({title: '', color: ''})
|
setNewEvent({title: '', color: ''})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleActiveCategory = (id) => {
|
||||||
|
setActiveCategory(id)
|
||||||
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
@@ -79,24 +75,55 @@ export default function Calendar(){
|
|||||||
:
|
:
|
||||||
<>
|
<>
|
||||||
<div className="col-xl-3">
|
<div className="col-xl-3">
|
||||||
<div id="external-events">
|
|
||||||
{/* <button className="btn btn-primary btn-block" data-bs-toggle="modal" data-bs-target="#eventModal">
|
{/* <button className="btn btn-primary btn-block" data-bs-toggle="modal" data-bs-target="#eventModal">
|
||||||
Add New Event
|
Add New Event
|
||||||
</button>
|
</button>
|
||||||
<p className="mt-3">
|
<p className="mt-3">
|
||||||
Drag and drop your event or click in the calendar.
|
Drag and drop your event or click in the calendar.
|
||||||
</p> */}
|
</p> */}
|
||||||
{/* {dummyEvents.map((item, index) => (
|
|
||||||
<div key={index} className={`fc-event ${item.color}`} data-color={`${item.color}`}
|
{category.map((item, index) => {
|
||||||
draggable="true"
|
let color = item?.cid == '1' ? 'fc-event-success' : item?.cid == '2' ? 'fc-event-danger' : item?.cid == '3' ? 'fc-event-warning' : 'fc-event-primary'
|
||||||
onDragStart={() =>
|
let circleColor = item?.cid == '1' ? 'text-success' : item?.cid == '2' ? 'text-danger' : item?.cid == '3' ? 'text-warning' : 'text-primary'
|
||||||
handleDragStart({...item})
|
return (
|
||||||
}
|
// <div key={index} className={`fc-event ${color}`} data-color={`${color}`}
|
||||||
>
|
// // draggable={false}
|
||||||
<span></span> {item.title}
|
// // onDragStart={() =>
|
||||||
|
// // handleDragStart({...item})
|
||||||
|
// // }
|
||||||
|
// >
|
||||||
|
// <span>{item.description}</span>
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
// <div key={index} className={`form-check ${color}`}>
|
||||||
|
// <input className="form-check-input" type="radio" value={item.cid}
|
||||||
|
// id={item.cid} name='category' checked={item.cid == activeCategory} onChange={() => handleActiveCategory(item.cid)} />
|
||||||
|
// <label className={`w-100 form-check-label`} htmlFor={item.cid}>
|
||||||
|
// {item.description}
|
||||||
|
// </label>
|
||||||
|
// </div>
|
||||||
|
|
||||||
|
<div key={index} className={`form-check ${color}`} onClick={() => handleActiveCategory(item.cid)} style={{cursor: 'pointer'}}>
|
||||||
|
<div>
|
||||||
|
<span className="nav align-items-center">
|
||||||
|
<span>
|
||||||
|
<i className={`fa fa-circle-o pr-4 ${item.cid == activeCategory ? circleColor : 'text-light'}`}></i>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<span>{item?.description}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
))} */}
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* <div id="external-events">
|
||||||
<ExternalDraggable category={category} />
|
<ExternalDraggable category={category} />
|
||||||
|
</div> */}
|
||||||
|
|
||||||
{/* <div className="form-check">
|
{/* <div className="form-check">
|
||||||
<input className="form-check-input" type="checkbox" value={removeAfterDrop}
|
<input className="form-check-input" type="checkbox" value={removeAfterDrop}
|
||||||
id="defaultCheck1" onChange={() => setRemoveAfterDrop(prev => !prev)} />
|
id="defaultCheck1" onChange={() => setRemoveAfterDrop(prev => !prev)} />
|
||||||
@@ -105,12 +132,12 @@ export default function Calendar(){
|
|||||||
</label>
|
</label>
|
||||||
</div> */}
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div className="col-xl-9">
|
<div className="col-xl-9">
|
||||||
<div className="event-calendar">
|
<div className="event-calendar">
|
||||||
<EventCalendar
|
<EventCalendar
|
||||||
removeAfterDrop={removeAfterDrop}
|
removeAfterDrop={removeAfterDrop}
|
||||||
eventList={eventList}
|
eventList={eventList}
|
||||||
|
activeCategory={activeCategory}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import timeGridPlugin from '@fullcalendar/timegrid';
|
|||||||
import interactionPlugin from '@fullcalendar/interaction';
|
import interactionPlugin from '@fullcalendar/interaction';
|
||||||
import { INITIAL_EVENTS, createEventId } from './event-utils';
|
import { INITIAL_EVENTS, createEventId } from './event-utils';
|
||||||
|
|
||||||
export default function EventCalendar({removeAfterDrop, eventList}) {
|
export default function EventCalendar({removeAfterDrop, eventList, activeCategory}) {
|
||||||
const [weekendsVisible, setWeekendsVisible] = useState(true);
|
const [weekendsVisible, setWeekendsVisible] = useState(true);
|
||||||
const [currentEvents, setCurrentEvents] = useState([]);
|
const [currentEvents, setCurrentEvents] = useState([]);
|
||||||
|
|
||||||
@@ -79,9 +79,11 @@ export default function EventCalendar({removeAfterDrop, eventList}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
let newEventList = eventList.map(item => ({...item, start: new Date(item?.start)}))
|
// let newEventList = eventList?.map(item => ({...item, start: new Date(item?.start)}))
|
||||||
|
let newEventList = eventList?.filter(item => (Number(item.category) == Number(activeCategory)))?.map(item => ({...item, start: new Date(item?.start)}))
|
||||||
|
console.log('newEventList', newEventList)
|
||||||
setCurrentEvents(newEventList)
|
setCurrentEvents(newEventList)
|
||||||
},[eventList])
|
},[activeCategory])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="demo-app">
|
<div className="demo-app">
|
||||||
|
|||||||
+110
-188
@@ -1,12 +1,65 @@
|
|||||||
import React from "react";
|
"use client"
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
import getImage from "../../utils/getImage";
|
import getImage from "../../utils/getImage";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { contactData } from "../../services/services";
|
||||||
|
import queryKeys from "../../services/queryKeys";
|
||||||
|
import getCustomTime from "../../utils/getCustomTime";
|
||||||
|
|
||||||
export default function Contacts(){
|
export default function Contacts(){
|
||||||
|
|
||||||
|
const {data:contacts, isFetching, isError, error} = useQuery({
|
||||||
|
queryKey: queryKeys.contacts,
|
||||||
|
queryFn: () => contactData()
|
||||||
|
})
|
||||||
|
|
||||||
|
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(
|
return(
|
||||||
<>
|
<>
|
||||||
<BreadcrumbComBS title='Contacts' paths={['Dashboard', 'Contacts']} />
|
<BreadcrumbComBS title='Contacts' paths={['Dashboard', 'Contacts']} />
|
||||||
|
{isFetching ?
|
||||||
|
<>
|
||||||
|
<div className="row">
|
||||||
|
<div className="col-12">
|
||||||
|
<p className='text-mute'>Loading...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
: isError ?
|
||||||
|
<div className="row">
|
||||||
|
<div className="col-12">
|
||||||
|
<p className='text-danger'>{error.message}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{/*<div className="vh-100 col-12 flex align-items-center">Coming Soon</div>*/}
|
{/*<div className="vh-100 col-12 flex align-items-center">Coming Soon</div>*/}
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
@@ -16,16 +69,16 @@ export default function Contacts(){
|
|||||||
<div className="col-md-4 col-xxl-2 col-md-4">
|
<div className="col-md-4 col-xxl-2 col-md-4">
|
||||||
<div className="mail-sidebar">
|
<div className="mail-sidebar">
|
||||||
<div className="row justify-content-center">
|
<div className="row justify-content-center">
|
||||||
<div className="col-12">
|
<div className="d-none col-12">
|
||||||
<div className="text-center mail-sidebar-title px-4">
|
<div className="text-center mail-sidebar-title px-4">
|
||||||
<a href="javascript:void(0)" className="btn btn-primary btn-block py-3 font-weight-bold font-18"><i className="fa fa-plus pl-2"></i></a>
|
<a href="#" className="btn btn-primary btn-block py-3 font-weight-bold font-18"><i className="fa fa-plus pl-2"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="px-4 py-4">
|
<div className="px-4 py-4">
|
||||||
<ul className="pl-0">
|
<ul className="pl-0">
|
||||||
<li className="py-2">
|
<li className="py-2">
|
||||||
<a href="javascript:void(0)">
|
<a href="#">
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className="fa fa-envelope-o text-primary pr-4"></i>
|
<i className="fa fa-envelope-o text-primary pr-4"></i>
|
||||||
@@ -34,13 +87,13 @@ export default function Contacts(){
|
|||||||
<span>Inbox</span>
|
<span>Inbox</span>
|
||||||
</span>
|
</span>
|
||||||
<span className="nav-item ml-auto text-right">
|
<span className="nav-item ml-auto text-right">
|
||||||
<span className="badge badge-pill badge-primary float-right">0+</span>
|
<span className="badge badge-pill badge-primary float-right">{contactsData?.length}</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="py-2">
|
<li className="py-2">
|
||||||
<a href="javascript:void(0)">
|
<a href="#">
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className="fa fa-paper-plane-o pr-4"></i>
|
<i className="fa fa-paper-plane-o pr-4"></i>
|
||||||
@@ -53,21 +106,36 @@ export default function Contacts(){
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul className="pl-0 mt-5">
|
<ul className="pl-0 mt-5">
|
||||||
<li className="py-2">
|
<li className="py-2" onClick={()=>changeActiveCategoryUID('0')} style={{cursor: 'pointer'}}>
|
||||||
<a href="javascript:void(0)">
|
<div>
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className="fa fa-circle-o text-danger pr-4"></i>
|
<i className={`fa fa-circle-o pr-4 ${activeCategoryUID == '0' ? 'text-primary' : 'text-warning'}`}></i>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<span>Personal</span>
|
<span>All</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li className="py-2">
|
{contactsCategory && contactsCategory.map(item => (
|
||||||
<a href="javascript:void(0)">
|
<li key={item?.product_id} className="py-2" onClick={()=>changeActiveCategoryUID(item?.product_id)} style={{cursor: 'pointer'}}>
|
||||||
|
<div>
|
||||||
|
<span className="nav align-items-center">
|
||||||
|
<span>
|
||||||
|
<i className={`fa fa-circle-o pr-4 ${activeCategoryUID == item?.product_id ? 'text-primary' : 'text-warning'}`}></i>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<span>{item?.title}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
{/* <li className="py-2">
|
||||||
|
<a href="#">
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className="fa fa-circle-o pr-4 text-warning"></i>
|
<i className="fa fa-circle-o pr-4 text-warning"></i>
|
||||||
@@ -79,7 +147,7 @@ export default function Contacts(){
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className="py-2">
|
<li className="py-2">
|
||||||
<a href="javascript:void(0)">
|
<a href="#">
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className="fa fa-plus pr-4"></i>
|
<i className="fa fa-plus pr-4"></i>
|
||||||
@@ -89,7 +157,7 @@ export default function Contacts(){
|
|||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li> */}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,8 +177,11 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mail-msg scrollbar scroll_dark">
|
<div className="mail-msg scrollbar scroll_dark">
|
||||||
<div className="mail-msg-item">
|
{contactsData && (filteredContactData || contactsData).map((contact, index)=> {
|
||||||
<a href="javascript:void(0)">
|
const isActive = (contact.uid == activeContactUID) || (!activeContactUID && index == 0)
|
||||||
|
return (
|
||||||
|
<div key={contact.uid} onClick={()=>changeActiveUID(contact.uid)} className={`mail-msg-item ${isActive && 'bg-light'}`}>
|
||||||
|
<a href="#">
|
||||||
<div className="media align-items-center">
|
<div className="media align-items-center">
|
||||||
<div className="mr-3">
|
<div className="mr-3">
|
||||||
<div className="bg-img">
|
<div className="bg-img">
|
||||||
@@ -119,193 +190,42 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
<div className="w-100">
|
<div className="w-100">
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
<div className="mail-msg-item-titel justify-content-between">
|
||||||
<p>Martin smith</p>
|
<p>{contact.sender}</p>
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
{/* <p className="d-none d-xl-block">06:59 <span> PM </span></p> */}
|
||||||
|
<p className="d-none d-xl-block"><span>{new Date(contact.added).toDateString()}</span></p>
|
||||||
</div>
|
</div>
|
||||||
<h5 className="mb-0 my-2">Saas Designer</h5>
|
<h5 className="mb-0 my-2">{contact.title}</h5>
|
||||||
<p>Since there is not an "all the above" category, I'll take the opportunity to enthusiastically congratulate you on the very high quality.</p>
|
<p>{contact.message.length < 100 ? contact.message : contact.message.substring(0,101) + ' ...' }</p>
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
<p className="d-xl-none">
|
||||||
</div>
|
<span>
|
||||||
</div>
|
{new Date(contact.added).toDateString()}
|
||||||
</a>
|
{/* {getCustomTime(contact.added)} */}
|
||||||
</div>
|
</span>
|
||||||
<div className="mail-msg-item">
|
</p>
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/02.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>DutcaPatrick</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Mobile app Designer </h5>
|
|
||||||
<p>Very nice template, lots of pages and good documentation.</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/03.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>m_morsch</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Landing page Designer</h5>
|
|
||||||
<p>Excellent and at a great price... thank you very much!</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/04.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>AnnaHorno</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Re-Design ios app</h5>
|
|
||||||
<p>Solved my theme problem in 10 minutes. We thank you.</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/05.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>Wdcorbitt</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Mobil UX/UI Designer</h5>
|
|
||||||
<p>Asked for information and received it EXTREMELY quickly. Great layout - good code - great price! </p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/06.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>Anne Smith</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Jobly Opportunity</h5>
|
|
||||||
<p>Mentor has so many features and layouts. Its a great choice.</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src={getImage("avtar/07.jpg")} className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>Paul Flavius</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Saas Designer</h5>
|
|
||||||
<p>There are many people in the world with amazing talents who realize only a small percentage of their potential. </p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src="assets/img/avtar/08.jpg" className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>Sara Lisbon</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">UI Designer</h5>
|
|
||||||
<p>We can look a bit further back in time to Albert Einstein or even further back to Abraham Lincoln.</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div className="mail-msg-item">
|
|
||||||
<a href="javascript:void(0)">
|
|
||||||
<div className="media align-items-center">
|
|
||||||
<div className="mr-3">
|
|
||||||
<div className="bg-img">
|
|
||||||
<img src="assets/img/avtar/09.jpg" className="img-fluid" alt="user" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="w-100">
|
|
||||||
<div className="mail-msg-item-titel justify-content-between">
|
|
||||||
<p>Annahorno</p>
|
|
||||||
<p className="d-none d-xl-block">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
|
||||||
<h5 className="mb-0 my-2">Saas Designer</h5>
|
|
||||||
<p>One of the most difficult aspects of achieving success is staying motivated over the long haul.</p>
|
|
||||||
<p className="d-xl-none">06:59 <span> PM </span></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-xxl-6 border-t border-xxl-t">
|
<div className="col-xxl-6 border-t border-xxl-t">
|
||||||
|
|
||||||
<div className="mail-chat py-5 px-5">
|
<div className="mail-chat py-5 px-5">
|
||||||
<div className="media align-items-center">
|
<div className="media align-items-center">
|
||||||
<div className="bg-img mr-3">
|
<div className="bg-img mr-3">
|
||||||
<img src={getImage("avtar/03.jpg")} className="img-fluid" alt="user" />
|
<img src={getImage("avtar/03.jpg")} className="img-fluid" alt="user" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h4 className="mb-0">Dutca Patrick</h4>
|
<h4 className="mb-0">{activeContactUID ? activeDetail[0].sender : contactsData[0].sender}</h4>
|
||||||
<p>30 Min ago</p>
|
<p>{activeContactUID ? new Date(activeDetail[0].added).toDateString() : new Date(contactsData[0].added).toDateString()}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 d-flex justify-content-between">
|
<div className="mt-4 d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
<h3>Landing page Designer...</h3>
|
<h3>{activeContactUID ? activeDetail[0].title : contactsData[0].title}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="d-flex">
|
<div className="d-flex">
|
||||||
{/*<a href="javascript:void(0)"><i className="fa fa-reply font-22 pr-3"></i></a>*/}
|
{/*<a href="javascript:void(0)"><i className="fa fa-reply font-22 pr-3"></i></a>*/}
|
||||||
@@ -313,10 +233,11 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="my-4">hey adminjon...</p>
|
<p>{activeContactUID ? activeDetail[0].message : contactsData[0].message}</p>
|
||||||
|
{/* <p className="my-4">hey adminjon...</p>
|
||||||
<p className="mb-2">I truly believe Augustine’s words are true and if you look at history you know it is true. There are many people in the world with amazing talents who realize only a small percentage of their potential. We all know people who live this truth.</p>
|
<p className="mb-2">I truly believe Augustine’s words are true and if you look at history you know it is true. There are many people in the world with amazing talents who realize only a small percentage of their potential. We all know people who live this truth.</p>
|
||||||
<p>We also know those epic stories, those modern-day legends surrounding the early failures of such supremely successful folks as Michael Jordan and Bill Gates. We can look a bit further back in time to Albert Einstein or even further back to Abraham Lincoln. What made each of these people so successful? Motivation.</p>
|
<p>We also know those epic stories, those modern-day legends surrounding the early failures of such supremely successful folks as Michael Jordan and Bill Gates. We can look a bit further back in time to Albert Einstein or even further back to Abraham Lincoln. What made each of these people so successful? Motivation.</p>
|
||||||
<p>We know this in our gut, but what can we do about it? How can we motivate ourselves? One of the most difficult aspects of achieving success is staying motivated over the long haul.</p>
|
<p>We know this in our gut, but what can we do about it? How can we motivate ourselves? One of the most difficult aspects of achieving success is staying motivated over the long haul.</p> */}
|
||||||
{/*<div className="my-5">*/}
|
{/*<div className="my-5">*/}
|
||||||
{/* <p>Have lovely Day,</p>*/}
|
{/* <p>Have lovely Day,</p>*/}
|
||||||
{/* <p>adminjon</p>*/}
|
{/* <p>adminjon</p>*/}
|
||||||
@@ -327,7 +248,7 @@ export default function Contacts(){
|
|||||||
<div className="bg-light mail-f px-4 py-3">
|
<div className="bg-light mail-f px-4 py-3">
|
||||||
<div className="py-2 bg-white px-4 py-3 d-flex justify-content-between">
|
<div className="py-2 bg-white px-4 py-3 d-flex justify-content-between">
|
||||||
<p>Click here to <a href="#editer" data-toggle="collapse" className="text-primary px-1">Reply</a>or<a href="#forward" data-toggle="collapse" className="text-primary px-1">Forward</a></p>
|
<p>Click here to <a href="#editer" data-toggle="collapse" className="text-primary px-1">Reply</a>or<a href="#forward" data-toggle="collapse" className="text-primary px-1">Forward</a></p>
|
||||||
<a href="javascript:void(0)" className="text-primary"><i className="fa fa-microphone"></i></a>
|
<a href="#" className="text-primary"><i className="fa fa-microphone"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div className="collapse" id="editer">
|
<div className="collapse" id="editer">
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
@@ -358,6 +279,7 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -31,13 +31,14 @@
|
|||||||
.fc-event {
|
.fc-event {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: move;
|
// cursor: move;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
padding: 10px 10px 10px 40px;
|
padding: 10px 10px 10px 40px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
position:relative;
|
position:relative;
|
||||||
&:before {
|
&:before {
|
||||||
|
display: none;
|
||||||
content:'';
|
content:'';
|
||||||
position:absolute;
|
position:absolute;
|
||||||
width:15px;
|
width:15px;
|
||||||
@@ -49,6 +50,9 @@
|
|||||||
&-primary {
|
&-primary {
|
||||||
@include hex-rgba($primary, 0.2);
|
@include hex-rgba($primary, 0.2);
|
||||||
color:$primary;
|
color:$primary;
|
||||||
|
& label {
|
||||||
|
color:$primary;
|
||||||
|
}
|
||||||
&:before {
|
&:before {
|
||||||
@include hex-rgba($primary, 0.8);
|
@include hex-rgba($primary, 0.8);
|
||||||
}
|
}
|
||||||
@@ -59,6 +63,9 @@
|
|||||||
&-warning {
|
&-warning {
|
||||||
@include hex-rgba($warning, 0.2);
|
@include hex-rgba($warning, 0.2);
|
||||||
color:$warning;
|
color:$warning;
|
||||||
|
& label {
|
||||||
|
color:$warning;
|
||||||
|
}
|
||||||
&:before {
|
&:before {
|
||||||
@include hex-rgba($warning, 0.8);
|
@include hex-rgba($warning, 0.8);
|
||||||
}
|
}
|
||||||
@@ -69,6 +76,9 @@
|
|||||||
&-danger {
|
&-danger {
|
||||||
@include hex-rgba($danger, 0.2);
|
@include hex-rgba($danger, 0.2);
|
||||||
color:$danger;
|
color:$danger;
|
||||||
|
& label {
|
||||||
|
color:$danger;
|
||||||
|
}
|
||||||
&:before {
|
&:before {
|
||||||
@include hex-rgba($danger, 0.8);
|
@include hex-rgba($danger, 0.8);
|
||||||
}
|
}
|
||||||
@@ -79,6 +89,9 @@
|
|||||||
&-success {
|
&-success {
|
||||||
@include hex-rgba($success, 0.2);
|
@include hex-rgba($success, 0.2);
|
||||||
color:$success;
|
color:$success;
|
||||||
|
& label {
|
||||||
|
color:$success;
|
||||||
|
}
|
||||||
&:before {
|
&:before {
|
||||||
@include hex-rgba($success, 0.8);
|
@include hex-rgba($success, 0.8);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.mail-msg{
|
.mail-msg{
|
||||||
max-height: 500px;
|
max-height: 747px;
|
||||||
min-height: 400px;
|
|
||||||
// max-height: 747px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
outline: none;
|
outline: none;
|
||||||
@include laptop {
|
@include laptop {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ const queryKeys = {
|
|||||||
product: ['product-data'],
|
product: ['product-data'],
|
||||||
product_url: ['product_url'],
|
product_url: ['product_url'],
|
||||||
myproduct_provision: ['myproduct_provision'],
|
myproduct_provision: ['myproduct_provision'],
|
||||||
calendar_events: ['calendar_events']
|
calendar_events: ['calendar_events'],
|
||||||
|
contacts: ['contacts']
|
||||||
}
|
}
|
||||||
|
|
||||||
export default queryKeys
|
export default queryKeys
|
||||||
@@ -122,6 +122,11 @@ export const productData = () => {
|
|||||||
return getAuxEnd(`/panel/account/products`)
|
return getAuxEnd(`/panel/account/products`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
||||||
|
export const contactData = () => {
|
||||||
|
return getAuxEnd(`/panel/contacts`)
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
||||||
export const productsURL = () => {
|
export const productsURL = () => {
|
||||||
return getAuxEnd(`/panel/account/products/url`)
|
return getAuxEnd(`/panel/account/products/url`)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
function getCustomTime(dateStr) {
|
||||||
|
let date = new Date(dateStr);
|
||||||
|
|
||||||
|
if(isNaN(date)){
|
||||||
|
return '00:00'
|
||||||
|
}
|
||||||
|
const hours = date.getHours()
|
||||||
|
const minutes = date.getMinutes()
|
||||||
|
|
||||||
|
return `${hours}:${minutes} ${hours >= 12 ? 'PM' : 'AM'}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getCustomTime
|
||||||
Reference in New Issue
Block a user