web client v0.2 (add restaurant OK, settings OK)
This commit is contained in:
@@ -5,6 +5,19 @@ const initialState = {
|
||||
username: "",
|
||||
userId: "",
|
||||
userEmail: "",
|
||||
userData: {
|
||||
jwt: "",
|
||||
firstname: "",
|
||||
lastname: "",
|
||||
userId: "",
|
||||
userEmail: "",
|
||||
billing: {
|
||||
NIP: "",
|
||||
adress: "",
|
||||
companyName: "",
|
||||
},
|
||||
restaurants: [],
|
||||
},
|
||||
dialogs: {
|
||||
registerCircularProgress: false,
|
||||
registerForm: true,
|
||||
@@ -29,19 +42,37 @@ const data = (state = initialState, action) => {
|
||||
return (state = {
|
||||
...state,
|
||||
loggedIn: true,
|
||||
username: action.payload.username,
|
||||
jwt: action.payload.jwt,
|
||||
userEmail: action.payload.email,
|
||||
userId: action.payload.id,
|
||||
userData: {
|
||||
jwt: action.payload.jwt,
|
||||
firstname: action.payload.firstname,
|
||||
lastname: action.payload.lastname,
|
||||
userId: action.payload.userId,
|
||||
userEmail: action.payload.email,
|
||||
billing: {
|
||||
NIP: action.payload.NIP,
|
||||
adress: action.payload.adress,
|
||||
companyName: action.payload.companyName,
|
||||
},
|
||||
restaurants: action.payload.restaurants,
|
||||
},
|
||||
});
|
||||
case "SET_LOGGEDOUT":
|
||||
return (state = {
|
||||
...state,
|
||||
loggedIn: false,
|
||||
username: "",
|
||||
jwt: "",
|
||||
userEmail: "",
|
||||
userId: "",
|
||||
userData: {
|
||||
jwt: "",
|
||||
firstname: "",
|
||||
lastname: "",
|
||||
userId: "",
|
||||
userEmail: "",
|
||||
billing: {
|
||||
NIP: "",
|
||||
adress: "",
|
||||
companyName: "",
|
||||
},
|
||||
restaurants: [],
|
||||
},
|
||||
});
|
||||
case "DIALOG_REGISTER_CIRCLE_SHOW":
|
||||
return (state = {
|
||||
|
||||
Reference in New Issue
Block a user