add inquiry
This commit is contained in:
Generated
+5
@@ -0,0 +1,5 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
Generated
+12
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/mip-website-frontend.iml" filepath="$PROJECT_DIR$/.idea/mip-website-frontend.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -59,8 +59,8 @@ export default function App() {
|
|||||||
{/*</div>*/}
|
{/*</div>*/}
|
||||||
{/* topheader */}
|
{/* topheader */}
|
||||||
<div className='bg-[#57C5C6] headerTop'>
|
<div className='bg-[#57C5C6] headerTop'>
|
||||||
<div className='flex sm:flex-col md:flex-row lg:flex-row justify-content-between items-center h-14 container-fluid m-auto '>
|
<div className='flex sm:flex-col md:flex-row sm:mt-5 lg:flex-row justify-content-between items-center h-14 container-fluid m-auto '>
|
||||||
<div className='flex '>
|
<div className='flex sm:mt-2'>
|
||||||
<div className='w-10 h-10 md:w-12 md:h-12 flex items-center justify-center'>
|
<div className='w-10 h-10 md:w-12 md:h-12 flex items-center justify-center'>
|
||||||
<a
|
<a
|
||||||
target={'_blank'}
|
target={'_blank'}
|
||||||
|
|||||||
@@ -17,12 +17,13 @@ import { Box, Divider, ScaleFade, SimpleGrid } from '@chakra-ui/react'
|
|||||||
import { AppProduction, 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'
|
||||||
|
import { Link as LinkChakra } from '@chakra-ui/react'
|
||||||
|
import { ExternalLinkIcon } from '@chakra-ui/icons'
|
||||||
|
|
||||||
const Recruitment = dataoccupational => {
|
const Recruitment = dataoccupational => {
|
||||||
const Parallax = ({ quality }) => {
|
const Parallax = ({ quality }) => {
|
||||||
return `../resource/parallax/Directors.jpg`
|
return `../resource/parallax/Directors.jpg`
|
||||||
}
|
}
|
||||||
console.log('Add', AppProduction)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -64,6 +65,12 @@ const Recruitment = dataoccupational => {
|
|||||||
<MDBTypography className={'bk-light text-primary-teal mt-2'}>
|
<MDBTypography className={'bk-light text-primary-teal mt-2'}>
|
||||||
ردیف شغلی مورد علاقه خود را انتخاب کنید{' '}
|
ردیف شغلی مورد علاقه خود را انتخاب کنید{' '}
|
||||||
</MDBTypography>
|
</MDBTypography>
|
||||||
|
<LinkChakra as={Link} className='cursor-pointer' href='/recruitment/inquiry'>
|
||||||
|
<div className='border-2 cursor-pointer'>
|
||||||
|
استعلام وضعیت درخواست استخدام <ExternalLinkIcon mx='2px' />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</LinkChakra>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
<Divider />
|
||||||
<SimpleGrid dir={'rtl'} columns={[1, 2, 4]} spacing={5}>
|
<SimpleGrid dir={'rtl'} columns={[1, 2, 4]} spacing={5}>
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
import React, {useState} from 'react'
|
||||||
|
import AppContainer from '../../appContainer'
|
||||||
|
import {MDBBtn, MDBCard, MDBCardBody, MDBCardText, MDBCardTitle, MDBInput} from "mdb-react-ui-kit";
|
||||||
|
import {Input, ListItem, UnorderedList} from "@chakra-ui/react";
|
||||||
|
import {useForm} from "react-hook-form";
|
||||||
|
import axios from "axios";
|
||||||
|
import Link from 'next/link'
|
||||||
|
import {AppProduction} from "../../../lib/api";
|
||||||
|
|
||||||
|
const InquiryJob = () => {
|
||||||
|
const {register, handleSubmit, formState: {errors}} = useForm();
|
||||||
|
const [loading, setLoading] = useState(false)
|
||||||
|
const [result, setResult] = useState(null)
|
||||||
|
const onSubmit = data => {
|
||||||
|
setLoading(true)
|
||||||
|
axios.post(`${AppProduction}public/job-request/inquiry`, data).then(res => {
|
||||||
|
console.log('res', res)
|
||||||
|
if (res.status == 208) {
|
||||||
|
alert(res.data.status.message)
|
||||||
|
}
|
||||||
|
if(res.status == 200) {
|
||||||
|
setResult(res.data)
|
||||||
|
}
|
||||||
|
setLoading(false)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('err', err)
|
||||||
|
setLoading(false)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<AppContainer title='استعلام وضعیت درخواست استخدام '>
|
||||||
|
<div dir="rtl" className='bk-bold flex inquiry-bg justify-content-center align-items-center'>
|
||||||
|
<MDBCard className="shadow-6-strong lg:w-[40%] my-[10rem]">
|
||||||
|
{!result ? (
|
||||||
|
<MDBCardBody>
|
||||||
|
<MDBCardTitle tag={'h4'} className="text-right my-3 text-primary-teal bk-heavy"> وضعیت درخواست
|
||||||
|
استخدام
|
||||||
|
</MDBCardTitle>
|
||||||
|
<form onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
<MDBCardText className="flex flex-column gap-2">
|
||||||
|
<Input
|
||||||
|
maxLength="10"
|
||||||
|
{...register('national_code', {
|
||||||
|
required: {
|
||||||
|
message: 'کد ملی اجباری است.' ,
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
minLength: {
|
||||||
|
message: 'کد ملی معتبر نیست ',
|
||||||
|
value: 10
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
variant='filled'
|
||||||
|
placeholder='کد ملی را وارد نمایید.'
|
||||||
|
/>
|
||||||
|
<Input
|
||||||
|
maxLength="11"
|
||||||
|
{...register('phone_number', {
|
||||||
|
required: {
|
||||||
|
message: ' شماره موبایل اجباری است.' ,
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
minLength: {
|
||||||
|
message: 'شماره موبایل معتبر نیست ',
|
||||||
|
value: 11
|
||||||
|
},
|
||||||
|
})}
|
||||||
|
variant='filled'
|
||||||
|
placeholder=' شماره موبایل را وارد نمایید.'
|
||||||
|
/>
|
||||||
|
</MDBCardText>
|
||||||
|
{errors.national_code && (
|
||||||
|
<p className="text-danger">
|
||||||
|
{errors.national_code.message}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
{errors.phone_number && (
|
||||||
|
<p className="text-danger">
|
||||||
|
{errors.phone_number.message}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<MDBBtn disabled={loading} type="submit" className="left-align left bg-primary-teal">
|
||||||
|
{loading ? 'در حال بررسی' : 'استعلام وضعیت'}
|
||||||
|
</MDBBtn>
|
||||||
|
</form>
|
||||||
|
</MDBCardBody>
|
||||||
|
): (
|
||||||
|
<MDBCardBody className="text-center">
|
||||||
|
<h4 className="text-primary-teal"> {result.status.name} </h4>
|
||||||
|
<hr />
|
||||||
|
<UnorderedList>
|
||||||
|
<ListItem className="text-primary-teal bk"> تعیین وضعیت نشده است.</ListItem>
|
||||||
|
</UnorderedList>
|
||||||
|
<Link href="/recruitment">
|
||||||
|
<MDBBtn onClick={() => {
|
||||||
|
setLoading(false)
|
||||||
|
setLoading(null)
|
||||||
|
}} className="left-align left bg-primary-teal"> بازگشت</MDBBtn>
|
||||||
|
</Link>
|
||||||
|
</MDBCardBody>
|
||||||
|
)}
|
||||||
|
</MDBCard>
|
||||||
|
</div>
|
||||||
|
</AppContainer>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InquiryJob
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -890,3 +890,8 @@ th {
|
|||||||
|
|
||||||
color: #414141;
|
color: #414141;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inquiry-bg {
|
||||||
|
background-image: url("../public/resource/images/inquiry1.jpg");
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user