send request to add fees in ORD
This commit is contained in:
@@ -14,6 +14,9 @@ import {
|
||||
FETCH_MEMBER_INCIDENTS_PENDING,
|
||||
FETCH_MEMBER_INCIDENTS_SUCCESS,
|
||||
FETCH_MEMBER_INCIDENTS_FAILED,
|
||||
ADD_FEES_TO_ORD_PENDING,
|
||||
ADD_FEES_TO_ORD_SUCCESS,
|
||||
ADD_FEES_TO_ORD_FAILED,
|
||||
} from '../constants';
|
||||
|
||||
import API from '../../utilities/api';
|
||||
@@ -78,3 +81,17 @@ export const fetchMemberIncidents = (dispatch, memberId, dateRange) => {
|
||||
dispatch({type: FETCH_MEMBER_INCIDENTS_FAILED, payload: error.response});
|
||||
});
|
||||
};
|
||||
|
||||
export const addFeesToOrd = (dispatch, dateRange, memberIds) => {
|
||||
dispatch({type: ADD_FEES_TO_ORD_PENDING});
|
||||
API.post(`integration/addFees`, {
|
||||
dateRange,
|
||||
memberIds: memberIds || [],
|
||||
})
|
||||
.then(response => {
|
||||
dispatch({type: ADD_FEES_TO_ORD_SUCCESS, payload: response.data});
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch({type: ADD_FEES_TO_ORD_FAILED, payload: error.response});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user