Skip to content

Commit a94a603

Browse files
authored
Merge pull request Expensify#82597 from TaduJR/feat-Add-back-withdrawal-status-column-to-group-by-withdrawal
feat: Add back withdrawal status column to group-by:withdrawal
2 parents c6e6b14 + df09261 commit a94a603

16 files changed

Lines changed: 45 additions & 12 deletions

File tree

src/CONST/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7136,8 +7136,9 @@ const CONST = {
71367136
TOTAL: this.TABLE_COLUMNS.GROUP_TOTAL,
71377137
},
71387138
WITHDRAWAL_ID: {
7139-
BANK_ACCOUNT: this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
71407139
WITHDRAWN: this.TABLE_COLUMNS.GROUP_WITHDRAWN,
7140+
WITHDRAWAL_STATUS: this.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS,
7141+
BANK_ACCOUNT: this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
71417142
WITHDRAWAL_ID: this.TABLE_COLUMNS.GROUP_WITHDRAWAL_ID,
71427143
EXPENSES: this.TABLE_COLUMNS.GROUP_EXPENSES,
71437144
TOTAL: this.TABLE_COLUMNS.GROUP_TOTAL,
@@ -7212,8 +7213,9 @@ const CONST = {
72127213
FROM: [this.TABLE_COLUMNS.GROUP_FROM, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
72137214
CARD: [this.TABLE_COLUMNS.GROUP_CARD, this.TABLE_COLUMNS.GROUP_FEED, this.TABLE_COLUMNS.GROUP_EXPENSES, this.TABLE_COLUMNS.GROUP_TOTAL],
72147215
WITHDRAWAL_ID: [
7215-
this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
72167216
this.TABLE_COLUMNS.GROUP_WITHDRAWN,
7217+
this.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS,
7218+
this.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
72177219
this.TABLE_COLUMNS.GROUP_WITHDRAWAL_ID,
72187220
this.TABLE_COLUMNS.GROUP_EXPENSES,
72197221
this.TABLE_COLUMNS.GROUP_TOTAL,
@@ -7327,6 +7329,7 @@ const CONST = {
73277329
GROUP_WEEK: 'groupweek',
73287330
GROUP_YEAR: 'groupyear',
73297331
GROUP_QUARTER: 'groupquarter',
7332+
GROUP_WITHDRAWAL_STATUS: 'groupWithdrawalStatus',
73307333
},
73317334
SYNTAX_OPERATORS: {
73327335
AND: 'and',
@@ -7525,6 +7528,7 @@ const CONST = {
75257528
[this.TABLE_COLUMNS.GROUP_WEEK]: 'group-week',
75267529
[this.TABLE_COLUMNS.GROUP_YEAR]: 'group-year',
75277530
[this.TABLE_COLUMNS.GROUP_QUARTER]: 'group-quarter',
7531+
[this.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS]: 'group-withdrawal-status',
75287532
};
75297533
},
75307534
NOT_MODIFIER: 'Not',

src/components/SelectionListWithSections/Search/StatusCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function StatusCell({stateNum, statusNum, isPending}: StatusCellProps) {
4444
}
4545

4646
return (
47-
<View style={[styles.w100, styles.justifyContentCenter, isPending && styles.offlineFeedbackPending]}>
47+
<View style={[styles.justifyContentCenter, styles.alignItemsCenter, isPending && styles.offlineFeedbackPending]}>
4848
<View style={[styles.reportStatusContainer, backgroundColorStyle]}>
4949
<Text style={[styles.reportStatusText, textColorStyle]}>{statusText}</Text>
5050
</View>

src/components/SelectionListWithSections/Search/WithdrawalIDListItemHeader.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ function WithdrawalIDListItemHeader<TItem extends ListItem>({
8383
);
8484
const badgeProps = getSettlementStatusBadgeProps(withdrawalIDItem.state, translate, theme);
8585
const settlementStatus = getSettlementStatus(withdrawalIDItem.state);
86+
const statusBadge = !!badgeProps && (
87+
<View style={[styles.reportStatusContainer, badgeProps.badgeStyles]}>
88+
<Text style={[styles.reportStatusText, badgeProps.textStyles]}>{badgeProps.text}</Text>
89+
</View>
90+
);
8691
const withdrawalInfoText = translate('settlement.withdrawalInfo', {date: formattedWithdrawalDate, withdrawalID: withdrawalIDItem.entryID});
8792

8893
const failedErrorHTML =
@@ -116,6 +121,14 @@ function WithdrawalIDListItemHeader<TItem extends ListItem>({
116121
/>
117122
</View>
118123
),
124+
[CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS]: (
125+
<View
126+
key={CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS}
127+
style={StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS)}
128+
>
129+
{statusBadge}
130+
</View>
131+
),
119132
[CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_ID]: (
120133
<View
121134
key={CONST.SEARCH.TABLE_COLUMNS.WITHDRAWAL_ID}
@@ -175,11 +188,7 @@ function WithdrawalIDListItemHeader<TItem extends ListItem>({
175188
style={[styles.optionDisplayName, styles.sidebarLinkTextBold, styles.pre, styles.fontWeightNormal]}
176189
/>
177190
<View style={[styles.flexRow, styles.alignItemsCenter, styles.gap1]}>
178-
{!!badgeProps && (
179-
<View style={[styles.reportStatusContainer, badgeProps.badgeStyles]}>
180-
<Text style={[styles.reportStatusText, badgeProps.textStyles]}>{badgeProps.text}</Text>
181-
</View>
182-
)}
191+
{statusBadge}
183192
<TextWithTooltip
184193
text={withdrawalInfoText}
185194
style={[styles.textLabelSupporting, styles.lh16, styles.pre]}

src/components/SelectionListWithSections/SearchTableHeader.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,18 @@ const getTransactionGroupHeaders = (groupBy: SearchGroupBy, icons: SearchHeaderI
314314
icon: icons.Bank,
315315
isColumnSortable: false,
316316
},
317-
{
318-
columnName: CONST.SEARCH.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
319-
translationKey: 'common.bankAccount',
320-
},
321317
{
322318
columnName: CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWN,
323319
translationKey: 'search.filters.withdrawn',
324320
},
321+
{
322+
columnName: CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_STATUS,
323+
translationKey: 'common.withdrawalStatus',
324+
},
325+
{
326+
columnName: CONST.SEARCH.TABLE_COLUMNS.GROUP_BANK_ACCOUNT,
327+
translationKey: 'common.bankAccount',
328+
},
325329
{
326330
columnName: CONST.SEARCH.TABLE_COLUMNS.GROUP_WITHDRAWAL_ID,
327331
translationKey: 'common.withdrawalID',

src/languages/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ const translations: TranslationDeepObject<typeof en> = {
436436
reportID: 'Berichts-ID',
437437
longReportID: 'Langer Bericht-ID',
438438
withdrawalID: 'Auszahlungs-ID',
439+
withdrawalStatus: 'Auszahlungsstatus',
439440
bankAccounts: 'Bankkonten',
440441
chooseFile: 'Datei auswählen',
441442
chooseFiles: 'Dateien auswählen',

src/languages/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ const translations = {
450450
reportID: 'Report ID',
451451
longReportID: 'Long Report ID',
452452
withdrawalID: 'Withdrawal ID',
453+
withdrawalStatus: 'Withdrawal status',
453454
bankAccounts: 'Bank accounts',
454455
chooseFile: 'Choose file',
455456
chooseFiles: 'Choose files',

src/languages/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ const translations: TranslationDeepObject<typeof en> = {
306306
reportID: 'ID del informe',
307307
longReportID: 'ID de informe largo',
308308
withdrawalID: 'ID de retiro',
309+
withdrawalStatus: 'Estado de retiro',
309310
bankAccounts: 'Cuentas bancarias',
310311
chooseFile: 'Elegir archivo',
311312
chooseFiles: 'Elegir archivos',

src/languages/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ const translations: TranslationDeepObject<typeof en> = {
435435
reportID: 'ID de note de frais',
436436
longReportID: 'ID de note de frais longue',
437437
withdrawalID: 'ID de retrait',
438+
withdrawalStatus: 'Statut de retrait',
438439
bankAccounts: 'Comptes bancaires',
439440
chooseFile: 'Choisir un fichier',
440441
chooseFiles: 'Choisir des fichiers',

src/languages/it.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ const translations: TranslationDeepObject<typeof en> = {
436436
reportID: 'ID report',
437437
longReportID: 'ID report dettagliato',
438438
withdrawalID: 'ID prelievo',
439+
withdrawalStatus: 'Stato del prelievo',
439440
bankAccounts: 'Conti bancari',
440441
chooseFile: 'Scegli file',
441442
chooseFiles: 'Scegli file',

src/languages/ja.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ const translations: TranslationDeepObject<typeof en> = {
435435
reportID: 'レポートID',
436436
longReportID: '長いレポートID',
437437
withdrawalID: '出金ID',
438+
withdrawalStatus: '出金ステータス',
438439
bankAccounts: '銀行口座',
439440
chooseFile: 'ファイルを選択',
440441
chooseFiles: 'ファイルを選択',

0 commit comments

Comments
 (0)