Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d84c266653 | |||
| b5a37c4cc5 | |||
| ddde4bd0d5 | |||
| bf9c6c8b32 | |||
| 14e588b0a9 | |||
| dde01ab79a | |||
| a5f1c4b5bb | |||
| a16dd7af24 | |||
| 54d44e39d3 | |||
| 578a0e4c8f | |||
| d0ac2515a3 | |||
| b26f8b4e0d | |||
| ab6518e2ee | |||
| 563abe6c35 | |||
| 894ed6ea35 | |||
| 71859d9712 | |||
| 6d9a0e5624 | |||
| 0bd0b3ca64 | |||
| 0bef976bca | |||
| 0d6dc40633 | |||
| f50590850b | |||
| 1dcae6b163 | |||
| c06dc93e9a | |||
| 67d67e773a | |||
| 0493ee4f03 | |||
| 866c127135 | |||
| f7d27a3778 | |||
| c7fac54e12 | |||
| f994c7f45e | |||
| b0821981e7 | |||
| a220f2faa4 | |||
| 2e46a56146 | |||
| b7aaff7adc | |||
| d606b5682c | |||
| 25d4751935 | |||
| a8d78c4c3f | |||
| 9c672d4bf2 | |||
| c744eccd15 | |||
| 302a3aa3bb | |||
| 23a295866a |
@@ -2,14 +2,14 @@ SKIP_PREFLIGHT_CHECK=true
|
|||||||
REACT_APP_NODE_ENV="development"
|
REACT_APP_NODE_ENV="development"
|
||||||
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
||||||
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://qa-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
REACT_APP_MAIN_SOCKET="https://devsocket.mermsemr.com"
|
||||||
|
|
||||||
# login footer links
|
# login footer links
|
||||||
REACT_APP_HOME_LINK='https://dev-www.mermsemr.com/'
|
REACT_APP_HOME_LINK='https://qa-www.mermsemr.com/'
|
||||||
REACT_APP_ABOUT_LINK='https://dev-www.mermsemr.com/about'
|
REACT_APP_ABOUT_LINK='https://qa-www.mermsemr.com/about'
|
||||||
REACT_APP_CONTACTS_LINK='https://dev-www.mermsemr.com/contacts'
|
REACT_APP_CONTACTS_LINK='https://qa-www.mermsemr.com/contacts'
|
||||||
REACT_APP_TERMS_LINK='https://dev-www.mermsemr.com/terms'
|
REACT_APP_TERMS_LINK='https://qa-www.mermsemr.com/terms'
|
||||||
|
|
||||||
# Inactivity timeout/logout AT 10MINS
|
# Inactivity timeout/logout AT 10MINS
|
||||||
REACT_APP_TIMEOUT=600000
|
REACT_APP_TIMEOUT=600000
|
||||||
|
|||||||
+7
-6
@@ -2,14 +2,15 @@ SKIP_PREFLIGHT_CHECK=true
|
|||||||
REACT_APP_NODE_ENV="development"
|
REACT_APP_NODE_ENV="development"
|
||||||
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
||||||
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://dev-media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://qa-media.mermsemr.com"
|
||||||
REACT_APP_MAIN_SOCKET="https://dev-socket.mermsemr.com"
|
REACT_APP_MAIN_SOCKET="https://devsocket.mermsemr.com"
|
||||||
|
|
||||||
# login footer links
|
# login footer links
|
||||||
REACT_APP_HOME_LINK='https://dev-www.mermsemr.com/'
|
REACT_APP_HOME_LINK='https://qa-www.mermsemr.com/'
|
||||||
REACT_APP_ABOUT_LINK='https://dev-www.mermsemr.com/about'
|
REACT_APP_ABOUT_LINK='https://qa-www.mermsemr.com/about'
|
||||||
REACT_APP_CONTACTS_LINK='https://dev-www.mermsemr.com/contacts'
|
REACT_APP_CONTACTS_LINK='https://qa-www.mermsemr.com/contacts'
|
||||||
REACT_APP_TERMS_LINK='https://dev-www.mermsemr.com/terms'
|
REACT_APP_TERMS_LINK='https://qa-www.mermsemr.com/terms'
|
||||||
|
|
||||||
# Inactivity timeout/logout AT 10MINS
|
# Inactivity timeout/logout AT 10MINS
|
||||||
REACT_APP_TIMEOUT=600000
|
REACT_APP_TIMEOUT=600000
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ REACT_APP_NODE_ENV="production"
|
|||||||
REACT_APP_SOCKET_URL="https://socket.mermsemr.com"
|
REACT_APP_SOCKET_URL="https://socket.mermsemr.com"
|
||||||
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
REACT_APP_MEDIA_SERVER="https://media.mermsemr.com"
|
REACT_APP_MEDIA_SERVER="https://media.mermsemr.com"
|
||||||
|
REACT_APP_MAIN_SOCKET="https://socket.mermsemr.com"
|
||||||
|
|
||||||
# login footer links
|
# login footer links
|
||||||
REACT_APP_HOME_LINK='https://www.mermsemr.com/'
|
REACT_APP_HOME_LINK='https://www.mermsemr.com/'
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
SKIP_PREFLIGHT_CHECK=true
|
||||||
|
REACT_APP_NODE_ENV="development"
|
||||||
|
REACT_APP_SOCKET_URL="https://devsocket.mermsemr.com"
|
||||||
|
REACT_APP_MAIN_API="https://devapi.mermsemr.com"
|
||||||
|
REACT_APP_MEDIA_SERVER="https://qa-media.mermsemr.com"
|
||||||
|
REACT_APP_MAIN_SOCKET="https://devsocket.mermsemr.com"
|
||||||
|
|
||||||
|
# login footer links
|
||||||
|
REACT_APP_HOME_LINK='https://qa-www.mermsemr.com/'
|
||||||
|
REACT_APP_ABOUT_LINK='https://qa-www.mermsemr.com/about'
|
||||||
|
REACT_APP_CONTACTS_LINK='https://qa-www.mermsemr.com/contacts'
|
||||||
|
REACT_APP_TERMS_LINK='https://qa-www.mermsemr.com/terms'
|
||||||
|
|
||||||
|
# Inactivity timeout/logout AT 10MINS
|
||||||
|
REACT_APP_TIMEOUT=600000
|
||||||
+1
-1
@@ -20,7 +20,7 @@ services:
|
|||||||
extra_hosts:
|
extra_hosts:
|
||||||
- api.mermsemr.com:10.10.33.15
|
- api.mermsemr.com:10.10.33.15
|
||||||
- devapi.mermsemr.com:10.10.33.15
|
- devapi.mermsemr.com:10.10.33.15
|
||||||
- dev-socket.mermsemr.com:10.10.33.15
|
- devsocket.mermsemr.com:10.10.33.15
|
||||||
- socket.mermsemr.com:10.10.33.15
|
- socket.mermsemr.com:10.10.33.15
|
||||||
- dev-media.mermsemr.com:10.10.33.15
|
- dev-media.mermsemr.com:10.10.33.15
|
||||||
- media.mermsemr.com:10.10.33.15
|
- media.mermsemr.com:10.10.33.15
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ const queryClient = new QueryClient({
|
|||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
retry: 3,
|
retry: 3,
|
||||||
// refetchOnMount: false,
|
// refetchOnMount: false,
|
||||||
staleTime: 360000 // can also be a number in millisecond
|
staleTime: 10*60*1000 // can also be a number in millisecond
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 995 B |
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -97,7 +97,7 @@ export default function CSignup() {
|
|||||||
<div className="vh-100 bg-white custom-bg">
|
<div className="vh-100 bg-white custom-bg">
|
||||||
<div className="container-fluid p-0">
|
<div className="container-fluid p-0">
|
||||||
<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-4 align-self-center order-2 order-sm-1" style={{maxWidth: '520px'}}>
|
||||||
<div className="mt-5 d-flex">
|
<div className="mt-5 d-flex">
|
||||||
<div className="bg-white register p-5">
|
<div className="bg-white register p-5">
|
||||||
<h1 className="mb-2">MERMS Panel</h1>
|
<h1 className="mb-2">MERMS Panel</h1>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function ExtFooter() {
|
||||||
|
return <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>
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import { Link } from 'react-router-dom'
|
|||||||
import siteLinks from '../../links/siteLinks'
|
import siteLinks from '../../links/siteLinks'
|
||||||
import { useMutation } from '@tanstack/react-query'
|
import { useMutation } from '@tanstack/react-query'
|
||||||
import { recoverPWD } from '../../services/services';
|
import { recoverPWD } from '../../services/services';
|
||||||
|
import getImage from '../../utils/getImage';
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
username: Yup.string()
|
username: Yup.string()
|
||||||
@@ -46,11 +47,11 @@ export default function Forgetpwd2() {
|
|||||||
<div className="vh-100 bg-white custom-bg">
|
<div className="vh-100 bg-white custom-bg">
|
||||||
<div className="container-fluid p-0">
|
<div className="container-fluid p-0">
|
||||||
<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-1h">
|
<div className="col-11 col-sm-6 col-lg-5 col-xxl-4 align-self-center order-2 order-sm-1h" style={{maxWidth: '520px'}}>
|
||||||
<div className="mt-5 d-flex">
|
<div className="mt-5 d-flex">
|
||||||
<div className="bg-white register p-5">
|
<div className="bg-white register p-5">
|
||||||
<h1 className="mb-2">MERMS Panel</h1>
|
<h1 className="mb-2">MERMS Panel</h1>
|
||||||
<p>Please enter your username.</p>
|
{!mutation.isSuccess && <p>Please enter your username.</p>}
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
@@ -81,8 +82,9 @@ export default function Forgetpwd2() {
|
|||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
<div className='col-12'>
|
<div className='col-12'>
|
||||||
<div className="rounded-2 d-flex flex-column justify-content-between align-items-center" style={{height: '200px', backgroundColor: '#F2FAF7'}}>
|
<div className="rounded-2 d-flex flex-column justify-content-between align-items-center" style={{backgroundColor: '#F2FAF7'}}>
|
||||||
<h4 className='p-4 text-black'>Check your email to continue password reset.</h4>
|
<h4 className='p-4 text-black'>Check your email to continue password reset.</h4>
|
||||||
|
<img className='' style={{width: '150px'}} src={getImage('reset-password.png')} alt='reset-icon' />
|
||||||
<Link to={siteLinks.login} className='p-2 text-primary' style={{color: '#6FCAEF'}}>Home</Link>
|
<Link to={siteLinks.login} className='p-2 text-primary' style={{color: '#6FCAEF'}}>Home</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default function Login() {
|
|||||||
<div className="vh-100 custom-bg">
|
<div className="vh-100 custom-bg">
|
||||||
<div className="container-fluid p-0">
|
<div className="container-fluid p-0">
|
||||||
<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-4 align-self-center order-2 order-sm-1" style={{maxWidth: '520px'}}>
|
||||||
<div className="mt-5 d-flex">
|
<div className="mt-5 d-flex">
|
||||||
<div className="bg-white register px-5 pt-5 pb-3">
|
<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>
|
||||||
@@ -124,7 +124,7 @@ export default function Login() {
|
|||||||
<button type='button' onClick={()=>{login.mutate(fields)}} className="btn btn-primary text-uppercase">{login.isPending ? 'loading...' : 'Sign In'}</button>
|
<button type='button' onClick={()=>{login.mutate(fields)}} className="btn btn-primary text-uppercase">{login.isPending ? 'loading...' : 'Sign In'}</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-12 mt-3">
|
<div className="col-12 mt-3">
|
||||||
<p>Don't have an account ?<Link to={siteLinks.signup}> Sign Up</Link></p>
|
<p>Don't have an account ?<Link to={siteLinks.signup}><span style={{fontWeight: 'bolder'}}>Sign Up</span></Link></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -133,7 +133,7 @@ export default function Login() {
|
|||||||
<div className="app-store-icons-wrap text-center">
|
<div className="app-store-icons-wrap text-center">
|
||||||
<a className="icon google"
|
<a className="icon google"
|
||||||
href='#' >
|
href='#' >
|
||||||
<img src={IOSDownload} className='w-100 h-auto' alt='IOS Download' />
|
<img src={IOSDownload} className='w-80 h-auto' alt='IOS Download' />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -141,7 +141,7 @@ export default function Login() {
|
|||||||
<div className="col-6">
|
<div className="col-6">
|
||||||
<div className="app-store-icons-wrap text-center">
|
<div className="app-store-icons-wrap text-center">
|
||||||
<a className="icon apple" href='#'>
|
<a className="icon apple" href='#'>
|
||||||
<img src={GoogleDownload} className='w-100 h-auto' alt='IOS Download' />
|
<img src={GoogleDownload} className='w-80 h-auto' alt='IOS Download' />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -153,6 +153,7 @@ export default function Login() {
|
|||||||
<a href={process.env.REACT_APP_CONTACTS_LINK}>Contact</a>
|
<a href={process.env.REACT_APP_CONTACTS_LINK}>Contact</a>
|
||||||
<a href={process.env.REACT_APP_TERMS_LINK}>Terms</a>
|
<a href={process.env.REACT_APP_TERMS_LINK}>Terms</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { Link } from 'react-router-dom'
|
|||||||
import siteLinks from '../../links/siteLinks'
|
import siteLinks from '../../links/siteLinks'
|
||||||
import { useMutation } from '@tanstack/react-query';
|
import { useMutation } from '@tanstack/react-query';
|
||||||
import { signUpUser } from '../../services/services';
|
import { signUpUser } from '../../services/services';
|
||||||
|
import getImage from '../../utils/getImage';
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
email: Yup.string()
|
email: Yup.string()
|
||||||
@@ -60,7 +61,7 @@ export default function Signup2() {
|
|||||||
<div className="vh-100 bg-white custom-bg">
|
<div className="vh-100 bg-white custom-bg">
|
||||||
<div className="container-fluid p-0">
|
<div className="container-fluid p-0">
|
||||||
<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-4 align-self-center order-2 order-sm-1" style={{maxWidth: '520px'}}>
|
||||||
<div className="mt-5 d-flex">
|
<div className="mt-5 d-flex">
|
||||||
<div className="bg-white register p-5">
|
<div className="bg-white register p-5">
|
||||||
<h1 className="mb-2">MERMS Panel</h1>
|
<h1 className="mb-2">MERMS Panel</h1>
|
||||||
@@ -130,8 +131,9 @@ export default function Signup2() {
|
|||||||
</>
|
</>
|
||||||
:
|
:
|
||||||
<div className='col-12'>
|
<div className='col-12'>
|
||||||
<div className="rounded-2 d-flex flex-column justify-content-between align-items-center" style={{height: '200px', backgroundColor: '#F2FAF7'}}>
|
<div className="rounded-2 d-flex flex-column justify-content-between align-items-center" style={{backgroundColor: '#F2FAF7'}}>
|
||||||
<h4 className='p-4 text-black'>Check your email to continue.</h4>
|
<h4 className='p-4 text-black' style={{marginBottom: '-30px'}}>Check your email to continue.</h4>
|
||||||
|
<img className='' style={{width: '200px'}} src={getImage('check-mail.png')} alt='mail-alert' />
|
||||||
<Link to={siteLinks.login} className='p-2 text-primary' style={{color: '#6FCAEF'}}>Home</Link>
|
<Link to={siteLinks.login} className='p-2 text-primary' style={{color: '#6FCAEF'}}>Home</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default function Calendar(){
|
|||||||
<div className="card card-statistics">
|
<div className="card card-statistics">
|
||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<div className="card-heading">
|
<div className="card-heading">
|
||||||
<h4 className="card-title">Event Calendar</h4>
|
<h4 className="card-title">Events</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default function Products() {
|
|||||||
uid: localStorage.getItem('uid') // USER UID
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
}
|
}
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.product,
|
queryKey: queryKeys.products,
|
||||||
queryFn: () => productsData(reqData)
|
queryFn: () => productsData(reqData)
|
||||||
})
|
})
|
||||||
const products = data?.data?.products_data // PRODUCTS DATA
|
const products = data?.data?.products_data // PRODUCTS DATA
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React from 'react'
|
|||||||
import { productsURL } from '../../services/services'
|
import { productsURL } from '../../services/services'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery } from '@tanstack/react-query'
|
||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
|
import getImage from '../../utils/getImage'
|
||||||
|
|
||||||
export default function ProductsURL() {
|
export default function ProductsURL() {
|
||||||
|
|
||||||
@@ -61,13 +62,21 @@ export default function ProductsURL() {
|
|||||||
{urlData && urlData.map((item, index) => {
|
{urlData && urlData.map((item, index) => {
|
||||||
let statusColor = item?.status === 'Preparing' ? 'badge-success-inverse' : item?.status === 'Active' ? 'badge-success-inverse' : item?.status == 'Refreshing' ? 'badge-danger-inverse' : 'badge-info-inverse'
|
let statusColor = item?.status === 'Preparing' ? 'badge-success-inverse' : item?.status === 'Active' ? 'badge-success-inverse' : item?.status == 'Refreshing' ? 'badge-danger-inverse' : 'badge-info-inverse'
|
||||||
let productUrl = '/product/'+ item?.product_id
|
let productUrl = '/product/'+ item?.product_id
|
||||||
|
let externalUrl= item?.url_protocol +"://"+ item?.internal_url;
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{Number(item?.id)}</td>
|
<td>{Number(item?.id).toString().padStart(6,'0')}</td>
|
||||||
<td>{item?.description} - <a href={productUrl} target='_blank'>{item?.external_url}</a></td>
|
<td>
|
||||||
|
<a className="mr-3" href={externalUrl} target='_blank'><b>{externalUrl}</b></a> - {item?.description}
|
||||||
|
</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={productUrl}><i className="fe fe-edit"></i></a></td> */}
|
||||||
|
<td>
|
||||||
|
<a className="mr-3" href={productUrl}>
|
||||||
|
<img src={getImage('arrow-next.png')} alt='next' />
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default function RecentActions() {
|
|||||||
queryFn: () => recentActions()
|
queryFn: () => recentActions()
|
||||||
})
|
})
|
||||||
|
|
||||||
const actionData = dataAction?.data?.action_data
|
const actionData = dataAction?.data?.recent_actions
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -43,7 +43,7 @@ export default function RecentActions() {
|
|||||||
<div className="d-xxs-flex align-items-center">
|
<div className="d-xxs-flex align-items-center">
|
||||||
<div className="total-sales">
|
<div className="total-sales">
|
||||||
<p>Last Update</p>
|
<p>Last Update</p>
|
||||||
<h3>{dataAction?.data?.action_data?.last_update}</h3>
|
<h3>{dataAction?.data?.last_update}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="mb-3 mb-sm-0 ml-auto">
|
<div className="mb-3 mb-sm-0 ml-auto">
|
||||||
{/*<button className="btn btn-primary btn-xs">View All Invoices</button>*/}
|
{/*<button className="btn btn-primary btn-xs">View All Invoices</button>*/}
|
||||||
@@ -62,19 +62,19 @@ export default function RecentActions() {
|
|||||||
<div className="row no-gutters">
|
<div className="row no-gutters">
|
||||||
<div className="col-6 col-xxs-3 ">
|
<div className="col-6 col-xxs-3 ">
|
||||||
<p>Initial</p>
|
<p>Initial</p>
|
||||||
<h4>{actionData?.initial}</h4>
|
<h4>{dataAction?.data?.initial}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-6 col-xxs-3 ">
|
<div className="col-6 col-xxs-3 ">
|
||||||
<p>Processing</p>
|
<p>Processing</p>
|
||||||
<h4>{actionData?.processing}</h4>
|
<h4>{dataAction?.data?.processing}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-6 col-xxs-3 ">
|
<div className="col-6 col-xxs-3 ">
|
||||||
<p>Verifying</p>
|
<p>Verifying</p>
|
||||||
<h4>{actionData?.verifying}</h4>
|
<h4>{dataAction?.data?.verifying}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-6 col-xxs-3 ">
|
<div className="col-6 col-xxs-3 ">
|
||||||
<p>Completed</p>
|
<p>Completed</p>
|
||||||
<h4>{actionData?.completed}</h4>
|
<h4>{dataAction?.data?.completed}</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="table-responsive m-t-20">
|
<div className="table-responsive m-t-20">
|
||||||
@@ -89,16 +89,16 @@ export default function RecentActions() {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody className="text-muted">
|
<tbody className="text-muted">
|
||||||
{actionData && actionData?.actions.map((action, index) => {
|
{actionData && actionData?.map((action, index) => {
|
||||||
let bgColor = action?.status == '5' ? 'badge-success-inverse' : action?.status == '3' ? 'badge-info-inverse' : action?.status == '0' ? 'badge-warning-inverse' : 'badge-primary-inverse'
|
let bgColor = action?.status == '5' ? 'badge-success-inverse' : action?.status == '3' ? 'badge-info-inverse' : action?.status == '0' ? 'badge-warning-inverse' : 'badge-primary-inverse'
|
||||||
let text = action?.status == '5' ? 'completed' : action?.status == '3' ? 'verifying' : action?.status == '0' ? 'processing' : 'processing'
|
let text = action?.status == '5' ? 'completed' : action?.status == '3' ? 'verifying' : action?.status == '0' ? 'processing' : 'processing'
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{action?.no}</td>
|
<td>{action?.id}</td>
|
||||||
<td>{action?.description}</td>
|
<td>{action?.action_label}</td>
|
||||||
<td>{new Date(action?.date).toDateString()}</td>
|
<td>{new Date(action?.added).toDateString()}</td>
|
||||||
<td>
|
<td>
|
||||||
<label className={`badge mb-0 ${bgColor}`}>{text}</label>
|
<label className={`badge mb-0 ${bgColor}`}>{action?.status_description}</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default function TopBar() {
|
|||||||
let textColor = item?.description == 'Contacts' ? 'text-danger' : item?.description == 'Site Traffic' ? 'text-primary' : item?.description == 'Appointments' ? 'text-orange' : 'text-success'
|
let textColor = item?.description == 'Contacts' ? 'text-danger' : item?.description == 'Site Traffic' ? 'text-primary' : item?.description == 'Appointments' ? 'text-orange' : 'text-success'
|
||||||
return (
|
return (
|
||||||
<div key={item.id + index} className="col-sm-6 col-xxl-3">
|
<div key={item.id + index} className="col-sm-6 col-xxl-3">
|
||||||
<div className="card card-statistics ecommerce-contant overflow-h">
|
<div className={`card card-statistics ecommerce-contant overflow-h ${item?.extra_style} `}>
|
||||||
<div className="card-body p-0">
|
<div className="card-body p-0">
|
||||||
<div className="d-flex m-b-0 ecommerce-contant-text h-100">
|
<div className="d-flex m-b-0 ecommerce-contant-text h-100">
|
||||||
<div className="w-100">
|
<div className="w-100">
|
||||||
@@ -68,9 +68,7 @@ export default function TopBar() {
|
|||||||
<small className="d-block">{item?.data_span}</small>
|
<small className="d-block">{item?.data_span}</small>
|
||||||
</div>
|
</div>
|
||||||
<div className="col text-right">
|
<div className="col text-right">
|
||||||
<h5 className="text-muted mb-0">{item?.description}</h5>
|
<h5 className="text-muted mb-0"><a href={item?.link}>{item?.description}</a></h5>
|
||||||
<strong className={`${textColor} m-t-5`}><i
|
|
||||||
className="zmdi zmdi-long-arrow-up font-weight-bold"></i> N/A</strong>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="apexchart-wrapper">
|
<div className="apexchart-wrapper">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from "react";
|
import React, { useRef } from "react";
|
||||||
import getImage from "../../../utils/getImage";
|
import getImage from "../../../utils/getImage";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
@@ -9,6 +9,8 @@ export default function UserHeader(){
|
|||||||
|
|
||||||
const { userDetails } = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
const { userDetails } = useSelector((state) => state?.userDetails); // CHECKS IF USER Details are avaliable, to determine if user is active
|
||||||
|
|
||||||
|
const nav_menu = useRef(null)
|
||||||
|
|
||||||
const toggleSidebar = (e) => {
|
const toggleSidebar = (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
document.body.classList.toggle('sidebar-toggled')
|
document.body.classList.toggle('sidebar-toggled')
|
||||||
@@ -32,6 +34,11 @@ export default function UserHeader(){
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const toggleMenu = (e) => {
|
||||||
|
// e.preventDefault()
|
||||||
|
nav_menu.current.classList.toggle('show')
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className="app-header top-bar">
|
<header className="app-header top-bar">
|
||||||
<nav className="navbar navbar-expand-md">
|
<nav className="navbar navbar-expand-md">
|
||||||
@@ -66,11 +73,11 @@ 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 onClick={toggleMenu} href="#" className="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdow">
|
||||||
<img src={getImage('profile-pic-circle.png')} 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 ref={nav_menu} className="dropdown-menu animated fadeIn">
|
||||||
<div className="bg-gradient px-4 py-3">
|
<div className="bg-gradient px-4 py-3">
|
||||||
<div className="d-flex align-items-center justify-content-between">
|
<div className="d-flex align-items-center justify-content-between">
|
||||||
<div className="mr-1">
|
<div className="mr-1">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function UserMenu() {
|
|||||||
<li className="nav-static-title">Panel</li>
|
<li className="nav-static-title">Panel</li>
|
||||||
<li className={`${pathname == siteLinks.dash ? 'active' : ''}`}>
|
<li className={`${pathname == siteLinks.dash ? 'active' : ''}`}>
|
||||||
<Link className="has-arrow" to='#' data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
<Link className="has-arrow" to='#' data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||||
<i className="nav-icon ti ti-rocket"></i>
|
<i className="nav-icon ti ti-home"></i>
|
||||||
<div className='d-flex gap-2 justify-content-between align-items-center'>
|
<div className='d-flex gap-2 justify-content-between align-items-center'>
|
||||||
<span className="nav-title">Dashboard</span>
|
<span className="nav-title">Dashboard</span>
|
||||||
<IoIosArrowDown />
|
<IoIosArrowDown />
|
||||||
|
|||||||
@@ -1,140 +1,160 @@
|
|||||||
import React from "react";
|
import React, { useRef, useState } from "react";
|
||||||
import getImage from "../../utils/getImage";
|
import getImage from "../../utils/getImage";
|
||||||
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
|
import GeneralTab from "./settingsTab/GeneralTab";
|
||||||
|
import { useMutation } from "@tanstack/react-query";
|
||||||
|
import { productRefreshSite } from "../../services/services";
|
||||||
|
|
||||||
|
|
||||||
export default function ProductActive(){
|
export default function ProductActive({productData}){
|
||||||
|
const iframe = useRef()
|
||||||
|
|
||||||
|
const dataFields ={
|
||||||
|
site_title: { name: 'Title', controls: 'TEXT', active: true },
|
||||||
|
site_description: { name: 'Description', controls: 'TEXTAREA', active: true },
|
||||||
|
site_logo_text: { name: 'Logo Text', controls: 'TEXT', active: true },
|
||||||
|
site_contact_email: { name: 'Email', controls: 'TEXT', active: true },
|
||||||
|
site_contact_phone: { name: 'Phone', controls: 'TEXT', active: true },
|
||||||
|
}
|
||||||
|
|
||||||
|
const socialFields ={
|
||||||
|
facebook: { name: 'Facebook', controls: 'TEXT', active: true },
|
||||||
|
twitter: { name: 'Twitter', controls: 'TEXT', active: true },
|
||||||
|
youtube: { name: 'Youtube', controls: 'TEXT', active: true },
|
||||||
|
}
|
||||||
|
|
||||||
|
const homeFields ={
|
||||||
|
banner_text: { name: 'Banner Text', controls: 'TEXT', active: true },
|
||||||
|
banner_description: { name: 'Banner Description', controls: 'TEXTAREA', active: true },
|
||||||
|
}
|
||||||
|
|
||||||
|
const footerFields ={
|
||||||
|
footer_description: { name: 'Footer Description', controls: 'TEXTAREA', active: true },
|
||||||
|
}
|
||||||
|
|
||||||
|
const aboutFields ={
|
||||||
|
about_description: { name: 'About us', controls: 'TEXTAREA', active: true },
|
||||||
|
}
|
||||||
|
|
||||||
|
const templateData = {
|
||||||
|
template_16 : { title: 'Template Name-16', template_id: '02af24fd-2b1a-46ed-af21-87018e726408', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_22 : { title: 'Template Name-22', template_id: '8b296894-42e4-4f2e-abd1-7c2a38d6e07b', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_47 : { title: 'Template Name-47', template_id: 'ef2ffa1c-9272-42cd-9d33-0e614047b4f8', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_25 : { title: 'Template Name-25', template_id: 'b3a7ba31-dc47-4a40-a5cc-fd1ff27d6b78', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_49 : { title: 'Template Name-49', template_id: '60959c69-6672-4f69-a006-eeb7d210e605', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_27 : { title: 'Template Name-27', template_id: 'e4acb98a-c584-45f2-bece-af677dcf0a1f', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_51 : { title: 'Template Name-51', template_id: '975ee42e-3169-4978-92d7-d28e7e2ac014', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
template_9 : { title: 'Template Name-9', template_id: 'fc8f0738-6500-4775-9895-2047cd275302', banner: '/assets/img/file-icon/svg.png', active: '' },
|
||||||
|
}
|
||||||
|
|
||||||
|
const settingsObject = {
|
||||||
|
settings: { title: 'Settings', controls: 'settings', active: 'active show' , custom: false, data: dataFields},
|
||||||
|
home_tab: { title: 'Home Page', controls: 'home', active: '', custom: false, data: homeFields},
|
||||||
|
footer_tab: { title: 'Footer', controls: 'footer', active: '', custom: false, data: footerFields },
|
||||||
|
about_tab: { title: 'About Page', controls: 'about', active: '', custom: false, data: aboutFields },
|
||||||
|
contact_tab: { title: 'Contact Page', controls: 'contact', active: '', custom: false, data: {} },
|
||||||
|
social_tab: { title: 'Socials', controls: 'social', active: '', custom: false, data: socialFields },
|
||||||
|
template_tab: { title: 'Template', controls: 'template', active: '', custom: true, data: templateData },
|
||||||
|
color_scheme_tab: { title: 'Color Scheme', controls: 'color-scheme', active: '', custom: true, data: {} },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const [activeTab, setActiveTab] = useState(Object.entries(settingsObject)[0][1]?.controls)
|
||||||
|
|
||||||
|
const refresh = useMutation({
|
||||||
|
mutationFn: (fields) => {
|
||||||
|
return productRefreshSite(fields)
|
||||||
|
},
|
||||||
|
onSuccess: (res) => {
|
||||||
|
iframe.current.src += ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleRefresh = () => {
|
||||||
|
const reqData = {
|
||||||
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
|
uid: localStorage.getItem('uid'), // USER UID
|
||||||
|
product_id: productData.product_id,
|
||||||
|
subscription_uid: productData.subscription_uid
|
||||||
|
}
|
||||||
|
refresh.mutate(reqData)
|
||||||
|
}
|
||||||
|
let externalUrl= 'https://'+productData?.internal_url
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
<BreadcrumbComBS title='Active Product Name' paths={['Dashboard', 'Product']} />
|
{/*<BreadcrumbComBS title='Active Product Name' paths={['Dashboard', 'Product']} />*/}
|
||||||
{/*<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>*/}
|
{/*</div>*/}
|
||||||
|
|
||||||
|
|
||||||
<div className="row account-contant">
|
<div className="row account-contant">
|
||||||
<div className="col-12">
|
<>
|
||||||
<div className="card card-statistics">
|
<div className="row tabs-contant">
|
||||||
<div className="card-body p-0">
|
<div className="col-xxl-6">
|
||||||
<div className="row no-gutters">
|
<div className="card card-statistics">
|
||||||
<div className="col-xl-3 pb-xl-0 pb-5 border-right">
|
<div className="card-header">
|
||||||
<div className="page-account-profil pt-5">
|
<div className="card-heading d-flex justify-content-between">
|
||||||
<div className="profile-img text-center rounded-circle">
|
<h4 className="card-title">{externalUrl}</h4>
|
||||||
<div className="pt-5">
|
<button type="button" onClick={()=>iframe.current.src += ''} className="btn btn-primary">IC</button>
|
||||||
<div className="bg-img m-auto">
|
|
||||||
<img src={getImage('widget/01.jpg')} className="img-fluid"
|
|
||||||
alt="users-avatar" />
|
|
||||||
</div>
|
|
||||||
<div className="profile pt-4">
|
|
||||||
<h4 className="mb-1">Product Short Name</h4>
|
|
||||||
<p>last Update : 00:00:0000</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-xl-5 col-md-6 col-12 border-t border-right">
|
<div className="card-body">
|
||||||
<div className="page-account-form">
|
<iframe ref={iframe} style={{borderWidth: '0px'}} src={externalUrl} width="100%" height="600" title={externalUrl}></iframe>
|
||||||
<div className="form-titel border-bottom p-3">
|
</div>
|
||||||
<h5 className="mb-0 py-2">Edit Your Product Settings</h5>
|
<div className="p-4 ml-auto">
|
||||||
</div>
|
<button type="button" onClick={handleRefresh} className="btn btn-primary">{refresh.isPending ? 'Loading...' : 'Refresh Site'}
|
||||||
<div className="p-4">
|
</button>
|
||||||
<form>
|
</div>
|
||||||
<div className="form-row">
|
</div>
|
||||||
<div className="form-group col-md-12">
|
</div>
|
||||||
<label htmlFor="name1">Full Name</label>
|
<div className="col-xxl-6">
|
||||||
<input type="text" className="form-control" id="name1"
|
<div className="card card-statistics">
|
||||||
value="Alice Williams" />
|
<div className="card-header">
|
||||||
</div>
|
<div className="card-heading">
|
||||||
<div className="form-group col-md-12">
|
<h4 className="card-title"> Site Settings </h4>
|
||||||
<label htmlFor="title1">Title</label>
|
|
||||||
<input type="text" className="form-control" id="title1"
|
|
||||||
value="Marketing expert" />
|
|
||||||
</div>
|
|
||||||
<div className="form-group col-md-12">
|
|
||||||
<label htmlFor="phone1">Phone Number</label>
|
|
||||||
<input type="text" className="form-control" id="phone1"
|
|
||||||
value="(01) 97 563 15613" />
|
|
||||||
</div>
|
|
||||||
<div className="form-group col-md-12">
|
|
||||||
<label htmlFor="email1">Email</label>
|
|
||||||
<input type="email" className="form-control" id="email1"
|
|
||||||
value="alicewilliams@gmail.com" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="form-group">
|
|
||||||
<label htmlFor="add1">Address</label>
|
|
||||||
<input type="text" className="form-control" id="add1"
|
|
||||||
value="17504 Carlton Cuevas Rd, Gulfport, MS, 39503" />
|
|
||||||
</div>
|
|
||||||
<div className="form-group">
|
|
||||||
<label htmlFor="add2">Address 2</label>
|
|
||||||
<input type="text" className="form-control" id="add2"
|
|
||||||
value="1234 North Avenue Luke Lane, South Bend, IN 360001" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary">Update Information
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-xl-4 col-md-6 border-t col-12">
|
<div className="card-body">
|
||||||
<div className="page-account-form">
|
<div className="tab tab-vertical">
|
||||||
<div className="form-titel border-bottom p-3">
|
<ul className="nav nav-tabs" role="tablist">
|
||||||
<h5 className="mb-0 py-2">Your External Link</h5>
|
<>
|
||||||
</div>
|
{Object.entries(settingsObject).map(([key, value]) => (
|
||||||
<div className="p-4">
|
<li key={key} className="nav-item">
|
||||||
<form>
|
<a className={`nav-link ${activeTab == value.controls && 'active show'}`}
|
||||||
<div className="form-group">
|
id={key} data-bs-toggle="pill"
|
||||||
<label htmlFor="fb">Facebook URL:</label>
|
// data-bs-target={`#${value.controls}`}
|
||||||
<input type="text" className="form-control" id="fb"
|
type="button" role="tab"
|
||||||
value="https://www.facebook.com/" />
|
// aria-controls={value.controls}
|
||||||
</div>
|
// aria-selected="true"
|
||||||
<div className="form-group">
|
onClick={()=>setActiveTab(value.controls)}
|
||||||
<label htmlFor="tr">Twitter URL:</label>
|
>
|
||||||
<input type="text" className="form-control" id="tr"
|
{value.title}
|
||||||
value="https://twitter.com/" />
|
</a>
|
||||||
</div>
|
</li>
|
||||||
|
))}
|
||||||
<div className="form-group">
|
</>
|
||||||
<label htmlFor="br">Blogger URL:</label>
|
</ul>
|
||||||
<input type="text" className="form-control" id="br"
|
<div className="tab-content">
|
||||||
value="https://www.blogger.com" />
|
<>
|
||||||
</div>
|
{Object.entries(settingsObject).map(([key, value]) => (
|
||||||
|
<div key={key} className={`tab-pane fade ${activeTab == value.controls && 'active show'}`}
|
||||||
<div className="form-group">
|
// id={value.controls} role="tabpanel"
|
||||||
<label htmlFor="go">Google+ URL:</label>
|
// aria-labelledby={key}
|
||||||
<input type="text" className="form-control" id="go"
|
>
|
||||||
value="https://plus.google.com/discover" />
|
<GeneralTab name={value.title} data={value.data} isCustom={value.custom} productData={productData} />
|
||||||
</div>
|
</div>
|
||||||
|
))}
|
||||||
<div className="form-group">
|
</>
|
||||||
<label htmlFor="li">LinkedIn URL:</label>
|
|
||||||
<input type="text" className="form-control" id="li"
|
|
||||||
value="https://in.linkedin.com/" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="form-group">
|
|
||||||
<label htmlFor="we">Website URL:</label>
|
|
||||||
<input type="text" className="form-control" id="we"
|
|
||||||
value="https://yourwebsite.com" />
|
|
||||||
</div>
|
|
||||||
<button type="submit" className="btn btn-primary">Save & Update</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
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";
|
||||||
@@ -8,6 +7,7 @@ import {MyProductData} from "../../services/services";
|
|||||||
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";
|
||||||
|
import queryKeys from "../../services/queryKeys";
|
||||||
|
|
||||||
export default function ProductFactory(){
|
export default function ProductFactory(){
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
@@ -16,30 +16,18 @@ export default function ProductFactory(){
|
|||||||
// Split the pathname by '/' and get the last element
|
// Split the pathname by '/' and get the last element
|
||||||
const productID = pathname.split('/').pop();
|
const productID = pathname.split('/').pop();
|
||||||
|
|
||||||
const getProductData = useMutation({
|
|
||||||
mutationFn: (reqData) => {
|
|
||||||
return MyProductData(reqData)
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
console.log(error)
|
|
||||||
},
|
|
||||||
onSuccess: (res) => {
|
|
||||||
if(res?.data?.resultCode != '0'){
|
|
||||||
throw({message: 'Something went wrong'})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
let reqData = {
|
let reqData = {
|
||||||
product_id : productID,
|
product_id : productID,
|
||||||
token: localStorage.getItem('token'), // USER TOKEN
|
token: localStorage.getItem('token'), // USER TOKEN
|
||||||
uid: localStorage.getItem('uid') // USER UID
|
uid: localStorage.getItem('uid') // USER UID
|
||||||
}
|
}
|
||||||
getProductData.mutate(reqData)
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
},[])
|
queryKey: queryKeys.product_page,
|
||||||
|
queryFn: () => MyProductData(reqData),
|
||||||
const myproduct_data = getProductData?.data?.data?.myproduct?.myproudct // PRODUCT DETAILS
|
staleTime: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const myproduct_data = 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;
|
||||||
|
|
||||||
@@ -47,7 +35,7 @@ export default function ProductFactory(){
|
|||||||
<>
|
<>
|
||||||
<BreadcrumbComBS title={product_name} paths={['Dashboard', 'Product']} />
|
<BreadcrumbComBS title={product_name} paths={['Dashboard', 'Product']} />
|
||||||
<div className="row">
|
<div className="row">
|
||||||
{getProductData?.isPending ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
@@ -55,27 +43,26 @@ export default function ProductFactory(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
: getProductData?.error ?
|
: isError ?
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<p className='text-danger'>{getProductData?.error?.message}</p>
|
<p className='text-danger'>{error?.message}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<div>
|
<div>
|
||||||
{(product_status <= productConst.PRODUCT_AVAILABLE)?
|
{(product_status <= productConst.PRODUCT_AVAILABLE)?
|
||||||
<ProductStart productData={myproduct_data} />
|
<ProductStart productData={myproduct_data} />
|
||||||
:<></> }
|
:<></> }
|
||||||
|
|
||||||
{(product_status === productConst.PRODUCT_PROVISIONING)?
|
{(product_status === productConst.PRODUCT_PROVISIONING)?
|
||||||
<ProductProvision productData={myproduct_data} />
|
<ProductProvision productData={myproduct_data} />
|
||||||
:<></> }
|
:<></> }
|
||||||
|
|
||||||
{(product_status === productConst.PRODUCT_ACTIVE)?
|
{(product_status === productConst.PRODUCT_ACTIVE)?
|
||||||
<ProductActive productData={myproduct_data} />
|
<ProductActive productData={myproduct_data} />
|
||||||
:<></> }
|
:<></> }
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -110,9 +110,9 @@ export default function ProductProvision(props){
|
|||||||
<div className="card card-statistics ">
|
<div className="card card-statistics ">
|
||||||
<h4 className="card-title" style={{padding:'10px'}}>Started creating your selection</h4>
|
<h4 className="card-title" style={{padding:'10px'}}>Started creating your selection</h4>
|
||||||
<img className="card-img-top" src={getImage('widget/working.jpg')} alt="Card image cap" />
|
<img className="card-img-top" src={getImage('widget/working.jpg')} alt="Card image cap" />
|
||||||
<div className="card-body">
|
{/* <div className="card-body">
|
||||||
<div className="" dangerouslySetInnerHTML={{__html: productDescription}}/>
|
<div className="" dangerouslySetInnerHTML={{__html: productDescription}}/>
|
||||||
</div>
|
</div> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useRef, useState } from "react";
|
import React, { useRef, useState } from "react";
|
||||||
|
import {useNavigate} from 'react-router-dom'
|
||||||
import getImage from "../../utils/getImage";
|
import getImage from "../../utils/getImage";
|
||||||
// import { Modal } from "bootstrap";
|
import { Modal } from "bootstrap";
|
||||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
import { subscribe } from '../../services/services'
|
import { subscribe } from '../../services/services'
|
||||||
import queryKeys from "../../services/queryKeys";
|
import queryKeys from "../../services/queryKeys";
|
||||||
@@ -8,26 +9,28 @@ import queryKeys from "../../services/queryKeys";
|
|||||||
export default function ProductStart(props){
|
export default function ProductStart(props){
|
||||||
|
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const [requestStatus, setRequestStatus] = useState({status:false, message: ''})
|
const [requestStatus, setRequestStatus] = useState({status:false, message: ''})
|
||||||
|
|
||||||
const product_uid = props?.productData?.product_uid;
|
const product_uid = props?.productData?.product_uid;
|
||||||
const product_id = props?.productData?.product_id;
|
const product_id = props?.productData?.product_id;
|
||||||
const productBanner = "product/"+props.productData?.banner;
|
const productBanner = `product/${props.productData?.banner}`;
|
||||||
const productTitle = props.productData?.title;
|
const productTitle = props?.productData?.title;
|
||||||
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 saleText = props?.productData?.sale_text;
|
||||||
|
|
||||||
const modalRef = useRef()
|
|
||||||
|
|
||||||
const refetch = () => {
|
const modalRef = useRef(null)
|
||||||
queryClient.refetchQueries({
|
|
||||||
queryKey: [...queryKeys.product],
|
const invalidate = () => {
|
||||||
// type: 'active',
|
// queryClient.refetchQueries({
|
||||||
// exact: true,
|
// queryKey: [...queryKeys.product],
|
||||||
})
|
// // type: 'active',
|
||||||
|
// // exact: true,
|
||||||
|
// })
|
||||||
|
queryClient.invalidateQueries({ queryKey: [...queryKeys.product_url] })
|
||||||
|
queryClient.invalidateQueries({ queryKey: [...queryKeys.product_page] })
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutation = useMutation({
|
const mutation = useMutation({
|
||||||
@@ -40,9 +43,12 @@ export default function ProductStart(props){
|
|||||||
},
|
},
|
||||||
onSuccess: (res) => {
|
onSuccess: (res) => {
|
||||||
setRequestStatus({status:true, message:'successful'})
|
setRequestStatus({status:true, message:'successful'})
|
||||||
|
navigate(`/product/${product_id}`, {replace: true}) //'/product/'+ product_id
|
||||||
|
dismissModal()
|
||||||
console.log(res)
|
console.log(res)
|
||||||
},
|
},
|
||||||
onSettled: () => {
|
onSettled: () => {
|
||||||
|
invalidate() // Invalidates selected queries
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
setRequestStatus({status:false, message:''})
|
setRequestStatus({status:false, message:''})
|
||||||
},4000)
|
},4000)
|
||||||
@@ -53,6 +59,22 @@ export default function ProductStart(props){
|
|||||||
mutation.mutate({product_id: product_id})
|
mutation.mutate({product_id: product_id})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dismissModal = () => {
|
||||||
|
const body = document.querySelector('body')
|
||||||
|
body.removeAttribute('style')
|
||||||
|
// body.classList.toggle('modal-open')
|
||||||
|
|
||||||
|
const modalBackdrop = document.querySelectorAll('.modal-backdrop')
|
||||||
|
modalBackdrop.forEach(item => {
|
||||||
|
if (item) {
|
||||||
|
item.remove();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const modal = Modal.getInstance(modalRef.current);
|
||||||
|
modal && modal.hide();
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
@@ -113,7 +135,7 @@ export default function ProductStart(props){
|
|||||||
<div className="modal-content">
|
<div className="modal-content">
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
<h5 className="modal-title" id="verticalCenterTitle">{productTitle}</h5>
|
<h5 className="modal-title" id="verticalCenterTitle">{productTitle}</h5>
|
||||||
<button onClick={refetch} type="button" className="close" data-bs-dismiss="modal" aria-label="Close">
|
<button type="button" className="close" data-bs-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -140,7 +162,7 @@ export default function ProductStart(props){
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
<button onClick={refetch} type="button" className="btn btn-danger" data-bs-dismiss="modal">Close</button>
|
<button type="button" className="btn btn-danger" data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button" className="btn btn-success" disabled={mutation.isSuccess} onClick={handleSubscribe}>{mutation.isPending ? 'loading...' : 'Start'}</button>
|
<button type="button" className="btn btn-success" disabled={mutation.isSuccess} onClick={handleSubscribe}>{mutation.isPending ? 'loading...' : 'Start'}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,278 @@
|
|||||||
|
import React from "react";
|
||||||
|
import getImage from "../../utils/getImage";
|
||||||
|
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||||
|
|
||||||
|
|
||||||
|
export default function ProductActive(){
|
||||||
|
|
||||||
|
return(
|
||||||
|
<>
|
||||||
|
{/*<BreadcrumbComBS title='Active Product Name' paths={['Dashboard', 'Product']} />*/}
|
||||||
|
{/*<div className="row">*/}
|
||||||
|
{/* <div className="vh-100 col-12 flex align-items-center">Coming Soon</div>*/}
|
||||||
|
{/*</div>*/}
|
||||||
|
|
||||||
|
|
||||||
|
<div className="row account-contant">
|
||||||
|
<>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="row tabs-contant">
|
||||||
|
<div className="col-xxl-6">
|
||||||
|
<div className="card card-statistics">
|
||||||
|
<div className="card-header">
|
||||||
|
<div className="card-heading">
|
||||||
|
<h4 className="card-title">https://25681.devprov.mermsemr.com/</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="card-body">
|
||||||
|
<iframe style={{borderWidth: '0px;'}} src="https://25681.devprov.mermsemr.com/" width="100%" height="600" title="https://25681.devprov.mermsemr.com"></iframe>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-xxl-6">
|
||||||
|
<div className="card card-statistics">
|
||||||
|
<div className="card-header">
|
||||||
|
<div className="card-heading">
|
||||||
|
<h4 className="card-title"> Site Settings </h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="card-body">
|
||||||
|
<div className="tab tab-vertical">
|
||||||
|
<ul className="nav nav-tabs" role="tablist">
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link active show" id="home-09-tab" data-toggle="tab" href="#home-09" role="tab" aria-controls="home-09" aria-selected="true">General</a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="home-09-tab" data-toggle="tab" href="#home-09" role="tab" aria-controls="home-09" aria-selected="true">Home Page</a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="profile-09-tab" data-toggle="tab" href="#profile-09" role="tab" aria-controls="profile-09" aria-selected="false"> Footer </a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="portfolio-09-tab" data-toggle="tab" href="#portfolio-09" role="tab" aria-controls="portfolio-09" aria-selected="false">About Page </a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="contact-09-tab" data-toggle="tab" href="#contact-09" role="tab" aria-controls="contact-09" aria-selected="false"> Contact Page</a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="home-09-tab" data-toggle="tab" href="#home-09" role="tab" aria-controls="home-09" aria-selected="true">Socials</a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="home-09-tab" data-toggle="tab" href="#home-09" role="tab" aria-controls="home-09" aria-selected="true">Template</a>
|
||||||
|
</li>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" id="home-09-tab" data-toggle="tab" href="#home-09" role="tab" aria-controls="home-09" aria-selected="true"> Color Scheme</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div className="tab-content">
|
||||||
|
<div className="tab-pane fade active show" id="home-09" role="tabpanel" aria-labelledby="home-09-tab">
|
||||||
|
|
||||||
|
<div className="page-account-form">
|
||||||
|
<div className="p-4">
|
||||||
|
<form>
|
||||||
|
<div className="form-row">
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="name1">Full Name</label>
|
||||||
|
<input type="text" className="form-control" id="name1"
|
||||||
|
value="Alice Williams" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="title1">Title</label>
|
||||||
|
<input type="text" className="form-control" id="title1"
|
||||||
|
value="Marketing expert" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="phone1">Phone Number</label>
|
||||||
|
<input type="text" className="form-control" id="phone1"
|
||||||
|
value="(01) 97 563 15613" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="email1">Email</label>
|
||||||
|
<input type="email" className="form-control" id="email1"
|
||||||
|
value="alicewilliams@gmail.com" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add1">Address</label>
|
||||||
|
<input type="text" className="form-control" id="add1"
|
||||||
|
value="17504 Carlton Cuevas Rd, Gulfport, MS, 39503" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add2">Address 2</label>
|
||||||
|
<input type="text" className="form-control" id="add2"
|
||||||
|
value="1234 North Avenue Luke Lane, South Bend, IN 360001" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" className="btn btn-primary">Update Information
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="tab-pane fade" id="profile-09" role="tabpanel" aria-labelledby="profile-09-tab">
|
||||||
|
<div className="page-account-form">
|
||||||
|
|
||||||
|
<div className="p-4">
|
||||||
|
<form>
|
||||||
|
<div className="form-row">
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="name1">Full Name</label>
|
||||||
|
<input type="text" className="form-control" id="name1"
|
||||||
|
value="Alice Williams" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="title1">Title</label>
|
||||||
|
<input type="text" className="form-control" id="title1"
|
||||||
|
value="Marketing expert" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="phone1">Phone Number</label>
|
||||||
|
<input type="text" className="form-control" id="phone1"
|
||||||
|
value="(01) 97 563 15613" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="email1">Email</label>
|
||||||
|
<input type="email" className="form-control" id="email1"
|
||||||
|
value="alicewilliams@gmail.com" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add1">Address</label>
|
||||||
|
<input type="text" className="form-control" id="add1"
|
||||||
|
value="17504 Carlton Cuevas Rd, Gulfport, MS, 39503" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add2">Address 2</label>
|
||||||
|
<input type="text" className="form-control" id="add2"
|
||||||
|
value="1234 North Avenue Luke Lane, South Bend, IN 360001" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" className="btn btn-primary">Update Information
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="tab-pane fade" id="portfolio-09" role="tabpanel" aria-labelledby="portfolio-09-tab">
|
||||||
|
<p>
|
||||||
|
<div className="page-account-form">
|
||||||
|
<div className="form-titel border-bottom p-3">
|
||||||
|
<h5 className="mb-0 py-2">Edit Your Product Settings</h5>
|
||||||
|
</div>
|
||||||
|
<div className="p-4">
|
||||||
|
<form>
|
||||||
|
<div className="form-row">
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="name1">Full Name</label>
|
||||||
|
<input type="text" className="form-control" id="name1"
|
||||||
|
value="Alice Williams" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="title1">Title</label>
|
||||||
|
<input type="text" className="form-control" id="title1"
|
||||||
|
value="Marketing expert" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="phone1">Phone Number</label>
|
||||||
|
<input type="text" className="form-control" id="phone1"
|
||||||
|
value="(01) 97 563 15613" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="email1">Email</label>
|
||||||
|
<input type="email" className="form-control" id="email1"
|
||||||
|
value="alicewilliams@gmail.com" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add1">Address</label>
|
||||||
|
<input type="text" className="form-control" id="add1"
|
||||||
|
value="17504 Carlton Cuevas Rd, Gulfport, MS, 39503" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add2">Address 2</label>
|
||||||
|
<input type="text" className="form-control" id="add2"
|
||||||
|
value="1234 North Avenue Luke Lane, South Bend, IN 360001" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" className="btn btn-primary">Update Information
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</p> </div>
|
||||||
|
<div className="tab-pane fade" id="contact-09" role="tabpanel" aria-labelledby="contact-09-tab">
|
||||||
|
<p>
|
||||||
|
<div className="page-account-form">
|
||||||
|
<div className="form-titel border-bottom p-3">
|
||||||
|
<h5 className="mb-0 py-2">Edit Your Product Settings</h5>
|
||||||
|
</div>
|
||||||
|
<div className="p-4">
|
||||||
|
<form>
|
||||||
|
<div className="form-row">
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="name1">Full Name</label>
|
||||||
|
<input type="text" className="form-control" id="name1"
|
||||||
|
value="Alice Williams" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="title1">Title</label>
|
||||||
|
<input type="text" className="form-control" id="title1"
|
||||||
|
value="Marketing expert" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="phone1">Phone Number</label>
|
||||||
|
<input type="text" className="form-control" id="phone1"
|
||||||
|
value="(01) 97 563 15613" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group col-md-12">
|
||||||
|
<label htmlFor="email1">Email</label>
|
||||||
|
<input type="email" className="form-control" id="email1"
|
||||||
|
value="alicewilliams@gmail.com" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add1">Address</label>
|
||||||
|
<input type="text" className="form-control" id="add1"
|
||||||
|
value="17504 Carlton Cuevas Rd, Gulfport, MS, 39503" />
|
||||||
|
</div>
|
||||||
|
<div className="form-group">
|
||||||
|
<label htmlFor="add2">Address 2</label>
|
||||||
|
<input type="text" className="form-control" id="add2"
|
||||||
|
value="1234 North Avenue Luke Lane, South Bend, IN 360001" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<button type="submit" className="btn btn-primary">Update Information
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import React, {memo, useState} from 'react'
|
||||||
|
import SiteTemplateSelector from './SiteTemplateSelector';
|
||||||
|
|
||||||
|
const GeneralTab = memo(({name='Full Name', data, isCustom, productData}) =>{
|
||||||
|
console.log("Page data == ", data)
|
||||||
|
|
||||||
|
const fieldData = {}
|
||||||
|
Object.entries(data)?.forEach(([key, value]) => { // LOOP TO POPULATE FIELDDATA PROPERTIES WITH DATA OF EACH TAB
|
||||||
|
fieldData[value.name] = ''
|
||||||
|
})
|
||||||
|
const [fields, setFields] = useState(fieldData)
|
||||||
|
const handleChange = ({target:{name, value}}) => {
|
||||||
|
setFields(prev => ({...prev, [name]:value}))
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSubmit = () => {
|
||||||
|
console.log('formInfo', fields)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isCustom === true){
|
||||||
|
return <SiteTemplateSelector name={name} data={data} isCustom={isCustom} productData={productData} />
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="page-account-form">
|
||||||
|
<div className="p-0" style={{ minHeight: '500px'}}>
|
||||||
|
|
||||||
|
<form id='tab_form'>
|
||||||
|
<div className="form-row">
|
||||||
|
<>
|
||||||
|
{Object.entries(data)?.map(([key, value]) => (
|
||||||
|
<div key={key} className="form-group col-md-12">
|
||||||
|
<label htmlFor="name1">{value.name}</label>
|
||||||
|
{value.controls == 'TEXT' ?
|
||||||
|
<input name={value.name} type="text" className="form-control" id={key} value={fields[value.name]} onChange={handleChange} />
|
||||||
|
:value.controls == 'TEXTAREA' ?
|
||||||
|
<textarea name={value.name} rows={5} style={{resize: 'none'}} type="text" className="form-control" id={key} value={fields[value.name]} onChange={handleChange} />
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
<div className="form-group col-md-12" style={{textAlign:'right'}}>
|
||||||
|
<button onClick={handleSubmit} type="button" className="btn btn-primary">Update</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
export default GeneralTab
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import React, {memo} from 'react'
|
||||||
|
|
||||||
|
const SiteTemplateSelector = memo(({name='Full Name', data}) =>{
|
||||||
|
console.log("Page data == ", data)
|
||||||
|
return (
|
||||||
|
<div className="page-account-form">
|
||||||
|
<div className="p-0">
|
||||||
|
<div className="row">
|
||||||
|
<>
|
||||||
|
{Object.entries(data)?.map(([key, value]) => (
|
||||||
|
<div key={key} className="col-xl-6 col-sm-6">
|
||||||
|
<div className="card card-statistics">
|
||||||
|
<div className="card-body">
|
||||||
|
<div className="text-center p-2">
|
||||||
|
<div className="mb-2">
|
||||||
|
<img src={value.banner} alt={value.title} />
|
||||||
|
</div>
|
||||||
|
<h4 className="mb-0">{value.title}</h4>
|
||||||
|
<a href="javascript:void(0)" className="btn btn-light">Activate</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
export default SiteTemplateSelector
|
||||||
@@ -588,11 +588,16 @@
|
|||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.show + .dropdown-menu{
|
.show{
|
||||||
margin-top: 0;
|
margin-top: 0!important;
|
||||||
visibility: visible;
|
visibility: visible!important;
|
||||||
opacity: 1;
|
opacity: 1!important;
|
||||||
}
|
}
|
||||||
|
// .show + .dropdown-menu{
|
||||||
|
// margin-top: 0;
|
||||||
|
// visibility: visible;
|
||||||
|
// opacity: 1;
|
||||||
|
// }
|
||||||
// .show {
|
// .show {
|
||||||
// .dropdown-menu{
|
// .dropdown-menu{
|
||||||
// margin-top: 0;
|
// margin-top: 0;
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
const queryKeys = {
|
const queryKeys = {
|
||||||
user_details: ['user_details'],
|
user_details: ['user_details'],
|
||||||
|
product_url: ['product_url'],
|
||||||
|
products: ['product-data'],
|
||||||
|
myproduct_provision: ['myproduct_provision'],
|
||||||
|
product_page: ['product_page'],
|
||||||
|
recentAction: ['recent-action'],
|
||||||
|
|
||||||
dashboard: ['dashboard'],
|
dashboard: ['dashboard'],
|
||||||
topBar: ['top-bar'],
|
topBar: ['top-bar'],
|
||||||
recentAction: ['recent-action'],
|
|
||||||
product: ['product-data'],
|
|
||||||
product_url: ['product_url'],
|
|
||||||
myproduct_provision: ['myproduct_provision'],
|
|
||||||
calendar_events: ['calendar_events'],
|
calendar_events: ['calendar_events'],
|
||||||
contacts: ['contacts']
|
contacts: ['contacts']
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,14 @@ export const productsData = (reqData) => {
|
|||||||
return postAuxEnd(`/panel/account/products`, postData, false)
|
return postAuxEnd(`/panel/account/products`, postData, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO REFRESH SITE
|
||||||
|
export const productRefreshSite = (reqData) => {
|
||||||
|
let postData = {
|
||||||
|
...reqData,
|
||||||
|
}
|
||||||
|
return postAuxEnd(`/panel/account/products/refresh`, 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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user