fix: use correct Ticket type properties in verification page
Fix property access to match the Ticket type definition: - ticket.user_name → ticket.user?.firstName + lastName - ticket.user_email → ticket.user?.email - ticket.prize_name → ticket.prize?.name - ticket.played_at → ticket.playedAt The Ticket type uses camelCase and nested objects (user, prize), not snake_case flat properties. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7f04ae5eca
commit
ecdfb826be
|
|
@ -230,17 +230,17 @@ export default function EmployeeVerificationPage() {
|
||||||
<td className="px-6 py-4">
|
<td className="px-6 py-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="text-sm font-medium text-gray-900">
|
<div className="text-sm font-medium text-gray-900">
|
||||||
{ticket.user_name || 'N/A'}
|
{ticket.user ? `${ticket.user.firstName} ${ticket.user.lastName}` : 'N/A'}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm text-gray-500">
|
<div className="text-sm text-gray-500">
|
||||||
{ticket.user_email || 'N/A'}
|
{ticket.user?.email || 'N/A'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-6 py-4">
|
<td className="px-6 py-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="text-sm font-medium text-gray-900">
|
<div className="text-sm font-medium text-gray-900">
|
||||||
{ticket.prize_name || 'N/A'}
|
{ticket.prize?.name || 'N/A'}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-gray-500">
|
<div className="text-xs text-gray-500">
|
||||||
Code: {ticket.code}
|
Code: {ticket.code}
|
||||||
|
|
@ -248,8 +248,8 @@ export default function EmployeeVerificationPage() {
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||||
{ticket.played_at
|
{ticket.playedAt
|
||||||
? new Date(ticket.played_at).toLocaleDateString('fr-FR')
|
? new Date(ticket.playedAt).toLocaleDateString('fr-FR')
|
||||||
: 'N/A'}
|
: 'N/A'}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user