IO-3166-Global-Notifications-Part-2 - Checkpoint
This commit is contained in:
@@ -97,7 +97,11 @@ export default function JobWatcherToggleComponent({
|
||||
<Text type="secondary">{t("notifications.labels.add-watchers")}</Text>
|
||||
<EmployeeSearchSelectComponent
|
||||
style={{ minWidth: "100%" }}
|
||||
options={bodyshop?.employees?.filter((e) => jobWatchers.every((w) => w.user_email !== e.user_email)) || []}
|
||||
options={
|
||||
bodyshop?.employees?.filter((e) =>
|
||||
jobWatchers.every((w) => w.user_email !== e.user_email && e.active && e.user_email)
|
||||
) || []
|
||||
}
|
||||
placeholder={t("notifications.labels.employee-search")}
|
||||
value={selectedWatcher}
|
||||
onChange={(value) => {
|
||||
@@ -120,10 +124,9 @@ export default function JobWatcherToggleComponent({
|
||||
const teamMembers = team.employee_team_members
|
||||
.map((member) => {
|
||||
const employee = bodyshop?.employees?.find((e) => e.id === member.employeeid);
|
||||
return employee ? employee.user_email : null;
|
||||
return employee?.user_email && employee?.active ? employee.user_email : null;
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
return {
|
||||
value: JSON.stringify(teamMembers),
|
||||
label: team.name
|
||||
|
||||
Reference in New Issue
Block a user