add admin panel
Co-authored-by: Jan-Marlon Leibl <jleibl@proton.me> Reviewed-on: #20
This commit is contained in:
31
templates/admin/customer_tickets.html.twig
Normal file
31
templates/admin/customer_tickets.html.twig
Normal file
@ -0,0 +1,31 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Ernährung</th>
|
||||
<th>Preis</th>
|
||||
<th>Anmerkung</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ticket in field.value %}
|
||||
<tr>
|
||||
<td>{{ (ticket.type | ticket)['name'] }}</td>
|
||||
<td>{{ ticket.foodType | food }}</td>
|
||||
<td>{{ (ticket.type | ticket)['price'] }}€</td>
|
||||
<td>{{ ticket.note }}</td>
|
||||
<td>
|
||||
<a href="{{ path('admin', { entity: 'App\Entity\Ticket', action: 'detail', id: ticket.id }) }}"
|
||||
class="btn btn-info btn-sm">
|
||||
View
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4" class="text-center">No Orders Found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
34
templates/admin/dashboard.html.twig
Normal file
34
templates/admin/dashboard.html.twig
Normal file
@ -0,0 +1,34 @@
|
||||
{% extends '@EasyAdmin/page/content.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Ticketwert insgesamt</h5>
|
||||
<p class="card-text">{{ totalMoney }} €</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Essens Daten</h5>
|
||||
<p class="card-text">Mit Fleisch: {{ foodData.totalMeat }}</p>
|
||||
<p class="card-text">Vegetarisch: {{ foodData.totalVegetarian }}</p>
|
||||
<p class="card-text">Vegan: {{ foodData.totalVegan }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Ticket Anzahl</h5>
|
||||
<p class="card-text">{{ totalTickets }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
58
templates/admin/login.html.twig
Normal file
58
templates/admin/login.html.twig
Normal file
@ -0,0 +1,58 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="min-h-screen flex items-center justify-center bg-[#0a0a0a] px-4 sm:px-6 lg:px-8">
|
||||
<div class="w-full max-w-[90%] sm:max-w-md">
|
||||
<div class="text-center mb-8">
|
||||
<h2 class="text-xl sm:text-2xl font-medium text-gray-200">Abiball Admin Panel</h2>
|
||||
</div>
|
||||
|
||||
{% if error %}
|
||||
{{ error.message }}
|
||||
{% endif %}
|
||||
|
||||
<form method="post" class="space-y-4 sm:space-y-6" action="{{ path('admin_login') }}">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
|
||||
<div>
|
||||
<label for="username" class="block text-sm font-medium text-gray-300">Benutzername</label>
|
||||
<div class="mt-1 relative">
|
||||
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<twig:ux:icon name="mdi:account" class="h-4 w-4 sm:h-5 sm:w-5 text-gray-500" />
|
||||
</div>
|
||||
<input type="text"
|
||||
id="username"
|
||||
name="_username"
|
||||
required
|
||||
class="block w-full pl-9 sm:pl-10 py-2 sm:py-2.5 text-sm sm:text-base bg-[#2a2a2a] border border-[#333333] text-gray-200 rounded-md focus:ring-2 focus:ring-orange-500/20 focus:border-orange-500 transition-colors"
|
||||
placeholder="username" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="password" class="block text-sm font-medium text-gray-300">Passwort</label>
|
||||
<div class="mt-1 relative">
|
||||
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
|
||||
<twig:ux:icon name="mdi:lock" class="h-4 w-4 sm:h-5 sm:w-5 text-gray-500" />
|
||||
</div>
|
||||
<input type="password"
|
||||
id="password"
|
||||
name="_password"
|
||||
required
|
||||
class="block w-full pl-9 sm:pl-10 py-2 sm:py-2.5 text-sm sm:text-base bg-[#2a2a2a] border border-[#333333] text-gray-200 rounded-md focus:ring-2 focus:ring-orange-500/20 focus:border-orange-500 transition-colors"
|
||||
placeholder="••••••••" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div>
|
||||
<button type="submit"
|
||||
class="w-full flex justify-center py-2 sm:py-2.5 px-4 text-sm sm:text-base bg-orange-500 hover:bg-orange-600 text-white font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-[#0a0a0a] focus:ring-orange-500 transition-colors">
|
||||
Anmelden
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user