Skip to content

Commit 55d15db

Browse files
authored
Merge pull request Expensify#80974 from Expensify/vit-homePageRelease4
[Home page] [Release 4] Adding time sensitive actions for broken connections
2 parents db10c65 + fbc8899 commit 55d15db

19 files changed

Lines changed: 288 additions & 6 deletions

File tree

src/components/BaseWidgetItem.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import variables from '@styles/variables';
77
import CONST from '@src/CONST';
88
import type IconAsset from '@src/types/utils/IconAsset';
99
import Button from './Button';
10+
import type {ButtonProps} from './Button';
1011
import Icon from './Icon';
1112
import {PressableWithoutFeedback} from './Pressable';
1213
import Text from './Text';
@@ -34,9 +35,12 @@ type BaseWidgetItemProps = {
3435

3536
/** Optional: fill color for the icon (defaults to white) */
3637
iconFill?: string;
38+
39+
/** Additional props to pass to the Button component for styling control */
40+
buttonProps?: Partial<ButtonProps>;
3741
};
3842

39-
function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, onCtaPress, iconFill}: BaseWidgetItemProps) {
43+
function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, onCtaPress, iconFill, buttonProps}: BaseWidgetItemProps) {
4044
const styles = useThemeStyles();
4145
const theme = useTheme();
4246
const {shouldUseNarrowLayout} = useResponsiveLayout();
@@ -65,9 +69,11 @@ function BaseWidgetItem({icon, iconBackgroundColor, title, subtitle, ctaText, on
6569
<Button
6670
text={ctaText}
6771
onPress={onCtaPress}
68-
success
6972
small
7073
style={styles.widgetItemButton}
74+
// Prop spreading allows parent components to pass additional button styling props (e.g., danger: true, success: true)
75+
// eslint-disable-next-line react/jsx-props-no-spreading
76+
{...buttonProps}
7177
/>
7278
</View>
7379
)}

src/languages/de.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,12 @@ const translations: TranslationDeepObject<typeof en> = {
10031003
subtitle: 'Validieren Sie Ihre Karte und beginnen Sie mit dem Ausgeben.',
10041004
cta: 'Aktivieren',
10051005
},
1006+
ctaFix: 'Beheben',
1007+
fixCompanyCardConnection: {
1008+
title: ({feedName}: {feedName: string}) => (feedName ? `${feedName}-Firmenkartenverbindung reparieren` : 'Firmenkarte reparieren Verbindung der Firmenkarte reparieren'),
1009+
subtitle: 'Workspace > Unternehmenskarten',
1010+
},
1011+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName}-Verbindung reparieren`, subtitle: 'Arbeitsbereich > Buchhaltung'},
10061012
},
10071013
announcements: 'Ankündigungen',
10081014
discoverSection: {

src/languages/en.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ const translations = {
998998
timeSensitiveSection: {
999999
title: 'Time sensitive',
10001000
cta: 'Claim',
1001+
ctaFix: 'Fix',
10011002
offer50off: {
10021003
title: 'Get 50% off your first year!',
10031004
subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} remaining`,
@@ -1006,6 +1007,14 @@ const translations = {
10061007
title: 'Get 25% off your first year!',
10071008
subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'day' : 'days'} remaining`,
10081009
},
1010+
fixCompanyCardConnection: {
1011+
title: ({feedName}: {feedName: string}) => (feedName ? `Fix ${feedName} company card connection` : 'Fix company card connection'),
1012+
subtitle: 'Workspace > Company cards',
1013+
},
1014+
fixAccountingConnection: {
1015+
title: ({integrationName}: {integrationName: string}) => `Fix ${integrationName} connection`,
1016+
subtitle: 'Workspace > Accounting',
1017+
},
10091018
addShippingAddress: {
10101019
title: 'We need your shipping address',
10111020
subtitle: 'Provide an address to receive your Expensify Card.',

src/languages/es.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ const translations: TranslationDeepObject<typeof en> = {
743743
timeSensitiveSection: {
744744
title: 'Requiere atención inmediata',
745745
cta: 'Reclamar',
746+
ctaFix: 'Corrige',
746747
offer50off: {
747748
title: '¡Obtén 50% de descuento en tu primer año!',
748749
subtitle: ({formattedTime}: {formattedTime: string}) => `${formattedTime} restantes`,
@@ -751,6 +752,14 @@ const translations: TranslationDeepObject<typeof en> = {
751752
title: '¡Obtén 25% de descuento en tu primer año!',
752753
subtitle: ({days}: {days: number}) => `${days} ${days === 1 ? 'día' : 'días'} restantes`,
753754
},
755+
fixCompanyCardConnection: {
756+
title: ({feedName}: {feedName: string}) => (feedName ? `Reconectar la tarjeta corporativa de ${feedName}` : 'Reconectar la tarjeta corporativa'),
757+
subtitle: 'Espacio de trabajo > Tarjetas de empresa',
758+
},
759+
fixAccountingConnection: {
760+
title: ({integrationName}: {integrationName: string}) => `Reconectar con ${integrationName}`,
761+
subtitle: 'Espacio de trabajo > Contabilidad',
762+
},
754763
addShippingAddress: {
755764
title: 'Necesitamos tu dirección de envío',
756765
subtitle: 'Proporciona una dirección para recibir tu Tarjeta Expensify.',

src/languages/fr.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,12 @@ const translations: TranslationDeepObject<typeof en> = {
10071007
subtitle: 'Validez votre carte et commencez à dépenser.',
10081008
cta: 'Activer',
10091009
},
1010+
ctaFix: 'Corriger',
1011+
fixCompanyCardConnection: {
1012+
title: ({feedName}: {feedName: string}) => (feedName ? `Corriger la connexion de la carte d'entreprise ${feedName}` : 'Corriger la connexion de la carte entreprise'),
1013+
subtitle: 'Espace de travail > Cartes d’entreprise',
1014+
},
1015+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Corriger la connexion ${integrationName}`, subtitle: 'Espace de travail > Comptabilité'},
10101016
},
10111017
announcements: 'Annonces',
10121018
discoverSection: {

src/languages/it.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,12 @@ const translations: TranslationDeepObject<typeof en> = {
10021002
subtitle: 'Convalida la tua carta e inizia a spendere.',
10031003
cta: 'Attiva',
10041004
},
1005+
ctaFix: 'Correggi',
1006+
fixCompanyCardConnection: {
1007+
title: ({feedName}: {feedName: string}) => (feedName ? `Correggi la connessione della carta aziendale ${feedName}` : 'Correggi connessione carta aziendale'),
1008+
subtitle: 'Spazio di lavoro > Carte aziendali',
1009+
},
1010+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Correggi connessione ${integrationName}`, subtitle: 'Spazio di lavoro > Contabilità'},
10051011
},
10061012
announcements: 'Annunci',
10071013
discoverSection: {

src/languages/ja.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,12 @@ const translations: TranslationDeepObject<typeof en> = {
998998
subtitle: 'カードを認証して支出を始めましょう。',
999999
cta: '有効化',
10001000
},
1001+
ctaFix: '修正',
1002+
fixCompanyCardConnection: {
1003+
title: ({feedName}: {feedName: string}) => (feedName ? `${feedName} 会社カード接続を修正` : '法人クレジットカードの接続を修正'),
1004+
subtitle: 'ワークスペース > 会社カード',
1005+
},
1006+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `${integrationName} 接続を修正`, subtitle: 'ワークスペース > 会計'},
10011007
},
10021008
announcements: 'お知らせ',
10031009
discoverSection: {

src/languages/nl.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,12 @@ const translations: TranslationDeepObject<typeof en> = {
10021002
subtitle: 'Valideer je kaart en begin met uitgeven.',
10031003
cta: 'Activeren',
10041004
},
1005+
ctaFix: 'Repareren',
1006+
fixCompanyCardConnection: {
1007+
title: ({feedName}: {feedName: string}) => (feedName ? `Verbinding bedrijfskaart ${feedName} herstellen` : 'Verbinding van bedrijfskaart repareren'),
1008+
subtitle: 'Werkruimte > Bedrijfspassen',
1009+
},
1010+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Verbinding met ${integrationName} repareren`, subtitle: 'Werkruimte > Boekhouding'},
10051011
},
10061012
announcements: 'Aankondigingen',
10071013
discoverSection: {

src/languages/pl.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,12 @@ const translations: TranslationDeepObject<typeof en> = {
10031003
subtitle: 'Zatwierdź swoją kartę i zacznij wydawać.',
10041004
cta: 'Aktywuj',
10051005
},
1006+
ctaFix: 'Napraw',
1007+
fixCompanyCardConnection: {
1008+
title: ({feedName}: {feedName: string}) => (feedName ? `Napraw połączenie karty firmowej ${feedName}` : 'Napraw połączenie karty firmowej'),
1009+
subtitle: 'Workspace > Karty firmowe',
1010+
},
1011+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Napraw połączenie ${integrationName}`, subtitle: 'Przestrzeń robocza > Księgowość'},
10061012
},
10071013
announcements: 'Ogłoszenia',
10081014
discoverSection: {

src/languages/pt-BR.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,12 @@ const translations: TranslationDeepObject<typeof en> = {
10011001
subtitle: 'Valide seu cartão e comece a gastar.',
10021002
cta: 'Ativar',
10031003
},
1004+
ctaFix: 'Corrigir',
1005+
fixCompanyCardConnection: {
1006+
title: ({feedName}: {feedName: string}) => (feedName ? `Corrigir conexão do cartão corporativo ${feedName}` : 'Corrigir conexão do cartão corporativo'),
1007+
subtitle: 'Área de trabalho > Cartões corporativos',
1008+
},
1009+
fixAccountingConnection: {title: ({integrationName}: {integrationName: string}) => `Corrigir conexão com ${integrationName}`, subtitle: 'Espaço de trabalho > Contabilidade'},
10041010
},
10051011
announcements: 'Comunicados',
10061012
discoverSection: {

0 commit comments

Comments
 (0)