From e0ba4e6686d32a5ec54b588fe8d9a4f66add3191 Mon Sep 17 00:00:00 2001 From: csuadev <72958726+csuadev@users.noreply.github.com> Date: Thu, 9 May 2024 16:29:10 +0200 Subject: [PATCH] feat: Add `CheckOption` on Omnichannel's departments multi selects (#32193) Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com> --- .changeset/strange-bears-dance.md | 5 + .../AutoCompleteDepartmentMultiple.tsx | 10 +- .../additionalForms/DepartmentForwarding.tsx | 10 +- .../ee/client/omnichannel/units/UnitEdit.tsx | 11 +- .../e2e/omnichannel/omnichannel-units.spec.ts | 137 +++++++++++------- .../e2e/page-objects/omnichannel-units.ts | 4 + 6 files changed, 117 insertions(+), 60 deletions(-) create mode 100644 .changeset/strange-bears-dance.md diff --git a/.changeset/strange-bears-dance.md b/.changeset/strange-bears-dance.md new file mode 100644 index 000000000000..49ea972c8fe4 --- /dev/null +++ b/.changeset/strange-bears-dance.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Adds CheckOption to departments multi selects improving options visibility state diff --git a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx index 214bffc9841e..99af9a1f6a2c 100644 --- a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx +++ b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx @@ -1,4 +1,4 @@ -import { Option, PaginatedMultiSelectFiltered } from '@rocket.chat/fuselage'; +import { CheckOption, PaginatedMultiSelectFiltered } from '@rocket.chat/fuselage'; import type { PaginatedMultiSelectOption } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import { useTranslation } from '@rocket.chat/ui-contexts'; @@ -65,7 +65,13 @@ const AutoCompleteDepartmentMultiple = ({ return loadMoreDepartments(start, Math.min(50, departmentsTotal)); } } - renderItem={({ label, ...props }) =>