- Fix console warn, add two missing try catch blocks
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -176,7 +176,7 @@ export function TaskUpsertModalComponent({
|
||||
label={t("tasks.fields.assigned_to")}
|
||||
name="assigned_to"
|
||||
initialValue={
|
||||
bodyshop.employees.find((employee) => employee.user_email === currentUser.email && employee.active)
|
||||
bodyshop.employees.find((employee) => employee?.user_email === currentUser.email && employee.active)
|
||||
? currentUser.email
|
||||
: undefined
|
||||
}
|
||||
@@ -189,7 +189,7 @@ export function TaskUpsertModalComponent({
|
||||
<Select
|
||||
placeholder={t("tasks.placeholders.assigned_to")}
|
||||
options={bodyshop.employees
|
||||
.filter((x) => x.active)
|
||||
.filter((x) => x.active && x.user_email)
|
||||
.map((employee) => ({
|
||||
key: employee.id,
|
||||
value: employee.user_email,
|
||||
|
||||
Reference in New Issue
Block a user