#42 formatting date
This commit is contained in:
@@ -7,9 +7,18 @@ export default class MyUserModel
|
||||
lastName = "";
|
||||
userName = "";
|
||||
totalBalance = "";
|
||||
userTransactions = new UserTransactionsModel()
|
||||
userTransactions = [];
|
||||
|
||||
static createFromApiResult(apiResult){
|
||||
return Object.assign(new MyUserModel(), apiResult);
|
||||
const userModel = Object.assign(new MyUserModel(), apiResult);
|
||||
|
||||
const notMapperTransaction = Object.freeze(userModel.userTransactions);
|
||||
userModel.userTransactions = [];
|
||||
|
||||
for (const transaction of notMapperTransaction) {
|
||||
userModel.userTransactions.push(UserTransactionsModel.createFromApiResult(transaction))
|
||||
}
|
||||
|
||||
return userModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user