This commit is contained in:
@@ -3,29 +3,36 @@ import { useGetRequestDetail } from './hooks/useRequestData'
|
||||
import { Link, useParams } from 'react-router-dom'
|
||||
import RequestItem from './components/RequestItem'
|
||||
import { Paths } from '@/config/Paths'
|
||||
import BackButton from '@/components/BackButton'
|
||||
import Button from '@/components/Button'
|
||||
import RefreshButton from '@/components/RefreshButton'
|
||||
import { TickSquare } from 'iconsax-react'
|
||||
import TicketSection from '../order/components/TicketSection'
|
||||
|
||||
const RequestDetail: FC = () => {
|
||||
const { id } = useParams()
|
||||
const { data } = useGetRequestDetail(id!)
|
||||
const { data, refetch, isFetching } = useGetRequestDetail(id!)
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-screen bg-[#eceef6] p-6">
|
||||
{/* Header Section */}
|
||||
<div className="flex items-start justify-between mb-6">
|
||||
<div className="text-sm text-[#8C90A3]">
|
||||
درخواست #{data?.data?.requestNumber}
|
||||
</div>
|
||||
<Link to={Paths.perfomaInvoice.create + `?requestId=${id}`}>
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<BackButton to={Paths.requests.list} />
|
||||
<div className="flex items-center gap-3">
|
||||
<RefreshButton onClick={() => refetch()} isLoading={isFetching} />
|
||||
<Link to={Paths.perfomaInvoice.create + `?requestId=${id}`}>
|
||||
<Button className="w-fit px-5">
|
||||
<div className="flex gap-2 items-center">
|
||||
<TickSquare size={20} color="black" />
|
||||
<div>ثبت پیش فاکتور</div>
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="text-sm text-[#8C90A3] mb-6">
|
||||
درخواست #{data?.data?.requestNumber}
|
||||
</div>
|
||||
|
||||
{/* Request Information Section */}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Filters from '@/components/Filters'
|
||||
import RefreshButton from '@/components/RefreshButton'
|
||||
import Table from '@/components/Table'
|
||||
import TrashWithConfrim from '@/components/TrashWithConfrim'
|
||||
import { extractErrorMessage } from '@/config/func'
|
||||
@@ -12,7 +13,7 @@ import { toast } from 'react-toastify'
|
||||
|
||||
const RequestList: FC = () => {
|
||||
|
||||
const { data } = useGetRequests()
|
||||
const { data, refetch, isFetching } = useGetRequests()
|
||||
const { mutate: deleteRequest, isPending: isDeleting } = useDeleteRequest()
|
||||
|
||||
const handleDelete = (id: string) => {
|
||||
@@ -28,7 +29,10 @@ const RequestList: FC = () => {
|
||||
|
||||
return (
|
||||
<div className='mt-5'>
|
||||
<h1 className='text-lg font-light'>درخواست ها</h1>
|
||||
<div className='flex justify-between items-center'>
|
||||
<h1 className='text-lg font-light'>درخواست ها</h1>
|
||||
<RefreshButton onClick={() => refetch()} isLoading={isFetching} />
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Filters
|
||||
|
||||
Reference in New Issue
Block a user