mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: application preferences.
This commit is contained in:
@@ -3,6 +3,7 @@ import t from 'store/types';
|
||||
|
||||
const initialState = {
|
||||
data: {},
|
||||
loading: false,
|
||||
};
|
||||
|
||||
export default createReducer(initialState, {
|
||||
|
||||
@@ -49,7 +49,16 @@ export const deleteUser = ({ id }) => {
|
||||
};
|
||||
|
||||
export const submitInvite = ({ form }) => {
|
||||
return (dispatch) => ApiService.post(`invite/send`, form);
|
||||
return (dispatch) => new Promise((resolve, reject) => {
|
||||
ApiService.post(`invite/send`, form)
|
||||
.then((response) => { resolve(response); })
|
||||
.catch((error) => {
|
||||
const { response } = error;
|
||||
const { data } = response;
|
||||
|
||||
reject(data?.errors);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
export const editUser = ({ form, id }) => {
|
||||
|
||||
Reference in New Issue
Block a user