Advertisement
aar6947

Untitled

Feb 12th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // esses dados abaixo não viriam da person, ainda estou entendendo como viriam para
  2. // esse handler
  3. const { personRoles: { bunsinessModelId, function: functionId, role } } = person;
  4. const personRoleIndexToBeUpdated = person.personRoles.map((personRole, index) => {
  5. if (personRole.businessModelId === bunsinessModelId
  6. && personRole.fId === 1
  7. && personRole.role === 2
  8. && personRole.endDate === null) return index;
  9. }).filter(value => value !== undefined)[0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement