From 61ca8bf2b5204aba168602f17ae9add1ec79c649 Mon Sep 17 00:00:00 2001 From: Rafael Ferreira Date: Tue, 2 Feb 2021 15:25:03 -0300 Subject: [PATCH] [FIX] Filters are not being applied correctly in Omnichannel Current Chats list (#20320) * fix capitalized "All" to "all" value. * fix date filtering issue. * refactor client and server to accept only 'from' and 'to' dates to list rooms. * set previous date limit to selected date on 'to' field. * permitting users to filter date and hour selecting only 'start' date/time. * Revert "permitting users to filter date and hour selecting only 'start' date/time." This reverts commit a48f0abc941b59f9f4e70cb03d37a9a08080f5c7. * set a specific date format to server side read properly. * check on the server side if dates are valid. * Revert "check on the server side if dates are valid." This reverts commit 5a1047621ba93d94a0f9cabb0fd367fc8510b0b6. * Code style improvements. * Revert unnecessary changes. Co-authored-by: Renato Becker --- client/components/AutoCompleteDepartment.js | 2 +- client/views/omnichannel/currentChats/CurrentChatsRoute.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/components/AutoCompleteDepartment.js b/client/components/AutoCompleteDepartment.js index acc8781d41a..a7e8041cd69 100644 --- a/client/components/AutoCompleteDepartment.js +++ b/client/components/AutoCompleteDepartment.js @@ -11,7 +11,7 @@ export const AutoCompleteDepartment = React.memo((props) => { const { label } = props; - const options = useMemo(() => (data && [{ value: 'All', label: label && t('All') }, ...data.departments.map((department) => ({ value: department._id, label: department.name }))]) || [{ value: 'All', label: label || t('All') }], [data, label, t]); + const options = useMemo(() => (data && [{ value: 'all', label: label && t('All') }, ...data.departments.map((department) => ({ value: department._id, label: department.name }))]) || [{ value: 'all', label: label || t('All') }], [data, label, t]); return