add admin panel

Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me>
Reviewed-on: #20
This commit is contained in:
2025-02-09 14:59:31 +00:00
parent e3a67adf63
commit 2ccba65185
31 changed files with 1773 additions and 17 deletions

View File

@ -2,6 +2,7 @@
namespace App\Entity;
use App\Enum\TicketData;
use App\Repository\PaymentRepository;
use Doctrine\ORM\Mapping as ORM;
@ -63,4 +64,11 @@ class Payment
return $this;
}
public function getTotal(): float
{
return $this->customer->getTickets()->reduce(function (float $total, Ticket $ticket) {
return $total + TicketData::TICKET_DATA[$ticket->getType()]['price'];
}, 0);
}
}