From 03865f769497d6b7f1df93564329a5ee62661f53 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Tue, 14 May 2024 08:23:13 +0700 Subject: [PATCH 1/4] hide delete option in multi tag view --- src/pages/workspace/tags/WorkspaceViewTagsPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx index 5d7eaf79efa1..a489b5134c8b 100644 --- a/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceViewTagsPage.tsx @@ -137,8 +137,9 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) { const options: Array>> = []; const isThereAnyAccountingConnection = Object.keys(policy?.connections ?? {}).length !== 0; + const isMultiLevelTags = PolicyUtils.isMultiLevelTags(policyTags); - if (!isThereAnyAccountingConnection) { + if (!isThereAnyAccountingConnection && !isMultiLevelTags) { options.push({ icon: Expensicons.Trashcan, text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'), From a7c9ae778e778a18220ffefcb794660a9b7c1c23 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Tue, 14 May 2024 08:29:40 +0700 Subject: [PATCH 2/4] revert: hide delete option for multi tag in workspace tags page --- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 39cf0d1db22a..08b8b17dcbb1 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -174,7 +174,6 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const getHeaderButtons = () => { const isThereAnyAccountingConnection = Object.keys(policy?.connections ?? {}).length !== 0; - const isMultiLevelTags = PolicyUtils.isMultiLevelTags(policyTags); if (selectedTagsArray.length === 0) { return ( @@ -204,7 +203,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const options: Array>> = []; - if (!isThereAnyAccountingConnection && !isMultiLevelTags) { + if (!isThereAnyAccountingConnection) { options.push({ icon: Expensicons.Trashcan, text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'), From dc46988f249dd9456c608a604ae2c59bac66b8cb Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Tue, 14 May 2024 08:44:54 +0700 Subject: [PATCH 3/4] Revert "revert: hide delete option for multi tag in workspace tags page" This reverts commit a7c9ae778e778a18220ffefcb794660a9b7c1c23. --- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 08b8b17dcbb1..39cf0d1db22a 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -174,6 +174,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const getHeaderButtons = () => { const isThereAnyAccountingConnection = Object.keys(policy?.connections ?? {}).length !== 0; + const isMultiLevelTags = PolicyUtils.isMultiLevelTags(policyTags); if (selectedTagsArray.length === 0) { return ( @@ -203,7 +204,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const options: Array>> = []; - if (!isThereAnyAccountingConnection) { + if (!isThereAnyAccountingConnection && !isMultiLevelTags) { options.push({ icon: Expensicons.Trashcan, text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'), From 016a8de52f309041d24af53cd95a6e5ddf8663d0 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Wed, 15 May 2024 04:53:24 +0700 Subject: [PATCH 4/4] revert changes in workspacetagspage --- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 2620e83dff71..febb307b7cb8 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -202,7 +202,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { const options: Array>> = []; - if (!isThereAnyAccountingConnection && !isMultiLevelTags) { + if (!isThereAnyAccountingConnection) { options.push({ icon: Expensicons.Trashcan, text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'),