diff --git a/src/components/Filters.tsx b/src/components/Filters.tsx index c3b713e..c4a6929 100644 --- a/src/components/Filters.tsx +++ b/src/components/Filters.tsx @@ -1,9 +1,11 @@ import { FC, useEffect, useState, ChangeEvent } from 'react'; -import { Filter, CloseCircle } from 'iconsax-react'; +import { Filter } from 'iconsax-react'; import DatePicker from './DatePicker'; import Input from './Input'; import Select, { ItemsSelectType } from './Select'; +import DefaulModal from './DefaulModal'; import moment from 'moment-jalaali' +import Button from './Button'; // تعریف نوع داده برای فیلدهای مختلف export type DateFieldType = { @@ -156,35 +158,32 @@ const Filters: FC = ({ )} - {/* فیلترها برای موبایل (قابل باز و بسته شدن) */} - {isFiltersOpen && ( -
-
-
-
- - فیلتر کردن نتایج + {/* فیلترها برای موبایل (در قالب مودال) */} + setIsFiltersOpen(false)} + isHeader={true} + title_header="فیلتر کردن نتایج" + > +
+ {otherFields.map(field => ( +
+ +
+ {renderField(field)}
-
- {otherFields.map(field => ( -
- -
- {renderField(field)} -
-
- ))} -
+ ))}
- )} +
+
+
); }; diff --git a/src/components/HeaderModal.tsx b/src/components/HeaderModal.tsx index 972fbbc..108fcd5 100644 --- a/src/components/HeaderModal.tsx +++ b/src/components/HeaderModal.tsx @@ -12,7 +12,7 @@ const HeaderModal: FC = (props: Props) => {
{props.label}
- +
) diff --git a/src/components/newMessage/NewMessage.tsx b/src/components/newMessage/NewMessage.tsx index b4d3bd5..af6c74f 100644 --- a/src/components/newMessage/NewMessage.tsx +++ b/src/components/newMessage/NewMessage.tsx @@ -116,7 +116,7 @@ const NewMessage: FC = () => { }`} onClick={handleClose} /> -
{/* Header */}
diff --git a/src/components/newMessage/Reply.tsx b/src/components/newMessage/Reply.tsx index 6e67a27..570cae4 100644 --- a/src/components/newMessage/Reply.tsx +++ b/src/components/newMessage/Reply.tsx @@ -49,18 +49,15 @@ const Reply: FC = ({ const handleClose = async () => { - // اگر محتوایی وارد شده، پیش‌نویس ذخیره کن if (content.trim()) { await handleSaveDraft() toast('پیش‌نویس ذخیره شد', 'success') } - // بسته کردن و برگشت به حالت قبل collapseReply() - onClose?.() // این خط مهمه تا parent component بفهمه + onClose?.() } - // اگر showInitialButton true باشه و هنوز expand نشده، فقط دکمه نشون بده if (showInitialButton && !isExpanded) { return (
@@ -82,12 +79,8 @@ const Reply: FC = ({ collapseReply() } - // در غیر این صورت editor رو نشون بده - // (یا showInitialButton false هست یا isExpanded true هست) - return (
- {/* Reply Header */}
@@ -114,11 +107,10 @@ const Reply: FC = ({
- {/* Reply Content */} +
- +
- {/* To Field */}
به: @@ -126,7 +118,6 @@ const Reply: FC = ({
- {/* Subject Field */}
موضوع: @@ -138,7 +129,6 @@ const Reply: FC = ({
- {/* Editor */}
= ({ />
- {/* Actions */} { onClick={() => handleDeleteSelected()} className="cursor-pointer" /> - ); @@ -194,26 +193,6 @@ const List: FC = () => { summarizeEmail({ messageId: message.id, mailbox: message.mailbox }) }, }, - { - label: message.seen ? 'علامت‌گذاری به عنوان خوانده نشده' : 'علامت‌گذاری به عنوان خوانده شده', - icon: , - onClick: () => emailActions.markAsSeen({ messageId: message.id, mailbox: message.mailbox }), - }, - { - label: 'اضافه به علاقه‌مندی‌ها', - icon: , - onClick: () => emailActions.favorite({ messageId: message.id, mailbox: message.mailbox }), - }, - { - label: 'بایگانی', - icon: , - onClick: () => emailActions.archive({ messageId: message.id, mailbox: message.mailbox }), - }, - { - label: 'حذف', - icon: , - onClick: () => emailActions.moveToTrash({ messageId: message.id, mailbox: message.mailbox }), - }, ]; const handleNext = (cursor?: string) => { diff --git a/src/shared/Footer.tsx b/src/shared/Footer.tsx deleted file mode 100644 index 70e0f02..0000000 --- a/src/shared/Footer.tsx +++ /dev/null @@ -1,136 +0,0 @@ -// import { -// Element3, -// Element4, -// Home2, -// Messages3, -// NotificationStatus, -// } from "iconsax-react"; -// import { FC } from "react"; -// import { useTranslation } from "react-i18next"; -// // import { Pages } from "../config/Pages"; -// import { Link, useLocation } from "react-router-dom"; - -// const Footer: FC = () => { -// const { t } = useTranslation("global"); -// const location = useLocation(); - -// const isActive = (path: string) => location.pathname === path; - -// return ( -//
-//
-//
-// -//
-// -//
-// {t("footer.my_services")} -//
-//
-// -// -//
-// -//
-// {t("footer.other_services")} -//
-//
-// -// -//
-//
-//
-// -//
-//
-//
-// {t("footer.home")} -//
-//
-// -// -//
-// -//
-// {t("footer.announcements")} -//
-//
-// -// -//
-// -//
-// {t("footer.tickets")} -//
-//
-// -//
-//
-// ); -// }; - -// export default Footer;