price update
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
import React from 'react';
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import {FiUsers, FiArrowLeft} from 'react-icons/fi'
|
||||
import {
|
||||
MDBBtn,
|
||||
MDBCard,
|
||||
MDBCardBody,
|
||||
MDBCardText,
|
||||
MDBCardTitle,
|
||||
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";
|
||||
|
||||
const Recruitment = (jobs) => {
|
||||
console.log(jobs)
|
||||
const Parallax = ({ quality }) => {
|
||||
return `../../resource/parallax/33012321.jpg`;
|
||||
}
|
||||
const router = useRouter();
|
||||
const {category_id} = router.query
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<Image
|
||||
loader={Parallax}
|
||||
src="Parallax.png"
|
||||
className={'responsive-img shadow-5'}
|
||||
alt={category_id}
|
||||
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'}>{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) => (
|
||||
<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'}>
|
||||
<div>
|
||||
<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'}>
|
||||
درخواست همکاری
|
||||
<FiArrowLeft className={'ml-2'} />
|
||||
</MDBBtn>
|
||||
</Link>
|
||||
</div>
|
||||
</MDBCardBody>
|
||||
</MDBCard>
|
||||
</Link>
|
||||
</Box>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</MDBContainer>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</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/job/${query.category_id}`).then((res) => {
|
||||
return res.data
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
const jobs = await res
|
||||
|
||||
// Pass data to the page via props
|
||||
return { props: { jobs } }
|
||||
}
|
||||
|
||||
export default Recruitment;
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Input, Select, SimpleGrid} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
|
||||
const CoursesData = () => {
|
||||
const {setPage, coursesData, setCoursesData, langStatus, setLangStatus} = useContext(HandleFormReq)
|
||||
const [formValues, setFormValues] = useState(coursesData)
|
||||
|
||||
let handleChange = (i, e) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues[i][e.target.name] = e.target.value;
|
||||
setFormValues(newFormValues);
|
||||
|
||||
}
|
||||
|
||||
let addFormFields = () => {
|
||||
setFormValues([...formValues, {
|
||||
courseName: '',
|
||||
courseEdu: '',
|
||||
courseLocal: '',
|
||||
courseTime: '',
|
||||
}])
|
||||
}
|
||||
|
||||
let removeFormFields = (i) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues.splice(i, 1);
|
||||
setFormValues(newFormValues)
|
||||
}
|
||||
|
||||
let handleSubmit = (event) => {
|
||||
event.preventDefault();
|
||||
setCoursesData(formValues)
|
||||
console.log(formValues);
|
||||
console.log('coursesData', coursesData);
|
||||
console.log('langStatus', langStatus.status);
|
||||
setPage(4)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<SimpleGrid className={'mt-2 flex justify-content-between mt-5'} dir={'rtl'} columns={[1,1,2]} spacingX='390px' spacingY='20px'>
|
||||
<Box>
|
||||
<MDBInputGroup className='flex flex-md-row flex-lg-row flex-sm-column'>
|
||||
<div style={{ flexDirection: 'column' }} className={'flex align-items-center flex-md-row flex-lg-row flex-sm-column'}>
|
||||
<div>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
میزان آشنایی با زبان انگلیسی :
|
||||
</MDBInputGroupText>
|
||||
</div>
|
||||
{process.browser && (
|
||||
<div>
|
||||
<select
|
||||
required
|
||||
onChange={(e) => setLangStatus({status: e.target.value})}
|
||||
dir={'ltr'}
|
||||
defaultValue={langStatus.status}
|
||||
style={{ width: 200 }}
|
||||
placeholder={'سطح زبان خود را مشخص کنید '}
|
||||
>
|
||||
<option value='3'> ضعیف </option>
|
||||
<option value='2'> خوب </option>
|
||||
<option value='1'> عالی </option>
|
||||
</select>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
<br />
|
||||
<br />
|
||||
<p className={'right'}>در صورتی که دوره آموزشی خاصی را گذرانده اید اطلاعات آن را وارد کنید </p>
|
||||
<br />
|
||||
<br />
|
||||
<form onSubmit={handleSubmit} id={'persondataform'}>
|
||||
<SimpleGrid className={'mt-4'} dir={'rtl'} columns={[1, 1, 1]} spacing={3}>
|
||||
{process.browser && formValues.map((element, index) => (
|
||||
<>
|
||||
<Box className={'d-lg-flex d-md-block justify-content-between'} key={index}>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='courseName'
|
||||
name="courseName"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.courseName || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام دوره آموزشی"
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='courseEdu'
|
||||
name="courseEdu"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.courseEdu || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام موسسه آموزشی "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='courseLocal'
|
||||
name="courseLocal"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.courseLocal || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="مکان موسسه "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='courseTime'
|
||||
name="courseTime"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.courseTime || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="مدت آموزش "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{
|
||||
index ?
|
||||
<MDBBtn color={'danger'} outline type="button" className="button remove" onClick={() => removeFormFields(index)}>پاک کردن</MDBBtn>
|
||||
: null
|
||||
}
|
||||
</>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
<div className="flex justify-content-end mt-5">
|
||||
<MDBBtn color={'warning'} className="button add" type="button" onClick={() => addFormFields()}>اضافه کردن </MDBBtn>
|
||||
</div>
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CoursesData;
|
||||
@@ -0,0 +1,170 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Input, SimpleGrid} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
|
||||
const EducationalData = () => {
|
||||
const {setPage, educationalData, setEducationalData} = useContext(HandleFormReq)
|
||||
const [formValues, setFormValues] = useState(educationalData)
|
||||
console.log('edd', educationalData)
|
||||
let handleChange = (i, e) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues[i][e.target.name] = e.target.value;
|
||||
setFormValues(newFormValues);
|
||||
}
|
||||
|
||||
let addFormFields = () => {
|
||||
setFormValues([...formValues, {
|
||||
university: '',
|
||||
field : '',
|
||||
trend: '',
|
||||
score: '',
|
||||
dateField: '',
|
||||
}])
|
||||
}
|
||||
|
||||
let removeFormFields = (i) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues.splice(i, 1);
|
||||
setFormValues(newFormValues)
|
||||
}
|
||||
|
||||
let handleSubmit = (event) => {
|
||||
event.preventDefault();
|
||||
console.log(formValues);
|
||||
setEducationalData(formValues)
|
||||
setPage(3)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<form onSubmit={handleSubmit} id={'persondataform'}>
|
||||
<SimpleGrid className={'mt-4'} dir={'rtl'} columns={[1, 1, 1]} spacing={3}>
|
||||
{process.browser && formValues.map((element, index) => (
|
||||
<>
|
||||
<Box className={'d-lg-flex d-md-block justify-content-between'} key={index}>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
required
|
||||
id='university'
|
||||
name="university"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.university || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="دانشگاه / موسسه "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='field'
|
||||
name="field"
|
||||
required
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.field || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="رشته تحصیلی "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='trend'
|
||||
name="trend"
|
||||
required
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.trend || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="گرایش "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='dateField'
|
||||
name="dateField"
|
||||
required
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.dateField || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تاریخ اخذ مدرک "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='score'
|
||||
name="score"
|
||||
required
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.score || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="معدل "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{
|
||||
index ?
|
||||
<MDBBtn color={'danger'} outline type="button" className="button remove" onClick={() => removeFormFields(index)}>پاک کردن</MDBBtn>
|
||||
: null
|
||||
}
|
||||
</>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
<div className="flex justify-content-end mt-5">
|
||||
<MDBBtn color={'warning'} className="button add" type="button" onClick={() => addFormFields()}>اضافه کردن </MDBBtn>
|
||||
</div>
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default EducationalData;
|
||||
@@ -0,0 +1,90 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Checkbox, Input, Radio, RadioGroup, Select, SimpleGrid, Stack, Text, Textarea} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
import NumberFormat from "react-number-format";
|
||||
import log from "tailwindcss/lib/util/log";
|
||||
|
||||
const Furtherinformation = () => {
|
||||
const {setPage, furtherinformation, setFurtherinformation} = useContext(HandleFormReq)
|
||||
const [criminal,setCriminal] = useState(process.browser && furtherinformation.criminal.toString())
|
||||
const [salary, setSalary] = useState(process.browser && furtherinformation.salary)
|
||||
const [Introduced, setIntroduced] = useState(process.browser && furtherinformation.Introduced)
|
||||
|
||||
// let handleSubmit = () => {
|
||||
// setPage(7)
|
||||
// }
|
||||
let handleChange = (e) => {
|
||||
setFurtherinformation({criminal: criminal,salary: salary, Introduced: Introduced})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
{process.browser && (
|
||||
<div>
|
||||
<SimpleGrid className={'mt-2 flex mt-5'} dir={'rtl'} columns={[1,1,2]} spacingX='390px' spacingY='20px'>
|
||||
<Box>
|
||||
<MDBInputGroup className='flex flex-md-row flex-lg-row flex-sm-column '>
|
||||
<div style={{ flexDirection: 'column' }} className={'flex align-items-center flex-md-row flex-lg-row flex-sm-column '}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
آیا سابقه کیفری دارید :
|
||||
</MDBInputGroupText>
|
||||
<RadioGroup className={'flex align-items-center'} onChange={setCriminal} value={criminal}>
|
||||
<Stack spacing={4} direction='row'>
|
||||
<Radio value='1'> ندارم </Radio>
|
||||
<Radio value='2'> دارم </Radio>
|
||||
</Stack>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<NumberFormat
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
onValueChange={(values) => {
|
||||
const { formattedValue, value } = values;
|
||||
handleChange()
|
||||
setSalary(formattedValue)
|
||||
console.log('salery', salary)
|
||||
}}
|
||||
className={'form-control'}
|
||||
type={'text'}
|
||||
thousandSeparator={true}
|
||||
defaultValue={furtherinformation.salary}
|
||||
placeholder=" حقوق پیشنهادی(تومان) "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
<Box dir={'rtl'} className={''}>
|
||||
<br /><br />
|
||||
<Textarea
|
||||
dir={'rtl'}
|
||||
defaultValue={furtherinformation.Introduced}
|
||||
onChange={(e) => {
|
||||
handleChange()
|
||||
setIntroduced(e.target.value)}
|
||||
}
|
||||
placeholder='در صورتی که معرفی دارید نام و شماره تماس آن را وارد کنید '
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/*<MDBBtn onClick={handleSubmit} size={'sm'} className={'mt-2 bg-primary-teal'} >ثبت درخواست </MDBBtn>*/}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Furtherinformation;
|
||||
@@ -0,0 +1,170 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Input, Select, SimpleGrid} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
|
||||
const JobData = () => {
|
||||
const {setPage, jobData, setJob} = useContext(HandleFormReq)
|
||||
const [formValues, setFormValues] = useState(jobData)
|
||||
|
||||
let handleChange = (i, e) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues[i][e.target.name] = e.target.value;
|
||||
setFormValues(newFormValues);
|
||||
}
|
||||
|
||||
let addFormFields = () => {
|
||||
setFormValues([...formValues, {
|
||||
companyName: '',
|
||||
position: '',
|
||||
workTime: '',
|
||||
exitReason: '',
|
||||
lastIncome: ''
|
||||
}])
|
||||
console.log('add nf', formValues);
|
||||
}
|
||||
|
||||
let removeFormFields = (i) => {
|
||||
let newFormValues = [...formValues];
|
||||
newFormValues.splice(i, 1);
|
||||
setFormValues(newFormValues)
|
||||
}
|
||||
|
||||
let handleSubmit = (event) => {
|
||||
event.preventDefault();
|
||||
setJob(formValues)
|
||||
setPage(5)
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<br />
|
||||
<br />
|
||||
<p className={'right'}>در صورتی که سابقه کاری دارید اطلاعات آن را وارد کنید </p>
|
||||
<br />
|
||||
<br />
|
||||
<form onSubmit={handleSubmit} id={'persondataform'}>
|
||||
<SimpleGrid className={'mt-4'} dir={'rtl'} columns={[1, 1, 1]} spacing={3}>
|
||||
{process.browser && formValues.map((element, index) => (
|
||||
<>
|
||||
<Box className={'d-lg-flex d-md-block justify-content-between'} key={index}>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='companyName'
|
||||
name="companyName"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.companyName || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام شرکت / موسسه"
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='position'
|
||||
name="position"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.position || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="موضعیت شغلی "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='workTime'
|
||||
name="workTime"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.workTime || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="مدت همکاری "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='exitReason'
|
||||
name="exitReason"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.exitReason || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="دلیل خروج "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='lastIncome'
|
||||
name="lastIncome"
|
||||
onChange={e => handleChange(index, e)}
|
||||
defaultValue={element.lastIncome || ""} className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="حقوقی دریافتی (تومان) "
|
||||
/>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{
|
||||
index ?
|
||||
<MDBBtn color={'danger'} outline type="button" className="button remove" onClick={() => removeFormFields(index)}>پاک کردن</MDBBtn>
|
||||
: null
|
||||
}
|
||||
</>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
<div className="flex justify-content-end mt-5">
|
||||
<MDBBtn color={'warning'} className="button add" type="button" onClick={() => addFormFields()}>اضافه کردن </MDBBtn>
|
||||
</div>
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default JobData;
|
||||
@@ -0,0 +1,55 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Input, Radio, RadioGroup, Select, SimpleGrid, Stack, Text, Textarea} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
|
||||
const PcSkill = () => {
|
||||
const {setPage, pcSkillData, setPcSkillData} = useContext(HandleFormReq)
|
||||
let icdlStr = process.browser && pcSkillData.icdlLevel.toString()
|
||||
const [icdl, seticdl] = useState(icdlStr)
|
||||
const [text, settext] = useState('')
|
||||
let handleSubmit = () => {
|
||||
setPcSkillData({text:text,icdlLevel: icdl})
|
||||
setPage(7)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Box dir={'rtl'} >
|
||||
{process.browser && (
|
||||
<div>
|
||||
<MDBInputGroup className='flex flex-md-row flex-lg-row flex-sm-column mt-5'>
|
||||
<div style={{ flexDirection: 'column' }} className={'flex align-items-center flex-md-row flex-lg-row flex-sm-column mt-5 justify-content-start'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
آیا به ICDL (مهارت های هفتگانه آشنا هستید) :
|
||||
</MDBInputGroupText>
|
||||
<RadioGroup onChange={seticdl} value={icdl} >
|
||||
<Stack direction='row'>
|
||||
<Radio value='1'>بله </Radio>
|
||||
<Radio value='2'>خیر</Radio>
|
||||
</Stack>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
<br /><br />
|
||||
<Textarea
|
||||
dir={'rtl'}
|
||||
defaultValue={pcSkillData.text}
|
||||
onChange={(e) => settext(e.target.value)}
|
||||
placeholder='در صورتی که به نرم افزار خاصی مسلط هستید نام آن را وارد کنید '
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<MDBBtn onClick={handleSubmit} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PcSkill;
|
||||
@@ -0,0 +1,524 @@
|
||||
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,
|
||||
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";
|
||||
|
||||
const PersonData = () => {
|
||||
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()
|
||||
let hasErr = Object.keys(errors).length
|
||||
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', {
|
||||
nationalcode: data.national_code
|
||||
}).then((res) => {
|
||||
if (res.data.status === false) {
|
||||
alert('کد ملی شما قبلا ثبت شده ')
|
||||
}else {
|
||||
setpersondata(data)
|
||||
setPage(2)
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log('44324589091',err)
|
||||
})
|
||||
|
||||
|
||||
console.log('jsondataperson', JSON.stringify({ personData: personData, scc: personData }))
|
||||
}
|
||||
else {
|
||||
alert('مقادیر وارد شده معبتر نمی باشد')
|
||||
}
|
||||
};
|
||||
console.log('personData.lastname', typeof personData.lastname)
|
||||
return (
|
||||
<div>
|
||||
<form onSubmit={handleSubmit(onSubmit)} id={'persondataform'}>
|
||||
<SimpleGrid className={'mt-4'} dir={'rtl'} columns={[1, 1, 4]} spacing={3}>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='firstname'
|
||||
defaultValue={personData.firstname}
|
||||
{...register('firstname', {required: true, maxLength: 100})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
<p className={'mt-1 text-sm text-danger'}>
|
||||
{errors?.firstname?.type === "required" && <p> وارد کردن نام اجباری است</p>}
|
||||
{errors?.firstname?.type === "maxLength" && <p>نام وارد شده معبتر نمی باشد</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='lastname'
|
||||
defaultValue={personData.lastname}
|
||||
{...register('lastname', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام خانوادگی خود را وارد کنید "
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.lastname?.type === "required" && <p> وارد کردن نام خانوادگی اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='fatherName'
|
||||
defaultValue={personData.fatherName}
|
||||
{...register('fatherName', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نام پدر خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.fatherName?.type === "required" && <p> وارد کردن نام پدر اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='wifeJob'
|
||||
defaultValue={personData.wifeJob}
|
||||
{...register('wifeJob')}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="شغل همسر خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
{/* {errors?.wifeJob?.type === "required" && <p> وارد کردن شغل همسر اجباری است</p>}*/}
|
||||
{/*</p>*/}
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='childIndex'
|
||||
defaultValue={personData.childIndex}
|
||||
{...register('childIndex' )}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تعداد فرزندان خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
{/* {errors?.childIndex?.type === "required" && <p> وارد کردن شغل همسر اجباری است</p>}*/}
|
||||
{/*</p>*/}
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='dependants'
|
||||
defaultValue={personData.dependants}
|
||||
{...register('dependants')}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تعداد افراد تحت تکلف خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
{/*<p className={' mt-1 text-sm text-danger'}>*/}
|
||||
{/* {errors?.dependants?.type === "required" && <p> وارد کردن شغل همسر اجباری است</p>}*/}
|
||||
{/*</p>*/}
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='Insurance'
|
||||
defaultValue={personData.Insurance}
|
||||
{...register('Insurance', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="وضعیت بیمه خود را وارد کنید "
|
||||
/>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.Insurance?.type === "required" && <p> وارد کردن وضعیت بیمه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='national_code'
|
||||
defaultValue={personData.national_code}
|
||||
{...register('national_code', {required: true, maxLength: 10, minLength: 10})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
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>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='placenational'
|
||||
defaultValue={personData.placenational}
|
||||
{...register('placenational', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="محل صدور شناسنامه خود را وارد کنید "
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.placenational?.type === "required" && <p> وارد کردن محل صدور شناسانه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='PHONE'
|
||||
defaultValue={personData.phone}
|
||||
{...register('phone', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="تلفن ثابت خود را وارد کنید "
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.phone?.type === "required" && <p> وارد کردن تلفن ثابت اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='mobile_number'
|
||||
defaultValue={personData.mobile_number}
|
||||
{...register('mobile_number', {required: true, maxLength: 11, minLength: 11})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
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>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</div>
|
||||
</Box>
|
||||
<Box>
|
||||
<div>
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0'}>
|
||||
<FiUser />
|
||||
</MDBInputGroupText>
|
||||
<Input
|
||||
id='birthday'
|
||||
defaultValue={personData.birthday}
|
||||
{...register('birthday', {required: true})}
|
||||
className={'bk-med rounded-0'}
|
||||
style={{ height: 40 }}
|
||||
dir={'rtl'}
|
||||
type='number'
|
||||
placeholder=" سال تولد خود را وارد کنید "
|
||||
/>
|
||||
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{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'>
|
||||
<Box>
|
||||
<MDBInputGroup className='flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<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)}
|
||||
>
|
||||
<option value='1'> مرد </option>
|
||||
<option value='2'> زن </option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.gender?.type === "required" && <p> وارد کردن نظام وظیفه اجباری است</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
وضعیت تحصیل :
|
||||
</MDBInputGroupText>
|
||||
<div>
|
||||
<Select
|
||||
dir={'ltr'}
|
||||
defaultValue={personData.degree}
|
||||
style={{ width: 200 }}
|
||||
{...register('degree', {required: true})}
|
||||
>
|
||||
<option value='0'> زیر دیپلم </option>
|
||||
<option value='1'> دیپلم </option>
|
||||
<option value='5'> فوق دیپام </option>
|
||||
<option value='2'> لیسانس </option>
|
||||
<option value='3'> فوق لیسانس </option>
|
||||
<option value='4'> دکتری </option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.degree?.type === "required" && <p> وضعیت تحصیل را مشخص کنید</p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBInputGroup>
|
||||
<div className={'flex align-items-center'}>
|
||||
<MDBInputGroupText className={'rounded-0 border-0'}>
|
||||
وضعیت تاهل :
|
||||
</MDBInputGroupText>
|
||||
<div>
|
||||
<Select
|
||||
defaultValue={personData.marital}
|
||||
style={{ width: 200 }}
|
||||
dir={'ltr'}
|
||||
{...register('marital', {required: true})}
|
||||
>
|
||||
<option value='1'> مجرد </option>
|
||||
<option value='2'> متاهل </option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.marital?.type === "required" && <p> وضعیت تاهل را مشخص کنید </p>}
|
||||
</p>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
<Box>
|
||||
{sex === '1' ? (
|
||||
<MDBInputGroup className='mb-3 flex'>
|
||||
<div className={'flex align-items-center'}>
|
||||
<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=' وضعیت خدمت '>
|
||||
<option value='1'> معافیت </option>
|
||||
<option value='2'> مشمول </option>
|
||||
<option value='3'> پایان خدمت </option>
|
||||
</Select>
|
||||
</div>
|
||||
</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>}
|
||||
</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}>
|
||||
<div>
|
||||
<Stack spacing={4} direction='row'>
|
||||
<Radio value='1'> ندارم </Radio>
|
||||
<Radio value='2'> دارم </Radio>
|
||||
</Stack>
|
||||
</div>
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
{health === '2' && (
|
||||
<div className={'flex mt-sm-2 align-items-center justify-content-center'}>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<Input
|
||||
id='healthreason'
|
||||
defaultValue={personData.healthreason}
|
||||
{...register('healthreason', {required: health === '2'})}
|
||||
className={'bk-med m-2 rounded-0'}
|
||||
style={{ height: 40, width:250 }}
|
||||
dir={'rtl'}
|
||||
type='text'
|
||||
placeholder="نوع بیماری خود را وارد کنید "
|
||||
/>
|
||||
<div>
|
||||
<p style={{ width: 400 }} className={'text-sm text-danger'}>
|
||||
{errors?.healthreason?.type === "required" && <p> نوع بیماری خود را وارد کنید </p>}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</MDBInputGroup>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
|
||||
{/*////*/}
|
||||
</SimpleGrid>
|
||||
<Box className={'flex flex-col justify-content-center'}>
|
||||
<MDBInputGroup className='mb-3 border-2'>
|
||||
<Textarea
|
||||
defaultValue={personData.address}
|
||||
{...register('address',{required: true})}
|
||||
dir={'rtl'} placeholder='آدرس محل سکونت خود را وارد کنید ' />
|
||||
</MDBInputGroup>
|
||||
<p className={' mt-1 text-sm text-danger'}>
|
||||
{errors?.address?.type === "required" && <p> آدرس محلص سکونت خود را وراد کنید </p>}
|
||||
</p>
|
||||
</Box>
|
||||
|
||||
<MDBBtn type={'submit'} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PersonData;
|
||||
@@ -0,0 +1,41 @@
|
||||
import React, {useContext, useState} from 'react';
|
||||
import {Box, Input, Select, SimpleGrid, Textarea} from "@chakra-ui/react";
|
||||
import {MDBBtn, MDBInputGroup, MDBInputGroupText} from "mdb-react-ui-kit";
|
||||
import {FiUser} from "react-icons/fi";
|
||||
import {useForm} from "react-hook-form";
|
||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
||||
|
||||
const ScientificData = () => {
|
||||
const {setPage, scientificData, setScientificData} = useContext(HandleFormReq)
|
||||
|
||||
|
||||
let handleSubmit = () => {
|
||||
console.log('scientificData', scientificData)
|
||||
setPage(6)
|
||||
}
|
||||
let handleChange = (e) => {
|
||||
setScientificData({text: e.target.value})
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<Box className={''}>
|
||||
<br />
|
||||
<br />
|
||||
{process.browser && (
|
||||
<Textarea
|
||||
dir={'rtl'}
|
||||
defaultValue={scientificData.text}
|
||||
onChange={handleChange}
|
||||
placeholder='در صورتی داشتن مقاله یا دستاورد علمی اطلاعات آن را وارد کنید'
|
||||
/>
|
||||
)}
|
||||
</Box>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<MDBBtn onClick={handleSubmit} size={'sm'} className={'mt-2 bg-primary-teal'} >مرحله بعد</MDBBtn>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ScientificData;
|
||||
@@ -0,0 +1,433 @@
|
||||
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,
|
||||
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';
|
||||
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";
|
||||
|
||||
|
||||
|
||||
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 [CheckCode, setCheckCode] = useState()
|
||||
const [page, setPage] = useState(1)
|
||||
const [personData, setpersondata] = useState({
|
||||
Insurance: '',
|
||||
address: '',
|
||||
birthday: '',
|
||||
childIndex: "",
|
||||
degree: "",
|
||||
healthreason: '',
|
||||
health: '1',
|
||||
dependants: "",
|
||||
fatherName: "",
|
||||
firstname: "",
|
||||
gender: '2',
|
||||
lastname: '',
|
||||
marital: "",
|
||||
mobile_number: "",
|
||||
national_code: "",
|
||||
phone: "",
|
||||
placenational: "",
|
||||
wifeJob: ""
|
||||
})
|
||||
const [educationalData,setEducationalData] = useState([{
|
||||
university: '',
|
||||
field : '',
|
||||
trend: '',
|
||||
score: '',
|
||||
dateField: '',
|
||||
}])
|
||||
const [coursesData,setCoursesData] = useState([{
|
||||
courseName: '',
|
||||
courseEdu: '',
|
||||
courseLocal: '',
|
||||
courseTime: '',
|
||||
}])
|
||||
const [langStatus,setLangStatus] = useState({
|
||||
status: 0
|
||||
})
|
||||
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({
|
||||
criminal: '1',
|
||||
salary: '',
|
||||
Introduced: ''
|
||||
})
|
||||
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]
|
||||
);
|
||||
|
||||
const handleLastSubmit = () => {
|
||||
setLoading(true)
|
||||
axios.post('https://mehriranianco.ir/api/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
|
||||
})
|
||||
}).then((res) => {
|
||||
setLoading(false)
|
||||
seShowSuccess(true)
|
||||
setCheckCode(res.data.code)
|
||||
|
||||
}).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 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<MDBContainer className={'mt-5 mb-5'}>
|
||||
<SimpleGrid className={'mb-4'} columns={[1, 1, 2]} spacing={3}>
|
||||
<Box>
|
||||
<MDBCard border='primary' className={'border-black'}>
|
||||
<MDBCardBody dir={'rtl'}>
|
||||
<MDBCardTitle className={'bk-med'}>
|
||||
<FcApproval className={'ml-2'} />
|
||||
توضیحات موقعیت شغلی</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>
|
||||
))
|
||||
})}
|
||||
</UnorderedList>
|
||||
</div>
|
||||
</MDBCardBody>
|
||||
</MDBCard>
|
||||
</Box>
|
||||
<Box>
|
||||
<MDBCard border='primary' className={'border-black'}>
|
||||
<MDBCardBody dir={'rtl'}>
|
||||
<MDBCardTitle className={'bk-med'}>
|
||||
<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>
|
||||
))
|
||||
})}
|
||||
</UnorderedList>
|
||||
</div>
|
||||
</MDBCardBody>
|
||||
</MDBCard>
|
||||
</Box>
|
||||
</SimpleGrid>
|
||||
<Divider />
|
||||
<br />
|
||||
<HandleFormReq.Provider value={value}>
|
||||
<div id={'formConatiner'} className={'flex flex-row-reverse align-items-center'}>
|
||||
<div>
|
||||
{(() => {
|
||||
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'}>
|
||||
اطلاعات فردی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 2:
|
||||
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'}>
|
||||
اطلاعات تحصیلی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 3:
|
||||
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'}>
|
||||
سوابق آموزشی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 4:
|
||||
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'}>
|
||||
سوابق شغلی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 5:
|
||||
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'}>
|
||||
سوابق علمی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 6:
|
||||
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'}>
|
||||
مهارت کار با کامپیوتر
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
case 7:
|
||||
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'}>
|
||||
اطلاعات تکمیلی
|
||||
</h3>
|
||||
</div>
|
||||
<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>
|
||||
</SlideFade>
|
||||
)
|
||||
}
|
||||
})()}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className={'mt-5'}>
|
||||
<Progress dir={'rtl'} value={page * 14} size='xs' colorScheme='teal' />
|
||||
</div>
|
||||
{(() => {
|
||||
switch(page) {
|
||||
case 1:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<PersonData />
|
||||
</SlideFade>
|
||||
)
|
||||
case 2:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<EducationalData />
|
||||
</SlideFade>
|
||||
)
|
||||
case 3:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<CoursesData />
|
||||
</SlideFade>
|
||||
)
|
||||
case 4:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<JobData />
|
||||
</SlideFade>
|
||||
)
|
||||
case 5:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<ScientificData />
|
||||
</SlideFade>
|
||||
)
|
||||
case 6:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
<PcSkill />
|
||||
</SlideFade>
|
||||
)
|
||||
case 7:
|
||||
return (
|
||||
<SlideFade in={true}>
|
||||
{ShowSuccess === false ? (
|
||||
<div>
|
||||
<Furtherinformation />
|
||||
<Checkbox onChange={() => setAgree(!iAgree)}>
|
||||
اینجانب مسئولیت صحت کلیه اطلاعات ارائه شده در این فرم را پذیرفته و در صورت اثبات عدم صحت موارد فوق الذکر شرکت مجاز به اتخاذ هر گونه تصمیم و برخورد قانونی می باشد .
|
||||
</Checkbox>
|
||||
</div>
|
||||
): (
|
||||
<Alert
|
||||
status='success'
|
||||
variant='subtle'
|
||||
flexDirection='column'
|
||||
alignItems='center'
|
||||
justifyContent='center'
|
||||
textAlign='center'
|
||||
height='200px'
|
||||
>
|
||||
<AlertIcon boxSize='40px' mr={0} />
|
||||
<AlertTitle className={'bk-med'} mt={4} mb={1} fontSize='lg'>
|
||||
درخواست شما ثبت شد
|
||||
</AlertTitle>
|
||||
<AlertDescription dir={'rtl'} maxWidth='sm'>
|
||||
کد درخواست شما جهت پیگیری : {CheckCode}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
</SlideFade>
|
||||
)
|
||||
}
|
||||
})()}
|
||||
</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>
|
||||
)
|
||||
: ''}
|
||||
|
||||
{/*{page === 1 && page !== 5 ? (*/}
|
||||
{/* (*/}
|
||||
{/* <MDBBtn size={'sm'} className={'mt-2 bg-primary-teal'} onClick={() => setPage(page + 1)} >مرحله بعد</MDBBtn>*/}
|
||||
{/* )*/}
|
||||
{/*): ''}*/}
|
||||
</div>
|
||||
<div className={'flex justify-content-center m-2'}>
|
||||
{page === 7 ? (
|
||||
<div>
|
||||
{ShowSuccess === false && (
|
||||
<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'}>
|
||||
در حال ثبت درخواست
|
||||
<MDBSpinner grow>
|
||||
<span className='visually-hidden'>Loading...</span>
|
||||
</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) => {
|
||||
return res.data
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
});
|
||||
const SelectedJob = await res
|
||||
|
||||
// Pass data to the page via props
|
||||
return { props: { SelectedJob } }
|
||||
}
|
||||
|
||||
export default requestForm;
|
||||
Reference in New Issue
Block a user