bug fixed in formatCard function
This commit is contained in:
parent
8e5eca5629
commit
9fbc404aa1
|
@ -36,10 +36,11 @@ module.exports = function(Client) {
|
|||
|
||||
function formatCard(card) {
|
||||
let cardFormated = JSON.parse(JSON.stringify(card));
|
||||
cardFormated.salesPerson = {
|
||||
id: card.salesPerson().id,
|
||||
name: `${card.salesPerson().name} ${card.salesPerson().surname}`
|
||||
};
|
||||
if(cardFormated.salesPersonFk)
|
||||
cardFormated.salesPerson = {
|
||||
id: card.salesPerson().id,
|
||||
name: `${card.salesPerson().name} ${card.salesPerson().surname}`
|
||||
};
|
||||
return cardFormated;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue