Skip to content

Commit a38c67d

Browse files
authored
Merge pull request #91496 from nabi-ebrahimi/feature/update-duplicate-rhp-screen
Update duplicate RHP screen to match other flows
2 parents 1cf43c7 + 9e62c4a commit a38c67d

17 files changed

Lines changed: 248 additions & 102 deletions

File tree

src/components/TransactionItemRow/TransactionItemRowNarrow.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ type TransactionItemRowNarrowProps = Pick<
3131
| 'isInSingleTransactionReport'
3232
| 'shouldShowRadioButton'
3333
| 'onRadioButtonPress'
34+
| 'shouldStopRadioButtonMouseDownPropagation'
35+
| 'radioButtonContainerStyle'
36+
| 'radioButtonWrapperStyle'
3437
| 'shouldShowErrors'
3538
| 'isDisabled'
3639
| 'violations'
@@ -53,6 +56,9 @@ function TransactionItemRowNarrow({
5356
isInSingleTransactionReport = false,
5457
shouldShowRadioButton = false,
5558
onRadioButtonPress = () => {},
59+
shouldStopRadioButtonMouseDownPropagation = false,
60+
radioButtonContainerStyle,
61+
radioButtonWrapperStyle,
5662
shouldShowErrors = true,
5763
isDisabled = false,
5864
violations,
@@ -153,12 +159,14 @@ function TransactionItemRowNarrow({
153159
</View>
154160
)}
155161
{shouldShowRadioButton && (
156-
<View style={[styles.ml3, styles.justifyContentCenter]}>
162+
<View style={[styles.ml3, styles.justifyContentCenter, radioButtonContainerStyle]}>
157163
<RadioButton
158164
isChecked={isSelected}
159165
disabled={isDisabled}
160166
onPress={() => onRadioButtonPress?.(transactionItem.transactionID)}
161167
accessibilityLabel={CONST.ROLE.RADIO}
168+
shouldStopMouseDownPropagation={shouldStopRadioButtonMouseDownPropagation}
169+
style={radioButtonWrapperStyle}
162170
/>
163171
</View>
164172
)}

src/components/TransactionItemRow/TransactionItemRowWide.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ function TransactionItemRowWide({
7676
isInSingleTransactionReport = false,
7777
shouldShowRadioButton = false,
7878
onRadioButtonPress = () => {},
79+
shouldStopRadioButtonMouseDownPropagation = false,
80+
radioButtonContainerStyle,
7981
shouldShowErrors = true,
8082
isDisabled = false,
8183
violations,
@@ -592,12 +594,13 @@ function TransactionItemRowWide({
592594
)}
593595
{columns?.map(renderColumn)}
594596
{shouldShowRadioButton && (
595-
<View style={[styles.ml1, styles.justifyContentCenter]}>
597+
<View style={[styles.ml1, styles.justifyContentCenter, radioButtonContainerStyle]}>
596598
<RadioButton
597599
isChecked={isSelected}
598600
disabled={isDisabled}
599601
onPress={() => onRadioButtonPress?.(transactionItem.transactionID)}
600602
accessibilityLabel={CONST.ROLE.RADIO}
603+
shouldStopMouseDownPropagation={shouldStopRadioButtonMouseDownPropagation}
601604
/>
602605
</View>
603606
)}

src/components/TransactionItemRow/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ function TransactionItemRow({
6565
isInSingleTransactionReport = false,
6666
shouldShowRadioButton = false,
6767
onRadioButtonPress = () => {},
68+
shouldStopRadioButtonMouseDownPropagation = false,
69+
radioButtonContainerStyle,
70+
radioButtonWrapperStyle,
6871
shouldShowErrors = true,
6972
shouldHighlightItemWhenSelected = true,
7073
isDisabled = false,
@@ -147,6 +150,9 @@ function TransactionItemRow({
147150
isInSingleTransactionReport,
148151
shouldShowRadioButton,
149152
onRadioButtonPress,
153+
shouldStopRadioButtonMouseDownPropagation,
154+
radioButtonContainerStyle,
155+
radioButtonWrapperStyle,
150156
shouldShowErrors,
151157
isDisabled,
152158
violations,
@@ -193,6 +199,8 @@ function TransactionItemRow({
193199
isInSingleTransactionReport,
194200
shouldShowRadioButton,
195201
onRadioButtonPress,
202+
shouldStopRadioButtonMouseDownPropagation,
203+
radioButtonContainerStyle,
196204
shouldShowErrors,
197205
shouldHighlightItemWhenSelected,
198206
isDisabled,

src/components/TransactionItemRow/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ type TransactionItemRowProps = {
7474
isInSingleTransactionReport?: boolean;
7575
shouldShowRadioButton?: boolean;
7676
onRadioButtonPress?: (transactionID: string) => void;
77+
shouldStopRadioButtonMouseDownPropagation?: boolean;
78+
radioButtonContainerStyle?: StyleProp<ViewStyle>;
79+
radioButtonWrapperStyle?: StyleProp<ViewStyle>;
7780
shouldShowErrors?: boolean;
7881
shouldHighlightItemWhenSelected?: boolean;
7982
isDisabled?: boolean;

src/languages/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ const translations: TranslationDeepObject<typeof en> = {
15261526
someDuplicatesArePaid: 'Einige dieser Duplikate wurden bereits genehmigt oder bezahlt.',
15271527
reviewDuplicates: 'Duplikate prüfen',
15281528
keepAll: 'Alle behalten',
1529+
keepSelected: 'Auswahl behalten',
15291530
noDuplicatesTitle: 'Alles erledigt!',
15301531
noDuplicatesDescription: 'Es gibt hier keine doppelten Transaktionen zur Überprüfung.',
15311532
confirmApprove: 'Genehmigungsbetrag bestätigen',

src/languages/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,7 @@ const translations = {
15831583
someDuplicatesArePaid: 'Some of these duplicates have been approved or paid already.',
15841584
reviewDuplicates: 'Review duplicates',
15851585
keepAll: 'Keep all',
1586+
keepSelected: 'Keep selected',
15861587
noDuplicatesTitle: 'All set!',
15871588
noDuplicatesDescription: 'There are no duplicate transactions for review here.',
15881589
confirmApprove: 'Confirm approval amount',

src/languages/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,7 @@ const translations: TranslationDeepObject<typeof en> = {
14871487
someDuplicatesArePaid: 'Algunos de estos duplicados ya han sido aprobados o pagados.',
14881488
reviewDuplicates: 'Revisar duplicados',
14891489
keepAll: 'Mantener todos',
1490+
keepSelected: 'Mantener seleccionado',
14901491
noDuplicatesTitle: '¡Todo listo!',
14911492
noDuplicatesDescription: 'No hay transacciones duplicadas para revisar aquí.',
14921493
confirmApprove: 'Confirmar importe a aprobar',

src/languages/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ const translations: TranslationDeepObject<typeof en> = {
15311531
someDuplicatesArePaid: 'Certains de ces doublons ont déjà été approuvés ou payés.',
15321532
reviewDuplicates: 'Examiner les doublons',
15331533
keepAll: 'Tout garder',
1534+
keepSelected: 'Garder la sélection',
15341535
noDuplicatesTitle: 'Tout est en ordre !',
15351536
noDuplicatesDescription: "Il n'y a aucune transaction en double à vérifier ici.",
15361537
confirmApprove: 'Confirmer le montant approuvé',

src/languages/it.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,7 @@ const translations: TranslationDeepObject<typeof en> = {
15251525
someDuplicatesArePaid: 'Alcuni di questi duplicati sono già stati approvati o pagati.',
15261526
reviewDuplicates: 'Controlla duplicati',
15271527
keepAll: 'Mantieni tutto',
1528+
keepSelected: 'Mantieni selezionati',
15281529
noDuplicatesTitle: 'Tutto a posto!',
15291530
noDuplicatesDescription: 'Non ci sono transazioni duplicate da verificare qui.',
15301531
confirmApprove: 'Conferma l’importo approvato',

src/languages/ja.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,7 @@ const translations: TranslationDeepObject<typeof en> = {
15061506
someDuplicatesArePaid: 'これらの重複の一部は、すでに承認または支払い済みです。',
15071507
reviewDuplicates: '重複を確認',
15081508
keepAll: 'すべて保持',
1509+
keepSelected: '選択したものを保持',
15091510
noDuplicatesTitle: '準備完了!',
15101511
noDuplicatesDescription: '確認が必要な重複取引はありません。',
15111512
confirmApprove: '承認金額を確認',

0 commit comments

Comments
 (0)