//notifications //delete restaurant //change picture //redesigned data store
86 lines
1.3 KiB
JavaScript
86 lines
1.3 KiB
JavaScript
export const showDishes = () => {
|
|
return {
|
|
type: "SET_DISHLIST_VISIBLE",
|
|
};
|
|
};
|
|
|
|
export const hideDishes = () => {
|
|
return {
|
|
type: "SET_DISHLIST_HIDDEN",
|
|
};
|
|
};
|
|
|
|
export const setLoggedIn = (
|
|
firstname,
|
|
lastname,
|
|
jwt,
|
|
userId,
|
|
email,
|
|
NIP,
|
|
adress,
|
|
companyName,
|
|
restaurants
|
|
) => {
|
|
return {
|
|
type: "SET_LOGGEDIN",
|
|
payload: {
|
|
firstname: firstname,
|
|
lastname: lastname,
|
|
jwt: jwt,
|
|
userId: userId,
|
|
email: email,
|
|
NIP: NIP,
|
|
adress: adress,
|
|
companyName: companyName,
|
|
restaurants: restaurants,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const setLoggedOut = () => {
|
|
return {
|
|
type: "SET_LOGGEDOUT",
|
|
};
|
|
};
|
|
|
|
export const hideRegulamin = () => {
|
|
return {
|
|
type: "DIALOG_REGULAMIN_HIDE",
|
|
};
|
|
};
|
|
|
|
export const showRegulamin = () => {
|
|
return {
|
|
type: "DIALOG_REGULAMIN_SHOW",
|
|
};
|
|
};
|
|
|
|
export const enqueueSnackbar = (notification) => {
|
|
const key = notification.options && notification.options.key;
|
|
|
|
return {
|
|
type: "ENQUEUE_SNACKBAR",
|
|
notification: {
|
|
...notification,
|
|
key: key || new Date().getTime() + Math.random(),
|
|
},
|
|
};
|
|
};
|
|
|
|
export const removeSnackbar = (key) => ({
|
|
type: "REMOVE_SNACKBAR",
|
|
key,
|
|
});
|
|
|
|
export const showBackdrop = () => {
|
|
return {
|
|
type: "SHOW_BACKDROP",
|
|
};
|
|
};
|
|
|
|
export const hideBackdrop = () => {
|
|
return {
|
|
type: "HIDE_BACKDROP",
|
|
};
|
|
};
|