This commit is contained in:
@@ -4,6 +4,7 @@ import Input from '@/components/Input'
|
||||
import Textarea from '@/components/Textarea'
|
||||
import UploadBox from '@/components/UploadBox'
|
||||
import DefaulModal from '@/components/DefaulModal'
|
||||
import SwitchComponent from '@/components/Switch'
|
||||
import LocationPicker from './components/LocationPicker'
|
||||
import LocationInput from './components/LocationInput'
|
||||
import { TickCircle } from 'iconsax-react'
|
||||
@@ -58,6 +59,7 @@ const GeneralSettings: FC = () => {
|
||||
logo: '',
|
||||
establishedYear: null,
|
||||
serviceArea: undefined,
|
||||
enableAiChat: false,
|
||||
},
|
||||
validationSchema,
|
||||
onSubmit: (values) => {
|
||||
@@ -117,6 +119,7 @@ const GeneralSettings: FC = () => {
|
||||
logo: restaurantData.logo || '',
|
||||
establishedYear: restaurantData.establishedYear ?? null,
|
||||
serviceArea: restaurantData.serviceArea || undefined,
|
||||
enableAiChat: restaurantData.enableAiChat ?? false,
|
||||
})
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
@@ -243,7 +246,15 @@ const GeneralSettings: FC = () => {
|
||||
onPolygonSelect={(polygon) => formik.setFieldValue('serviceArea', polygon)}
|
||||
/>
|
||||
</div>
|
||||
{/* </div> */}
|
||||
|
||||
<div className='mt-8'>
|
||||
<div className='text-sm mb-3'>چت هوش مصنوعی</div>
|
||||
<SwitchComponent
|
||||
active={formik.values.enableAiChat ?? false}
|
||||
onChange={(value) => formik.setFieldValue('enableAiChat', value)}
|
||||
label={formik.values.enableAiChat ? 'فعال' : 'غیرفعال'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8 flex justify-end'>
|
||||
<Button
|
||||
|
||||
@@ -19,6 +19,7 @@ export type UpdateRestaurantType = {
|
||||
description?: string;
|
||||
establishedYear?: number | null;
|
||||
serviceArea?: GeoJSONPolygon;
|
||||
enableAiChat?: boolean;
|
||||
score?: {
|
||||
purchaseAmount: string;
|
||||
purchaseScore: string;
|
||||
@@ -50,6 +51,7 @@ export type Restaurant = {
|
||||
longitude: number | null;
|
||||
serviceArea: GeoJSONPolygon;
|
||||
isActive: boolean;
|
||||
enableAiChat: boolean;
|
||||
establishedYear: number | null;
|
||||
phoneNumber: string | null;
|
||||
phone?: string;
|
||||
|
||||
Reference in New Issue
Block a user