more button remove + remove all logs

This commit is contained in:
hamid zarghami
2025-07-30 09:47:21 +03:30
parent ef26c63e33
commit e35634a0c2
17 changed files with 71 additions and 51 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
+2 -3
View File
@@ -2,7 +2,7 @@ import Filters, { FilterValues } from '../../components/Filters';
import { FC, useState } from 'react'
import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, More, Refresh2, Trash, ArchiveSlash } from 'iconsax-react';
import { InfoCircle, Refresh2, Trash, ArchiveSlash } from 'iconsax-react';
import { RowActionItem } from '../../components/RowActionsDropdown';
import { useNavigate } from 'react-router-dom';
import { useGetArchiveMessages } from './hooks/useArchiveData';
@@ -127,7 +127,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
@@ -141,7 +141,6 @@ const List: FC = () => {
className={`cursor-pointer ${isFetching ? 'animate-spin-reverse' : ''}`}
onClick={() => refetch()}
/>
<More size={18} color='black' className='rotate-90 cursor-pointer' />
</div>
);
+2 -5
View File
@@ -3,7 +3,7 @@ import { FC, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, More, Refresh2, Trash, Edit, Send } from 'iconsax-react';
import { InfoCircle, Refresh2, Trash, Edit, Send } from 'iconsax-react';
import { RowActionItem } from '../../components/RowActionsDropdown';
import { useNavigate } from 'react-router-dom';
import { useGetDrafts } from './hooks/useDraftData';
@@ -145,7 +145,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
@@ -159,7 +159,6 @@ const List: FC = () => {
className={`cursor-pointer ${isFetching ? 'animate-spin-reverse' : ''}`}
onClick={() => refetch()}
/>
<More size={18} color='black' className='rotate-90 cursor-pointer' />
</div>
);
@@ -218,8 +217,6 @@ const List: FC = () => {
const handleEditSelected = () => {
if (selectedMessages.length === 1) {
navigate(`/draft/edit/${selectedMessages[0].id}`);
} else {
console.log('ویرایش چندین پیش‌نویس انتخاب شده:', selectedMessages.map(m => m.id));
}
setSelectedMessages([]);
setSelectAll(false);
+2 -3
View File
@@ -2,7 +2,7 @@ import Filters, { FilterValues } from '../../components/Filters';
import { FC, useState } from 'react'
import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, More, Refresh2, Trash, Archive, Star1 } from 'iconsax-react';
import { InfoCircle, Refresh2, Trash, Archive, Star1 } from 'iconsax-react';
import { RowActionItem } from '../../components/RowActionsDropdown';
import { useNavigate } from 'react-router-dom';
import { useGetFavoriteMessages } from './hooks/useFavoriteData';
@@ -128,7 +128,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
@@ -142,7 +142,6 @@ const List: FC = () => {
className={`cursor-pointer ${isFetching ? 'animate-spin-reverse' : ''}`}
onClick={() => refetch()}
/>
<More size={18} color='black' className='rotate-90 cursor-pointer' />
</div>
);
-1
View File
@@ -118,7 +118,6 @@ const DetailEmail: FC = () => {
// Mark message as seen when it's loaded and not already seen
useEffect(() => {
if (messageDetail && !messageDetail.seen && id) {
console.log('Marking message as seen:', id, 'Current seen status:', messageDetail.seen)
emailActions.markAsSeen({ messageId: Number(id), mailbox: mailbox || '' })
}
}, [messageDetail, emailActions, id])
+1 -1
View File
@@ -149,7 +149,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
+1 -1
View File
@@ -137,7 +137,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
+2 -3
View File
@@ -2,7 +2,7 @@ import Filters, { FilterValues } from '../../components/Filters';
import { FC, useState } from 'react'
import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, More, Refresh2, AttachSquare, Trash, Archive, Star } from 'iconsax-react';
import { InfoCircle, Refresh2, AttachSquare, Trash, Archive, Star } from 'iconsax-react';
import { useGetSentMessages } from './hooks/useSentData';
import { InboxMessage } from './types/SentTypes';
import { useNavigate } from 'react-router-dom';
@@ -142,7 +142,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
@@ -156,7 +156,6 @@ const List: FC = () => {
className={`cursor-pointer ${isFetching ? 'animate-spin-reverse' : ''}`}
onClick={() => refetch()}
/>
<More size={18} color='black' className='rotate-90 cursor-pointer' />
</div>
);
+2 -3
View File
@@ -127,7 +127,7 @@ const List: FC = () => {
};
const tableActions = (
<div className='flex items-center gap-2 md:gap-4'>
<div className='flex items-center gap-4 md:gap-4'>
<div className="flex items-center gap-2">
<Checkbox
checked={selectAll}
@@ -179,7 +179,6 @@ const List: FC = () => {
const handleNotSpamSelected = () => {
// TODO: پیاده‌سازی علامت‌گذاری به عنوان غیر اسپم - نیاز به API endpoint جداگانه
console.log('علامت‌گذاری به عنوان غیر اسپم:', selectedMessages.map(m => m.id));
setSelectedMessages([]);
setSelectAll(false);
};
@@ -200,7 +199,7 @@ const List: FC = () => {
{
label: 'غیر اسپم',
icon: <RecoveryConvert size={16} color="black" />,
onClick: () => console.log('علامت‌گذاری به عنوان غیر اسپم', message.id),
onClick: () => null,
},
{
label: 'حذف',