Changeset b248810 for jobvista-frontend/src/redux
- Timestamp:
- 06/10/24 22:34:32 (5 months ago)
- Branches:
- main
- Children:
- befb988
- Parents:
- 28b3398
- Location:
- jobvista-frontend/src/redux
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/redux/actionTypes.js
r28b3398 rb248810 18 18 export const DOWNLOAD_RESUME = "DOWNLOAD_RESUME" 19 19 20 export const FETCH_RECRUITERS = "FETCH_RECRUITERS" 21 export const CHANGE_ACCESS = "CHANGE_ACCESS" 20 22 23 -
jobvista-frontend/src/redux/actions/authActions.js
r28b3398 rb248810 48 48 email: response.email, 49 49 name: response.name, 50 role: response.role 50 role: response.role, 51 access: response.hasAccess, 51 52 }; 52 53 dispatch({ -
jobvista-frontend/src/redux/reducers/jobAdvertisementReducer.js
r28b3398 rb248810 5 5 FETCH_JOB_ADVERTISEMENTS_BY_RECRUITER, FILTER_JOB_ADVERTISEMENTS, FILTER_JOB_ADVERTISEMENTS_BY_RECRUITER 6 6 } from "../actionTypes"; 7 import {sortElementsBy DateCreated} from "../../utils/utils";7 import {sortElementsBy} from "../../utils/utils"; 8 8 import {useSelector} from "react-redux"; 9 9 … … 22 22 return { 23 23 ...state, 24 jobAdvertisements: sortElementsBy DateCreated([...state.jobAdvertisements, action.jobAdvertisement]),25 jobAdvertisementsByRecruiter: sortElementsBy DateCreated([...state.jobAdvertisementsByRecruiter, action.jobAdvertisement])24 jobAdvertisements: sortElementsBy([...state.jobAdvertisements, action.jobAdvertisement]), 25 jobAdvertisementsByRecruiter: sortElementsBy([...state.jobAdvertisementsByRecruiter, action.jobAdvertisement], "postedOn") 26 26 } 27 27 case EDIT_JOB_ADVERTISEMENT: … … 30 30 31 31 return { 32 jobAdvertisements: sortElementsBy DateCreated([...jobAdvertisements, action.jobAdvertisement]),33 jobAdvertisementsByRecruiter: sortElementsBy DateCreated([...jobAdvertisementsByRecruiter, action.jobAdvertisement])32 jobAdvertisements: sortElementsBy([...jobAdvertisements, action.jobAdvertisement], "postedOn"), 33 jobAdvertisementsByRecruiter: sortElementsBy([...jobAdvertisementsByRecruiter, action.jobAdvertisement], "postedOn") 34 34 } 35 35 case DELETE_JOB_ADVERTISEMENT: … … 38 38 39 39 return { 40 jobAdvertisements: sortElementsBy DateCreated([...jobAdvertisements]),41 jobAdvertisementsByRecruiter: sortElementsBy DateCreated([...jobAdvertisementsByRecruiter])40 jobAdvertisements: sortElementsBy([...jobAdvertisements], "postedOn"), 41 jobAdvertisementsByRecruiter: sortElementsBy([...jobAdvertisementsByRecruiter], "postedOn") 42 42 } 43 43 … … 45 45 return { 46 46 ...state, 47 jobAdvertisements: sortElementsBy DateCreated(action.jobAdvertisements)47 jobAdvertisements: sortElementsBy(action.jobAdvertisements, "postedOn") 48 48 } 49 49 … … 52 52 return { 53 53 ...state, 54 jobAdvertisementsByRecruiter: sortElementsBy DateCreated(action.jobAdvertisementsByRecruiter)54 jobAdvertisementsByRecruiter: sortElementsBy(action.jobAdvertisementsByRecruiter, "postedOn") 55 55 } 56 56 -
jobvista-frontend/src/redux/store.js
r28b3398 rb248810 4 4 import jobAdReducer from "./reducers/jobAdvertisementReducer"; 5 5 import applicationReducer from "./reducers/applicationReducer" 6 import adminReducer from "./reducers/adminReducer" 7 import {AdminActions} from "./actions/adminActions"; 6 8 7 9 // const rootReducer = combineReducers({ … … 18 20 auth: authReducer, 19 21 jobAd: jobAdReducer, 20 appl: applicationReducer 22 appl: applicationReducer, 23 admin: adminReducer 21 24 }, 22 25 });
Note:
See TracChangeset
for help on using the changeset viewer.