add production url
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"next": {
|
||||||
|
"modifyConfig": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+14
-16
@@ -1,24 +1,22 @@
|
|||||||
export const AppUrl = (query) => {
|
export const AppUrl = query => {
|
||||||
|
const serve = 'https://mehrara-api.iran.liara.run'
|
||||||
|
const local = 'http://127.0.0.1:8000'
|
||||||
|
|
||||||
const serve = 'https://mehrara-api.iran.liara.run';
|
return `${serve}/api/${query}`
|
||||||
const local = 'http://127.0.0.1:8000';
|
|
||||||
|
|
||||||
return `${serve}/api/${query}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const VueApi = (query) => {
|
export const VueApi = query => {
|
||||||
|
const serve = 'https://mipstockholder.iran.liara.run'
|
||||||
|
const local = 'http://127.0.0.1:8000'
|
||||||
|
|
||||||
const serve = 'https://mipstockholder.iran.liara.run';
|
return `${local}/api/${query}`
|
||||||
const local = 'http://127.0.0.1:8000';
|
|
||||||
|
|
||||||
return `${local}/api/${query}`
|
|
||||||
}
|
}
|
||||||
export const BackTwo = 'http://127.0.0.1:8000/api'
|
export const BackTwo = 'http://127.0.0.1:8000/api'
|
||||||
|
|
||||||
export const AppFile = (addr) => {
|
export const AppFile = addr => {
|
||||||
const serve = 'https://mehrara-api.iran.liara.run';
|
const serve = 'https://mehrara-api.iran.liara.run'
|
||||||
const local = 'http://127.0.0.1:8000';
|
const local = 'http://127.0.0.1:8000'
|
||||||
|
|
||||||
return `${serve}/${addr}`
|
return `${serve}/${addr}`
|
||||||
|
}
|
||||||
}
|
export const AppProduction = 'https://mipstockholder.iran.liara.run/api/'
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
const withImages = require('next-images')
|
const withImages = require('next-images')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
experimental: {
|
||||||
|
outputStandalone: true
|
||||||
|
},
|
||||||
siteUrl: 'https://miphospital.ir',
|
siteUrl: 'https://miphospital.ir',
|
||||||
generateRobotsTxt: true, // (optional)
|
generateRobotsTxt: true, // (optional)
|
||||||
...withImages(),
|
...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 { MDBRadio } from 'mdb-react-ui-kit'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import NumberFormat from 'react-number-format'
|
import NumberFormat from 'react-number-format'
|
||||||
|
import { AppProduction } from '../../lib/api'
|
||||||
|
|
||||||
const Sales = () => {
|
const Sales = () => {
|
||||||
const [name, setName] = useState()
|
const [name, setName] = useState()
|
||||||
@@ -23,7 +24,7 @@ const Sales = () => {
|
|||||||
setLoading(true)
|
setLoading(true)
|
||||||
toast.loading('در حال ثبت درخواست شما')
|
toast.loading('در حال ثبت درخواست شما')
|
||||||
axios
|
axios
|
||||||
.post('https://mehriranianco.ir/api/public/website/request', {
|
.post(`${AppProduction}public/website/request`, {
|
||||||
name: name,
|
name: name,
|
||||||
mobile_number: mobileNumber,
|
mobile_number: mobileNumber,
|
||||||
investment_price: InvestmentPrice,
|
investment_price: InvestmentPrice,
|
||||||
|
|||||||
+113
-98
@@ -1,106 +1,121 @@
|
|||||||
import React from 'react';
|
import React from 'react'
|
||||||
import AppContainer from "../appContainer";
|
import AppContainer from '../appContainer'
|
||||||
import Image from "next/image";
|
import Image from 'next/image'
|
||||||
import {FiUsers, FiArrowLeft} from 'react-icons/fi'
|
import { FiUsers, FiArrowLeft } from 'react-icons/fi'
|
||||||
import Link from "next/link";
|
import Link from 'next/link'
|
||||||
import {
|
import {
|
||||||
MDBBtn,
|
MDBBtn,
|
||||||
MDBCard,
|
MDBCard,
|
||||||
MDBCardBody,
|
MDBCardBody,
|
||||||
MDBCardText,
|
MDBCardText,
|
||||||
MDBCardTitle,
|
MDBCardTitle,
|
||||||
MDBContainer,
|
MDBContainer,
|
||||||
MDBIcon,
|
MDBIcon,
|
||||||
MDBTypography
|
MDBTypography
|
||||||
} from "mdb-react-ui-kit";
|
} from 'mdb-react-ui-kit'
|
||||||
import {Box, Divider, ScaleFade, SimpleGrid} from "@chakra-ui/react";
|
import { Box, Divider, ScaleFade, SimpleGrid } from '@chakra-ui/react'
|
||||||
import {VueApi} from "../../lib/api";
|
import { AppProduction, VueApi } from '../../lib/api'
|
||||||
import axios from "axios";
|
import axios from 'axios'
|
||||||
import {data} from "autoprefixer";
|
import { data } from 'autoprefixer'
|
||||||
|
|
||||||
const Recruitment = (dataoccupational) => {
|
const Recruitment = dataoccupational => {
|
||||||
const Parallax = ({ quality }) => {
|
const Parallax = ({ quality }) => {
|
||||||
return `../resource/parallax/Directors.jpg`;
|
return `../resource/parallax/Directors.jpg`
|
||||||
}
|
}
|
||||||
return (
|
console.log('Add', AppProduction)
|
||||||
<div>
|
|
||||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
return (
|
||||||
<div className="parallax-container">
|
<div>
|
||||||
<div className={'flex flex-column'}>
|
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||||
<div className={'mb-5'}>
|
<div className='parallax-container'>
|
||||||
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}> فرصت های شغلی بیمارستان مهر ایرانیان پرند </h2>
|
<div className={'flex flex-column'}>
|
||||||
</div>
|
<div className={'mb-5'}>
|
||||||
<br />
|
<h2 className={'center-align bk-med text-white header_back service-text dana font-weight-bold'}>
|
||||||
<br />
|
{' '}
|
||||||
<div className={'mt-2'}>
|
فرصت های شغلی بیمارستان مهر ایرانیان پرند{' '}
|
||||||
<br />
|
</h2>
|
||||||
<br />
|
</div>
|
||||||
<p className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}>فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.</p>
|
<br />
|
||||||
</div>
|
<br />
|
||||||
</div>
|
<div className={'mt-2'}>
|
||||||
<Image
|
<br />
|
||||||
loader={Parallax}
|
<br />
|
||||||
src="Parallax.png"
|
<p
|
||||||
className={'responsive-img shadow-5'}
|
className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}
|
||||||
alt="فرصت های شغلی بیمارستان مهر ایرانیان پرند"
|
>
|
||||||
width={3000}
|
فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.
|
||||||
height={1300}
|
</p>
|
||||||
/>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MDBContainer className={'mt-5'}>
|
<Image
|
||||||
<div className={'bk-med flex justify-content-center align-items-center flex-col'}>
|
loader={Parallax}
|
||||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>فرصت های همکاری</MDBTypography>
|
src='Parallax.png'
|
||||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>ردیف شغلی مورد علاقه خود را انتخاب کنید </MDBTypography>
|
className={'responsive-img shadow-5'}
|
||||||
</div>
|
alt='فرصت های شغلی بیمارستان مهر ایرانیان پرند'
|
||||||
<Divider />
|
width={3000}
|
||||||
<SimpleGrid dir={'rtl'} columns={[1, 2, 4]} spacing={5}>
|
height={1300}
|
||||||
{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'}>
|
|
||||||
<div>
|
|
||||||
<FiUsers size={35} />
|
|
||||||
</div>
|
|
||||||
<MDBCardTitle className={'bk-med mt-2 right'}>{item.title} </MDBCardTitle>
|
|
||||||
<Link href={`recruitment/item/${item.id}`}>
|
|
||||||
<MDBBtn rounded size={'sm'} className={'mt-2 flex align-items-center bk-light bg-primary-teal'}>
|
|
||||||
مشاهده
|
|
||||||
<FiArrowLeft className={'mr-2'} />
|
|
||||||
</MDBBtn>
|
|
||||||
</Link>
|
|
||||||
</MDBCardBody>
|
|
||||||
</MDBCard>
|
|
||||||
</Box>
|
|
||||||
</ScaleFade>
|
|
||||||
))}
|
|
||||||
</SimpleGrid>
|
|
||||||
</MDBContainer>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
</AppContainer>
|
|
||||||
</div>
|
</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>
|
||||||
|
</div>
|
||||||
|
<Divider />
|
||||||
|
<SimpleGrid dir={'rtl'} columns={[1, 2, 4]} spacing={5}>
|
||||||
|
{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'}>
|
||||||
|
<div>
|
||||||
|
<FiUsers size={35} />
|
||||||
|
</div>
|
||||||
|
<MDBCardTitle className={'bk-med mt-2 right'}>{item.title} </MDBCardTitle>
|
||||||
|
<Link href={`recruitment/item/${item.id}`}>
|
||||||
|
<MDBBtn rounded size={'sm'} className={'mt-2 flex align-items-center bk-light bg-primary-teal'}>
|
||||||
|
مشاهده
|
||||||
|
<FiArrowLeft className={'mr-2'} />
|
||||||
|
</MDBBtn>
|
||||||
|
</Link>
|
||||||
|
</MDBCardBody>
|
||||||
|
</MDBCard>
|
||||||
|
</Box>
|
||||||
|
</ScaleFade>
|
||||||
|
))}
|
||||||
|
</SimpleGrid>
|
||||||
|
</MDBContainer>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</AppContainer>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Recruitment
|
||||||
export default Recruitment;
|
|
||||||
|
|
||||||
export async function getServerSideProps() {
|
export async function getServerSideProps() {
|
||||||
// Fetch data from external API
|
// Fetch data from external API
|
||||||
const res = await axios.get('https://mehriranianco.ir/api/public/job/occupational/').then((res) => {
|
const res = await axios
|
||||||
return res.data
|
.get(`${AppProduction}public/job/occupational/`)
|
||||||
}).catch((err) => {
|
.then(res => {
|
||||||
console.log(err)
|
return res.data
|
||||||
});
|
})
|
||||||
const data = await res
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
const data = await res
|
||||||
|
|
||||||
// Pass data to the page via props
|
// Pass data to the page via props
|
||||||
return { props: { data } }
|
return { props: { data } }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,108 +1,133 @@
|
|||||||
import React from 'react';
|
import React from 'react'
|
||||||
import Image from "next/image";
|
import Image from 'next/image'
|
||||||
import Link from "next/link";
|
import Link from 'next/link'
|
||||||
import {FiUsers, FiArrowLeft} from 'react-icons/fi'
|
import { FiUsers, FiArrowLeft } from 'react-icons/fi'
|
||||||
import {
|
import {
|
||||||
MDBBtn,
|
MDBBtn,
|
||||||
MDBCard,
|
MDBCard,
|
||||||
MDBCardBody,
|
MDBCardBody,
|
||||||
MDBCardText,
|
MDBCardText,
|
||||||
MDBCardTitle,
|
MDBCardTitle,
|
||||||
MDBContainer,
|
MDBContainer,
|
||||||
MDBIcon,
|
MDBIcon,
|
||||||
MDBTypography
|
MDBTypography
|
||||||
} from "mdb-react-ui-kit";
|
} from 'mdb-react-ui-kit'
|
||||||
import {Box, Divider, SimpleGrid} from "@chakra-ui/react";
|
import { Box, Divider, SimpleGrid } from '@chakra-ui/react'
|
||||||
import AppContainer from "../../appContainer";
|
import AppContainer from '../../appContainer'
|
||||||
import {useRouter} from "next/router";
|
import { useRouter } from 'next/router'
|
||||||
import axios from "axios";
|
import axios from 'axios'
|
||||||
|
import { AppProduction } from '../../../lib/api'
|
||||||
|
|
||||||
const Recruitment = (jobs) => {
|
const Recruitment = jobs => {
|
||||||
console.log(jobs)
|
console.log(jobs)
|
||||||
const Parallax = ({ quality }) => {
|
const Parallax = ({ quality }) => {
|
||||||
return `../../resource/parallax/33012321.jpg`;
|
return `../../resource/parallax/33012321.jpg`
|
||||||
}
|
}
|
||||||
const router = useRouter();
|
const router = useRouter()
|
||||||
const {category_id} = router.query
|
const { category_id } = router.query
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||||
<div className="parallax-container">
|
<div className='parallax-container'>
|
||||||
<div className={'flex flex-column'}>
|
<div className={'flex flex-column'}>
|
||||||
<div className={'mb-5'}>
|
<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'}>
|
||||||
</div>
|
{' '}
|
||||||
<br />
|
فرصت های شغلی بیمارستان مهر ایرانیان پرند{' '}
|
||||||
<br />
|
</h2>
|
||||||
<div className={'mt-2'}>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<p className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}>فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.</p>
|
<div className={'mt-2'}>
|
||||||
</div>
|
<br />
|
||||||
</div>
|
<br />
|
||||||
<Image
|
<p
|
||||||
loader={Parallax}
|
className={'center-align bk-light RTL text-white mt-5 header_back service-text dana font-weight-bold'}
|
||||||
src="Parallax.png"
|
>
|
||||||
className={'responsive-img shadow-5'}
|
فرصتهایی برای اینکه رویاهای خودتان را در کنار ما بسازید.
|
||||||
alt={category_id}
|
</p>
|
||||||
width={3000}
|
</div>
|
||||||
height={1300}
|
</div>
|
||||||
/>
|
<Image
|
||||||
</div>
|
loader={Parallax}
|
||||||
<MDBContainer className={'mt-5'}>
|
src='Parallax.png'
|
||||||
<div className={'bk-med flex justify-content-center align-items-center flex-col'}>
|
className={'responsive-img shadow-5'}
|
||||||
<MDBTypography className={'bk-md text-primary-teal font-weight-bold'} variant={'h3'}>{jobs.jobs.name.title} </MDBTypography>
|
alt={category_id}
|
||||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>شغل مورد علاقه خود را انتخاب کنید </MDBTypography>
|
width={3000}
|
||||||
</div>
|
height={1300}
|
||||||
<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>
|
</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'}>
|
||||||
export async function getServerSideProps(ctx) {
|
{jobs.jobs.name.title}{' '}
|
||||||
// Fetch data from external API
|
</MDBTypography>
|
||||||
const {query} = ctx
|
<MDBTypography className={'bk-light text-primary-teal mt-2'}>
|
||||||
|
شغل مورد علاقه خود را انتخاب کنید{' '}
|
||||||
const res = await axios.get(`https://mehriranianco.ir/api/public/job/${query.category_id}`).then((res) => {
|
</MDBTypography>
|
||||||
return res.data
|
</div>
|
||||||
}).catch((err) => {
|
<Divider />
|
||||||
console.log(err)
|
<SimpleGrid dir={'rtl'} columns={[1, 1, 3]} spacing={3}>
|
||||||
});
|
{jobs.jobs.data &&
|
||||||
const jobs = await res
|
jobs.jobs.data.map(item => (
|
||||||
|
<Box key={item.id}>
|
||||||
// Pass data to the page via props
|
<Link href={`/recruitment/item/request/${item.id}`}>
|
||||||
return { props: { jobs } }
|
<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 default Recruitment;
|
export async function getServerSideProps(ctx) {
|
||||||
|
// Fetch data from external API
|
||||||
|
const { query } = ctx
|
||||||
|
|
||||||
|
const res = await axios
|
||||||
|
.get(`${AppProduction}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
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,433 +1,570 @@
|
|||||||
import React, {Suspense, useMemo, useState} from 'react';
|
import React, { Suspense, useMemo, useState } from 'react'
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from 'react-hook-form'
|
||||||
import {Alert, AlertDescription, AlertIcon, AlertTitle, Checkbox, useDisclosure} from '@chakra-ui/react'
|
import { Alert, AlertDescription, AlertIcon, AlertTitle, Checkbox, useDisclosure } from '@chakra-ui/react'
|
||||||
import AppContainer from "../../../appContainer";
|
import AppContainer from '../../../appContainer'
|
||||||
|
import { MDBBtn, MDBCard, MDBCardBody, MDBCardImage, MDBCardTitle, MDBContainer, MDBSpinner } from 'mdb-react-ui-kit'
|
||||||
import {
|
import {
|
||||||
MDBBtn, MDBCard, MDBCardBody, MDBCardImage, MDBCardTitle,
|
Box,
|
||||||
MDBContainer, MDBSpinner,
|
Divider,
|
||||||
} from "mdb-react-ui-kit";
|
ListItem,
|
||||||
import {
|
Progress,
|
||||||
Box,
|
SimpleGrid,
|
||||||
Divider,
|
SlideFade,
|
||||||
ListItem, Progress,
|
Text,
|
||||||
SimpleGrid, SlideFade, Text,
|
UnorderedList,
|
||||||
UnorderedList,
|
Button,
|
||||||
Button,Modal,ModalOverlay,ModalContent,ModalHeader,
|
Modal,
|
||||||
ModalCloseButton,ModalBody,ModalFooter
|
ModalOverlay,
|
||||||
} from "@chakra-ui/react";
|
ModalContent,
|
||||||
import {FiUser, FiCheck} from 'react-icons/fi'
|
ModalHeader,
|
||||||
import {FcApproval} from 'react-icons/fc'
|
ModalCloseButton,
|
||||||
import { MDBRadio } from 'mdb-react-ui-kit';
|
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 Employer from '../../../../public/resource/icons/portfolio-outline.png'
|
||||||
import axios from "axios";
|
import axios from 'axios'
|
||||||
import {FORM_CAST} from "../../../../src/redux/actions";
|
import { HandleFormReq } from '../../../../lib/HandleFormReq'
|
||||||
import {HandleFormReq} from "../../../../lib/HandleFormReq";
|
import PersonData from './PersonData'
|
||||||
import PersonData from "./PersonData";
|
import EducationalData from './EducationalData'
|
||||||
import EducationalData from "./EducationalData";
|
import CoursesData from './CoursesData'
|
||||||
import CoursesData from "./CoursesData";
|
import JobData from './JobData'
|
||||||
import JobData from "./JobData";
|
import ScientificData from './ScientificData'
|
||||||
import ScientificData from "./ScientificData";
|
import PcSkill from './PcSkill'
|
||||||
import PcSkill from "./PcSkill";
|
import Furtherinformation from './Furtherinformation'
|
||||||
import Furtherinformation from "./Furtherinformation";
|
import log from 'tailwindcss/lib/util/log'
|
||||||
import log from "tailwindcss/lib/util/log";
|
import { AppProduction } from '../../../../lib/api'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
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
|
||||||
|
]
|
||||||
|
)
|
||||||
|
console.log('SelectedJob', SelectedJob)
|
||||||
|
const handleLastSubmit = () => {
|
||||||
|
setLoading(true)
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
setLoading(false)
|
||||||
|
seShowSuccess(true)
|
||||||
|
setCheckCode(res.data.code)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log('err', err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
<AppContainer title={'فرصت های شغلی بیمارستان مهر ایرانیان پرند'}>
|
||||||
<div className={'w-100 p-5 bg-teal-grad'}>
|
<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
|
||||||
<div className={'bg-white p-2 rounded-circle shadow-6-soft'}>
|
style={{ flexDirection: 'column' }}
|
||||||
<MDBCardImage width={50} src={Employer} />
|
className={'flex lg:flex-row md:flex-col sm:flex-col justify-content-between items-center'}
|
||||||
</div>
|
>
|
||||||
<div className={'mt-4 w-full'}>
|
<div className={'bg-white p-2 rounded-circle shadow-6-soft'}>
|
||||||
<Text dir={'rtl'} className={'bk-med text-center text-white font-weight-bold '}> درخواست شغلی برای {SelectedJob.SelectedJob.data.title } - {SelectedJob.SelectedJob.OccupationalJob.title}</Text>
|
<MDBCardImage width={50} src={Employer} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className={'mt-4 w-full'}>
|
||||||
</div>
|
<Text dir={'rtl'} className={'bk-med text-center text-white font-weight-bold '}>
|
||||||
<MDBContainer className={'mt-5 mb-5'}>
|
{' '}
|
||||||
<SimpleGrid className={'mb-4'} columns={[1, 1, 2]} spacing={3}>
|
درخواست شغلی برای {SelectedJob.SelectedJob.data.title} - {SelectedJob.SelectedJob.OccupationalJob.title}
|
||||||
<Box>
|
</Text>
|
||||||
<MDBCard border='primary' className={'border-black'}>
|
</div>
|
||||||
<MDBCardBody dir={'rtl'}>
|
</div>
|
||||||
<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>
|
</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>
|
||||||
|
) : (
|
||||||
|
''
|
||||||
|
)}
|
||||||
|
|
||||||
export async function getServerSideProps(ctx) {
|
{/*{page === 1 && page !== 5 ? (*/}
|
||||||
// Fetch data from external API
|
{/* (*/}
|
||||||
const {query} = ctx
|
{/* <MDBBtn size={'sm'} className={'mt-2 bg-primary-teal'} onClick={() => setPage(page + 1)} >مرحله بعد</MDBBtn>*/}
|
||||||
const res = await axios.get(`https://mehriranianco.ir/api/public/selectJob/${query.pos_id}`).then((res) => {
|
{/* )*/}
|
||||||
return res.data
|
{/*): ''}*/}
|
||||||
}).catch((err) => {
|
</div>
|
||||||
console.log(err)
|
<div className={'flex justify-content-center m-2'}>
|
||||||
});
|
{page === 7 ? (
|
||||||
const SelectedJob = await res
|
<div>
|
||||||
|
{ShowSuccess === false && (
|
||||||
// Pass data to the page via props
|
<MDBBtn
|
||||||
return { props: { SelectedJob } }
|
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 default requestForm;
|
export async function getServerSideProps(ctx) {
|
||||||
|
// Fetch data from external API
|
||||||
|
const { query } = ctx
|
||||||
|
const res = await axios
|
||||||
|
.get(`${AppProduction}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