Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f73e84a84 | |||
| 8c57e94bb6 | |||
| fa7660de29 | |||
| bde30f781a | |||
| 9f9dcc5e37 | |||
| ec11a7b5b3 | |||
| 38c5717667 | |||
| 77eaf15c6a | |||
| 60488524ed | |||
| 3584447c65 | |||
| 58cd232f91 |
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 18 KiB |
+7
-3
@@ -22,10 +22,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-links a {
|
.login-links a {
|
||||||
font-size: 15px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
|
||||||
padding: 0px 20px;
|
padding: 0px 20px;
|
||||||
border-right: 2px solid;
|
border-right: 2px solid #6c757d;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,4 +34,9 @@
|
|||||||
|
|
||||||
.login-links a:last-child{
|
.login-links a:last-child{
|
||||||
border: 0px;
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button{
|
||||||
|
font-size: 1rem!important;
|
||||||
|
font-weight: 700!important;
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
@@ -1,5 +1,5 @@
|
|||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useMutation, useQuery } from '@tanstack/react-query'
|
||||||
|
|
||||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
import EventCalendar from "./EventCalendar";
|
import EventCalendar from "./EventCalendar";
|
||||||
@@ -16,12 +16,34 @@ export default function Calendar(){
|
|||||||
// setDraggedEvent(event)
|
// setDraggedEvent(event)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
// const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.calendar_events,
|
// queryKey: queryKeys.calendar_events,
|
||||||
queryFn: () => getCalendarEvents()
|
// queryFn: () => getCalendarEvents()
|
||||||
|
// })
|
||||||
|
|
||||||
|
const calendarEvents = useMutation({
|
||||||
|
mutationFn: (reqData) => {
|
||||||
|
return getCalendarEvents(reqData)
|
||||||
|
},
|
||||||
|
onError: (error) => {
|
||||||
|
console.log(error)
|
||||||
|
},
|
||||||
|
onSuccess: (res) => {
|
||||||
|
if(res?.data?.resultCode != '0'){
|
||||||
|
throw({message: 'Something went wrong'})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const receievedEvents = data?.data?.bar_data
|
useEffect(()=>{
|
||||||
|
let reqData = {
|
||||||
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
|
}
|
||||||
|
calendarEvents.mutate(reqData)
|
||||||
|
},[])
|
||||||
|
|
||||||
|
const receievedEvents = calendarEvents?.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
|
||||||
|
|
||||||
@@ -62,15 +84,15 @@ export default function Calendar(){
|
|||||||
</div>
|
</div>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{isFetching ?
|
{calendarEvents?.isPending ?
|
||||||
<>
|
<>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-mute'>Loading...</p>
|
<p className='text-mute'>Loading...</p>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: isError ?
|
: calendarEvents?.error ?
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-danger'>{error.message}</p>
|
<p className='text-danger'>{calendarEvents?.error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<>
|
<>
|
||||||
@@ -83,7 +105,7 @@ export default function Calendar(){
|
|||||||
Drag and drop your event or click in the calendar.
|
Drag and drop your event or click in the calendar.
|
||||||
</p> */}
|
</p> */}
|
||||||
|
|
||||||
{category.map((item, index) => {
|
{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 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'
|
let circleColor = item?.cid == '1' ? 'text-success' : item?.cid == '2' ? 'text-danger' : item?.cid == '3' ? 'text-warning' : 'text-primary'
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ import React from "react";
|
|||||||
|
|
||||||
export default function UserFooter(){
|
export default function UserFooter(){
|
||||||
|
|
||||||
|
const year = new Date().getFullYear()
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
<footer className="footer">
|
<footer className="footer">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12 col-sm-6 text-center text-sm-left">
|
<div className="col-12 col-sm-6 text-center text-sm-left">
|
||||||
<p>© Copyright 2024. All rights reserved.</p>
|
<p>© Copyright {year}. All rights reserved.</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="col col-sm-6 ml-sm-auto text-center text-sm-right">
|
<div className="col col-sm-6 ml-sm-auto text-center text-sm-right">
|
||||||
<p>A division of <i className="fa fa-key text-danger mx-1"></i> autoMedSys A.I.</p>
|
<p>A division of <i className="fa fa-key text-danger mx-1"></i> autoMedSys A.I.</p>
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ export default function UserHeader(){
|
|||||||
<div className="navbar-header d-flex align-items-center">
|
<div className="navbar-header d-flex align-items-center">
|
||||||
<a href="#" onClick={toggleSidebar} className="mobile-toggle"><i className="ti ti-align-right"></i></a>
|
<a href="#" onClick={toggleSidebar} className="mobile-toggle"><i className="ti ti-align-right"></i></a>
|
||||||
<a className="navbar-brand" href="/dash">
|
<a className="navbar-brand" href="/dash">
|
||||||
<img src={getImage('logo-light.png')} className="img-fluid logo-desktop" alt="logo"/>
|
<img src={getImage('logo-pink.png')} className="img-fluid logo-desktop" alt="logo"/>
|
||||||
<img src={getImage('logo-icon.png')} className="img-fluid logo-mobile" alt="logo"/>
|
<img src={getImage('logo-pink.png')} className="img-fluid logo-mobile" alt="logo"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<button onClick={removeSidebar} className="navbar-toggler" type="button" data-bs-toggle="collapse"
|
<button onClick={removeSidebar} className="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import React, {useState} from "react";
|
import {useEffect} from "react";
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useMutation, useQuery } from '@tanstack/react-query'
|
||||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
// import getImage from "../../utils/getImage";
|
// import getImage from "../../utils/getImage";
|
||||||
import ProductStart from "./ProductStart";
|
import ProductStart from "./ProductStart";
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import {MyProductData, productData} from "../../services/services";
|
import {MyProductData} from "../../services/services";
|
||||||
import queryKeys from "../../services/queryKeys";
|
|
||||||
import ProductActive from "./ProductActive";
|
import ProductActive from "./ProductActive";
|
||||||
import ProductProvision from "./ProductProvision";
|
import ProductProvision from "./ProductProvision";
|
||||||
import {productConst} from "../../constants/products";
|
import {productConst} from "../../constants/products";
|
||||||
@@ -13,34 +12,42 @@ import {productConst} from "../../constants/products";
|
|||||||
export default function ProductFactory(){
|
export default function ProductFactory(){
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const pathname = location.pathname;
|
const pathname = location.pathname;
|
||||||
const [productStatus, setProductStatus] = useState(0);
|
|
||||||
|
|
||||||
//productConst.PRODUCT_ACTIVE
|
|
||||||
|
|
||||||
|
|
||||||
// Split the pathname by '/' and get the last element
|
// Split the pathname by '/' and get the last element
|
||||||
const lastPart = pathname.split('/').pop();
|
const productID = pathname.split('/').pop();
|
||||||
// console.log(lastPart)
|
|
||||||
|
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
const getProductData = useMutation({
|
||||||
queryKey: queryKeys.product,
|
mutationFn: (reqData) => {
|
||||||
queryFn: () => MyProductData(lastPart)
|
return MyProductData(reqData)
|
||||||
|
},
|
||||||
|
onError: (error) => {
|
||||||
|
console.log(error)
|
||||||
|
},
|
||||||
|
onSuccess: (res) => {
|
||||||
|
if(res?.data?.resultCode != '0'){
|
||||||
|
throw({message: 'Something went wrong'})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
let reqData = {
|
||||||
const myproduct_data = data?.data?.myproduct_data
|
product_id : productID,
|
||||||
//setProductStatus(myproduct_data?.status)
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
const product_name = myproduct_data?.product_name;
|
}
|
||||||
|
getProductData.mutate(reqData)
|
||||||
const product_status = myproduct_data?.status;
|
},[])
|
||||||
|
|
||||||
|
const myproduct_data = getProductData?.data?.data?.myproduct?.myproudct // PRODUCT DETAILS
|
||||||
|
const product_name = myproduct_data?.product_name;
|
||||||
|
const product_status = myproduct_data?.status;
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
<BreadcrumbComBS title={product_name} paths={['Dashboard', 'Product']} />
|
<BreadcrumbComBS title={product_name} paths={['Dashboard', 'Product']} />
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{isFetching ?
|
{getProductData?.isPending ?
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
@@ -48,10 +55,10 @@ export default function ProductFactory(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: isError ?
|
: getProductData?.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'>{getProductData?.error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ body {
|
|||||||
outline:0;
|
outline:0;
|
||||||
background:$body;
|
background:$body;
|
||||||
color:$muted;
|
color:$muted;
|
||||||
|
font-weight: $font-regular;
|
||||||
&.sidebar-mini {
|
&.sidebar-mini {
|
||||||
.app-main {
|
.app-main {
|
||||||
padding-left:$sidebar-mini;
|
padding-left:$sidebar-mini;
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ h6 {
|
|||||||
|
|
||||||
p {
|
p {
|
||||||
color: $muted;
|
color: $muted;
|
||||||
font-weight: $font-regular;
|
font-size: $font-18;
|
||||||
font-size: $font-base;
|
|
||||||
line-height: $line-md;
|
line-height: $line-md;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ $container-max-widths: (
|
|||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
$body : #f9f9fb;
|
$body : #f9f9fb;
|
||||||
$primary : #8E54E9;
|
$primary : #148399; //#8E54E9;
|
||||||
$primary2 : #4776E6;
|
$primary2 : #4776E6;
|
||||||
$secondary : #a1a1a1;
|
$secondary : #a1a1a1;
|
||||||
$light-gray : #eceef3;
|
$light-gray : #eceef3;
|
||||||
$dark-gray : #2c2e3e;
|
$dark-gray : #2c2e3e;
|
||||||
$darker-gray : #333333;
|
$darker-gray : #333333;
|
||||||
$muted : #a6a9b7;
|
$muted : #6c757d; //#a6a9b7;
|
||||||
$info : #45aaf2;
|
$info : #45aaf2;
|
||||||
$danger : #e3324c;
|
$danger : #e3324c;
|
||||||
$cyan : #2bcbba;
|
$cyan : #2bcbba;
|
||||||
@@ -75,7 +75,7 @@ $behance : #053eff;
|
|||||||
$whatsapp : #4FCE5D;
|
$whatsapp : #4FCE5D;
|
||||||
|
|
||||||
// Font family
|
// Font family
|
||||||
$font-primary : 'Roboto', sans-serif;
|
$font-primary : 'Plus Jakarta Sans', sans-serif;
|
||||||
|
|
||||||
//Font size
|
//Font size
|
||||||
|
|
||||||
|
|||||||
+20
-24
@@ -75,6 +75,22 @@ export const topBar = (reqData) => {
|
|||||||
return postAuxEnd(`/panel/account/bar`, postData, false)
|
return postAuxEnd(`/panel/account/bar`, postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET PRODUCT BY ID
|
||||||
|
export const MyProductData = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/myproduct/dash`, postData, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET CALENDAR EVENTS
|
||||||
|
export const getCalendarEvents = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/calendar`, 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 = {
|
||||||
@@ -98,6 +114,7 @@ export const productsData = (reqData) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
// FUNCTION TO GET DASHBOARD PRODUCT URL DATA SECTION
|
||||||
export const productsURL = (reqData) => {
|
export const productsURL = (reqData) => {
|
||||||
let postData = {
|
let postData = {
|
||||||
@@ -114,7 +131,7 @@ export const signUpUser = (reqData) => {
|
|||||||
let postData = {
|
let postData = {
|
||||||
...reqData
|
...reqData
|
||||||
}
|
}
|
||||||
return postAuxEnd('/panel/auth/register', postData, false)
|
return postAuxEnd('/panel/Register', postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO VERIFY EMAIL
|
// FUNCTION TO VERIFY EMAIL
|
||||||
@@ -122,7 +139,7 @@ export const verifyEmail = (reqData) => {
|
|||||||
let postData = {
|
let postData = {
|
||||||
...reqData
|
...reqData
|
||||||
}
|
}
|
||||||
return postAuxEnd('/panel/auth/register/verify', postData, false)
|
return postAuxEnd('/panel/Register/verify', postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO COMPLETE REGISTRATION
|
// FUNCTION TO COMPLETE REGISTRATION
|
||||||
@@ -130,7 +147,7 @@ export const completeRegistration = (reqData) => {
|
|||||||
let postData = {
|
let postData = {
|
||||||
...reqData
|
...reqData
|
||||||
}
|
}
|
||||||
return postAuxEnd('/panel/auth/register/complete', postData, false)
|
return postAuxEnd('/panel/Register/complete', postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO SUBSCRIBE
|
// FUNCTION TO SUBSCRIBE
|
||||||
@@ -152,16 +169,6 @@ export const recoverPWD = (reqData) => {
|
|||||||
return postAuxEnd('/panel/auth/reset', postData, false)
|
return postAuxEnd('/panel/auth/reset', postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET CALENDAR EVENTS
|
|
||||||
export const getCalendarEvents = (reqData) => {
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/account/calendar`, postData, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION TO GET MY PRODUCT PROVISION DATA
|
// FUNCTION TO GET MY PRODUCT PROVISION DATA
|
||||||
export const productProvision = (reqData) => {
|
export const productProvision = (reqData) => {
|
||||||
let postData = {
|
let postData = {
|
||||||
@@ -182,15 +189,4 @@ export const contactData = (reqData) => {
|
|||||||
}
|
}
|
||||||
return postAuxEnd(`/panel/contacts`, postData, false)
|
return postAuxEnd(`/panel/contacts`, postData, false)
|
||||||
// return getAuxEnd(`/panel/contacts`)
|
// return getAuxEnd(`/panel/contacts`)
|
||||||
}
|
|
||||||
|
|
||||||
export const MyProductData = (productID) => {
|
|
||||||
const reqData = { product_id : productID}
|
|
||||||
let postData = {
|
|
||||||
...reqData,
|
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
|
||||||
}
|
|
||||||
return postAuxEnd(`/panel/myproduct/dash`, postData, false)
|
|
||||||
// return getAuxEnd(`/panel/myproduct/dash`,reqData)
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
let getImage = (location) => {
|
let getImage = (location) => {
|
||||||
if (!location) {
|
if (!location) {
|
||||||
return require(`../assets/img/logo.png`);
|
return require(`../assets/img/logo-pink.png`);
|
||||||
} else {
|
} else {
|
||||||
return require(`../assets/img/${location}`);
|
return require(`../assets/img/${location}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user