-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
836 additions
and
8 deletions.
There are no files selected for viewing
155 changes: 155 additions & 0 deletions
155
assets/images/product-illustrations/emptystate__receiptfairy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import {useNavigation} from '@react-navigation/native'; | ||
import React, {useEffect} from 'react'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import variables from '@styles/variables'; | ||
import FeatureTrainingModal from './FeatureTrainingModal'; | ||
import HoldMenuSectionList from './HoldMenuSectionList'; | ||
import * as Illustrations from './Icon/Illustrations'; | ||
|
||
|
||
type ChangePolicyEducationalMenuProps = { | ||
/** Method to trigger when pressing outside of the popover menu to close it */ | ||
onClose: () => void; | ||
|
||
/** Method to trigger when pressing confirm button */ | ||
onConfirm: () => void; | ||
}; | ||
|
||
function ChangePolicyEducationalMenu({onClose, onConfirm}: ChangePolicyEducationalMenuProps) { | ||
const {translate} = useLocalize(); | ||
const styles = useThemeStyles(); | ||
const navigation = useNavigation(); | ||
|
||
useEffect(() => { | ||
const unsub = navigation.addListener('beforeRemove', () => { | ||
onClose(); | ||
}); | ||
return unsub; | ||
}, [navigation, onClose]); | ||
|
||
return ( | ||
<FeatureTrainingModal | ||
title={translate('iou.changePolicyEducational.title')} | ||
description={translate('iou.changePolicyEducational.description')} | ||
confirmText={translate('common.buttonConfirm')} | ||
image={Illustrations.ReceiptFairy} | ||
contentFitImage="cover" | ||
width={variables.changePolicyEducationModalWidth} | ||
illustrationAspectRatio={39 / 22} | ||
contentInnerContainerStyles={styles.mb5} | ||
modalInnerContainerStyle={styles.pt0} | ||
illustrationOuterContainerStyle={styles.p0} | ||
onClose={onClose} | ||
onConfirm={onConfirm} | ||
> | ||
<HoldMenuSectionList /> | ||
</FeatureTrainingModal> | ||
); | ||
} | ||
|
||
ChangePolicyEducationalMenu.displayName = 'ChangePolicyEducationalMenu'; | ||
|
||
export default ChangePolicyEducationalMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import type {ImageSourcePropType} from 'react-native'; | ||
import type {SvgProps} from 'react-native-svg'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import variables from '@styles/variables'; | ||
import type {TranslationPaths} from '@src/languages/types'; | ||
import Icon from './Icon'; | ||
import * as Illustrations from './Icon/Illustrations'; | ||
import Text from './Text'; | ||
|
||
type ChangeWorkspaceMenuSection = { | ||
/** The icon supplied with the section */ | ||
icon: React.FC<SvgProps> | ImageSourcePropType; | ||
|
||
/** Translation key for the title */ | ||
titleTranslationKey: TranslationPaths; | ||
}; | ||
|
||
function ChangeWorkspaceMenuSectionList() { | ||
const {translate} = useLocalize(); | ||
const styles = useThemeStyles(); | ||
|
||
const holdMenuSections: ChangeWorkspaceMenuSection[] = [ | ||
{ | ||
icon: Illustrations.FolderOpen, | ||
titleTranslationKey: 'iou.changePolicyEducational.reCategorize', | ||
}, | ||
{ | ||
icon: Illustrations.Workflows, | ||
titleTranslationKey: 'iou.changePolicyEducational.workflows', | ||
}, | ||
]; | ||
|
||
return ( | ||
<> | ||
{holdMenuSections.map((section, i) => ( | ||
<View | ||
// eslint-disable-next-line react/no-array-index-key | ||
key={i} | ||
style={[styles.flexRow, styles.alignItemsCenter, styles.mt5]} | ||
> | ||
<Icon | ||
width={variables.menuIconSize} | ||
height={variables.menuIconSize} | ||
src={section.icon} | ||
additionalStyles={[styles.mr4]} | ||
/> | ||
<View style={[styles.flex1, styles.justifyContentCenter]}> | ||
<Text style={[styles.mb1]}>{translate(section.titleTranslationKey)}</Text> | ||
</View> | ||
</View> | ||
))} | ||
</> | ||
); | ||
} | ||
|
||
ChangeWorkspaceMenuSectionList.displayName = 'ChangeWorkspaceMenuSectionList'; | ||
|
||
export type {ChangeWorkspaceMenuSection}; | ||
|
||
export default ChangeWorkspaceMenuSectionList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type ChangeReportPolicyParams = { | ||
reportID: string; | ||
policyID: string; | ||
reportPreviewReportActionID: string; | ||
changePolicyReportActionID: string; | ||
}; | ||
export default ChangeReportPolicyParams; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.