page description
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
VITE_TOKEN_NAME = 'admin_token'
|
||||
VITE_REFRESH_TOKEN_NAME = 'admin_refresh_token'
|
||||
VITE_BASE_URL = 'https://api.danakcorp.com'
|
||||
# VITE_BASE_URL = 'http://192.168.82.158:4000'
|
||||
# VITE_BASE_URL = 'http://192.168.1.112:4001'
|
||||
+2
-1
@@ -211,7 +211,8 @@
|
||||
"active_plan": "پلن فعال",
|
||||
"slider": "نمایش در اسلایدر",
|
||||
"slug": "اسلاگ",
|
||||
"page_title": "عنوان صفحه"
|
||||
"page_title": "عنوان صفحه",
|
||||
"page_description": "توضیحات صفحه"
|
||||
},
|
||||
"plan": {
|
||||
"plans_list": "لیست پلن های ",
|
||||
|
||||
@@ -67,7 +67,8 @@ const AddService: FC = () => {
|
||||
userCount: 0,
|
||||
createDate: '',
|
||||
slug: '',
|
||||
pageTitle: ''
|
||||
pageTitle: '',
|
||||
pageDescription: ''
|
||||
},
|
||||
validationSchema: Yup.object({
|
||||
name: Yup.string().required(t('errors.required')),
|
||||
@@ -81,6 +82,7 @@ const AddService: FC = () => {
|
||||
link: Yup.string().required(t('errors.required')),
|
||||
slug: Yup.string().required(t('errors.required')),
|
||||
pageTitle: Yup.string().required(t('errors.required')),
|
||||
pageDescription: Yup.string().required(t('errors.required')),
|
||||
}),
|
||||
onSubmit: async (values) => {
|
||||
if (iconFile && imagesFile) {
|
||||
|
||||
@@ -71,7 +71,8 @@ const UpdateService: FC = () => {
|
||||
createDate: '',
|
||||
coverUrl: '',
|
||||
slug: '',
|
||||
pageTitle: ''
|
||||
pageTitle: '',
|
||||
pageDescription: ''
|
||||
},
|
||||
validationSchema: Yup.object({
|
||||
name: Yup.string().required(t('errors.required')),
|
||||
@@ -85,6 +86,7 @@ const UpdateService: FC = () => {
|
||||
link: Yup.string().required(t('errors.required')),
|
||||
slug: Yup.string().required(t('errors.required')),
|
||||
pageTitle: Yup.string().required(t('errors.required')),
|
||||
pageDescription: Yup.string().required(t('errors.required')),
|
||||
}),
|
||||
onSubmit: async (values) => {
|
||||
|
||||
@@ -156,7 +158,8 @@ const UpdateService: FC = () => {
|
||||
createDate: moment(data?.createDate).format('YYYY-MM-DD'),
|
||||
coverUrl: data?.coverUrl,
|
||||
slug: data?.slug,
|
||||
pageTitle: data?.pageTitle
|
||||
pageTitle: data?.pageTitle,
|
||||
pageDescription: data?.pageDescription
|
||||
});
|
||||
const editorElement = editorRef.current?.querySelector('.ql-editor');
|
||||
if (editorElement) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import UploadBoxDraggble from '../../../components/UploadBoxDraggble'
|
||||
import { FormikProps } from 'formik'
|
||||
import { CreateServiceType, ServiceCategoryType } from '../types/ServiceTypes'
|
||||
import { useGetCategoryParents } from '../hooks/useServiceData'
|
||||
import Textarea from '../../../components/Textarea'
|
||||
|
||||
type Props = {
|
||||
formik: FormikProps<CreateServiceType>,
|
||||
@@ -51,6 +52,14 @@ const AddServiceSidebar: FC<Props> = (props: Props) => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Textarea
|
||||
label={t('service.page_description')}
|
||||
{...formik.getFieldProps('pageDescription')}
|
||||
error_text={formik.touched.pageDescription && formik.errors.pageDescription ? formik.errors.pageDescription : ''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Input
|
||||
label={t('service.service_link')}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { FormikProps } from 'formik'
|
||||
import { CreateServiceType, ServiceCategoryType } from '../types/ServiceTypes'
|
||||
import { useGetCategoryParents, useGetDetailService } from '../hooks/useServiceData'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import Textarea from '../../../components/Textarea'
|
||||
|
||||
type Props = {
|
||||
formik: FormikProps<CreateServiceType>,
|
||||
@@ -54,6 +55,14 @@ const UpdateServiceSidebar: FC<Props> = (props: Props) => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Textarea
|
||||
label={t('service.page_description')}
|
||||
{...formik.getFieldProps('pageDescription')}
|
||||
error_text={formik.touched.pageDescription && formik.errors.pageDescription ? formik.errors.pageDescription : ''}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='mt-8'>
|
||||
<Input
|
||||
label={t('service.service_link')}
|
||||
|
||||
@@ -46,6 +46,7 @@ export type CreateServiceType = {
|
||||
coverUrl?: string;
|
||||
slug: string;
|
||||
pageTitle: string;
|
||||
pageDescription: string;
|
||||
};
|
||||
|
||||
export type ServiceItemType = {
|
||||
|
||||
Reference in New Issue
Block a user