add production url
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"next": {
|
||||
"modifyConfig": false
|
||||
}
|
||||
}
|
||||
|
||||
+10
-12
@@ -1,24 +1,22 @@
|
||||
export const AppUrl = (query) => {
|
||||
|
||||
const serve = 'https://mehrara-api.iran.liara.run';
|
||||
const local = 'http://127.0.0.1:8000';
|
||||
export const AppUrl = query => {
|
||||
const serve = 'https://mehrara-api.iran.liara.run'
|
||||
const local = 'http://127.0.0.1:8000'
|
||||
|
||||
return `${serve}/api/${query}`
|
||||
}
|
||||
|
||||
export const VueApi = (query) => {
|
||||
|
||||
const serve = 'https://mipstockholder.iran.liara.run';
|
||||
const local = 'http://127.0.0.1:8000';
|
||||
export const VueApi = query => {
|
||||
const serve = 'https://mipstockholder.iran.liara.run'
|
||||
const local = 'http://127.0.0.1:8000'
|
||||
|
||||
return `${local}/api/${query}`
|
||||
}
|
||||
export const BackTwo = 'http://127.0.0.1:8000/api'
|
||||
|
||||
export const AppFile = (addr) => {
|
||||
const serve = 'https://mehrara-api.iran.liara.run';
|
||||
const local = 'http://127.0.0.1:8000';
|
||||
export const AppFile = addr => {
|
||||
const serve = 'https://mehrara-api.iran.liara.run'
|
||||
const local = 'http://127.0.0.1:8000'
|
||||
|
||||
return `${serve}/${addr}`
|
||||
|
||||
}
|
||||
export const AppProduction = 'https://mipstockholder.iran.liara.run/api/'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
const withImages = require('next-images')
|
||||
|
||||
module.exports = {
|
||||
experimental: {
|
||||
outputStandalone: true
|
||||
},
|
||||
siteUrl: 'https://miphospital.ir',
|
||||
generateRobotsTxt: true, // (optional)
|
||||
...withImages(),
|
||||
|
||||
Generated
+10280
-32
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -11,6 +11,7 @@ import toast, { Toaster } from 'react-hot-toast'
|
||||
import { MDBRadio } from 'mdb-react-ui-kit'
|
||||
import axios from 'axios'
|
||||
import NumberFormat from 'react-number-format'
|
||||
import { AppProduction } from '../../lib/api'
|
||||
|
||||
const Sales = () => {
|
||||
const [name, setName] = useState()
|
||||
@@ -23,7 +24,7 @@ const Sales = () => {
|
||||
setLoading(true)
|
||||
toast.loading('در حال ثبت درخواست شما')
|
||||
axios
|
||||
.post('https://mehriranianco.ir/api/public/website/request', {
|
||||
.post(`${AppProduction}public/website/request`, {
|
||||
name: name,
|
||||
mobile_number: mobileNumber,
|
||||
investment_price: InvestmentPrice,
|
||||
|
||||
+43
-28
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import AppContainer from "../appContainer";
|
||||
import Image from "next/image";
|
||||
import {FiUsers, FiArrowLeft} from 'react-icons/fi'
|
||||
import Link from "next/link";
|
||||
import React from 'react'
|
||||
import AppContainer from '../appContainer'
|
||||
import Image from 'next/image'
|
||||
import { FiUsers, FiArrowLeft } from 'react-icons/fi'
|
||||
import Link from 'next/link'
|
||||
import {
|
||||
MDBBtn,
|
||||
MDBCard,
|
||||
@@ -12,50 +12,63 @@ import {
|
||||
MDBContainer,
|
||||
MDBIcon,
|
||||
MDBTypography
|
||||
} from "mdb-react-ui-kit";
|
||||
import {Box, Divider, ScaleFade, SimpleGrid} from "@chakra-ui/react";
|
||||
import {VueApi} from "../../lib/api";
|
||||
import axios from "axios";
|
||||
import {data} from "autoprefixer";
|
||||
} from 'mdb-react-ui-kit'
|
||||
import { Box, Divider, ScaleFade, SimpleGrid } from '@chakra-ui/react'
|
||||
import { AppProduction, VueApi } from '../../lib/api'
|
||||
import axios from 'axios'
|
||||
import { data } from 'autoprefixer'
|
||||
|
||||
const Recruitment = (dataoccupational) => {
|
||||
const Recruitment = dataoccupational => {
|
||||
const Parallax = ({ quality }) => {
|
||||
return `../resource/parallax/Directors.jpg`;
|
||||
return `../resource/parallax/Directors.jpg`
|
||||
}
|
||||
console.log('Add', AppProduction)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||
<div className="parallax-container">
|
||||
<div className='parallax-container'>
|
||||
<div className={'flex flex-column'}>
|
||||
<div className={'mb-5'}>
|
||||
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}> فرصت های شغلی بیمارستان مهر ایرانیان پرند </h2>
|
||||
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}>
|
||||
{' '}
|
||||
فرصت های شغلی بیمارستان مهر ایرانیان پرند{' '}
|
||||
</h2>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<div className={'mt-2'}>
|
||||
<br />
|
||||
<br />
|
||||
<p className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}>فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.</p>
|
||||
<p
|
||||
className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}
|
||||
>
|
||||
فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Image
|
||||
loader={Parallax}
|
||||
src="Parallax.png"
|
||||
src='Parallax.png'
|
||||
className={'responsive-img shadow-5'}
|
||||
alt="فرصت های شغلی بیمارستان مهر ایرانیان پرند"
|
||||
alt='فرصت های شغلی بیمارستان مهر ایرانیان پرند'
|
||||
width={3000}
|
||||
height={1300}
|
||||
/>
|
||||
</div>
|
||||
<MDBContainer className={'mt-5'}>
|
||||
<div className={'bk-med flex justify-content-center align-items-center flex-col'}>
|
||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>فرصت های همکاری</MDBTypography>
|
||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>ردیف شغلی مورد علاقه خود را انتخاب کنید </MDBTypography>
|
||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>
|
||||
فرصت های همکاری
|
||||
</MDBTypography>
|
||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>
|
||||
ردیف شغلی مورد علاقه خود را انتخاب کنید{' '}
|
||||
</MDBTypography>
|
||||
</div>
|
||||
<Divider />
|
||||
<SimpleGrid dir={'rtl'} columns={[1, 2, 4]} spacing={5}>
|
||||
{dataoccupational.data.data.map((item) => (
|
||||
<ScaleFade initialScale={0.9} in={() => setTimeout(() => true, 3000) }>
|
||||
{dataoccupational.data.data.map(item => (
|
||||
<ScaleFade initialScale={0.9} in={() => setTimeout(() => true, 3000)}>
|
||||
<Box key={item.id}>
|
||||
<MDBCard className={'jobs-item-card rounded-6'}>
|
||||
<MDBCardBody className={'flex flex-col align-items-center justify-content-between'}>
|
||||
@@ -86,19 +99,21 @@ const Recruitment = (dataoccupational) => {
|
||||
<br />
|
||||
</AppContainer>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Recruitment;
|
||||
export default Recruitment
|
||||
|
||||
export async function getServerSideProps() {
|
||||
// Fetch data from external API
|
||||
const res = await axios.get('https://mehriranianco.ir/api/public/job/occupational/').then((res) => {
|
||||
const res = await axios
|
||||
.get(`${AppProduction}public/job/occupational/`)
|
||||
.then(res => {
|
||||
return res.data
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
})
|
||||
const data = await res
|
||||
|
||||
// Pass data to the page via props
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import {FiUsers, FiArrowLeft} from 'react-icons/fi'
|
||||
import React from 'react'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { FiUsers, FiArrowLeft } from 'react-icons/fi'
|
||||
import {
|
||||
MDBBtn,
|
||||
MDBCard,
|
||||
@@ -11,39 +11,47 @@ import {
|
||||
MDBContainer,
|
||||
MDBIcon,
|
||||
MDBTypography
|
||||
} from "mdb-react-ui-kit";
|
||||
import {Box, Divider, SimpleGrid} from "@chakra-ui/react";
|
||||
import AppContainer from "../../appContainer";
|
||||
import {useRouter} from "next/router";
|
||||
import axios from "axios";
|
||||
} from 'mdb-react-ui-kit'
|
||||
import { Box, Divider, SimpleGrid } from '@chakra-ui/react'
|
||||
import AppContainer from '../../appContainer'
|
||||
import { useRouter } from 'next/router'
|
||||
import axios from 'axios'
|
||||
import { AppProduction } from '../../../lib/api'
|
||||
|
||||
const Recruitment = (jobs) => {
|
||||
const Recruitment = jobs => {
|
||||
console.log(jobs)
|
||||
const Parallax = ({ quality }) => {
|
||||
return `../../resource/parallax/33012321.jpg`;
|
||||
return `../../resource/parallax/33012321.jpg`
|
||||
}
|
||||
const router = useRouter();
|
||||
const {category_id} = router.query
|
||||
const router = useRouter()
|
||||
const { category_id } = router.query
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||
<div className="parallax-container">
|
||||
<div className='parallax-container'>
|
||||
<div className={'flex flex-column'}>
|
||||
<div className={'mb-5'}>
|
||||
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}> فرصت های شغلی بیمارستان مهر ایرانیان پرند </h2>
|
||||
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}>
|
||||
{' '}
|
||||
فرصت های شغلی بیمارستان مهر ایرانیان پرند{' '}
|
||||
</h2>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<div className={'mt-2'}>
|
||||
<br />
|
||||
<br />
|
||||
<p className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}>فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.</p>
|
||||
<p
|
||||
className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}
|
||||
>
|
||||
فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Image
|
||||
loader={Parallax}
|
||||
src="Parallax.png"
|
||||
src='Parallax.png'
|
||||
className={'responsive-img shadow-5'}
|
||||
alt={category_id}
|
||||
width={3000}
|
||||
@@ -52,22 +60,37 @@ const Recruitment = (jobs) => {
|
||||
</div>
|
||||
<MDBContainer className={'mt-5'}>
|
||||
<div className={'bk-med flex justify-content-center align-items-center flex-col'}>
|
||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>{jobs.jobs.name.title} </MDBTypography>
|
||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>شغل مورد علاقه خود را انتخاب کنید </MDBTypography>
|
||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>
|
||||
{jobs.jobs.name.title}{' '}
|
||||
</MDBTypography>
|
||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>
|
||||
شغل مورد علاقه خود را انتخاب کنید{' '}
|
||||
</MDBTypography>
|
||||
</div>
|
||||
<Divider />
|
||||
<SimpleGrid dir={'rtl'} columns={[1, 1, 3]} spacing={3}>
|
||||
{jobs.jobs.data && jobs.jobs.data.map((item) => (
|
||||
{jobs.jobs.data &&
|
||||
jobs.jobs.data.map(item => (
|
||||
<Box key={item.id}>
|
||||
<Link href={`/recruitment/item/request/${item.id}`}>
|
||||
<MDBCard className={'jobs-item-card rounded-6'}>
|
||||
<MDBCardBody className={'flex align-items-center lg:flex-row md:flex-col sm:flex-col justify-content-between'}>
|
||||
<MDBCardBody
|
||||
className={
|
||||
'flex align-items-center lg:flex-row md:flex-col sm:flex-col justify-content-between'
|
||||
}
|
||||
>
|
||||
<div>
|
||||
<MDBCardTitle title={item.title} className={'bk-med text-summery-2 mt-2 right'}>{item.title} </MDBCardTitle>
|
||||
<MDBCardTitle title={item.title} className={'bk-med text-summery-2 mt-2 right'}>
|
||||
{item.title}{' '}
|
||||
</MDBCardTitle>
|
||||
</div>
|
||||
<div>
|
||||
<Link href={`/recruitment/item/request/${item.id}`}>
|
||||
<MDBBtn rounded size={'sm'} className={'mt-2 flex align-items-center bk-light bg-primary-teal'}>
|
||||
<MDBBtn
|
||||
rounded
|
||||
size={'sm'}
|
||||
className={'mt-2 flex align-items-center bk-light bg-primary-teal'}
|
||||
>
|
||||
درخواست همکاری
|
||||
<FiArrowLeft className={'ml-2'} />
|
||||
</MDBBtn>
|
||||
@@ -86,23 +109,25 @@ const Recruitment = (jobs) => {
|
||||
<br />
|
||||
</AppContainer>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export async function getServerSideProps(ctx) {
|
||||
// Fetch data from external API
|
||||
const {query} = ctx
|
||||
const { query } = ctx
|
||||
|
||||
const res = await axios.get(`https://mehriranianco.ir/api/public/job/${query.category_id}`).then((res) => {
|
||||
const res = await axios
|
||||
.get(`${AppProduction}public/job/${query.category_id}`)
|
||||
.then(res => {
|
||||
return res.data
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
})
|
||||
const jobs = await res
|
||||
|
||||
// Pass data to the page via props
|
||||
return { props: { jobs } }
|
||||
}
|
||||
|
||||
export default Recruitment;
|
||||
|
||||
export default Recruitment
|
||||
|
||||
@@ -1,48 +1,57 @@
|
||||
import React, {useContext, useEffect, useRef, useState} from 'react';
|
||||
import {Box, Input, Radio, RadioGroup, Select, SimpleGrid, Stack, Textarea, UnorderedList} from "@chakra-ui/react";
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react'
|
||||
import { Box, Input, Radio, RadioGroup, Select, SimpleGrid, Stack, Textarea, UnorderedList } from '@chakra-ui/react'
|
||||
import {
|
||||
MDBBtn, MDBCol, MDBContainer,
|
||||
MDBBtn,
|
||||
MDBCol,
|
||||
MDBContainer,
|
||||
MDBFile,
|
||||
MDBRadio,
|
||||
MDBInputGroup,
|
||||
MDBInputGroupText, MDBRow
|
||||
} from "mdb-react-ui-kit";
|
||||
import {FcApproval} from "react-icons/fc";
|
||||
import {FiCheck, FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
import axios from "axios";
|
||||
MDBInputGroupText,
|
||||
MDBRow
|
||||
} from 'mdb-react-ui-kit'
|
||||
import { FcApproval } from 'react-icons/fc'
|
||||
import { FiCheck, FiUser } from 'react-icons/fi'
|
||||
import { useForm } from 'react-hook-form'
|
||||
import { HandleFormReq } from '../../../../lib/HandleFormReq'
|
||||
import axios from 'axios'
|
||||
import { AppProduction } from '../../../../lib/api'
|
||||
|
||||
const PersonData = () => {
|
||||
const {setPage, personData, setpersondata} = useContext(HandleFormReq)
|
||||
const { setPage, personData, setpersondata } = useContext(HandleFormReq)
|
||||
const [sex, setSex] = useState(personData.gender)
|
||||
const [health, setHealth] = React.useState(personData.health)
|
||||
const {register, handleSubmit, watch, formState: { errors }} = useForm()
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
watch,
|
||||
formState: { errors }
|
||||
} = useForm()
|
||||
let hasErr = Object.keys(errors).length
|
||||
const onSubmit = async (data) => {
|
||||
const onSubmit = async data => {
|
||||
console.log('dadadada', data)
|
||||
if (hasErr === 0) {
|
||||
console.log('om', data.national_code)
|
||||
axios.post('https://mehriranianco.ir/api/public/jobrequest/nationalcode', {
|
||||
axios
|
||||
.post(`${AppProduction}public/jobrequest/nationalcode`, {
|
||||
nationalcode: data.national_code
|
||||
}).then((res) => {
|
||||
})
|
||||
.then(res => {
|
||||
if (res.data.status === false) {
|
||||
alert('کد ملی شما قبلا ثبت شده ')
|
||||
}else {
|
||||
} else {
|
||||
setpersondata(data)
|
||||
setPage(2)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log('44324589091',err)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('44324589091', err)
|
||||
})
|
||||
|
||||
|
||||
console.log('jsondataperson', JSON.stringify({ personData: personData, scc: personData }))
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
alert('مقادیر وارد شده معبتر نمی باشد')
|
||||
}
|
||||
};
|
||||
}
|
||||
console.log('personData.lastname', typeof personData.lastname)
|
||||
return (
|
||||
<div>
|
||||
@@ -58,17 +67,17 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='firstname'
|
||||
defaultValue={personData.firstname}
|
||||
{...register('firstname', {required: true, maxLength: 100})}
|
||||
{...register('firstname', { required: true, maxLength: 100 })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام خود را وارد کنید "
|
||||
placeholder='نام خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
<p className={'mt-1 text-sm text-danger'}>
|
||||
{errors?.firstname?.type === "required" && <p> وارد کردن نام اجباری است</p>}
|
||||
{errors?.firstname?.type === "maxLength" && <p>نام وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.firstname?.type === 'required' && <p> وارد کردن نام اجباری است</p>}
|
||||
{errors?.firstname?.type === 'maxLength' && <p>نام وارد شده معبتر نمی باشد</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -83,17 +92,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='lastname'
|
||||
defaultValue={personData.lastname}
|
||||
{...register('lastname', {required: true})}
|
||||
{...register('lastname', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام خانوادگی خود را وارد کنید "
|
||||
placeholder='نام خانوادگی خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.lastname?.type === "required" && <p> وارد کردن نام خانوادگی اجباری است</p>}
|
||||
{errors?.lastname?.type === 'required' && <p> وارد کردن نام خانوادگی اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -108,16 +116,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='fatherName'
|
||||
defaultValue={personData.fatherName}
|
||||
{...register('fatherName', {required: true})}
|
||||
{...register('fatherName', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام پدر خود را وارد کنید "
|
||||
placeholder='نام پدر خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.fatherName?.type === "required" && <p> وارد کردن نام پدر اجباری است</p>}
|
||||
{errors?.fatherName?.type === 'required' && <p> وارد کردن نام پدر اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -137,7 +145,7 @@ const PersonData = () => {
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="شغل همسر خود را وارد کنید "
|
||||
placeholder='شغل همسر خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
@@ -156,12 +164,12 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='childIndex'
|
||||
defaultValue={personData.childIndex}
|
||||
{...register('childIndex' )}
|
||||
{...register('childIndex')}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تعداد فرزندان خود را وارد کنید "
|
||||
placeholder='تعداد فرزندان خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
@@ -185,7 +193,7 @@ const PersonData = () => {
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تعداد افراد تحت تکلف خود را وارد کنید "
|
||||
placeholder='تعداد افراد تحت تکلف خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
@@ -204,16 +212,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='Insurance'
|
||||
defaultValue={personData.Insurance}
|
||||
{...register('Insurance', {required: true})}
|
||||
{...register('Insurance', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="وضعیت بیمه خود را وارد کنید "
|
||||
placeholder='وضعیت بیمه خود را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.Insurance?.type === "required" && <p> وارد کردن وضعیت بیمه اجباری است</p>}
|
||||
{errors?.Insurance?.type === 'required' && <p> وارد کردن وضعیت بیمه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -228,19 +236,18 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='national_code'
|
||||
defaultValue={personData.national_code}
|
||||
{...register('national_code', {required: true, maxLength: 10, minLength: 10})}
|
||||
{...register('national_code', { required: true, maxLength: 10, minLength: 10 })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
placeholder=" کد ملی خود را وارد کنید "
|
||||
placeholder=' کد ملی خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.national_code?.type === "required" && <p> وارد کردن کد ملی اجباری است</p>}
|
||||
{errors?.national_code?.type === "maxLength" && <p>کد ملی وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.national_code?.type === "minLength" && <p>کد ملی وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.national_code?.type === 'required' && <p> وارد کردن کد ملی اجباری است</p>}
|
||||
{errors?.national_code?.type === 'maxLength' && <p>کد ملی وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.national_code?.type === 'minLength' && <p>کد ملی وارد شده معبتر نمی باشد</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -255,17 +262,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='placenational'
|
||||
defaultValue={personData.placenational}
|
||||
{...register('placenational', {required: true})}
|
||||
{...register('placenational', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="محل صدور شناسنامه خود را وارد کنید "
|
||||
placeholder='محل صدور شناسنامه خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.placenational?.type === "required" && <p> وارد کردن محل صدور شناسانه اجباری است</p>}
|
||||
{errors?.placenational?.type === 'required' && <p> وارد کردن محل صدور شناسانه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -280,17 +286,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='PHONE'
|
||||
defaultValue={personData.phone}
|
||||
{...register('phone', {required: true})}
|
||||
{...register('phone', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تلفن ثابت خود را وارد کنید "
|
||||
placeholder='تلفن ثابت خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.phone?.type === "required" && <p> وارد کردن تلفن ثابت اجباری است</p>}
|
||||
{errors?.phone?.type === 'required' && <p> وارد کردن تلفن ثابت اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -305,19 +310,18 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='mobile_number'
|
||||
defaultValue={personData.mobile_number}
|
||||
{...register('mobile_number', {required: true, maxLength: 11, minLength: 11})}
|
||||
{...register('mobile_number', { required: true, maxLength: 11, minLength: 11 })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
placeholder=" شماره موبایل خود را وارد کنید "
|
||||
placeholder=' شماره موبایل خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.mobile_number?.type === "required" && <p> وارد کردن شماره موبایل اجباری است</p>}
|
||||
{errors?.mobile_number?.type === "maxLength" && <p>شماره موبایل وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.mobile_number?.type === "minLength" && <p>شماره موبایل وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.mobile_number?.type === 'required' && <p> وارد کردن شماره موبایل اجباری است</p>}
|
||||
{errors?.mobile_number?.type === 'maxLength' && <p>شماره موبایل وارد شده معبتر نمی باشد</p>}
|
||||
{errors?.mobile_number?.type === 'minLength' && <p>شماره موبایل وارد شده معبتر نمی باشد</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
@@ -332,37 +336,40 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='birthday'
|
||||
defaultValue={personData.birthday}
|
||||
{...register('birthday', {required: true})}
|
||||
{...register('birthday', { required: true })}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
placeholder=" سال تولد خود را وارد کنید "
|
||||
placeholder=' سال تولد خود را وارد کنید '
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.birthday?.type === "required" && <p> وارد کردن تاریخ تولد اجباری است</p>}
|
||||
{errors?.birthday?.type === 'required' && <p> وارد کردن تاریخ تولد اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
{/*////*/}
|
||||
|
||||
<SimpleGrid className={'mt-2 flex justify-content-between'} dir={'rtl'} columns={[1,1,2]} spacingX='390px' spacingY='20px'>
|
||||
<SimpleGrid
|
||||
className={'mt-2 flex justify-content-between'}
|
||||
dir={'rtl'}
|
||||
columns={[1, 1, 2]}
|
||||
spacingX='390px'
|
||||
spacingY='20px'
|
||||
>
|
||||
<Box>
|
||||
<MDBInputGroup className='flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
جنسیت :
|
||||
</MDBInputGroupText>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>جنسیت :</MDBInputGroupText>
|
||||
<div>
|
||||
<Select
|
||||
dir={'ltr'}
|
||||
{...register('gender')}
|
||||
defaultValue={personData.gender}
|
||||
style={{ width: 200 }}
|
||||
onChange={(e) => setSex(e.target.value)}
|
||||
onChange={e => setSex(e.target.value)}
|
||||
>
|
||||
<option value='1'> مرد </option>
|
||||
<option value='2'> زن </option>
|
||||
@@ -370,22 +377,20 @@ const PersonData = () => {
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.gender?.type === "required" && <p> وارد کردن نظام وظیفه اجباری است</p>}
|
||||
{errors?.gender?.type === 'required' && <p> وارد کردن نظام وظیفه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
وضعیت تحصیل :
|
||||
</MDBInputGroupText>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>وضعیت تحصیل :</MDBInputGroupText>
|
||||
<div>
|
||||
<Select
|
||||
dir={'ltr'}
|
||||
defaultValue={personData.degree}
|
||||
style={{ width: 200 }}
|
||||
{...register('degree', {required: true})}
|
||||
{...register('degree', { required: true })}
|
||||
>
|
||||
<option value='0'> زیر دیپلم </option>
|
||||
<option value='1'> دیپلم </option>
|
||||
@@ -397,22 +402,20 @@ const PersonData = () => {
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.degree?.type === "required" && <p> وضعیت تحصیل را مشخص کنید</p>}
|
||||
{errors?.degree?.type === 'required' && <p> وضعیت تحصیل را مشخص کنید</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
وضعیت تاهل :
|
||||
</MDBInputGroupText>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>وضعیت تاهل :</MDBInputGroupText>
|
||||
<div>
|
||||
<Select
|
||||
defaultValue={personData.marital}
|
||||
style={{ width: 200 }}
|
||||
dir={'ltr'}
|
||||
{...register('marital', {required: true})}
|
||||
{...register('marital', { required: true })}
|
||||
>
|
||||
<option value='1'> مجرد </option>
|
||||
<option value='2'> متاهل </option>
|
||||
@@ -420,7 +423,7 @@ const PersonData = () => {
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.marital?.type === "required" && <p> وضعیت تاهل را مشخص کنید </p>}
|
||||
{errors?.marital?.type === 'required' && <p> وضعیت تاهل را مشخص کنید </p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
@@ -428,17 +431,16 @@ const PersonData = () => {
|
||||
{sex === '1' ? (
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
وضعیت نظام وظیفه :
|
||||
</MDBInputGroupText>
|
||||
<div className="form-check">
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>وضعیت نظام وظیفه :</MDBInputGroupText>
|
||||
<div className='form-check'>
|
||||
<Select
|
||||
dir={'ltr'}
|
||||
defaultValue={personData.military}
|
||||
className={'form-select'}
|
||||
style={{ width: 200 }}
|
||||
{...register('military', {required: true})}
|
||||
placeholder=' وضعیت خدمت '>
|
||||
{...register('military', { required: true })}
|
||||
placeholder=' وضعیت خدمت '
|
||||
>
|
||||
<option value='1'> معافیت </option>
|
||||
<option value='2'> مشمول </option>
|
||||
<option value='3'> پایان خدمت </option>
|
||||
@@ -447,19 +449,30 @@ const PersonData = () => {
|
||||
</div>
|
||||
<div style={{ width: 500 }} className={'mt-2 d-inline'}>
|
||||
<p style={{ width: 500 }} className={' text-sm text-danger'}>
|
||||
{errors?.military?.type === "required" && <p> وضعیت سربازی را مشخص کنید</p>}
|
||||
{errors?.military?.type === 'required' && <p> وضعیت سربازی را مشخص کنید</p>}
|
||||
</p>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
): ''}
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup style={{ flexDirection: "column" }} className='mb-3 flex'>
|
||||
<div style={{display: "flex" ,flexDirection: "column" }} className={'flex align-items-center align-items-center flex-row flex-lg-row flex-md-row flex-sm-column'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
سابقه بیماری :
|
||||
</MDBInputGroupText>
|
||||
<RadioGroup defaultValue={personData.health} {...register('health', {required: false})} className={'flex align-items-center flex-row flex-lg-row flex-md-row flex-sm-column'} onChange={setHealth} value={health}>
|
||||
<MDBInputGroup style={{ flexDirection: 'column' }} className='mb-3 flex'>
|
||||
<div
|
||||
style={{ display: 'flex', flexDirection: 'column' }}
|
||||
className={
|
||||
'flex align-items-center align-items-center flex-row flex-lg-row flex-md-row flex-sm-column'
|
||||
}
|
||||
>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>سابقه بیماری :</MDBInputGroupText>
|
||||
<RadioGroup
|
||||
defaultValue={personData.health}
|
||||
{...register('health', { required: false })}
|
||||
className={'flex align-items-center flex-row flex-lg-row flex-md-row flex-sm-column'}
|
||||
onChange={setHealth}
|
||||
value={health}
|
||||
>
|
||||
<div>
|
||||
<Stack spacing={4} direction='row'>
|
||||
<Radio value='1'> ندارم </Radio>
|
||||
@@ -467,8 +480,6 @@ const PersonData = () => {
|
||||
</Stack>
|
||||
</div>
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
{health === '2' && (
|
||||
@@ -480,16 +491,16 @@ const PersonData = () => {
|
||||
<Input
|
||||
id='healthreason'
|
||||
defaultValue={personData.healthreason}
|
||||
{...register('healthreason', {required: health === '2'})}
|
||||
{...register('healthreason', { required: health === '2' })}
|
||||
className={'bk-med m-2 rounded-0'}
|
||||
style={{ height: 40, width:250 }}
|
||||
style={{ height: 40, width: 250 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نوع بیماری خود را وارد کنید "
|
||||
placeholder='نوع بیماری خود را وارد کنید '
|
||||
/>
|
||||
<div>
|
||||
<p style={{ width: 400 }} className={'text-sm text-danger'}>
|
||||
{errors?.healthreason?.type === "required" && <p> نوع بیماری خود را وارد کنید </p>}
|
||||
{errors?.healthreason?.type === 'required' && <p> نوع بیماری خود را وارد کنید </p>}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -505,20 +516,22 @@ const PersonData = () => {
|
||||
<MDBInputGroup className='mb-3 border-2'>
|
||||
<Textarea
|
||||
defaultValue={personData.address}
|
||||
{...register('address',{required: true})}
|
||||
dir={'rtl'} placeholder='آدرس محل سکونت خود را وارد کنید ' />
|
||||
{...register('address', { required: true })}
|
||||
dir={'rtl'}
|
||||
placeholder='آدرس محل سکونت خود را وارد کنید '
|
||||
/>
|
||||
</MDBInputGroup>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.address?.type === "required" && <p> آدرس محلص سکونت خود را وراد کنید </p>}
|
||||
{errors?.address?.type === 'required' && <p> آدرس محلص سکونت خود را وراد کنید </p>}
|
||||
</p>
|
||||
</Box>
|
||||
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'}>
|
||||
مرحله بعد
|
||||
</MDBBtn>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default PersonData;
|
||||
export default PersonData
|
||||
|
||||
@@ -1,96 +1,105 @@
|
||||
import React, {Suspense, useMemo, useState} from 'react';
|
||||
import { useForm } from "react-hook-form";
|
||||
import {Alert, AlertDescription, AlertIcon, AlertTitle, Checkbox, useDisclosure} from '@chakra-ui/react'
|
||||
import AppContainer from "../../../appContainer";
|
||||
import {
|
||||
MDBBtn, MDBCard, MDBCardBody, MDBCardImage, MDBCardTitle,
|
||||
MDBContainer, MDBSpinner,
|
||||
} from "mdb-react-ui-kit";
|
||||
import React, { Suspense, useMemo, useState } from 'react'
|
||||
import { useForm } from 'react-hook-form'
|
||||
import { Alert, AlertDescription, AlertIcon, AlertTitle, Checkbox, useDisclosure } from '@chakra-ui/react'
|
||||
import AppContainer from '../../../appContainer'
|
||||
import { MDBBtn, MDBCard, MDBCardBody, MDBCardImage, MDBCardTitle, MDBContainer, MDBSpinner } from 'mdb-react-ui-kit'
|
||||
import {
|
||||
Box,
|
||||
Divider,
|
||||
ListItem, Progress,
|
||||
SimpleGrid, SlideFade, Text,
|
||||
ListItem,
|
||||
Progress,
|
||||
SimpleGrid,
|
||||
SlideFade,
|
||||
Text,
|
||||
UnorderedList,
|
||||
Button,Modal,ModalOverlay,ModalContent,ModalHeader,
|
||||
ModalCloseButton,ModalBody,ModalFooter
|
||||
} from "@chakra-ui/react";
|
||||
import {FiUser, FiCheck} from 'react-icons/fi'
|
||||
import {FcApproval} from 'react-icons/fc'
|
||||
import { MDBRadio } from 'mdb-react-ui-kit';
|
||||
Button,
|
||||
Modal,
|
||||
ModalOverlay,
|
||||
ModalContent,
|
||||
ModalHeader,
|
||||
ModalCloseButton,
|
||||
ModalBody,
|
||||
ModalFooter
|
||||
} from '@chakra-ui/react'
|
||||
import { FiUser, FiCheck } from 'react-icons/fi'
|
||||
import { FcApproval } from 'react-icons/fc'
|
||||
import Employer from '../../../../public/resource/icons/portfolio-outline.png'
|
||||
import axios from "axios";
|
||||
import {FORM_CAST} from "../../../../src/redux/actions";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
import PersonData from "./PersonData";
|
||||
import EducationalData from "./EducationalData";
|
||||
import CoursesData from "./CoursesData";
|
||||
import JobData from "./JobData";
|
||||
import ScientificData from "./ScientificData";
|
||||
import PcSkill from "./PcSkill";
|
||||
import Furtherinformation from "./Furtherinformation";
|
||||
import log from "tailwindcss/lib/util/log";
|
||||
import axios from 'axios'
|
||||
import { HandleFormReq } from '../../../../lib/HandleFormReq'
|
||||
import PersonData from './PersonData'
|
||||
import EducationalData from './EducationalData'
|
||||
import CoursesData from './CoursesData'
|
||||
import JobData from './JobData'
|
||||
import ScientificData from './ScientificData'
|
||||
import PcSkill from './PcSkill'
|
||||
import Furtherinformation from './Furtherinformation'
|
||||
import log from 'tailwindcss/lib/util/log'
|
||||
import { AppProduction } from '../../../../lib/api'
|
||||
|
||||
|
||||
|
||||
const requestForm = (SelectedJob) => {
|
||||
console.log('sdsds', SelectedJob.SelectedJob.data);
|
||||
const requestForm = SelectedJob => {
|
||||
console.log('sdsds', SelectedJob.SelectedJob.data)
|
||||
const { isOpen, onOpen, onClose } = useDisclosure()
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [ShowSuccess, seShowSuccess] = useState(false);
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [ShowSuccess, seShowSuccess] = useState(false)
|
||||
const [CheckCode, setCheckCode] = useState()
|
||||
const [page, setPage] = useState(1)
|
||||
const [personData, setpersondata] = useState({
|
||||
Insurance: '',
|
||||
address: '',
|
||||
birthday: '',
|
||||
childIndex: "",
|
||||
degree: "",
|
||||
childIndex: '',
|
||||
degree: '',
|
||||
healthreason: '',
|
||||
health: '1',
|
||||
dependants: "",
|
||||
fatherName: "",
|
||||
firstname: "",
|
||||
dependants: '',
|
||||
fatherName: '',
|
||||
firstname: '',
|
||||
gender: '2',
|
||||
lastname: '',
|
||||
marital: "",
|
||||
mobile_number: "",
|
||||
national_code: "",
|
||||
phone: "",
|
||||
placenational: "",
|
||||
wifeJob: ""
|
||||
marital: '',
|
||||
mobile_number: '',
|
||||
national_code: '',
|
||||
phone: '',
|
||||
placenational: '',
|
||||
wifeJob: ''
|
||||
})
|
||||
const [educationalData,setEducationalData] = useState([{
|
||||
const [educationalData, setEducationalData] = useState([
|
||||
{
|
||||
university: '',
|
||||
field : '',
|
||||
field: '',
|
||||
trend: '',
|
||||
score: '',
|
||||
dateField: '',
|
||||
}])
|
||||
const [coursesData,setCoursesData] = useState([{
|
||||
dateField: ''
|
||||
}
|
||||
])
|
||||
const [coursesData, setCoursesData] = useState([
|
||||
{
|
||||
courseName: '',
|
||||
courseEdu: '',
|
||||
courseLocal: '',
|
||||
courseTime: '',
|
||||
}])
|
||||
const [langStatus,setLangStatus] = useState({
|
||||
courseTime: ''
|
||||
}
|
||||
])
|
||||
const [langStatus, setLangStatus] = useState({
|
||||
status: 0
|
||||
})
|
||||
const [jobData, setJob] = useState([{
|
||||
const [jobData, setJob] = useState([
|
||||
{
|
||||
companyName: '',
|
||||
position: '',
|
||||
workTime: '',
|
||||
exitReason: '',
|
||||
lastIncome: ''
|
||||
}])
|
||||
}
|
||||
])
|
||||
const [scientificData, setScientificData] = useState({
|
||||
text: ''
|
||||
});
|
||||
})
|
||||
const [pcSkillData, setPcSkillData] = useState({
|
||||
text: '',
|
||||
icdlLevel: 2
|
||||
});
|
||||
const [furtherinformation,setFurtherinformation] = useState({
|
||||
})
|
||||
const [furtherinformation, setFurtherinformation] = useState({
|
||||
criminal: '1',
|
||||
salary: '',
|
||||
Introduced: ''
|
||||
@@ -98,45 +107,81 @@ const requestForm = (SelectedJob) => {
|
||||
const [isSubmitPersonData, setIsSubmitPersonData] = useState(false)
|
||||
const [iAgree, setAgree] = useState(true)
|
||||
const value = useMemo(
|
||||
() => ({ page, setPage, personData, setpersondata,educationalData, setEducationalData,coursesData, setCoursesData, langStatus, setLangStatus, jobData, setJob, scientificData, setScientificData,pcSkillData,setPcSkillData, furtherinformation, setFurtherinformation }),
|
||||
[page, personData,educationalData, coursesData, langStatus, jobData, scientificData, pcSkillData, furtherinformation]
|
||||
);
|
||||
|
||||
() => ({
|
||||
page,
|
||||
setPage,
|
||||
personData,
|
||||
setpersondata,
|
||||
educationalData,
|
||||
setEducationalData,
|
||||
coursesData,
|
||||
setCoursesData,
|
||||
langStatus,
|
||||
setLangStatus,
|
||||
jobData,
|
||||
setJob,
|
||||
scientificData,
|
||||
setScientificData,
|
||||
pcSkillData,
|
||||
setPcSkillData,
|
||||
furtherinformation,
|
||||
setFurtherinformation
|
||||
}),
|
||||
[
|
||||
page,
|
||||
personData,
|
||||
educationalData,
|
||||
coursesData,
|
||||
langStatus,
|
||||
jobData,
|
||||
scientificData,
|
||||
pcSkillData,
|
||||
furtherinformation
|
||||
]
|
||||
)
|
||||
console.log('SelectedJob', SelectedJob)
|
||||
const handleLastSubmit = () => {
|
||||
setLoading(true)
|
||||
axios.post('https://mehriranianco.ir/api/public/jobrequest' , {
|
||||
axios
|
||||
.post(`${AppProduction}public/jobrequest`, {
|
||||
job_id: SelectedJob.SelectedJob.data.id,
|
||||
OccupationalJob_id: SelectedJob.SelectedJob.OccupationalJob.id,
|
||||
lastData : JSON.stringify({
|
||||
"personData" : personData,
|
||||
"educationalData" : educationalData,
|
||||
"coursesData" : {...coursesData, langStatus},
|
||||
"jobData": jobData,
|
||||
"scientificData": scientificData,
|
||||
"pcSkillData": pcSkillData,
|
||||
"furtherinformation": furtherinformation
|
||||
lastData: JSON.stringify({
|
||||
personData: personData,
|
||||
educationalData: educationalData,
|
||||
coursesData: { ...coursesData, langStatus },
|
||||
jobData: jobData,
|
||||
scientificData: scientificData,
|
||||
pcSkillData: pcSkillData,
|
||||
furtherinformation: furtherinformation
|
||||
})
|
||||
}).then((res) => {
|
||||
})
|
||||
.then(res => {
|
||||
setLoading(false)
|
||||
seShowSuccess(true)
|
||||
setCheckCode(res.data.code)
|
||||
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('err', err)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||
<div className={'w-100 p-5 bg-teal-grad'}>
|
||||
<div style={{ flexDirection: 'column' }} className={'flex lg:flex-row md:flex-col sm:flex-col justify-content-between items-center'}>
|
||||
<div
|
||||
style={{ flexDirection: 'column' }}
|
||||
className={'flex lg:flex-row md:flex-col sm:flex-col justify-content-between items-center'}
|
||||
>
|
||||
<div className={'bg-white p-2 rounded-circle shadow-6-soft'}>
|
||||
<MDBCardImage width={50} src={Employer} />
|
||||
</div>
|
||||
<div className={'mt-4 w-full'}>
|
||||
<Text dir={'rtl'} className={'bk-med text-center text-white font-weight-bold '}> درخواست شغلی برای {SelectedJob.SelectedJob.data.title } - {SelectedJob.SelectedJob.OccupationalJob.title}</Text>
|
||||
<Text dir={'rtl'} className={'bk-med text-center text-white font-weight-bold '}>
|
||||
{' '}
|
||||
درخواست شغلی برای {SelectedJob.SelectedJob.data.title} - {SelectedJob.SelectedJob.OccupationalJob.title}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,13 +192,12 @@ const requestForm = (SelectedJob) => {
|
||||
<MDBCardBody dir={'rtl'}>
|
||||
<MDBCardTitle className={'bk-med'}>
|
||||
<FcApproval className={'ml-2'} />
|
||||
توضیحات موقعیت شغلی</MDBCardTitle>
|
||||
توضیحات موقعیت شغلی
|
||||
</MDBCardTitle>
|
||||
<div className={'mt-4'}>
|
||||
<UnorderedList className={'bk-light'}>
|
||||
{SelectedJob.SelectedJob.data.details.map((items, index) => {
|
||||
return [items].map((item, index) => (
|
||||
<ListItem key={index}>{item}</ListItem>
|
||||
))
|
||||
return [items].map((item, index) => <ListItem key={index}>{item}</ListItem>)
|
||||
})}
|
||||
</UnorderedList>
|
||||
</div>
|
||||
@@ -164,15 +208,13 @@ const requestForm = (SelectedJob) => {
|
||||
<MDBCard border='primary' className={'border-black'}>
|
||||
<MDBCardBody dir={'rtl'}>
|
||||
<MDBCardTitle className={'bk-med'}>
|
||||
<FcApproval className={'ml-2'}/>
|
||||
<FcApproval className={'ml-2'} />
|
||||
نیازمندی های موقعیت شغلی
|
||||
</MDBCardTitle>
|
||||
<div className={'mt-4'}>
|
||||
<UnorderedList className={'bk-light'}>
|
||||
{SelectedJob.SelectedJob.data.requirement.map((items, index) => {
|
||||
return [items].map((item, index) => (
|
||||
<ListItem key={index}>{item}</ListItem>
|
||||
))
|
||||
return [items].map((item, index) => <ListItem key={index}>{item}</ListItem>)
|
||||
})}
|
||||
</UnorderedList>
|
||||
</div>
|
||||
@@ -186,17 +228,29 @@ const requestForm = (SelectedJob) => {
|
||||
<div id={'formConatiner'} className={'flex flex-row-reverse align-items-center'}>
|
||||
<div>
|
||||
{(() => {
|
||||
switch(page) {
|
||||
switch (page) {
|
||||
case 1:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
اطلاعات فردی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -206,12 +260,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
اطلاعات تحصیلی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,12 +287,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
سوابق آموزشی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -236,12 +314,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
سوابق شغلی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -251,12 +341,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
سوابق علمی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -266,12 +368,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
مهارت کار با کامپیوتر
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -281,12 +395,24 @@ const requestForm = (SelectedJob) => {
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<div className={'flex'}>
|
||||
<div className={'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '}>
|
||||
<h3 className={'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'}>
|
||||
<div
|
||||
className={
|
||||
'light-primary-teal flex align-items-center justify-content-center rounded-6 shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<h3
|
||||
className={
|
||||
'bk-med text-primary-teal flex justify-content-center align-items-center font-weight-bold m-3'
|
||||
}
|
||||
>
|
||||
اطلاعات تکمیلی
|
||||
</h3>
|
||||
</div>
|
||||
<div className={'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '}>
|
||||
<div
|
||||
className={
|
||||
'bg-primary-teal flex align-items-center justify-content-center shadow-5-soft '
|
||||
}
|
||||
>
|
||||
<FiUser className={'m-1 text-white'} size={20} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -295,13 +421,12 @@ const requestForm = (SelectedJob) => {
|
||||
}
|
||||
})()}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className={'mt-5'}>
|
||||
<Progress dir={'rtl'} value={page * 14} size='xs' colorScheme='teal' />
|
||||
</div>
|
||||
{(() => {
|
||||
switch(page) {
|
||||
switch (page) {
|
||||
case 1:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
@@ -345,10 +470,11 @@ const requestForm = (SelectedJob) => {
|
||||
<div>
|
||||
<Furtherinformation />
|
||||
<Checkbox onChange={() => setAgree(!iAgree)}>
|
||||
اینجانب مسئولیت صحت کلیه اطلاعات ارائه شده در این فرم را پذیرفته و در صورت اثبات عدم صحت موارد فوق الذکر شرکت مجاز به اتخاذ هر گونه تصمیم و برخورد قانونی می باشد .
|
||||
اینجانب مسئولیت صحت کلیه اطلاعات ارائه شده در این فرم را پذیرفته و در صورت اثبات عدم صحت
|
||||
موارد فوق الذکر شرکت مجاز به اتخاذ هر گونه تصمیم و برخورد قانونی می باشد .
|
||||
</Checkbox>
|
||||
</div>
|
||||
): (
|
||||
) : (
|
||||
<Alert
|
||||
status='success'
|
||||
variant='subtle'
|
||||
@@ -373,12 +499,14 @@ const requestForm = (SelectedJob) => {
|
||||
})()}
|
||||
</HandleFormReq.Provider>
|
||||
<div className={'mt-5'}>
|
||||
|
||||
<div dir={'rtl'} className={'m-2 mt-2 mb-2 flex justify-content-between'}>
|
||||
{page > 1 && ShowSuccess === false ? (
|
||||
<MDBBtn color='danger' size={'sm'} className={'mt-2'} onClick={() => setPage(page - 1)} >مرحله قبل</MDBBtn>
|
||||
)
|
||||
: ''}
|
||||
<MDBBtn color='danger' size={'sm'} className={'mt-2'} onClick={() => setPage(page - 1)}>
|
||||
مرحله قبل
|
||||
</MDBBtn>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
|
||||
{/*{page === 1 && page !== 5 ? (*/}
|
||||
{/* (*/}
|
||||
@@ -390,10 +518,15 @@ const requestForm = (SelectedJob) => {
|
||||
{page === 7 ? (
|
||||
<div>
|
||||
{ShowSuccess === false && (
|
||||
<MDBBtn disabled={iAgree} onClick={handleLastSubmit} size={'lg'} className={'mt-2 bk-med text-center bg-primary-teal'}>
|
||||
<MDBBtn
|
||||
disabled={iAgree}
|
||||
onClick={handleLastSubmit}
|
||||
size={'lg'}
|
||||
className={'mt-2 bk-med text-center bg-primary-teal'}
|
||||
>
|
||||
{loading === false ? (
|
||||
' ثبت در خواست استخدام'
|
||||
): (
|
||||
) : (
|
||||
<div>
|
||||
<div className={'flex align-items-center'}>
|
||||
در حال ثبت درخواست
|
||||
@@ -402,32 +535,36 @@ const requestForm = (SelectedJob) => {
|
||||
</MDBSpinner>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)}
|
||||
</MDBBtn>
|
||||
)}
|
||||
</div>
|
||||
): ''}
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</MDBContainer>
|
||||
</AppContainer>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export async function getServerSideProps(ctx) {
|
||||
// Fetch data from external API
|
||||
const {query} = ctx
|
||||
const res = await axios.get(`https://mehriranianco.ir/api/public/selectJob/${query.pos_id}`).then((res) => {
|
||||
const { query } = ctx
|
||||
const res = await axios
|
||||
.get(`${AppProduction}public/selectJob/${query.pos_id}`)
|
||||
.then(res => {
|
||||
return res.data
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
})
|
||||
const SelectedJob = await res
|
||||
|
||||
// Pass data to the page via props
|
||||
return { props: { SelectedJob } }
|
||||
}
|
||||
|
||||
export default requestForm;
|
||||
export default requestForm
|
||||
|
||||
Reference in New Issue
Block a user