2021-06-30 17:21:55 +03:00
|
|
|
import { createSlice } from '@reduxjs/toolkit';
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
tags: [],
|
|
|
|
profiles: [],
|
|
|
|
candidates: [],
|
|
|
|
selectedTab: '',
|
|
|
|
selectedItems: [],
|
|
|
|
};
|
|
|
|
|
|
|
|
export const outstaffingSlice = createSlice({
|
|
|
|
name: 'outstaffing',
|
|
|
|
initialState,
|
|
|
|
reducers: {
|
|
|
|
tags: (state, action) => {
|
|
|
|
state.tags = action.payload;
|
|
|
|
},
|
|
|
|
profiles: (state, action) => {
|
|
|
|
state.profiles = action.payload;
|
|
|
|
},
|
|
|
|
candidates: (state, action) => {
|
|
|
|
state.candidates = action.payload;
|
|
|
|
},
|
|
|
|
selectedTab: (state, action) => {
|
|
|
|
state.selectedTab = action.payload;
|
|
|
|
},
|
2021-07-01 14:25:17 +03:00
|
|
|
selectedItems: (state, action) => {
|
|
|
|
state.selectedItems = action.payload;
|
2021-06-30 17:21:55 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export const { tags, profiles, candidates, selectedTab, selectedItems } = outstaffingSlice.actions;
|
|
|
|
|
|
|
|
export const selectProfiles = (state) => state.outstaffing.profiles;
|
|
|
|
export const selectTags = (state) => state.outstaffing.tags;
|
|
|
|
export const selectCandidates = (state) => state.outstaffing.candidates;
|
|
|
|
export const selectTab = (state) => state.outstaffing.selectedTab;
|
|
|
|
export const selectItems = (state) => state.outstaffing.selectedItems;
|
|
|
|
|
|
|
|
export default outstaffingSlice.reducer;
|