-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Card Assignment Flow #48278
Merged
yuwenmemon
merged 30 commits into
Expensify:main
from
koko57:feat/47377-card-assignement-flow
Sep 4, 2024
Merged
[No QA] Card Assignment Flow #48278
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
faa7b95
feat: prepare assign-card route
koko57 1812f74
fix: resolve conflicts
koko57 871933c
feat: add translations
koko57 cc0aaee
feat: create onyx key for the form, create form steps
koko57 56fe0b6
feat: create company cards actions, handle back button press
koko57 83b72f5
feat: add next button to assignee step
koko57 a6eb447
Merge branch 'main' into feat/47377-card-assignement-flow
koko57 ee82902
feat: create transaction start date options
koko57 e01947b
fix: resolve conflicts
koko57 639a4e0
feat: create card list item
koko57 e70b932
feat: save data in Onyx and show it in confirmation step
koko57 8546924
feat: transaction start date page
koko57 5ca5edb
fix: go back to confirmation page when done editing or clicking back …
koko57 00df540
fix: minor fix
koko57 b825952
feat: focus initially selected item
koko57 2dd26ca
feat: empty cards screen for card selection step
koko57 ac9cd99
feat: validation for card selection and assignee steps
koko57 d777f70
feat: clear Onyx after assigning card
koko57 75e365a
fix: show step header
koko57 8d88cb0
fix: resolve conflicts
koko57 e35b89c
fix: lint
koko57 c76bc5c
fix: resolve conflicts
koko57 8811dd3
fix: style fixes
koko57 a097e7c
fix: minor fixes
koko57 a8491af
fix: spanish translations
koko57 ab16106
fix: resolve conflicts
koko57 f87eb6d
fix: typecheck
koko57 afe6112
fix: revert unnecessarily changed files
koko57 ace11f4
fix: submit button styles
koko57 034349a
fix: lint
koko57 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
assets/images/product-illustrations/broken-magnifying-glass.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
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,58 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import CONST from '@src/CONST'; | ||
import HeaderWithBackButton from './HeaderWithBackButton'; | ||
import InteractiveStepSubHeader from './InteractiveStepSubHeader'; | ||
import ScreenWrapper from './ScreenWrapper'; | ||
|
||
type InteractiveStepWrapperProps = { | ||
// Step content | ||
children: React.ReactNode; | ||
|
||
// ID of the wrapper | ||
wrapperID: string; | ||
|
||
// Function to handle back button press | ||
handleBackButtonPress: () => void; | ||
|
||
// Title of the back button header | ||
headerTitle: string; | ||
|
||
// Index of the highlighted step | ||
startStepIndex?: number; | ||
|
||
// Array of step names | ||
stepNames?: readonly string[]; | ||
}; | ||
|
||
function InteractiveStepWrapper({children, wrapperID, handleBackButtonPress, headerTitle, startStepIndex, stepNames}: InteractiveStepWrapperProps) { | ||
const styles = useThemeStyles(); | ||
|
||
return ( | ||
<ScreenWrapper | ||
testID={wrapperID} | ||
includeSafeAreaPaddingBottom={false} | ||
shouldEnablePickerAvoiding={false} | ||
shouldEnableMaxHeight | ||
> | ||
<HeaderWithBackButton | ||
title={headerTitle} | ||
onBackButtonPress={handleBackButtonPress} | ||
/> | ||
{stepNames && ( | ||
<View style={[styles.ph5, styles.mb5, styles.mt3, {height: CONST.BANK_ACCOUNT.STEPS_HEADER_HEIGHT}]}> | ||
<InteractiveStepSubHeader | ||
startStepIndex={startStepIndex} | ||
stepNames={stepNames} | ||
/> | ||
</View> | ||
)} | ||
{children} | ||
</ScreenWrapper> | ||
); | ||
} | ||
|
||
InteractiveStepWrapper.displayName = 'InteractiveStepWrapper'; | ||
|
||
export default InteractiveStepWrapper; |
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 | ||
---|---|---|---|---|
|
@@ -8,6 +8,7 @@ | |||
AlreadySignedInParams, | ||||
ApprovalWorkflowErrorParams, | ||||
ApprovedAmountParams, | ||||
AssignCardParams, | ||||
BeginningOfChatHistoryAdminRoomPartOneParams, | ||||
BeginningOfChatHistoryAnnounceRoomPartOneParams, | ||||
BeginningOfChatHistoryAnnounceRoomPartTwo, | ||||
|
@@ -2839,6 +2840,24 @@ | |||
assignCard: 'Asignar tarjeta', | ||||
cardNumber: 'Número de la tarjeta', | ||||
customFeed: 'Fuente personalizada', | ||||
assignCard: 'Asignar tarjeta', | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
whoNeedsCardAssigned: '¿Quién necesita una tarjeta?', | ||||
chooseCard: 'Elige una tarjeta', | ||||
chooseCardFor: ({assignee, feed}: AssignCardParams) => `Elige una tarjeta para ${assignee} del feed de tarjetas ${feed}.`, | ||||
noActiveCards: 'No hay tarjetas activas en este feed', | ||||
somethingMightBeBroken: 'O algo podría estar roto. De cualquier manera, si tienes alguna pregunta,', | ||||
contactConcierge: 'contacta a Concierge', | ||||
chooseTransactionStartDate: 'Elige una fecha de inicio de transacciones', | ||||
startDateDescription: 'Importaremos todas las transacciones desde esta fecha en adelante. Si no se especifica una fecha, iremos tan atrás como lo permita tu banco.', | ||||
fromTheBeginning: 'Desde el principio', | ||||
customStartDate: 'Fecha de inicio personalizada', | ||||
letsDoubleCheck: 'Verifiquemos que todo esté bien.', | ||||
confirmationDescription: 'Comenzaremos a importar transacciones inmediatamente.', | ||||
cardholder: 'Titular de la tarjeta', | ||||
card: 'Tarjeta', | ||||
startTransactionDate: 'Fecha de inicio de transacciones', | ||||
cardName: 'Nombre de la tarjeta', | ||||
assignedYouCard: (assigner: string) => `¡${assigner} te ha asignado una tarjeta de empresa! Las transacciones importadas aparecerán en este chat.`, | ||||
}, | ||||
expensifyCard: { | ||||
issueAndManageCards: 'Emitir y gestionar Tarjetas Expensify', | ||||
|
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.