Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a2843d97e2 | |||
| f503422c42 | |||
| bd470ea8bc | |||
| 6c14b2587c | |||
| 085756b8bc | |||
| 8ac742e5d6 | |||
| c2db47cbb8 |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -21,29 +21,37 @@ export default function Calendar(){
|
|||||||
// queryFn: () => getCalendarEvents()
|
// queryFn: () => getCalendarEvents()
|
||||||
// })
|
// })
|
||||||
|
|
||||||
const calendarEvents = useMutation({
|
// const calendarEvents = useMutation({
|
||||||
mutationFn: (reqData) => {
|
// mutationFn: (reqData) => {
|
||||||
return getCalendarEvents(reqData)
|
// return getCalendarEvents(reqData)
|
||||||
},
|
// },
|
||||||
onError: (error) => {
|
// onError: (error) => {
|
||||||
console.log(error)
|
// console.log(error)
|
||||||
},
|
// },
|
||||||
onSuccess: (res) => {
|
// onSuccess: (res) => {
|
||||||
if(res?.data?.resultCode != '0'){
|
// if(res?.data?.resultCode != '0'){
|
||||||
throw({message: 'Something went wrong'})
|
// throw({message: 'Something went wrong'})
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
useEffect(()=>{
|
// useEffect(()=>{
|
||||||
|
// let reqData = {
|
||||||
|
// token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
// uid: localStorage.getItem('uid') // USER UID
|
||||||
|
// }
|
||||||
|
// calendarEvents.mutate(reqData)
|
||||||
|
// },[])
|
||||||
let reqData = {
|
let reqData = {
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
}
|
}
|
||||||
calendarEvents.mutate(reqData)
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
},[])
|
queryKey: queryKeys.calendar_events,
|
||||||
|
queryFn: () => getCalendarEvents(reqData)
|
||||||
|
})
|
||||||
|
|
||||||
const receievedEvents = calendarEvents?.data?.data
|
const receievedEvents = data?.data
|
||||||
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
|
||||||
|
|
||||||
@@ -84,15 +92,15 @@ export default function Calendar(){
|
|||||||
</div>
|
</div>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{calendarEvents?.isPending ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-mute'>Loading...</p>
|
<p className='text-mute'>Loading...</p>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: calendarEvents?.error ?
|
: isError ?
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-danger'>{calendarEvents?.error?.message}</p>
|
<p className='text-danger'>{error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default function EventCalendar({removeAfterDrop, eventList, activeCategor
|
|||||||
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)}))
|
let newEventList = eventList?.filter(item => (Number(item.category) == Number(activeCategory)))?.map(item => ({...item, start: new Date(item?.start)}))
|
||||||
console.log('newEventList', newEventList)
|
// console.log('newEventList', newEventList)
|
||||||
setCurrentEvents(newEventList)
|
setCurrentEvents(newEventList)
|
||||||
},[activeCategory])
|
},[activeCategory])
|
||||||
|
|
||||||
|
|||||||
@@ -2,27 +2,40 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
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 { useMutation, useQuery } from "@tanstack/react-query";
|
||||||
import { contactData } from "../../services/services";
|
import { contactData } from "../../services/services";
|
||||||
import queryKeys from "../../services/queryKeys";
|
import queryKeys from "../../services/queryKeys";
|
||||||
import getCustomTime from "../../utils/getCustomTime";
|
import getCustomTime from "../../utils/getCustomTime";
|
||||||
|
|
||||||
export default function Contacts(){
|
export default function Contacts(){
|
||||||
|
|
||||||
const {data:contacts, isFetching, isError, error} = useQuery({
|
// const {data:contacts, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.contacts,
|
// queryKey: queryKeys.contacts,
|
||||||
queryFn: () => contactData()
|
// 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 [activeCategoryUID, setActiveCategoryUID] = useState('0') // HOLDS VALUE OF THE ACTIVE CATEGORY
|
||||||
|
|
||||||
const [activeContactUID, setActiveContactUID] = useState(null)
|
const [activeContactUID, setActiveContactUID] = useState('')
|
||||||
const [activeDetail, setActiveDetail] = useState(null)
|
const [activeDetail, setActiveDetail] = useState([])
|
||||||
|
|
||||||
const [filteredContactData, setFiltererdContactData] = useState(null)
|
const [filteredContactData, setFiltererdContactData] = useState([])
|
||||||
|
|
||||||
|
|
||||||
|
const getContactData = useMutation({
|
||||||
|
mutationFn: (reqData) => {
|
||||||
|
return contactData(reqData)
|
||||||
|
},
|
||||||
|
onError: (error) => {
|
||||||
|
console.log(error)
|
||||||
|
},
|
||||||
|
onSuccess: (res) => {
|
||||||
|
if(res?.data?.resultCode != '0'){
|
||||||
|
throw({message: 'Something went wrong'})
|
||||||
|
}
|
||||||
|
setFiltererdContactData(res?.data?.contacts)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const changeActiveUID = (uid) => {
|
const changeActiveUID = (uid) => {
|
||||||
setActiveContactUID(uid)
|
setActiveContactUID(uid)
|
||||||
@@ -42,10 +55,21 @@ export default function Contacts(){
|
|||||||
changeActiveUID(filteredConData[0]?.uid)
|
changeActiveUID(filteredConData[0]?.uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
let reqData = {
|
||||||
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
|
}
|
||||||
|
getContactData.mutate(reqData)
|
||||||
|
},[])
|
||||||
|
|
||||||
|
const contactsData = getContactData?.data?.data?.contacts // LIST OF CONTACTS
|
||||||
|
const contactsCategory = getContactData?.data?.data?.category // LIST OF CATEGORY
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
<BreadcrumbComBS title='Contacts' paths={['Dashboard', 'Contacts']} />
|
<BreadcrumbComBS title='Contacts' paths={['Dashboard', 'Contacts']} />
|
||||||
{isFetching ?
|
{getContactData?.isPending ?
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
@@ -53,10 +77,10 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: isError ?
|
: getContactData?.error ?
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-danger'>{error.message}</p>
|
<p className='text-danger'>{getContactData?.error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
@@ -121,14 +145,14 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{contactsCategory && contactsCategory.map(item => (
|
{contactsCategory && contactsCategory.map(item => (
|
||||||
<li key={item?.product_id} className="py-2" onClick={()=>changeActiveCategoryUID(item?.product_id)} style={{cursor: 'pointer'}}>
|
<li key={item?.cid} className="py-2" onClick={()=>changeActiveCategoryUID(`A00000${item?.cid}`)} style={{cursor: 'pointer'}}>
|
||||||
<div>
|
<div>
|
||||||
<span className="nav align-items-center">
|
<span className="nav align-items-center">
|
||||||
<span>
|
<span>
|
||||||
<i className={`fa fa-circle-o pr-4 ${activeCategoryUID == item?.product_id ? 'text-primary' : 'text-warning'}`}></i>
|
<i className={`fa fa-circle-o pr-4 ${activeCategoryUID == `A00000${item?.cid}` ? 'text-primary' : 'text-warning'}`}></i>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<span>{item?.title}</span>
|
<span>{item?.description}</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -177,10 +201,10 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mail-msg scrollbar scroll_dark">
|
<div className="mail-msg scrollbar scroll_dark">
|
||||||
{contactsData && (filteredContactData || contactsData).map((contact, index)=> {
|
{contactsData && filteredContactData?.map((contact, index)=> {
|
||||||
const isActive = (contact.uid == activeContactUID) || (!activeContactUID && index == 0)
|
const isActive = (contact?.uid == activeContactUID) || (!activeContactUID && index == 0)
|
||||||
return (
|
return (
|
||||||
<div key={contact.uid} onClick={()=>changeActiveUID(contact.uid)} className={`mail-msg-item ${isActive && 'bg-light'}`}>
|
<div key={contact?.uid} onClick={()=>changeActiveUID(contact?.uid)} className={`mail-msg-item ${isActive && 'bg-light'}`}>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<div className="media align-items-center">
|
<div className="media align-items-center">
|
||||||
<div className="mr-3">
|
<div className="mr-3">
|
||||||
@@ -190,15 +214,15 @@ 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>{contact.sender}</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>
|
<p className="d-none d-xl-block"><span>{new Date(contact?.added).toDateString()}</span></p>
|
||||||
</div>
|
</div>
|
||||||
<h5 className="mb-0 my-2">{contact.title}</h5>
|
<h5 className="mb-0 my-2">{contact?.title}</h5>
|
||||||
<p>{contact.message.length < 100 ? contact.message : contact.message.substring(0,101) + ' ...' }</p>
|
<p>{contact?.message?.length < 100 ? contact?.message : contact?.message.substring(0,101) + ' ...' }</p>
|
||||||
<p className="d-xl-none">
|
<p className="d-xl-none">
|
||||||
<span>
|
<span>
|
||||||
{new Date(contact.added).toDateString()}
|
{new Date(contact?.added).toDateString()}
|
||||||
{/* {getCustomTime(contact.added)} */}
|
{/* {getCustomTime(contact.added)} */}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -219,13 +243,13 @@ export default function Contacts(){
|
|||||||
<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">{activeContactUID ? activeDetail[0].sender : contactsData[0].sender}</h4>
|
<h4 className="mb-0">{activeContactUID ? activeDetail[0]?.sender : filteredContactData[0]?.sender}</h4>
|
||||||
<p>{activeContactUID ? new Date(activeDetail[0].added).toDateString() : new Date(contactsData[0].added).toDateString()}</p>
|
<p>{activeContactUID ? new Date(activeDetail[0]?.added).toDateString() : new Date(filteredContactData[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>{activeContactUID ? activeDetail[0].title : contactsData[0].title}</h3>
|
<h3>{activeContactUID ? activeDetail[0]?.title : filteredContactData[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>*/}
|
||||||
@@ -233,7 +257,7 @@ export default function Contacts(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>{activeContactUID ? activeDetail[0].message : contactsData[0].message}</p>
|
<p>{activeContactUID ? activeDetail[0]?.message : filteredContactData[0]?.message}</p>
|
||||||
{/* <p className="my-4">hey adminjon...</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>
|
||||||
|
|||||||
@@ -1,34 +1,22 @@
|
|||||||
import React, {useEffect} from 'react'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import { useMutation } from '@tanstack/react-query'
|
|
||||||
import { productsData } from '../../services/services'
|
import { productsData } from '../../services/services'
|
||||||
import productPath from "../../utils/productpath";
|
import productPath from "../../utils/productpath";
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
import queryKeys from '../../services/queryKeys'
|
||||||
|
|
||||||
|
|
||||||
export default function Products() {
|
export default function Products() {
|
||||||
const getProductsData = useMutation({
|
|
||||||
mutationFn: (reqData) => {
|
|
||||||
return productsData(reqData)
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
console.log(error)
|
|
||||||
},
|
|
||||||
onSuccess: (res) => {
|
|
||||||
if(res?.data?.resultCode != '0'){
|
|
||||||
throw({message: 'Something went wrong'})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
useEffect(()=>{
|
let reqData = {
|
||||||
let reqData = {
|
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
}
|
}
|
||||||
getProductsData.mutate(reqData)
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
},[])
|
queryKey: queryKeys.product,
|
||||||
|
queryFn: () => productsData(reqData)
|
||||||
const products = getProductsData?.data?.data?.products_data // PRODUCTS DATA
|
})
|
||||||
|
const products = data?.data?.products_data // PRODUCTS DATA
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -37,7 +25,7 @@ export default function Products() {
|
|||||||
<h4 className="card-title">My Products</h4>
|
<h4 className="card-title">My Products</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-body pb-0">
|
<div className="card-body pb-0">
|
||||||
{getProductsData?.isPending ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
@@ -45,10 +33,10 @@ export default function Products() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: getProductsData?.isPending ?
|
: isError ?
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-danger'>{getProductsData?.error?.message}</p>
|
<p className='text-danger'>{error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -5,12 +5,18 @@ import queryKeys from '../../services/queryKeys'
|
|||||||
|
|
||||||
export default function ProductsURL() {
|
export default function ProductsURL() {
|
||||||
|
|
||||||
const {data:data, isFetching, isError, error} = useQuery({
|
let reqData = {
|
||||||
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
|
}
|
||||||
|
|
||||||
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.product_url,
|
queryKey: queryKeys.product_url,
|
||||||
queryFn: () => productsURL()
|
queryFn: () => productsURL(reqData)
|
||||||
})
|
})
|
||||||
|
|
||||||
const urlData = data?.data?.url_data?.url
|
const urlData = data?.data?.products_data
|
||||||
|
// console.log('data', urlData)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -57,8 +63,8 @@ export default function ProductsURL() {
|
|||||||
let productUrl = '/product/'+ item?.product_id
|
let productUrl = '/product/'+ item?.product_id
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{Number(item?.no) + Number(index)}</td>
|
<td>{Number(item?.id)}</td>
|
||||||
<td>{item?.description} - <a href={productUrl} target='_blank'>{item?.url}</a></td>
|
<td>{item?.description} - <a href={productUrl} target='_blank'>{item?.external_url}</a></td>
|
||||||
|
|
||||||
<td><span className={`badge ${statusColor}`}>{item?.status}</span></td>
|
<td><span className={`badge ${statusColor}`}>{item?.status}</span></td>
|
||||||
<td><a className="mr-3" href=""><i className="fe fe-edit"></i></a></td>
|
<td><a className="mr-3" href=""><i className="fe fe-edit"></i></a></td>
|
||||||
|
|||||||
@@ -1,36 +1,44 @@
|
|||||||
import React, {useEffect} from 'react'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import { useMutation } from '@tanstack/react-query'
|
|
||||||
import { topBar } from '../../services/services'
|
import { topBar } from '../../services/services'
|
||||||
|
import queryKeys from '../../services/queryKeys'
|
||||||
|
|
||||||
export default function TopBar() {
|
export default function TopBar() {
|
||||||
|
|
||||||
const topBarData = useMutation({
|
// const topBarData = useMutation({
|
||||||
mutationFn: (reqData) => {
|
// mutationFn: (reqData) => {
|
||||||
return topBar(reqData)
|
// return topBar(reqData)
|
||||||
},
|
// },
|
||||||
onError: (error) => {
|
// onError: (error) => {
|
||||||
console.log(error)
|
// console.log(error)
|
||||||
},
|
// },
|
||||||
onSuccess: (res) => {
|
// onSuccess: (res) => {
|
||||||
if(res?.data?.resultCode != '0'){
|
// if(res?.data?.resultCode != '0'){
|
||||||
throw({message: 'Something went wrong'})
|
// throw({message: 'Something went wrong'})
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
useEffect(()=>{
|
// useEffect(()=>{
|
||||||
let reqData = {
|
// let reqData = {
|
||||||
|
// token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
// uid: localStorage.getItem('uid') // USER UID
|
||||||
|
// }
|
||||||
|
// topBarData.mutate(reqData)
|
||||||
|
// },[])
|
||||||
|
|
||||||
|
let reqData = {
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
}
|
}
|
||||||
topBarData.mutate(reqData)
|
const {data:topBarData, isFetching, isError, error} = useQuery({
|
||||||
},[])
|
queryKey: queryKeys.topBar,
|
||||||
|
queryFn: () => topBar(reqData)
|
||||||
const data = topBarData?.data?.data?.top_bar // top bar data
|
})
|
||||||
|
const data = topBarData?.data?.top_bar // top bar data
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{topBarData.isPending ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="card p-4">
|
<div className="card p-4">
|
||||||
@@ -38,10 +46,10 @@ export default function TopBar() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: topBarData.error ?
|
: isError?
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="card p-4">
|
<div className="card p-4">
|
||||||
<p className='text-danger'>{topBarData.error.message}</p>
|
<p className='text-danger'>{error.message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export default function UserHeader(){
|
|||||||
<ul className="navbar-nav nav-right ml-auto">
|
<ul className="navbar-nav nav-right ml-auto">
|
||||||
<li className="nav-item user-profile">
|
<li className="nav-item user-profile">
|
||||||
<a href="#" className="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown">
|
<a href="#" className="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown">
|
||||||
<img src={getImage('avtar/02.jpg')} alt="avtar-img" />
|
<img src={getImage('profile-pic-circle.png')} alt="avtar-img" />
|
||||||
<span className="bg-success user-status"></span>
|
<span className="bg-success user-status"></span>
|
||||||
</a>
|
</a>
|
||||||
<div className="dropdown-menu animated fadeIn">
|
<div className="dropdown-menu animated fadeIn">
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ export default function ProductFactory(){
|
|||||||
getProductData.mutate(reqData)
|
getProductData.mutate(reqData)
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
const myproduct_data = getProductData?.data?.data?.myproduct?.myproudct // PRODUCT DETAILS
|
const myproduct_data = getProductData?.data?.data?.myproduct?.myproudct // PRODUCT DETAILS
|
||||||
const product_name = myproduct_data?.product_name;
|
const product_name = myproduct_data?.product_name;
|
||||||
const product_status = myproduct_data?.status;
|
const product_status = myproduct_data?.status;
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export default function ProductStart(props){
|
|||||||
const productDescription = props.productData?.description;
|
const productDescription = props.productData?.description;
|
||||||
const promotion_text = props.productData?.promotion_text;
|
const promotion_text = props.productData?.promotion_text;
|
||||||
const product_status = props.productData?.status;
|
const product_status = props.productData?.status;
|
||||||
|
const saleText = props.productData?.sale_text;
|
||||||
|
|
||||||
const modalRef = useRef()
|
const modalRef = useRef()
|
||||||
|
|
||||||
const refetch = () => {
|
const refetch = () => {
|
||||||
@@ -116,16 +118,7 @@ export default function ProductStart(props){
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-body">
|
<div className="modal-body">
|
||||||
<p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis
|
<div className="" dangerouslySetInnerHTML={{__html: saleText}}/>
|
||||||
in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at
|
|
||||||
eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Aenean lacinia
|
|
||||||
bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque
|
|
||||||
nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor
|
|
||||||
fringilla. Cras mattis consectetur purus sit amet fermentum. Cras justo odio,
|
|
||||||
</p>
|
|
||||||
{/* {mutation.error &&
|
{/* {mutation.error &&
|
||||||
<>
|
<>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
|
|||||||
@@ -85,7 +85,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mail-contant .mail-f{
|
.mail-contant .mail-f{
|
||||||
position: absolute;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@include desktop {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
@include desktop-lg {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-27
@@ -91,6 +91,30 @@ export const getCalendarEvents = (reqData) => {
|
|||||||
return postAuxEnd(`/panel/account/calendar`, postData, false)
|
return postAuxEnd(`/panel/account/calendar`, postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
||||||
|
export const contactData = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/contacts`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
||||||
|
export const productsURL = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/products/url`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
||||||
|
export const productsData = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/products`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
|
// FUNCTION TO GET DASHBOARD RECENT ACTIONS SECTION
|
||||||
export const recentActions = (reqData) => {
|
export const recentActions = (reqData) => {
|
||||||
let postData = {
|
let postData = {
|
||||||
@@ -102,29 +126,13 @@ export const recentActions = (reqData) => {
|
|||||||
return postAuxEnd(`/panel/account/actions`, postData, false)
|
return postAuxEnd(`/panel/account/actions`, postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
|
||||||
export const productsData = (reqData) => {
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/account/products`, postData, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
|
||||||
export const productsURL = (reqData) => {
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/account/products/url`, postData, false)
|
|
||||||
// return getAuxEnd(`/panel/account/products/url`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION TO REGISTER USER
|
// FUNCTION TO REGISTER USER
|
||||||
export const signUpUser = (reqData) => {
|
export const signUpUser = (reqData) => {
|
||||||
@@ -180,13 +188,3 @@ export const productProvision = (reqData) => {
|
|||||||
// return getAuxEnd(`/panel/myproduct/provision`, postData)
|
// return getAuxEnd(`/panel/myproduct/provision`, postData)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT DATA SECTION
|
|
||||||
export const contactData = (reqData) => {
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/contacts`, postData, false)
|
|
||||||
// return getAuxEnd(`/panel/contacts`)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user