handle order actions

This commit is contained in:
Almira Krdzic
2018-10-31 10:23:59 +01:00
parent 5aca4e8572
commit 308c836460
17 changed files with 834 additions and 649 deletions

View File

@@ -36,7 +36,7 @@ export const fetchCustomerQuestionnaires = (idOrder) => {
return dispatch => {
dispatch(requestCustomerQuestionnaires());
return htmlClient.fetch({
url: `${API_SERVER}/wp-json/wiaas/customer-questionnaires/${idOrder}`,
url: `${API_SERVER}/wp-json/wiaas/delivery/${idOrder}/customer-questionnaires`,
method: 'get'
})
.then(response => {
@@ -55,7 +55,7 @@ export const uploadCustomerQuestionnaire = (orderId, actionId, file) => {
return dispatch => {
dispatch(uploadCustomerQuestionnaireAction());
return htmlClient.uploadFile(file, {
url: `${API_SERVER}/wp-json/wiaas/customer-questionnaires/${orderId}/upload/${actionId}`,
url: `${API_SERVER}/wp-json/wiaas/delivery/${orderId}/customer-questionnaires/upload/${actionId}`,
}).then(response => {
if (typeof response.data !== 'undefined') {
dispatch(updateMessages(response.data.messages, orderMessages));