Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/Icon/chunks/illustrations.chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import WellsFargoCompanyCardDetail from '@assets/images/companyCards/card-wellsf
import CompanyCardsEmptyStateGeneric from '@assets/images/companyCards/companycards-generic.svg';
import CompanyCardsEmptyStateUKEU from '@assets/images/companyCards/companycards-uk_eu.svg';
import CompanyCardsEmptyStateUSCA from '@assets/images/companyCards/companycards-us_ca.svg';
import CardReconciliation from '@assets/images/companyCards/emptystate__card-reconciliation.svg';
import LaptopAssignCard from '@assets/images/companyCards/emptystate__laptop-assign-card.svg';
import LaptopReviewCard from '@assets/images/companyCards/emptystate__laptop-review-card.svg';
import AmexCardCompanyCardDetailLarge from '@assets/images/companyCards/large/card-amex-large.svg';
Expand Down Expand Up @@ -252,6 +253,7 @@ const Illustrations = {
CompanyCardsEmptyStateGeneric,
CompanyCardsEmptyStateUKEU,
CompanyCardsEmptyStateUSCA,
CardReconciliation,
LaptopAssignCard,
LaptopReviewCard,
ExpensifyCardCoins,
Expand Down
14 changes: 9 additions & 5 deletions src/components/Tables/WorkspaceCompanyCardsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function WorkspaceCompanyCardsTable({
} = companyCards;

const {cardFeedErrors} = useCardFeedErrors();
const illustrations = useMemoizedLazyIllustrations(['LaptopAssignCard', 'BrokenMagnifyingGlass']);
const illustrations = useMemoizedLazyIllustrations(['LaptopAssignCard', 'BrokenMagnifyingGlass', 'CardReconciliation']);
const isFeedConnectionBroken = feedName ? cardFeedErrors[feedName]?.isFeedConnectionBroken : false;

const [countryByIp] = useOnyx(ONYXKEYS.COUNTRY);
Expand Down Expand Up @@ -156,6 +156,8 @@ function WorkspaceCompanyCardsTable({
// If we already have fetched cards, then do not show a loading spinner (let the remaining updates refresh in the background), else show it
const hasCards = (companyCardEntries ?? []).length > 0;

const isImportProcessing = !hasCards && !!selectedFeed?.importStartedAt;

const isLoadingOnyxCardList = !hasCards && isLoadingOnyxValue(cardListMetadata);
const isLoadingOnyxPersonalDetails = isLoadingOnyxValue(personalDetailsMetadata);
const isLoadingOnyxFeed = !isNoFeed && isLoadingOnyxValue(lastSelectedFeedMetadata) && !hasOnceLoadedSelectedFeed;
Expand Down Expand Up @@ -455,12 +457,14 @@ function WorkspaceCompanyCardsTable({
) : (
<>
<Table.EmptyState
headerMedia={illustrations.LaptopAssignCard}
headerMedia={isImportProcessing ? illustrations.CardReconciliation : illustrations.LaptopAssignCard}
containerStyles={styles.mt5}
headerStyles={styles.emptyStateCardIllustrationContainer}
headerContentStyles={styles.pendingStateCardIllustration}
title={translate('workspace.moreFeatures.companyCards.emptyAddedFeedTitle')}
subtitle={translate('workspace.moreFeatures.companyCards.emptyAddedFeedDescription')}
headerContentStyles={isImportProcessing ? styles.cardReconciliationIllustration : styles.pendingStateCardIllustration}
title={translate(isImportProcessing ? 'workspace.moreFeatures.companyCards.importingCardsTitle' : 'workspace.moreFeatures.companyCards.emptyAddedFeedTitle')}
subtitle={translate(
isImportProcessing ? 'workspace.moreFeatures.companyCards.importingCardsDescription' : 'workspace.moreFeatures.companyCards.emptyAddedFeedDescription',
)}
>
{!!shouldShowGBDisclaimer && <Text style={[styles.textMicroSupporting, styles.m5]}>{translate('workspace.companyCards.ukRegulation')}</Text>}
</Table.EmptyState>
Expand Down
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6230,6 +6230,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
setTransactionLiabilityDescription: 'Wenn aktiviert, können Karteninhaber Kartentransaktionen löschen. Neue Transaktionen folgen dieser Regel.',
emptyAddedFeedTitle: 'Keine Karten in diesem Feed',
emptyAddedFeedDescription: 'Stelle sicher, dass sich Karten im Kartenfeed deiner Bank befinden.',
importingCardsTitle: 'Karten werden gleich angezeigt …',
importingCardsDescription: 'Bitte haben Sie etwas Geduld, neue Karten und Transaktionen können einige Minuten benötigen, bis sie erscheinen.',
pendingFeedTitle: `Wir überprüfen Ihre Anfrage …`,
pendingFeedDescription: `Wir überprüfen gerade Ihre Feed-Details. Sobald das erledigt ist, melden wir uns bei Ihnen über`,
pendingBankTitle: 'Überprüfe dein Browserfenster',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6318,6 +6318,8 @@ const translations = {
setTransactionLiabilityDescription: 'When enabled, cardholders can delete card transactions. New transactions will follow this rule.',
emptyAddedFeedTitle: 'No cards in this feed',
emptyAddedFeedDescription: "Make sure there are cards in your bank's card feed.",
importingCardsTitle: 'Cards will appear in a moment...',
importingCardsDescription: 'Hang tight, new cards and transactions may take a few minutes to appear.',
pendingFeedTitle: `We're reviewing your request...`,
pendingFeedDescription: `We're currently reviewing your feed details. Once that's done, we'll reach out to you via`,
pendingBankTitle: 'Check your browser window',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6070,6 +6070,8 @@ ${amount} para ${merchant} - ${date}`,
'Cuando está habilitada, los titulares de tarjetas pueden eliminar transacciones con tarjeta. Las transacciones nuevas seguirán esta regla.',
emptyAddedFeedTitle: 'Asignar tarjetas de empresa',
emptyAddedFeedDescription: 'Comienza asignando tu primera tarjeta a un miembro.',
importingCardsTitle: 'Las tarjetas aparecerán en un momento...',
importingCardsDescription: 'Un momento, las nuevas tarjetas y transacciones pueden tardar unos minutos en aparecer.',
pendingFeedTitle: `Estamos revisando tu solicitud...`,
pendingFeedDescription: `Actualmente estamos revisando los detalles de tu feed. Una vez hecho esto, nos pondremos en contacto contigo a través de`,
pendingBankTitle: 'Comprueba la ventana de tu navegador',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6253,6 +6253,8 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
'Lorsque cette option est activée, les titulaires de carte peuvent supprimer les transactions de carte. Les nouvelles transactions suivront cette règle.',
emptyAddedFeedTitle: 'Aucune carte dans ce flux',
emptyAddedFeedDescription: 'Assurez-vous qu’il y a des cartes dans le flux de cartes de votre banque.',
importingCardsTitle: 'Les cartes vont apparaître dans un instant...',
importingCardsDescription: 'Veuillez patienter, l’apparition de nouvelles cartes et transactions peut prendre quelques minutes.',
pendingFeedTitle: `Nous examinons votre demande...`,
pendingFeedDescription: `Nous examinons actuellement les détails de votre flux. Une fois cela terminé, nous vous contacterons via`,
pendingBankTitle: 'Vérifiez la fenêtre de votre navigateur',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6208,6 +6208,8 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
setTransactionLiabilityDescription: 'Quando è abilitato, i titolari della carta possono eliminare le transazioni della carta. Le nuove transazioni seguiranno questa regola.',
emptyAddedFeedTitle: 'Nessuna carta in questo feed',
emptyAddedFeedDescription: 'Assicurati che ci siano carte nel flusso di carte della tua banca.',
importingCardsTitle: 'Le carte appariranno tra un momento...',
importingCardsDescription: 'Attendi, le nuove carte e transazioni potrebbero impiegare qualche minuto per apparire.',
pendingFeedTitle: `Stiamo esaminando la tua richiesta...`,
pendingFeedDescription: `Al momento stiamo esaminando i dettagli del tuo feed. Una volta terminato, ti contatteremo tramite`,
pendingBankTitle: 'Controlla la finestra del browser',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6129,6 +6129,8 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
setTransactionLiabilityDescription: '有効にすると、カード保有者はカード取引を削除できるようになります。新しい取引にもこのルールが適用されます。',
emptyAddedFeedTitle: 'このフィードにはカードがありません',
emptyAddedFeedDescription: '銀行のカード明細フィードにカードが含まれていることを確認してください。',
importingCardsTitle: 'まもなくカードが表示されます…',
importingCardsDescription: 'しばらくお待ちください。新しいカードや取引が表示されるまでに数分かかる場合があります。',
pendingFeedTitle: `リクエストを確認しています…`,
pendingFeedDescription: `現在、お客さまのフィードの詳細を確認しています。完了し次第、次の方法でご連絡します:`,
pendingBankTitle: 'ブラウザウィンドウを確認してください',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6195,6 +6195,8 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
setTransactionLiabilityDescription: 'Indien ingeschakeld kunnen kaarthouders kaarttransacties verwijderen. Nieuwe transacties zullen deze regel volgen.',
emptyAddedFeedTitle: 'Geen kaarten in deze feed',
emptyAddedFeedDescription: 'Controleer of er kaarten in de kaartfeed van je bank staan.',
importingCardsTitle: 'Kaarten verschijnen zo...',
importingCardsDescription: 'Even geduld, het kan een paar minuten duren voordat nieuwe kaarten en transacties verschijnen.',
pendingFeedTitle: `We beoordelen je aanvraag...`,
pendingFeedDescription: `We beoordelen momenteel je feedgegevens. Zodra dat klaar is, nemen we contact met je op via`,
pendingBankTitle: 'Controleer je browservenster',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6175,6 +6175,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
setTransactionLiabilityDescription: 'Po włączeniu posiadacze kart mogą usuwać transakcje kartą. Nowe transakcje będą podlegać tej zasadzie.',
emptyAddedFeedTitle: 'Brak kart w tym kanale',
emptyAddedFeedDescription: 'Upewnij się, że w strumieniu kart Twojego banku znajdują się karty.',
importingCardsTitle: 'Karty pojawią się za chwilę…',
importingCardsDescription: 'Prosimy o cierpliwość, nowe karty i transakcje mogą pojawić się dopiero za kilka minut.',
pendingFeedTitle: `Przeglądamy Twoje zgłoszenie…`,
pendingFeedDescription: `Aktualnie sprawdzamy szczegóły Twojego kanału. Gdy skończymy, skontaktujemy się z Tobą przez`,
pendingBankTitle: 'Sprawdź okno przeglądarki',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6193,6 +6193,8 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
setTransactionLiabilityDescription: 'Quando ativado, titulares de cartão podem excluir transações do cartão. Novas transações seguirão esta regra.',
emptyAddedFeedTitle: 'Nenhum cartão neste feed',
emptyAddedFeedDescription: 'Verifique se há cartões no feed de cartões do seu banco.',
importingCardsTitle: 'Os cartões aparecerão em instantes...',
importingCardsDescription: 'Aguarde um momento, novos cartões e transações podem levar alguns minutos para aparecer.',
pendingFeedTitle: `Estamos analisando sua solicitação...`,
pendingFeedDescription: `No momento, estamos analisando os detalhes do seu feed. Quando isso for concluído, entraremos em contato com você por meio de`,
pendingBankTitle: 'Verifique a janela do seu navegador',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5996,6 +5996,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
setTransactionLiabilityDescription: '启用后,持卡人可以删除卡片交易。新的交易将遵循此规则。',
emptyAddedFeedTitle: '此订阅源中没有卡片',
emptyAddedFeedDescription: '请确保在您银行的卡片交易流水中有可用的卡片。',
importingCardsTitle: '卡片马上就会显示…',
importingCardsDescription: '请耐心等待,新卡片和交易可能需要几分钟才会显示。',
pendingFeedTitle: `我们正在审核你的请求…`,
pendingFeedDescription: `我们目前正在审核您的导入信息。完成后,我们将通过以下方式与您联系:`,
pendingBankTitle: '检查你的浏览器窗口',
Expand Down
5 changes: 5 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5766,6 +5766,11 @@ const staticStyles = (theme: ThemeColors) =>
height: 162,
},

cardReconciliationIllustration: {
width: variables.cardReconciliationIllustrationWidth,
height: variables.cardReconciliationIllustrationHeight,
},

computerIllustrationContainer: {
width: 272,
height: 188,
Expand Down
2 changes: 2 additions & 0 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ export default {
agentsRulesEmptyStateIllustrationWidth: 268,
agentsRulesEmptyStateIllustrationHeight: 194,
cardRulesEmptyStateMaxWidth: 496,
cardReconciliationIllustrationWidth: 168,
cardReconciliationIllustrationHeight: 156,
expensifyCardEmptyIllustrationWidth: 280,
expensifyCardEmptyIllustrationHeight: 172,
rulesNewMenuItemMinHeight: 84,
Expand Down
3 changes: 3 additions & 0 deletions src/types/onyx/CardFeeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ type CustomCardFeedData = OnyxCommon.OnyxValueWithOfflineFeedback<{
/** Whether any actions are pending */
pending?: boolean;

/** Microsecond timestamp of when a CSV import for this feed started */
importStartedAt?: number;

/** Determines if Automated Statement Reconciliation (ASR) is enabled for the cards */
asrEnabled?: boolean;

Expand Down
Loading
Loading