Ignore:
Timestamp:
06/17/24 21:59:14 (2 weeks ago)
Author:
223021 <daniel.ilievski.2@…>
Branches:
main
Children:
08f82ec
Parents:
b248810
Message:

Added an edit profile page for both job seekers and recruiters, where they can upload profile pictures/company logos and edit their profile data. Added profile page specifically for recruiters. Refactored existing code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jobvista-frontend/src/views/job_advertisements/AddJobAdModal.js

    rb248810 rbefb988  
    11import React, {useState} from "react";
    2 import "./Form.css";
     2import "../shared_css/Modal.css";
    33
    44import { Editor } from 'primereact/editor';
     
    1717import {useDispatch, useSelector} from "react-redux";
    1818import {JobAdvertisementActions} from "../../redux/actions/jobAdvertisementActions";
     19import {notifyJobAdPost} from "../../utils/toastUtils";
    1920
    2021
     
    3233        description: yup.string().required("Please enter a description"),
    3334        industry: yup.mixed().required("Select industry"),
    34         startingSalary: yup.number().required("Please enter the starting salary"),
     35        startingSalary: yup.string().required("Please enter the starting salary"),
    3536        jobType: yup.mixed().required("Select job type"),
    3637        employmentStatus: yup.mixed().required("Select employment status"),
     
    4647            dispatch(JobAdvertisementActions.addJobAdvertisement(
    4748                {
    48                     email: auth.email,
     49                    id: auth.id,
    4950                    title: values.title,
    5051                    description: values.description,
     
    5657                }, (success, response) => {
    5758                    if (success) {
    58                         console.log("Job Advertisement added")
     59                        // console.log("Job Advertisement added")
    5960                        toggleModal()
     61                        notifyJobAdPost()
    6062                    }
    6163                }
     
    7577        </div>
    7678        {/*<button onClick={toggleModal} className="btn-open-modal">POST ADVERTISEMENT</button>*/}
    77         <Modal open={modal} onClose={toggleModal} center classNames="job-advertisement-modal">
     79        <Modal open={modal} onClose={toggleModal} center>
    7880            <div className="head-modal">
    7981                <h3>Post Job Advertisement</h3>
     
    8284
    8385            <div className="modal-content">
    84                 <form onSubmit={handleSubmit(addJobAdvertisement)}>
     86                <form>
    8587                    <div className="row">
    8688                        <div className="col-md-7">
     
    111113                        <div className="col-md-5">
    112114                            <label className="label">Hourly rate:</label>
    113                             <input {...register("startingSalary")}/>
     115                            <input type="number" {...register("startingSalary")}/>
    114116                            <p style={{color: "red"}}>{errors.startingSalary?.message}</p>
    115117
     
    157159                    </div>
    158160
    159                     <div className="aligned">
    160                         <button className="submit-btn"> Submit</button>
     161                    <div className="modal-buttons">
     162                        <div className="cancel-btn" onClick={toggleModal}> Cancel</div>
     163                        <button className="submit-btn" onClick={handleSubmit(addJobAdvertisement)}>Submit</button>
    161164                    </div>
    162165
Note: See TracChangeset for help on using the changeset viewer.