Ignore:
Timestamp:
06/20/24 11:57:13 (3 months ago)
Author:
223021 <daniel.ilievski.2@…>
Branches:
main
Children:
0f0add0
Parents:
befb988
Message:

Did more refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jobvista-frontend/src/views/applications/ApplyToJobAdModal.js

    rbefb988 r08f82ec  
    5151
    5252            dispatch(ApplicationActions.submitApplication(
    53                 formData,(success, response) => {
    54                     if(success) {
     53                formData, (success) => {
     54                    if (success) {
    5555                        toggleModal()
    5656                        notifyJobAdApply()
     
    6666
    6767    return (<div className="modal-wrap">
    68         {role===Roles.JOBSEEKER &&
     68        {role === Roles.JOBSEEKER &&
    6969            <>
    70                 {jobAd.active && <button onClick={toggleModal} className="apply-button apply">Apply now</button> }
    71                 {!jobAd.active && <button className="card-button apply disabled">Apply now</button> }
     70                {jobAd.active && <button onClick={toggleModal} className="apply-button apply">Apply now</button>}
     71                {!jobAd.active && <button className="card-button apply disabled">Apply now</button>}
    7272            </>
    7373        }
    74         <Modal open={modal} onClose={toggleModal} center >
     74        <Modal open={modal} onClose={toggleModal} center>
    7575            <div className="head-modal">
    7676                <h3>Applying to {jobAd.title} at {jobAd.recruiterName}</h3>
     
    7878            </div>
    7979
    80             <div className="modal-content" >
     80            <div className="modal-content">
    8181                <form onSubmit={handleSubmit(submitApplication)}>
    8282                    <div className="row">
     
    9292                            <p style={{color: "red"}}>{errors.answerTwo?.message}</p>
    9393
    94                             <label className="label">What do you hope to achieve in your first 6 months in this role?</label>
    95                             <textarea type="text"  placeholder="Write your answer here..."
    96                                    {...register("answerThree")} className="application-textarea"/>
     94                            <label className="label">What do you hope to achieve in your first 6 months in this
     95                                role?</label>
     96                            <textarea type="text" placeholder="Write your answer here..."
     97                                      {...register("answerThree")} className="application-textarea"/>
    9798                            <p style={{color: "red"}}>{errors.answerThree?.message}</p>
    9899
     
    101102                            <label htmlFor="start">Curriculum vitae (CV)</label>
    102103                            <br/>
    103                             <input {...register("file")} className="resume-link" onChange={(e) => setResumeFile(e.target.files[0])} required type="file" id="fileUpload" accept=".pdf"/>
     104                            <input {...register("file")} className="resume-link"
     105                                   onChange={(e) => setResumeFile(e.target.files[0])} required type="file"
     106                                   id="fileUpload" accept=".pdf"/>
    104107
    105108                            <br/>
     
    109112
    110113                            <br/><br/>
    111                             <p style={{color: "red"}}>Please note that your personal data from your account will be used to identify and process your application.</p>
     114                            <p style={{color: "red"}}>Please note that your personal data from your account will be used
     115                                to identify and process your application.</p>
    112116                        </div>
    113117                    </div>
Note: See TracChangeset for help on using the changeset viewer.