Skip to content

Commit

Permalink
update: disable tax & category row only when deleted offline.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <[email protected]>
  • Loading branch information
Krishna2323 committed Mar 25, 2024
1 parent d9a1b4f commit 7f2c7ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function WorkspaceCategoriesPage({policy, policyCategories, route}: WorkspaceCat
Object.values(policyCategories ?? {})
.sort((a, b) => localeCompare(a.name, b.name))
.map((value) => {
const isDisabled = value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || Object.values(value.pendingFields ?? {}).length > 0;
const isDisabled = value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
return {
text: value.name,
keyForList: value.name,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function WorkspaceTagsPage({policyTags, route}: WorkspaceTagsPageProps) {
Object.values(policyTagList.tags || [])
.sort((a, b) => localeCompare(a.name, b.name))
.map((value) => {
const isDisabled = value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || Object.values(value.pendingFields ?? {}).length > 0;
const isDisabled = value.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
return {
value: value.name,
text: value.name,
Expand Down

0 comments on commit 7f2c7ee

Please sign in to comment.