change list invoce and tickets + pwa + ...

This commit is contained in:
hamid zarghami
2025-03-05 16:44:11 +03:30
parent 0084aefae4
commit b346481267
19 changed files with 8624 additions and 188 deletions
+6
View File
@@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'
import { Element3, Messages3, NotificationStatus, People, Receipt2 } from 'iconsax-react'
import ItemDashboard from './components/ItemDashboard'
import { useGetDashboard } from './hooks/useHomeData'
import { Pages } from '../../config/Pages'
const Home: FC = () => {
@@ -21,6 +22,7 @@ const Home: FC = () => {
color='#00D16C'
count={getDashboard.data?.data?.danakServicesCount}
description={t('home.service')}
to={Pages.services.list}
/>
<ItemDashboard
@@ -29,6 +31,7 @@ const Home: FC = () => {
color='#00D16C'
count={getDashboard.data?.data?.customersCount}
description={t('home.customer')}
to={Pages.customers.list}
/>
<ItemDashboard
@@ -37,6 +40,7 @@ const Home: FC = () => {
color='#FF7B00'
count={getDashboard.data?.data?.unreadTickets}
description={t('home.unread_messages')}
to={Pages.ticket.list}
/>
<ItemDashboard
@@ -45,6 +49,7 @@ const Home: FC = () => {
color='#FF0000'
count={getDashboard.data?.data?.adsCount}
description={t('home.active_ads')}
to={Pages.ads.list}
/>
<ItemDashboard
@@ -53,6 +58,7 @@ const Home: FC = () => {
color='#0047FF'
count={getDashboard.data?.data?.invoicesCount}
description={t('home.new_invoice')}
to={Pages.receipts.index}
/>
</div>
+5 -3
View File
@@ -1,17 +1,19 @@
import { FC, ReactNode } from 'react'
import { Link } from 'react-router-dom'
type Props = {
title: string
icon: ReactNode,
color: string,
count: number,
description: string
description: string,
to?: string
}
const ItemDashboard: FC<Props> = (props: Props) => {
return (
<div className='p-6 min-w-[40%] xl:min-w-[15%] flex flex-col items-center xl:items-start flex-1 h-[178px] bg-white rounded-3xl'>
<Link to={props.to ? props.to : ''} className='p-6 min-w-[40%] xl:min-w-[15%] flex flex-col items-center xl:items-start flex-1 h-[178px] bg-white rounded-3xl'>
<div className='size-10 rounded-full bg-[#EEF0F7] flex justify-center items-center'>
{props.icon}
</div>
@@ -28,7 +30,7 @@ const ItemDashboard: FC<Props> = (props: Props) => {
</div>
</div>
</div>
</div>
</Link>
)
}