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

Did more refactoring

Location:
jobvista-frontend/src/views/job_advertisements
Files:
5 edited
1 moved

Legend:

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

    rbefb988 r08f82ec  
    4343
    4444    const addJobAdvertisement = async (values) => {
    45         //const description = values.description.replace(/\n/g, "\\n");
    4645        try {
    4746            dispatch(JobAdvertisementActions.addJobAdvertisement(
     
    5554                    jobType: values.jobType.value,
    5655                    employmentStatus: values.employmentStatus.value,
    57                 }, (success, response) => {
     56                }, (success) => {
    5857                    if (success) {
    59                         // console.log("Job Advertisement added")
    6058                        toggleModal()
    6159                        notifyJobAdPost()
  • jobvista-frontend/src/views/job_advertisements/DeleteJobAdModal.js

    rbefb988 r08f82ec  
    2626    };
    2727
    28     const addJobAdvertisement = async () => {
     28    const deleteJobAdvertisement = async () => {
    2929        try {
    30             dispatch(JobAdvertisementActions.deleteJobAdvertisement(jobAd.props.id, (success, response) => {
     30            dispatch(JobAdvertisementActions.deleteJobAdvertisement(jobAd.props.id, (success) => {
    3131                if (success) {
    32                     // console.log("Job Advertisement deleted")
    3332                    toggleModal()
    3433                    notifyJobAdDelete()
     
    5453                <div className="modal-delete-buttons">
    5554                    <button className="cancel-btn" onClick={toggleModal}>Cancel</button>
    56                     <button className="delete-btn" onClick={addJobAdvertisement}> Delete</button>
     55                    <button className="delete-btn" onClick={deleteJobAdvertisement}> Delete</button>
    5756                </div>
    5857            </div>
  • jobvista-frontend/src/views/job_advertisements/EditJobAdModal.js

    rbefb988 r08f82ec  
    5454                    jobType: values.jobType.value,
    5555                    employmentStatus: values.employmentStatus.value,
    56                 }, jobAd.props.id, (success, response) => {
     56                }, jobAd.props.id, (success) => {
    5757                    if(success) {
    58                         // console.log("Job Advertisement edited")
    5958                        toggleModal()
    6059                        notifyJobAdEdit()
  • jobvista-frontend/src/views/job_advertisements/JobAdDetails.css

    rbefb988 r08f82ec  
    2020    /*scrollbar-width: thin; !* "auto" hides scrollbar on some browsers, "thin" shows a thin scrollbar *!*/
    2121    /*scrollbar-color: #999999 #fff;*/
     22}
     23
     24.min-wrap {
     25    min-height: 80vh;
    2226}
    2327
  • jobvista-frontend/src/views/job_advertisements/JobAdDetails.js

    rbefb988 r08f82ec  
    6363        <div className="row">
    6464            <div className="col-md-9">
    65                 <div className="details-wrap">
     65                <div className="details-wrap min-wrap">
    6666                    <div className="row">
    6767                        <div className="col-md-9">
  • jobvista-frontend/src/views/job_advertisements/JobManagementHub.js

    rbefb988 r08f82ec  
    6666
    6767    let filterJobAdvertisements = () => {
    68         JobAdvertisementActions.filterJobAdvertisementsByRecruiter({
     68        JobAdvertisementActions.filterJobAdvertisementsByRecruiter(auth.id, {
    6969            searchTerm: searchTerm, industry: selectedIndustry, sortOrder: selectedSortOrder
    7070        }, (success, response) => {
     
    127127                {jobAdvertisementsByRecruiter && jobAdvertisementsByRecruiter.map((jobAd, index) => (
    128128                    <div key={index} className="col">
    129                         <div className="custom-card">
     129                        <div className="custom-card hub-card">
    130130                            <div className="card-head">
    131131                                <span className="hourly-salary"><b>${jobAd.startingSalary}/hr</b></span>
     
    150150                                </div>
    151151
    152                                 <div className="aligned">
    153                                     <Link to={`/job-management-hub/applications/${jobAd.id}`}
    154                                           className="card-button solo">View applications</Link>
    155                                 </div>
     152                            </div>
    156153
     154
     155                            <div className="card-foot">
     156                                <Link to={`/job-management-hub/applications/${jobAd.id}`}
     157                                      className="card-button">View applications</Link>
    157158                            </div>
    158159                        </div>
Note: See TracChangeset for help on using the changeset viewer.