mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Add email and error message when duplicate email at registration
This commit is contained in:
@@ -7,7 +7,7 @@ import { postulantAdd } from "../services/postulantsAccessors"
|
||||
const postulantAdapter = createEntityAdapter<Postulant>()
|
||||
|
||||
const postulantAddSlice = createSlice({
|
||||
name: "addPostulant",
|
||||
name: "postulantAdd",
|
||||
initialState: postulantAdapter.getInitialState({
|
||||
readyStatus: "idle",
|
||||
} as StateRequest),
|
||||
@@ -17,7 +17,7 @@ const postulantAddSlice = createSlice({
|
||||
},
|
||||
getSuccess: (state, { payload }: PayloadAction<Postulant>) => {
|
||||
state.readyStatus = "success"
|
||||
postulantAdapter.addOne(state, payload)
|
||||
postulantAdapter.setOne(state, payload)
|
||||
},
|
||||
getFailure: (state, { payload }: PayloadAction<string>) => {
|
||||
state.readyStatus = "failure"
|
||||
|
@@ -7,7 +7,7 @@ import { volunteerPartialAdd } from "../services/volunteersAccessors"
|
||||
const volunteerAdapter = createEntityAdapter<Volunteer>()
|
||||
|
||||
const volunteerPartialAddSlice = createSlice({
|
||||
name: "addVolunteer",
|
||||
name: "volunteerAdd",
|
||||
initialState: volunteerAdapter.getInitialState({
|
||||
readyStatus: "idle",
|
||||
} as StateRequest),
|
||||
@@ -17,7 +17,7 @@ const volunteerPartialAddSlice = createSlice({
|
||||
},
|
||||
getSuccess: (state, { payload }: PayloadAction<Volunteer>) => {
|
||||
state.readyStatus = "success"
|
||||
volunteerAdapter.addOne(state, payload)
|
||||
volunteerAdapter.setOne(state, payload)
|
||||
},
|
||||
getFailure: (state, { payload }: PayloadAction<string>) => {
|
||||
state.readyStatus = "failure"
|
||||
|
@@ -7,7 +7,7 @@ import { wishAdd } from "../services/wishesAccessors"
|
||||
const wishAdapter = createEntityAdapter<Wish>()
|
||||
|
||||
const wishAddSlice = createSlice({
|
||||
name: "addWish",
|
||||
name: "wishAdd",
|
||||
initialState: wishAdapter.getInitialState({
|
||||
readyStatus: "idle",
|
||||
} as StateRequest),
|
||||
|
@@ -8,7 +8,7 @@ import { wishListGet } from "../services/wishesAccessors"
|
||||
const wishAdapter = createEntityAdapter<Wish>()
|
||||
|
||||
const wishList = createSlice({
|
||||
name: "getWishList",
|
||||
name: "wishList",
|
||||
initialState: wishAdapter.getInitialState({
|
||||
readyStatus: "idle",
|
||||
} as StateRequest),
|
||||
|
Reference in New Issue
Block a user