Skip to content

Commit 721d44d

Browse files
authored
Merge pull request #42124 from gijoe0295/gijoe/42113-new
hide delete option in multi tag view
2 parents a246c5e + 016a8de commit 721d44d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/pages/workspace/tags/WorkspaceTagsPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
202202

203203
const options: Array<DropdownOption<DeepValueOf<typeof CONST.POLICY.TAGS_BULK_ACTION_TYPES>>> = [];
204204

205-
if (!isThereAnyAccountingConnection && !isMultiLevelTags) {
205+
if (!isThereAnyAccountingConnection) {
206206
options.push({
207207
icon: Expensicons.Trashcan,
208208
text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'),

src/pages/workspace/tags/WorkspaceViewTagsPage.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) {
137137

138138
const options: Array<DropdownOption<DeepValueOf<typeof CONST.POLICY.TAGS_BULK_ACTION_TYPES>>> = [];
139139
const isThereAnyAccountingConnection = Object.keys(policy?.connections ?? {}).length !== 0;
140+
const isMultiLevelTags = PolicyUtils.isMultiLevelTags(policyTags);
140141

141-
if (!isThereAnyAccountingConnection) {
142+
if (!isThereAnyAccountingConnection && !isMultiLevelTags) {
142143
options.push({
143144
icon: Expensicons.Trashcan,
144145
text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'),

0 commit comments

Comments
 (0)