diff --git a/.cursor/commands/navtive.md b/.cursor/commands/navtive.md new file mode 100644 index 0000000..e69de29 diff --git a/src/components/DatePicker.tsx b/src/components/DatePicker.tsx index 3598f56..7a26d04 100644 --- a/src/components/DatePicker.tsx +++ b/src/components/DatePicker.tsx @@ -15,6 +15,7 @@ type Props = { className?: string; label: string, readOnly?: boolean; + minDate?: Date; }; const DatePickerComponent: FC = (props: Props) => { @@ -63,6 +64,7 @@ const DatePickerComponent: FC = (props: Props) => { calendarPosition="bottom-right" className={props.className} readOnly={props.readOnly} + minDate={props.minDate} /> {props.error_text && props.error_text !== '' && (
diff --git a/src/components/PageTitle.tsx b/src/components/PageTitle.tsx index fd72e34..5cb23df 100644 --- a/src/components/PageTitle.tsx +++ b/src/components/PageTitle.tsx @@ -3,11 +3,15 @@ import { useLocation } from 'react-router-dom' import TitleLine from './TitleLine' import { getPageTitle } from '../config/PageTitles' -const PageTitle: FC = () => { +type Props = { + title1?: string +} + +const PageTitle: FC = ({ title1 }) => { const location = useLocation() const title = getPageTitle(location.pathname) - return + return } export default PageTitle diff --git a/src/config/Pages.ts b/src/config/Pages.ts index 59f342e..bc9dc43 100644 --- a/src/config/Pages.ts +++ b/src/config/Pages.ts @@ -171,7 +171,7 @@ export const Pages = { orders: { native: "/orders/native", sellers: "/orders/seller", - admin: "/orders/native", + admin: "/orders/native?status=Admin", completed: "/orders/native?status=Completed", cancelled: "/orders/native?status=Cancelled", pending: "/orders/native?status=Pending", @@ -204,7 +204,7 @@ export const Pages = { withdrawalRequests: "/sellers/withdrawal-requests", announcement: "/sellers/announcement", requestCreateProduct: "/sellers/request-create-product", - learningCategory: "/sellers/learning-category", + learningCategory: "/sellers/category", learning: "/sellers/learning", learningCreate: "/sellers/learning/create", learningUpdate: "/sellers/learning/update/", diff --git a/src/pages/Coupon/Create.tsx b/src/pages/Coupon/Create.tsx index dc3a4b6..c179074 100644 --- a/src/pages/Coupon/Create.tsx +++ b/src/pages/Coupon/Create.tsx @@ -214,6 +214,7 @@ const CreateCoupon: FC = () => { placeholder='انتخاب تاریخ' onChange={(date) => formik.setFieldValue('expirationDate', date)} error_text={formik.touched.expirationDate && formik.errors.expirationDate ? formik.errors.expirationDate : ''} + minDate={new Date()} />