From ef600b2f00f06c2bcbfa69a606e71251b88bc51e Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Mon, 9 Feb 2026 15:49:45 +0330 Subject: [PATCH] fix build --- .../product/components/MealTimesSection.tsx | 53 ------------------ .../components/ProductContentSection.tsx | 54 ------------------- .../components/ServiceOptionsSection.tsx | 34 ------------ .../product/components/WeekDaysSection.tsx | 50 ----------------- 4 files changed, 191 deletions(-) delete mode 100644 src/pages/product/components/MealTimesSection.tsx delete mode 100644 src/pages/product/components/ProductContentSection.tsx delete mode 100644 src/pages/product/components/ServiceOptionsSection.tsx delete mode 100644 src/pages/product/components/WeekDaysSection.tsx diff --git a/src/pages/product/components/MealTimesSection.tsx b/src/pages/product/components/MealTimesSection.tsx deleted file mode 100644 index 87323ef..0000000 --- a/src/pages/product/components/MealTimesSection.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { type FC } from 'react' -import type { FormikProps } from 'formik' -import { Checkbox } from '@/components/ui/checkbox' -import type { CreateProductType } from '../types/Types' - -type MealTimesSectionProps = { - formik: FormikProps -} - -const MealTimesSection: FC = ({ formik }) => { - const mealTypes = [ - { value: 'breakfast', label: 'صبحانه' }, - { value: 'lunch', label: 'ناهار' }, - { value: 'dinner', label: 'شام' }, - { value: 'snack', label: 'عصرانه' } - ] as const - - const handleMealTypeChange = (mealType: string, checked: boolean) => { - const currentMealTypes = formik.values.mealTypes || [] - if (checked) { - if (!currentMealTypes.includes(mealType)) { - formik.setFieldValue('mealTypes', [...currentMealTypes, mealType]) - } - } else { - formik.setFieldValue('mealTypes', currentMealTypes.filter(m => m !== mealType)) - } - } - - return ( -
-
وعده‌های کالایی
-
-
ساعات 6 تا 11 صبح :صبحانه
-
11 تا 15 ناهار
-
15 تا 19 عصرانه
-
18 تا 24 شام
-
-
- {mealTypes.map((mealType) => ( -
- handleMealTypeChange(mealType.value, checked as boolean)} - /> - -
- ))} -
-
- ) -} - -export default MealTimesSection diff --git a/src/pages/product/components/ProductContentSection.tsx b/src/pages/product/components/ProductContentSection.tsx deleted file mode 100644 index 8d24863..0000000 --- a/src/pages/product/components/ProductContentSection.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { type FC } from 'react' -import type { FormikProps } from 'formik' -import Input from '@/components/Input' -import Button from '@/components/Button' -import type { CreateProductType } from '../types/Types' - -type ProductContentSectionProps = { - formik: FormikProps -} - -const ProductContentSection: FC = ({ formik }) => { - - return ( -
-
محتوای کالا
-
- {formik.values.content.map((item, index) => ( -
- { - const newContent = [...formik.values.content] - newContent[index] = e.target.value - formik.setFieldValue('content', newContent) - }} - /> - -
- ))} - -
-
- ) -} - -export default ProductContentSection diff --git a/src/pages/product/components/ServiceOptionsSection.tsx b/src/pages/product/components/ServiceOptionsSection.tsx deleted file mode 100644 index 43d9953..0000000 --- a/src/pages/product/components/ServiceOptionsSection.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { type FC } from 'react' -import type { FormikProps } from 'formik' -import { Checkbox } from '@/components/ui/checkbox' -import type { CreateProductType } from '../types/Types' - -type ServiceOptionsSectionProps = { - formik: FormikProps -} - -const ServiceOptionsSection: FC = ({ formik }) => { - return ( -
-
گزینه‌های سرویس
-
-
- formik.setFieldValue('pickupServe', checked)} - /> - -
-
- formik.setFieldValue('inPlaceServe', checked)} - /> - -
-
-
- ) -} - -export default ServiceOptionsSection diff --git a/src/pages/product/components/WeekDaysSection.tsx b/src/pages/product/components/WeekDaysSection.tsx deleted file mode 100644 index 1d0dc48..0000000 --- a/src/pages/product/components/WeekDaysSection.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { type FC } from 'react' -import type { FormikProps } from 'formik' -import { Checkbox } from '@/components/ui/checkbox' -import type { CreateProductType } from '../types/Types' - -type WeekDaysSectionProps = { - formik: FormikProps -} - -const WeekDaysSection: FC = ({ formik }) => { - const weekDays = [ - { value: 0, label: 'شنبه' }, - { value: 1, label: 'یکشنبه' }, - { value: 2, label: 'دوشنبه' }, - { value: 3, label: 'سه‌شنبه' }, - { value: 4, label: 'چهارشنبه' }, - { value: 5, label: 'پنج‌شنبه' }, - { value: 6, label: 'جمعه' } - ] as const - - const handleDayChange = (dayValue: number, checked: boolean) => { - const currentDays = formik.values.weekDays || [] - if (checked) { - if (!currentDays.includes(dayValue)) { - formik.setFieldValue('weekDays', [...currentDays, dayValue]) - } - } else { - formik.setFieldValue('weekDays', currentDays.filter(d => d !== dayValue)) - } - } - - return ( -
-
روزهای هفته
-
- {weekDays.map((day) => ( -
- handleDayChange(day.value, checked as boolean)} - /> - -
- ))} -
-
- ) -} - -export default WeekDaysSection