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