uploader and create service

This commit is contained in:
hamid zarghami
2025-01-29 11:51:09 +03:30
parent ce0019fde0
commit 9c8b15a2cf
8 changed files with 196 additions and 44 deletions
@@ -9,7 +9,9 @@ import { CreateServiceType, ServiceCategoryType } from '../types/ServiceTypes'
import { useGetCategoryParents } from '../hooks/useServiceData'
type Props = {
formik: FormikProps<CreateServiceType>
formik: FormikProps<CreateServiceType>,
onChangeIconFile: (file: File) => void,
onChangeImagesFile: (file: File[]) => void
}
const AddServiceSidebar: FC<Props> = (props: Props) => {
@@ -76,7 +78,7 @@ const AddServiceSidebar: FC<Props> = (props: Props) => {
<div className='mt-2'>
<UploadBoxDraggble
label={t('service.upload_icon_service')}
onChange={() => null}
onChange={(file: File[]) => props.onChangeIconFile(file[0])}
/>
</div>
</div>
@@ -85,7 +87,8 @@ const AddServiceSidebar: FC<Props> = (props: Props) => {
<div className='mt-2'>
<UploadBoxDraggble
label={t('service.upload_images_service')}
onChange={() => null}
onChange={props.onChangeImagesFile}
isMultiple
/>
</div>
</div>