mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
re-structure to monorepo.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// @ts-nocheck
|
||||
import ApiService from "services/ApiService";
|
||||
import t from '@/store/types';
|
||||
|
||||
export const savePreferences = ({ options }) => {
|
||||
return (dispatch) => new Promise((resolve, reject) => {
|
||||
ApiService.post('options', { options }).then((response) => {
|
||||
dispatch({
|
||||
type: t.OPTIONS_SET,
|
||||
options: response.data.options,
|
||||
});
|
||||
resolve(response);
|
||||
}).catch(error => { reject(error); });
|
||||
});
|
||||
};
|
||||
|
||||
export const fetchPreferences = () => {
|
||||
return (dispatch) => new Promise((resolve, reject) => {
|
||||
ApiService.get('options').then((response) => {
|
||||
dispatch({
|
||||
type: t.OPTIONS.SET,
|
||||
options: response.data.options,
|
||||
});
|
||||
resolve(response);
|
||||
}).catch(error => { reject(error); });
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// @ts-nocheck
|
||||
|
||||
|
||||
export default {
|
||||
RESOURCE_COLUMNS_SET: 'RESOURCE_COLUMNS_SET',
|
||||
RESOURCE_FIELDS_SET: 'RESOURCE_FIELDS_SET',
|
||||
RESOURCE_DATA_SET: 'RESOURCE_DATA_SET',
|
||||
};
|
||||
Reference in New Issue
Block a user