From f1d856304a233c857ab13c38c10c89e820cd0407 Mon Sep 17 00:00:00 2001 From: Renato Becker Date: Thu, 19 Mar 2020 18:06:28 -0300 Subject: [PATCH] [IMPROVE] Replace the Department select component by an Autocomplete input in Omnichannel UI (#16669) --- .../views/app/livechatCurrentChats.html | 31 ++++++----- .../client/views/app/livechatCurrentChats.js | 46 ++++++++++++---- .../views/app/tabbar/visitorForward.html | 32 +++++++---- .../client/views/app/tabbar/visitorForward.js | 54 +++++++++++++------ .../imports/server/rest/departments.js | 16 +++++- app/livechat/server/api/lib/departments.js | 23 ++++++++ app/models/server/raw/LivechatDepartment.js | 20 +++++++ packages/rocketchat-i18n/i18n/en.i18n.json | 1 + packages/rocketchat-i18n/i18n/pt-BR.i18n.json | 1 + 9 files changed, 174 insertions(+), 50 deletions(-) diff --git a/app/livechat/client/views/app/livechatCurrentChats.html b/app/livechat/client/views/app/livechatCurrentChats.html index 9ab5d338a425..c45ad535ab1b 100644 --- a/app/livechat/client/views/app/livechatCurrentChats.html +++ b/app/livechat/client/views/app/livechatCurrentChats.html @@ -46,18 +46,25 @@
- + {{> livechatAutocompleteUser + onClickTag=onClickTagDepartment + list=selectedDepartments + onSelect=onSelectDepartments + collection='CachedDepartmentList' + endpoint='livechat/department.autocomplete' + field='name' + sort='name' + label="Department" + placeholder="Enter_a_department_name" + name="department" + icon="queue" + noMatchTemplate="userSearchEmpty" + templateItem="popupList_item_channel" + template="roomSearch" + noMatchTemplate="roomSearchEmpty" + modifier=departmentModifier + showLabel=true + }}