31 lines
800 B
JavaScript
31 lines
800 B
JavaScript
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
const localVariablesSlice = createSlice({
|
|
name: "localVariables",
|
|
initialState: {
|
|
selectedMaster:"Application Role",
|
|
regularizationCount:0,
|
|
projectId: "",
|
|
reload:false
|
|
|
|
},
|
|
reducers: {
|
|
changeMaster: (state, action) => {
|
|
state.selectedMaster = action.payload;
|
|
},
|
|
updateRegularizationCount: (state, action) => {
|
|
state.regularizationCount = action.payload;
|
|
},
|
|
setProjectId: (state, action) => {
|
|
state.projectId = action.payload;
|
|
},
|
|
refreshData: ( state, action ) =>
|
|
{
|
|
state.reload = action.payload
|
|
}
|
|
},
|
|
});
|
|
|
|
export const { changeMaster ,updateRegularizationCount,setProjectId,refreshData} = localVariablesSlice.actions;
|
|
export default localVariablesSlice.reducer;
|