You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
411 B
13 lines
411 B
export const getEmployeeFromPrice = (priceUUID, selfUser) => { |
|
const employees = selfUser && selfUser.client && selfUser.client.employees; |
|
let matchEmployee = null; |
|
employees.forEach(employee => { |
|
const priceMatch = employee.prices.filter(price => { |
|
return price.uuid === priceUUID; |
|
}); |
|
if (priceMatch.length > 0) { |
|
matchEmployee = employee; |
|
} |
|
}); |
|
return matchEmployee; |
|
};
|
|
|