From 1b42ce9ebc0dbaaad292ca97018d9a20797116e7 Mon Sep 17 00:00:00 2001 From: FrancescoGottardi Date: Thu, 12 Dec 2024 17:52:08 +0100 Subject: [PATCH 01/40] refator: moved inputs of filter action --- .../filters/parts/filter-action-rows.tsx | 78 +++++-------------- .../filters/parts/filter-actions/mark-as.tsx | 28 +++++++ .../parts/filter-actions/move-to-folder.tsx | 45 +++++++++++ .../parts/filter-actions/redirect-to.tsx | 34 ++++++++ .../filters/parts/filter-actions/show-tag.tsx | 37 +++++++++ .../parts/tests/filter-actions-rows.test.tsx | 35 +++++++++ 6 files changed, 200 insertions(+), 57 deletions(-) create mode 100644 src/views/settings/filters/parts/filter-actions/mark-as.tsx create mode 100644 src/views/settings/filters/parts/filter-actions/move-to-folder.tsx create mode 100644 src/views/settings/filters/parts/filter-actions/redirect-to.tsx create mode 100644 src/views/settings/filters/parts/filter-actions/show-tag.tsx diff --git a/src/views/settings/filters/parts/filter-action-rows.tsx b/src/views/settings/filters/parts/filter-action-rows.tsx index 4cec5c535..52a6a06c8 100644 --- a/src/views/settings/filters/parts/filter-action-rows.tsx +++ b/src/views/settings/filters/parts/filter-action-rows.tsx @@ -6,12 +6,9 @@ import React, { FC, ReactElement, useCallback, useMemo, useState } from 'react'; import { - Button, - ChipInput, Container, CustomModal, IconButton, - Input, Padding, Row, Text, @@ -25,6 +22,10 @@ import styled from 'styled-components'; import { v4 as uuidv4 } from 'uuid'; import CustomSelect from './custom-select'; +import { MarkAs } from './filter-actions/mark-as'; +import { MovetoFolder } from './filter-actions/move-to-folder'; +import { RedirectTo } from './filter-actions/redirect-to'; +import { ShowTag } from './filter-actions/show-tag'; import { getActionOptions, getMarkAsOptions } from './utils'; import { ZIMBRA_STANDARD_COLORS } from '../../../../carbonio-ui-commons/constants'; import { CONTACT_TYPES } from '../../../../carbonio-ui-commons/integrations/constants'; @@ -403,66 +404,29 @@ const FilterActionRows: FC = ({ )} {showBrowseBtn && ( - <> - {destination && Object.keys(destination).length > 0 && destination?.name !== '' && ( - - - - )} - -