Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43e8b9601a | |||
| a2c7ecd1f5 | |||
| 0113f047dd |
@@ -1,5 +1,5 @@
|
|||||||
import {useEffect, useState} from 'react'
|
import {useEffect, useState} from 'react'
|
||||||
import { useQuery } from '@tanstack/react-query'
|
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
||||||
|
|
||||||
import {useLocation, useNavigate, Link} from 'react-router-dom'
|
import {useLocation, useNavigate, Link} from 'react-router-dom'
|
||||||
|
|
||||||
@@ -14,6 +14,8 @@ import CustomerPaymentsView from "./CustomerPaymentsView";
|
|||||||
|
|
||||||
export default function AccountViewCom() {
|
export default function AccountViewCom() {
|
||||||
|
|
||||||
|
const queryClient = useQueryClient()
|
||||||
|
|
||||||
const {state} = useLocation()
|
const {state} = useLocation()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
@@ -43,6 +45,14 @@ export default function AccountViewCom() {
|
|||||||
const payments = accountsViewData?.payments
|
const payments = accountsViewData?.payments
|
||||||
// console.log('DATA', payments, subscriptions)
|
// console.log('DATA', payments, subscriptions)
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
queryClient.refetchQueries({
|
||||||
|
queryKey: [...queryKeys.account_view],
|
||||||
|
// type: 'active',
|
||||||
|
// exact: true,
|
||||||
|
})
|
||||||
|
},[state?.memberUID])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title={`Account View [${state?.memberUID}]`} paths={['Dashboard', 'Account View']}/>
|
<BreadcrumbCom title={`Account View [${state?.memberUID}]`} paths={['Dashboard', 'Account View']}/>
|
||||||
|
|||||||
@@ -61,19 +61,22 @@ export default function RecentPaymentsBar({data, isFetching, isError, error}) {
|
|||||||
:
|
:
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
{recentLogin.map((item, index)=> {
|
{recentLogin.map((item, index)=> {
|
||||||
if(index < 5){
|
return (
|
||||||
return (
|
<Link
|
||||||
<div key={index} className='flex gap-3 items-center'>
|
to={`/account-view/${item?.member_uid}`}
|
||||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
state={{customerID: item?.id, memberUID: item?.member_uid}}
|
||||||
<img src={Img} className='w-8' alt="Order" />
|
key={index}
|
||||||
</div>
|
className='flex gap-3 items-center'
|
||||||
<div className='flex-col'>
|
>
|
||||||
<p className='text-base font-bold text-white-body'>{item.firstname} {item.lastname}</p>
|
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
||||||
<p className='text-sm text-slate-500'>{item.username}</p>
|
<img src={Img} className='w-8' alt="Order" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
<div className='flex-col'>
|
||||||
}
|
<p className='text-base font-bold text-white-body'>{item.firstname} {item.lastname}</p>
|
||||||
|
<p className='text-sm text-slate-500'>{item.username}</p>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import {Link} from 'react-router-dom'
|
||||||
import Img from '../../../assets/user_avatar.jpg'
|
import Img from '../../../assets/user_avatar.jpg'
|
||||||
import CustomCounter from '../../CustomCounter'
|
import CustomCounter from '../../CustomCounter'
|
||||||
|
|
||||||
export default function Tickets({data, isFetching, isError, error}) {
|
export default function Tickets({data, isFetching, isError, error}) {
|
||||||
|
|
||||||
const recentDeployment = data?.data?.recent_deployment_summary
|
const recentDeployment = data?.data?.recent_deployment_summary
|
||||||
|
const recentSignup = data?.data?.recent_signup
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='h-full p-2 sm:p-4 large:p-8 flex flex-col gap-16 overflow-y-auto aside-scroll-design'>
|
<div className='h-full p-2 sm:p-4 large:p-8 flex flex-col gap-16 aside-scroll-design'>
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
<p className='text-base text-white-body font-bold'>Recent Deployments</p>
|
<p className='text-base text-white-body font-bold'>Recent Deployments</p>
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
@@ -46,8 +49,8 @@ export default function Tickets({data, isFetching, isError, error}) {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='overflow-y-auto h-full flex flex-col gap-4'>
|
||||||
<p className='text-base text-white-body font-bold'>Tracked Errors</p>
|
<p className='text-base text-white-body font-bold'>Recent Signup</p>
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
<div className='w-full flex justify-center'>
|
<div className='w-full flex justify-center'>
|
||||||
<div className="w-6 h-6 border-2 border-gray-300 border-b-gray-500 rounded-full animate-spin"></div>
|
<div className="w-6 h-6 border-2 border-gray-300 border-b-gray-500 rounded-full animate-spin"></div>
|
||||||
@@ -57,42 +60,25 @@ export default function Tickets({data, isFetching, isError, error}) {
|
|||||||
<p className='text-base text-white-body font-bold'>{error?.message}</p>
|
<p className='text-base text-white-body font-bold'>{error?.message}</p>
|
||||||
:
|
:
|
||||||
<div className='flex flex-col gap-4'>
|
<div className='flex flex-col gap-4'>
|
||||||
<div className='flex gap-3 items-center'>
|
{recentSignup.map((item, index)=> {
|
||||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
return (
|
||||||
<img src={Img} className='w-8' alt="Order" />
|
<Link
|
||||||
</div>
|
to={`/account-view/${item?.member_uid}`}
|
||||||
<div className='flex-col'>
|
state={{customerID: item?.id, memberUID: item?.member_uid}}
|
||||||
<p className='text-base font-bold text-white-body'>Project Briefing</p>
|
key={index}
|
||||||
<p className='text-sm text-slate-500'>Project Manager</p>
|
className='flex gap-3 items-center'
|
||||||
</div>
|
>
|
||||||
</div>
|
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
||||||
<div className='flex gap-3 items-center'>
|
<img src={Img} className='w-8' alt="Order" />
|
||||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
</div>
|
||||||
<img src={Img} className='w-8' alt="Order" />
|
<div className='flex-col'>
|
||||||
</div>
|
<p className='text-base font-bold text-white-body'>{item.firstname} {item.lastname}</p>
|
||||||
<div className='flex-col'>
|
<p className='text-sm text-slate-500'>{item.username}</p>
|
||||||
<p className='text-base font-bold text-white-body'>Project Briefing</p>
|
</div>
|
||||||
<p className='text-sm text-slate-500'>Project Manager</p>
|
</Link>
|
||||||
</div>
|
)
|
||||||
</div>
|
}
|
||||||
<div className='flex gap-3 items-center'>
|
)}
|
||||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
|
||||||
<img src={Img} className='w-8' alt="Order" />
|
|
||||||
</div>
|
|
||||||
<div className='flex-col'>
|
|
||||||
<p className='text-base font-bold text-white-body'>Project Briefing</p>
|
|
||||||
<p className='text-sm text-slate-500'>Project Manager</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='flex gap-3 items-center'>
|
|
||||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
|
||||||
<img src={Img} className='w-8' alt="Order" />
|
|
||||||
</div>
|
|
||||||
<div className='flex-col'>
|
|
||||||
<p className='text-base font-bold text-white-body'>Project Briefing</p>
|
|
||||||
<p className='text-sm text-slate-500'>Project Manager</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user