fetch next actions from wiaas plugin

This commit is contained in:
GotPPay
2018-08-02 14:32:15 +02:00
parent ce7e864c1d
commit 5ceb376f8f

View File

@@ -1,4 +1,8 @@
import {REQUEST_NEXT_ACTIONS, RECIEVE_NEXT_ACTIONS} from '../../constants/dashboardConstants'; import {REQUEST_NEXT_ACTIONS, RECIEVE_NEXT_ACTIONS} from '../../constants/dashboardConstants';
import { API_SERVER } from '../../config';
import HtmlClient from '../../helpers/HtmlClient';
const client = new HtmlClient();
export const requestNextActions = () => ({ export const requestNextActions = () => ({
type: REQUEST_NEXT_ACTIONS, type: REQUEST_NEXT_ACTIONS,
@@ -14,16 +18,12 @@ export const recieveNextActions = (json) => ({
export const fetchNextActions = () => { export const fetchNextActions = () => {
return dispatch => { return dispatch => {
dispatch(requestNextActions()); dispatch(requestNextActions());
//TODO : fetch next actions from gravity flow api
dispatch(recieveNextActions({}));
/*
return client.fetch({ return client.fetch({
url: `${API_SERVER}/dashboards/api/getNextActionsInfo` url: `${API_SERVER}/wp-json/wiaas/next-delivery-steps`
}) })
.then(response => dispatch(recieveNextActions(response.data))) .then(response => dispatch(recieveNextActions(response.data)))
.catch(error => { .catch(error => {
client.onError(error, dispatch); client.onError(error, dispatch);
}); });
*/
} }
} }