Skip to content

Commit

Permalink
Merge pull request Expensify#48309 from nkdengineer/fix/48097
Browse files Browse the repository at this point in the history
fix: Employee has the option to edit categories
  • Loading branch information
carlosmiceli authored Sep 6, 2024
2 parents 7814fbc + 3fd6195 commit da8370f
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/pages/iou/request/step/IOURequestStepCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as OptionsListUtils from '@libs/OptionsListUtils';
import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import * as TransactionUtils from '@libs/TransactionUtils';
Expand Down Expand Up @@ -176,23 +177,25 @@ function IOURequestStepCategory({
subtitle={translate('workspace.categories.emptyCategories.subtitle')}
containerStyle={[styles.flex1, styles.justifyContentCenter]}
/>
<FixedFooter style={[styles.mtAuto, styles.pt5]}>
<Button
large
success
style={[styles.w100]}
onPress={() =>
Navigation.navigate(
ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(
policy?.id ?? '-1',
ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, transactionID, report?.reportID ?? '-1', backTo, reportActionID),
),
)
}
text={translate('workspace.categories.editCategories')}
pressOnEnter
/>
</FixedFooter>
{PolicyUtils.isPolicyAdmin(policy) && (
<FixedFooter style={[styles.mtAuto, styles.pt5]}>
<Button
large
success
style={[styles.w100]}
onPress={() =>
Navigation.navigate(
ROUTES.SETTINGS_CATEGORIES_ROOT.getRoute(
policy?.id ?? '-1',
ROUTES.MONEY_REQUEST_STEP_CATEGORY.getRoute(action, iouType, transactionID, report?.reportID ?? '-1', backTo, reportActionID),
),
)
}
text={translate('workspace.categories.editCategories')}
pressOnEnter
/>
</FixedFooter>
)}
</View>
)}
{!shouldShowEmptyState && !isLoading && (
Expand Down

0 comments on commit da8370f

Please sign in to comment.