Ignore:
Timestamp:
08/30/24 15:44:27 (4 weeks ago)
Author:
223021 <daniel.ilievski.2@…>
Branches:
main
Parents:
0f0add0
Message:

Implemented Google login, additional file uploads, response messages and email notifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jobvista-frontend/src/redux/reducers/applicationReducer.js

    r0f0add0 r4d97b63  
    22    CURRENT_USER,
    33    FETCH_APPLICATIONS_BY_JOB_ID,
    4     FETCH_APPLICATIONS_BY_JOB_SEEKER_ID,
    5     SUBMIT_APPLICATION, UPDATE_APPLICATION_STATUS
     4    FETCH_APPLICATIONS_BY_JOB_SEEKER_ID, FILTER_APPLICATIONS_BY_JOB_ID, FILTER_APPLICATIONS_BY_JOB_SEEKER_ID,
     5    SUBMIT_APPLICATION, UPDATE_APPLICATION, UPDATE_APPLICATION_STATUS
    66} from "../actionTypes";
    77
     
    2222                applicationsByJobSeeker: [...state.applicationsByJobSeeker, action.application]
    2323            }
     24        case UPDATE_APPLICATION:
     25            return {
     26                ...state,
     27                applicationsByJobSeeker: state.applicationsByJobSeeker.map(application =>
     28                    application.id === action.application.id ?
     29                        action.application : // Replace with the updated application
     30                        application // Keep the old one
     31                )
     32            }
    2433        case UPDATE_APPLICATION_STATUS:
    2534            return {
     
    3645                applicationsByJobAdId: action.applicationsByJobAdId
    3746            }
     47        case FILTER_APPLICATIONS_BY_JOB_ID:
     48            return {
     49                ...state,
     50                applicationsByJobAdId: action.applicationsByJobAdId
     51            }
     52
    3853        case FETCH_APPLICATIONS_BY_JOB_SEEKER_ID:
     54            return {
     55                ...state,
     56                applicationsByJobSeeker: action.applicationsByJobSeeker
     57            }
     58        case FILTER_APPLICATIONS_BY_JOB_SEEKER_ID:
    3959            return {
    4060                ...state,
Note: See TracChangeset for help on using the changeset viewer.