Skip to content

Commit

Permalink
Add payment method column
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrine-ds committed Dec 16, 2024
1 parent 7d877b6 commit f08ec2e
Show file tree
Hide file tree
Showing 19 changed files with 1,279 additions and 419 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export const MerchantProfilePaymentArea = ({ params, large }: Props) => {
items={payments?.edges.map(item => item.node) ?? []}
render={(item, large) => (
<MerchantProfilePaymentDetail
paymentLinkId={item.paymentLinkId}
paymentLinkId={item.paymentLink?.id}
paymentId={item.id}
large={large}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const MerchantProfilePaymentDetailView = ({
render={() =>
isNotNullish(payment.threeDS) ? (
<LakeText variant="regular" color={colors.gray[900]}>
{payment.threeDS.statusInfo}
{payment.threeDS.statusInfo.status}
</LakeText>
) : (
UNKNOWN_VALUE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ const formatPaymentMethodsName = (paymentMethodType: MerchantPaymentMethodType)
return match(paymentMethodType)
.with("Card", () => t("merchantProfile.paymentLink.paymentMethod.card"))
.with(P.union("SepaDirectDebitB2b", "SepaDirectDebitCore"), () =>
t("merchantProfile.paymentLink.paymentMethod.SepaDirectDebit"),
t("merchantProfile.paymentLink.paymentMethod.sepaDirectDebit"),
)
.with("Check", () => t("merchantProfile.paymentLink.paymentMethod.checks"))
.with("Check", () => t("merchantProfile.paymentLink.paymentMethod.check"))
.with(P.union("InternalDirectDebitB2b", "InternalDirectDebitStandard"), () =>
t("merchantProfile.paymentLink.paymentMethod.internalDirectDebit"),
)
Expand Down
26 changes: 24 additions & 2 deletions clients/banking/src/components/MerchantProfilePaymentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,28 @@ const columns: ColumnConfig<MerchantPaymentFragment, ExtraInfo>[] = [
</View>
),
},
{
id: "paymentMethod",
width: 200,
title: t("merchantProfile.payments.paymentMethod"),
renderTitle: ({ title }) => <HeaderCell text={title} />,
renderCell: ({ item: { paymentMethod } }) => (
<Cell>
<LakeText variant="regular" color={colors.gray[900]}>
{match(paymentMethod.type)
.with("Card", () => t("merchantProfile.paymentLink.paymentMethod.card"))
.with("Check", () => t("merchantProfile.paymentLink.paymentMethod.check"))
.with("InternalDirectDebitB2b", "InternalDirectDebitStandard", () =>
t("merchantProfile.paymentLink.paymentMethod.internalDirectDebit"),
)
.with("SepaDirectDebitB2b", "SepaDirectDebitCore", () =>
t("merchantProfile.paymentLink.paymentMethod.sepaDirectDebit"),
)
.exhaustive()}
</LakeText>
</Cell>
),
},
{
id: "externalReference",
width: 200,
Expand Down Expand Up @@ -156,7 +178,7 @@ const columns: ColumnConfig<MerchantPaymentFragment, ExtraInfo>[] = [
),
},
{
width: 48,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
Expand Down Expand Up @@ -207,7 +229,7 @@ const smallColumns: ColumnConfig<MerchantPaymentFragment, ExtraInfo>[] = [
),
},
{
width: 48,
width: 40,
id: "actions",
title: "",
renderTitle: () => null,
Expand Down
14 changes: 10 additions & 4 deletions clients/banking/src/graphql/partner.gql
Original file line number Diff line number Diff line change
Expand Up @@ -2274,8 +2274,13 @@ fragment MerchantPayment on MerchantPayment {
currency
value
}
paymentMethodId
merchantProfileId
paymentMethod {
id
type
}
merchantProfile {
id
}
balance {
totalAuthorized {
currency
Expand All @@ -2302,8 +2307,9 @@ fragment MerchantPayment on MerchantPayment {
value
}
}
paymentLinkId
id
paymentLink {
id
}
reference
threeDS {
requested
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Weiterleitungen",
"merchantProfile.paymentLink.new.reference": "Referenz",
"merchantProfile.paymentLink.noResults": "Keine Zahlungslinks",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA-Lastschrift",
"merchantProfile.paymentLink.paymentMethod.card": "Karten",
"merchantProfile.paymentLink.paymentMethod.checks": "Schecks",
"merchantProfile.paymentLink.paymentMethod.card": "Karte",
"merchantProfile.paymentLink.paymentMethod.check": "Scheck",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Interne Lastschrift",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA-Lastschrift",
"merchantProfile.paymentLink.status.active": "Aktiv",
"merchantProfile.paymentLink.status.completed": "Abgeschlossen",
"merchantProfile.paymentLink.status.expired": "Abgelaufen",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Abgelehnt",
"merchantProfile.payments.list.actions": "Aktionen",
"merchantProfile.payments.list.amount": "Betrag",
"merchantProfile.payments.list.noResults": "Keine Zahlungen",
"merchantProfile.payments.newPayment.button": "Zahlung erstellen",
"merchantProfile.payments.newPayment.subtitle": "Sie sind bereit, Ihre erste Zahlung zu erstellen",
"merchantProfile.payments.newPayment.title": "Sie sind bereit zu starten!",
Expand Down
6 changes: 3 additions & 3 deletions clients/banking/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,9 @@
"merchantProfile.paymentLink.new.redirections": "Redirections",
"merchantProfile.paymentLink.new.reference": "Reference",
"merchantProfile.paymentLink.noResults": "No payment links",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA Direct Debit",
"merchantProfile.paymentLink.paymentMethod.card": "Cards",
"merchantProfile.paymentLink.paymentMethod.checks": "Checks",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA Direct Debit",
"merchantProfile.paymentLink.paymentMethod.card": "Card",
"merchantProfile.paymentLink.paymentMethod.check": "Check",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Internal Direct Debit",
"merchantProfile.paymentLink.status.active": "Active",
"merchantProfile.paymentLink.status.completed": "Completed",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Redirecciones",
"merchantProfile.paymentLink.new.reference": "Referencia",
"merchantProfile.paymentLink.noResults": "No hay enlaces de pago",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Domiciliación bancaria SEPA",
"merchantProfile.paymentLink.paymentMethod.card": "Tarjetas",
"merchantProfile.paymentLink.paymentMethod.checks": "Cheques",
"merchantProfile.paymentLink.paymentMethod.card": "Tarjeta",
"merchantProfile.paymentLink.paymentMethod.check": "Cheque",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Domiciliación bancaria interna",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Domiciliación bancaria SEPA",
"merchantProfile.paymentLink.status.active": "Activo",
"merchantProfile.paymentLink.status.completed": "Completado",
"merchantProfile.paymentLink.status.expired": "Caducada",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Rechazado",
"merchantProfile.payments.list.actions": "Acciones",
"merchantProfile.payments.list.amount": "Monto",
"merchantProfile.payments.list.noResults": "Sin pagos",
"merchantProfile.payments.newPayment.button": "Crear un pago",
"merchantProfile.payments.newPayment.subtitle": "Estás listo para crear tu primer pago",
"merchantProfile.payments.newPayment.title": "¡Estás listo para empezar!",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Uudelleenohjaukset",
"merchantProfile.paymentLink.new.reference": "Viite",
"merchantProfile.paymentLink.noResults": "Ei maksulinkkejä",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Sepan suoraveloitus",
"merchantProfile.paymentLink.paymentMethod.card": "Kortit",
"merchantProfile.paymentLink.paymentMethod.checks": "Tarkistukset",
"merchantProfile.paymentLink.paymentMethod.card": "Kortti",
"merchantProfile.paymentLink.paymentMethod.check": "Shekki",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Sisäinen suoraveloitus",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA-suoraveloitus",
"merchantProfile.paymentLink.status.active": "Aktiivinen",
"merchantProfile.paymentLink.status.completed": "Valmis",
"merchantProfile.paymentLink.status.expired": "Vanhentunut",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Hylätty",
"merchantProfile.payments.list.actions": "Toiminnot",
"merchantProfile.payments.list.amount": "Summa",
"merchantProfile.payments.list.noResults": "Ei maksuja",
"merchantProfile.payments.newPayment.button": "Luo maksu",
"merchantProfile.payments.newPayment.subtitle": "Olet valmis luomaan ensimmäisen maksusi",
"merchantProfile.payments.newPayment.title": "Olet valmis aloittamaan!",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Redirections",
"merchantProfile.paymentLink.new.reference": "Référence",
"merchantProfile.paymentLink.noResults": "Aucun lien de paiement",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Prélèvement SEPA",
"merchantProfile.paymentLink.paymentMethod.card": "Cartes",
"merchantProfile.paymentLink.paymentMethod.checks": "Chèques",
"merchantProfile.paymentLink.paymentMethod.card": "Carte",
"merchantProfile.paymentLink.paymentMethod.check": "Chèque",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Prélèvement interne",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Prélèvement SEPA",
"merchantProfile.paymentLink.status.active": "Actif",
"merchantProfile.paymentLink.status.completed": "Terminé",
"merchantProfile.paymentLink.status.expired": "Expiré",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Rejeté",
"merchantProfile.payments.list.actions": "Actions",
"merchantProfile.payments.list.amount": "Montant",
"merchantProfile.payments.list.noResults": "Aucun paiement",
"merchantProfile.payments.newPayment.button": "Créer un paiement",
"merchantProfile.payments.newPayment.subtitle": "Vous êtes prêt à créer votre premier paiement",
"merchantProfile.payments.newPayment.title": "Vous êtes prêt à commencer !",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Reindirizzamenti",
"merchantProfile.paymentLink.new.reference": "Riferimento",
"merchantProfile.paymentLink.noResults": "Nessun link di pagamento",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Addebito diretto SEPA",
"merchantProfile.paymentLink.paymentMethod.card": "Carte",
"merchantProfile.paymentLink.paymentMethod.checks": "Assegni",
"merchantProfile.paymentLink.paymentMethod.card": "Carta",
"merchantProfile.paymentLink.paymentMethod.check": "Assegno",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Addebito diretto interno",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Addebito diretto SEPA",
"merchantProfile.paymentLink.status.active": "Attivo",
"merchantProfile.paymentLink.status.completed": "Completato",
"merchantProfile.paymentLink.status.expired": "Scaduta",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Rifiutato",
"merchantProfile.payments.list.actions": "Azioni",
"merchantProfile.payments.list.amount": "Importo",
"merchantProfile.payments.list.noResults": "Nessun pagamento",
"merchantProfile.payments.newPayment.button": "Crea un pagamento",
"merchantProfile.payments.newPayment.subtitle": "Sei pronto per creare il tuo primo pagamento",
"merchantProfile.payments.newPayment.title": "Sei pronto per iniziare!",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Omleidingen",
"merchantProfile.paymentLink.new.reference": "Referentie",
"merchantProfile.paymentLink.noResults": "Geen betalingslinks",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "SEPA Directe Debet",
"merchantProfile.paymentLink.paymentMethod.card": "Kaarten",
"merchantProfile.paymentLink.paymentMethod.checks": "Cheques",
"merchantProfile.paymentLink.paymentMethod.card": "Kaart",
"merchantProfile.paymentLink.paymentMethod.check": "Cheque",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Interne Directe Debet",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "SEPA Automatische Incasso",
"merchantProfile.paymentLink.status.active": "Actief",
"merchantProfile.paymentLink.status.completed": "Voltooid",
"merchantProfile.paymentLink.status.expired": "Verlopen",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Afgewezen",
"merchantProfile.payments.list.actions": "Acties",
"merchantProfile.payments.list.amount": "Bedrag",
"merchantProfile.payments.list.noResults": "Geen betalingen",
"merchantProfile.payments.newPayment.button": "Betaling maken",
"merchantProfile.payments.newPayment.subtitle": "Je bent klaar om je eerste betaling te maken",
"merchantProfile.payments.newPayment.title": "Je bent er klaar voor om te beginnen!",
Expand Down
7 changes: 4 additions & 3 deletions clients/banking/src/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@
"merchantProfile.paymentLink.new.redirections": "Redirecionamentos",
"merchantProfile.paymentLink.new.reference": "Referência",
"merchantProfile.paymentLink.noResults": "Sem links de pagamento",
"merchantProfile.paymentLink.paymentMethod.SepaDirectDebit": "Débito Direto SEPA",
"merchantProfile.paymentLink.paymentMethod.card": "Cartões",
"merchantProfile.paymentLink.paymentMethod.checks": "Cheques",
"merchantProfile.paymentLink.paymentMethod.card": "Cartão",
"merchantProfile.paymentLink.paymentMethod.check": "Cheque",
"merchantProfile.paymentLink.paymentMethod.internalDirectDebit": "Débito Direto Interno",
"merchantProfile.paymentLink.paymentMethod.sepaDirectDebit": "Débito Direto SEPA",
"merchantProfile.paymentLink.status.active": "Ativo",
"merchantProfile.paymentLink.status.completed": "Concluído",
"merchantProfile.paymentLink.status.expired": "Expirado",
Expand Down Expand Up @@ -649,6 +649,7 @@
"merchantProfile.payments.filter.status.rejected": "Rejeitado",
"merchantProfile.payments.list.actions": "Ações",
"merchantProfile.payments.list.amount": "Montante",
"merchantProfile.payments.list.noResults": "Sem pagamentos",
"merchantProfile.payments.newPayment.button": "Criar um pagamento",
"merchantProfile.payments.newPayment.subtitle": "Está pronto para criar o seu primeiro pagamento",
"merchantProfile.payments.newPayment.title": "Está pronto para começar!",
Expand Down
4 changes: 4 additions & 0 deletions scripts/graphql/dist/partner-admin-schema-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@
"ReportDocumentFile",
"ResidencePermitDocumentFile"
],
"ThreeDsStatusInfo": [
"FailedThreeDs",
"SuccessfulThreeDs"
],
"FundingLimitSettingsChangeRequestStatusInfo": [
"FundingLimitSettingsChangeRequestApprovedStatusInfo",
"FundingLimitSettingsChangeRequestPendingStatusInfo",
Expand Down
Loading

0 comments on commit f08ec2e

Please sign in to comment.