From fc145bf85f845f75e11614ed15b7c5b7120a2852 Mon Sep 17 00:00:00 2001 From: FinnIckler Date: Mon, 25 Nov 2024 11:03:45 +0100 Subject: [PATCH] Don't show users as unpaid if one of their payment attempts succeeded (#10290) * use has_paid when determining tooltip * only show successful transaction for refund * revert changes to payment_controller --- .../RegistrationAdministration/AdministrationTableRow.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/webpacker/components/RegistrationsV2/RegistrationAdministration/AdministrationTableRow.jsx b/app/webpacker/components/RegistrationsV2/RegistrationAdministration/AdministrationTableRow.jsx index 23c7ec5a46..55fb74d232 100644 --- a/app/webpacker/components/RegistrationsV2/RegistrationAdministration/AdministrationTableRow.jsx +++ b/app/webpacker/components/RegistrationsV2/RegistrationAdministration/AdministrationTableRow.jsx @@ -21,7 +21,7 @@ import { countries } from '../../../lib/wca-data.js.erb'; const truncateComment = (comment) => (comment?.length > 12 ? `${comment.slice(0, 12)}...` : comment); function RegistrationTime({ - timestamp, registeredOn, paymentStatuses, paidOn, usesPaymentIntegration, + timestamp, registeredOn, paymentStatuses, hasPaid, paidOn, usesPaymentIntegration, }) { if (timestamp) { return getRegistrationTimestamp(paidOn ?? registeredOn); @@ -29,7 +29,7 @@ function RegistrationTime({ const mostRecentPaymentStatus = paymentStatuses ? paymentStatuses[0] : 'unpaid'; - if (usesPaymentIntegration && mostRecentPaymentStatus !== 'succeeded') { + if (usesPaymentIntegration && !hasPaid) { let content = i18n.t('registrations.list.payment_requested_on', { date: getRegistrationTimestamp(registeredOn) }); let trigger = {i18n.t('registrations.list.not_paid')}; @@ -151,6 +151,7 @@ export default function TableRow({