RoomPrices - Added Admin Panel
CI / Docker Lint (push) Successful in 51s

This commit is contained in:
2025-12-08 20:57:31 +01:00
parent 2adaffeba9
commit 3b8a14a9b3
9 changed files with 379 additions and 3 deletions
@@ -0,0 +1,47 @@
{# templates/admin/room_category_bed_type_admin/category_view.html.twig #}
{% extends '@EasyAdmin/page/content.html.twig' %}
{% block content_title 'Room Prices' %}
{% block main %}
<div class="row justify-content-between mb-4">
<div class="col">
<h3>{{categoryData.name}}</h3>
</div>
<div class="col">
<a class="btn btn-primary" href="{{ path('admin_roomPrice_prices_create', { categoryId: categoryData.id }) }}">
Add Price
</a>
</div>
</div>
<div class="mb-4">
{{ form(searchForm) }}
</div>
<table class="table datagrid {{ roomPriceList is empty ? 'datagrid-empty' }}">
<thead>
<tr>
<td>Date</td>
<td>Guest Num</td>
<td>Amount</td>
<td>Actions</td>
</tr>
</thead>
<tbody>
{% for price in roomPriceList %}
<tr>
<td>{{price.date |date('d-m-Y')}}</td>
<td>{{price.guestNumber}}</td>
<td>{{price.price / 100}}</td>
<td>
<a class="btn btn-secondary" href="{{ path('admin_roomPrice_prices_remove', {
categoryId: price.roomCategory.id,
date: price.date |date('Y-m-d'),
guestNumber: price.guestNumber})
}}">
Remove
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}