import React, {useEffect, useState} from "react"; import "../shared_css/Modal.css"; import 'react-responsive-modal/styles.css'; import {Modal} from 'react-responsive-modal'; import Select from "react-select"; //Validation import * as yup from "yup"; import {yupResolver} from "@hookform/resolvers/yup"; import {Controller, useForm} from "react-hook-form"; import {employmentStatusOptions, industryOptions, jobTypeOptions} from "../selectOptions"; import {useDispatch, useSelector} from "react-redux"; import {JobAdvertisementActions} from "../../redux/actions/jobAdvertisementActions"; import Roles from "../../enumerations/Roles"; import {ApplicationActions} from "../../redux/actions/applicationActions"; export const ApplicationDetailsModal = (props) => { const {application} = props const [modal, setModal] = useState(false); const dispatch = useDispatch(); const auth = useSelector(state => state.auth.currentUser) const [resumeUrl, setResumeUrl] = useState(""); //const [resumeFile, setResumeFile] = useState(null); const toggleModal = () => { setModal(!modal); }; useEffect(() => { if (application) { ApplicationActions.downloadResume(application.id, (success, response) => { if (success) { setResumeUrl(response); } }) } }, []) function getFileName(path) { let fileName = path.split('\\').pop().split('/').pop(); fileName = fileName.trim(); return fileName; } return (

{application.jobSeekerName}'s application for {application.jobAdTitle}