action
This commit is contained in:
+15
-18
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import Table from '../../components/Table';
|
||||
import { ColumnType } from '../../components/types/TableTypes';
|
||||
import { InfoCircle, Refresh2, Trash, ArchiveTick, Star1 } from 'iconsax-react';
|
||||
import { RowActionItem } from '../../components/RowActionsDropdown';
|
||||
import RowActionsDropdown, { RowActionItem } from '../../components/RowActionsDropdown';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useGetInbox, useMarkAllRead, useSummarizeEmail } from './hooks/useEmailData';
|
||||
import { InboxMessage } from './types/Types';
|
||||
@@ -15,7 +15,6 @@ import Favorite from './Components/Favorite';
|
||||
import Summerize from './Components/Summerize';
|
||||
import Intelligense from '@/assets/images/intelligense.svg'
|
||||
import SummarizeModal from './Components/SummarizeModal';
|
||||
import Button from '@/components/Button';
|
||||
import ModalConfrim from '@/components/ModalConfrim';
|
||||
import { ErrorType } from '@/helpers/types';
|
||||
import { toast } from '@/components/Toast';
|
||||
@@ -108,17 +107,17 @@ const List: FC = () => {
|
||||
<span className="truncate font-medium text-sm flex-1 min-w-0">
|
||||
{item.from.name || item.from.address}
|
||||
</span>
|
||||
<span className="text-xs text-gray-500 whitespace-nowrap">
|
||||
<span className="text-[10px] text-gray-500 whitespace-nowrap">
|
||||
{formatTime(item.date)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="truncate w-full text-sm font-medium">
|
||||
{item.subject || 'بدون موضوع'}
|
||||
{item.subject}
|
||||
</div>
|
||||
|
||||
<div className="truncate w-full text-xs text-gray-600">
|
||||
{item.intro || 'بدون متن پیشنمایش'}
|
||||
{item.intro}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -164,6 +163,17 @@ const List: FC = () => {
|
||||
className={`cursor-pointer min-w-[18px] ${isFetching ? 'animate-spin-reverse' : ''}`}
|
||||
onClick={() => refetch()}
|
||||
/>
|
||||
|
||||
<RowActionsDropdown actions={[
|
||||
{
|
||||
label: 'خواندن همه',
|
||||
icon: <img src={MarkAsRead} className='w-[18px]' />,
|
||||
onClick: () => handleMarkAll()
|
||||
}
|
||||
]} />
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -293,19 +303,6 @@ const List: FC = () => {
|
||||
<div className='mt-2 md:mt-4 px-2 md:px-0'>
|
||||
<div className='flex justify-between items-center'>
|
||||
<h1 className="">{t('received.title')}</h1>
|
||||
<Button
|
||||
onClick={() => setShowModal(true)}
|
||||
loading={isMarkingAllRead}
|
||||
className='w-fit'
|
||||
>
|
||||
<div className='flex items-center gap-2'>
|
||||
<img
|
||||
src={MarkAsRead}
|
||||
className='w-[18px] filter invert'
|
||||
/>
|
||||
<span>خواندن همه</span>
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Filters
|
||||
|
||||
Reference in New Issue
Block a user