add helper functions for order and process object transformations

This commit is contained in:
GotPPay
2018-08-15 09:58:13 +02:00
parent b923b35323
commit aef9bc5ba9
2 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import moment from "moment";
export const fromWiaasProcessStep = (step) => {
return {
actionCode: step.action_code,
actualDate: step.actual_date,
comments: step.comments,
fullDesc: step.full_desc,
idOrder: step.order_id,
idProcess: step.step_form_entry_id, //not sure about this
idProcessStep: step.step_id, //not sure about this
isNewCommentVisible: 1, //TODO : get this from backend
isVisibleForCustomer: 1, //TODO : get this from backend
now: moment().format("Do MMM YY"),
shortDesc: step.short_desc,
status: step.status,
stepType: step.step_type,
}
};