Skip to content

Commit

Permalink
Merge pull request #51779 from klajdipaja/issues/51361-workspace_page…
Browse files Browse the repository at this point in the history
…s_use_checkmark_icon_for_enabling_and_close_icon_for_disabling

Replace checkmark icon for enabling and close icon for disabling
  • Loading branch information
youssef-lr authored Nov 5, 2024
2 parents 81d6fc7 + 163be22 commit 94e7233
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
}, {});

options.push({
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
text: translate(enabledCategories.length === 1 ? 'workspace.categories.disableCategory' : 'workspace.categories.disableCategories'),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
onSelected: () => {
Expand All @@ -227,7 +227,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
return acc;
}, {});
options.push({
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
text: translate(disabledCategories.length === 1 ? 'workspace.categories.enableCategory' : 'workspace.categories.enableCategories'),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
onSelected: () => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function PolicyDistanceRatesPage({
options.push({
text: translate('workspace.distanceRates.disableRates', {count: enabledRates.length}),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
onSelected: () => (canDisableOrDeleteSelectedRates ? disableRates() : setIsWarningModalVisible(true)),
});
}
Expand All @@ -227,7 +227,7 @@ function PolicyDistanceRatesPage({
options.push({
text: translate('workspace.distanceRates.enableRates', {count: disabledRates.length}),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
onSelected: enableRates,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function ReportFieldsListValuesPage({
}, []);

options.push({
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
text: translate(enabledValues.length === 1 ? 'workspace.reportFields.disableValue' : 'workspace.reportFields.disableValues'),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
onSelected: () => {
Expand Down Expand Up @@ -222,7 +222,7 @@ function ReportFieldsListValuesPage({
}, []);

options.push({
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
text: translate(disabledValues.length === 1 ? 'workspace.reportFields.enableValue' : 'workspace.reportFields.enableValues'),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
onSelected: () => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {

if (enabledTagCount > 0) {
options.push({
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
text: translate(enabledTagCount === 1 ? 'workspace.tags.disableTag' : 'workspace.tags.disableTags'),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
onSelected: () => {
Expand All @@ -265,7 +265,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {

if (disabledTagCount > 0) {
options.push({
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
text: translate(disabledTagCount === 1 ? 'workspace.tags.enableTag' : 'workspace.tags.enableTags'),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
onSelected: () => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/tags/WorkspaceViewTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) {

if (enabledTagCount > 0) {
options.push({
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
text: translate(enabledTagCount === 1 ? 'workspace.tags.disableTag' : 'workspace.tags.disableTags'),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
onSelected: () => {
Expand All @@ -205,7 +205,7 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) {

if (disabledTagCount > 0) {
options.push({
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
text: translate(disabledTagCount === 1 ? 'workspace.tags.enableTag' : 'workspace.tags.enableTags'),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
onSelected: () => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function WorkspaceTaxesPage({
// `Disable rates` when at least one enabled rate is selected.
if (selectedTaxesIDs.some((taxID) => !policy?.taxRates?.taxes[taxID]?.isDisabled)) {
options.push({
icon: Expensicons.DocumentSlash,
icon: Expensicons.Close,
text: isMultiple ? translate('workspace.taxes.actions.disableMultiple') : translate('workspace.taxes.actions.disable'),
value: CONST.POLICY.BULK_ACTION_TYPES.DISABLE,
onSelected: () => toggleTaxes(false),
Expand All @@ -217,7 +217,7 @@ function WorkspaceTaxesPage({
// `Enable rates` when at least one disabled rate is selected.
if (selectedTaxesIDs.some((taxID) => policy?.taxRates?.taxes[taxID]?.isDisabled)) {
options.push({
icon: Expensicons.Document,
icon: Expensicons.Checkmark,
text: isMultiple ? translate('workspace.taxes.actions.enableMultiple') : translate('workspace.taxes.actions.enable'),
value: CONST.POLICY.BULK_ACTION_TYPES.ENABLE,
onSelected: () => toggleTaxes(true),
Expand Down

0 comments on commit 94e7233

Please sign in to comment.