wip: integrate with bpn-connect for admin crud, calendars
This commit is contained in:
1 parent
90b0726f0d
commit
f0b68b2cc4
12 files changed
+481
-35
No files matched your search
@@ -0,0 +1 @@
|
||||
<twig:calendar :accommodation="accommodation" :startMonth="startMonth ?? null"/>
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
<hr class="my-8">
|
||||
|
||||
<twig:calendar :accommodation="accommodation"/>
|
||||
|
||||
<hr class="my-8">
|
||||
|
||||
<h2 class="text-xl font-bold">
|
||||
Preise
|
||||
</h2>
|
||||
@@ -41,7 +45,7 @@
|
||||
Preis pro Nacht
|
||||
</th>
|
||||
<th>
|
||||
Preise weitere Person
|
||||
Preis weitere Person
|
||||
</th>
|
||||
<th>
|
||||
Mindestbelegung (Nächte)
|
||||
@@ -95,7 +99,7 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<td colspan="7" class="text-center">
|
||||
Keine Daten
|
||||
</td>
|
||||
</tr>
|
||||
@@ -165,7 +169,7 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<td colspan="5" class="text-center">
|
||||
Keine Daten
|
||||
</td>
|
||||
</tr>
|
||||
@@ -241,7 +245,7 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<td colspan="6" class="text-center">
|
||||
Keine Daten
|
||||
</td>
|
||||
</tr>
|
||||
@@ -256,9 +260,9 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<hr class="my-8">
|
||||
{% if cmsData is defined and cmsData.success is true %}
|
||||
<hr class="my-8">
|
||||
|
||||
{% if cmsData is defined %}
|
||||
<h2 class="text-xl font-bold">
|
||||
CMS-Daten
|
||||
</h2>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<td colspan="5" class="text-center">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
@@ -64,8 +64,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<a href="{{ path('app_admin_accommodation_create') }}" class="button button--primary button--small">
|
||||
<button type="button"
|
||||
hx-get="{{ path('app_admin_accommodation_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend"
|
||||
class="button button--primary button--small">
|
||||
neu
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,23 @@
|
||||
{% extends 'htmx_modal_admin.html.twig' %}
|
||||
{% form_theme form 'forms_admin.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="text-xl font-bold pb-4">
|
||||
Neues Gruppenhaus
|
||||
</div>
|
||||
{{ form_start(form) }}
|
||||
<div class="grid lg:grid-cols-2 gap-y-4 lg:gap-x-8">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.code) }}
|
||||
{{ form_row(form.minPaxSummer) }}
|
||||
{{ form_row(form.maxAdolescentAge) }}
|
||||
{{ form_row(form.currency) }}
|
||||
</div>
|
||||
<div class="flex justify-end pt-8">
|
||||
<button type="submit" class="button button--primary button--small">
|
||||
speichern
|
||||
</button>
|
||||
</div>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,56 @@
|
||||
<div class="flex justify-around items-center gap-6 mb-4 text-sm text-gray-600">
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-3 h-3 rounded-full bg-blue-500"></span> Preiskonfigurationen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-3 h-3 rounded-full bg-green-500"></span> Verpflegungsleistungen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-3 h-3 rounded-full bg-amber-500"></span> optionale Zusatzleistungen
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5">
|
||||
<span class="inline-block w-3 h-3 rounded-full bg-red-500"></span> Buchungsstopp
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-3 gap-8">
|
||||
{% for month in months %}
|
||||
<div>
|
||||
<div class="text-sm font-semibold text-center mb-2">{{ month.label }}</div>
|
||||
|
||||
<div class="grid grid-cols-7 rounded-md overflow-hidden ring-1 ring-gray-300">
|
||||
{% for header in ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] %}
|
||||
<div class="text-center text-xs text-gray-400 font-medium py-1 bg-gray-50 border-r border-b border-gray-200">{{ header }}</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if month.firstDow > 0 %}
|
||||
{% for i in 1..month.firstDow %}
|
||||
<div class="h-8 border-r border-b border-gray-200 bg-gray-50/40"></div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% for dayNum, day in month.days %}
|
||||
<div class="{{ html_classes('h-8 flex flex-col items-center justify-between py-1 border-r border-b border-gray-200 cursor-default', { 'bg-secondary/25': day.isToday }) }}"
|
||||
{% if day.tooltip %}{{ stimulus_controller('tooltip', {'content': day.tooltip}) }}{% endif %}
|
||||
>
|
||||
<span class="text-xs text-gray-700 leading-none">{{ dayNum }}</span>
|
||||
<div class="flex gap-px">
|
||||
{% if day.hasPrice %}
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span>
|
||||
{% endif %}
|
||||
{% if day.hasBoard %}
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>
|
||||
{% endif %}
|
||||
{% if day.hasAdditional %}
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-amber-500"></span>
|
||||
{% endif %}
|
||||
{% if day.isBlocked %}
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-red-500"></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<div id="calendar-wrapper">
|
||||
<twig:calendar:grid :months="months"/>
|
||||
<div class="flex items-center justify-between mt-4">
|
||||
<button class="button button--secondary button--small"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: prevMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
← {{ prevLabel }}
|
||||
</button>
|
||||
<button class="button button--secondary button--small"
|
||||
hx-get="{{ path('app_admin_accommodation_calendar', {id: accommodation.id, month: nextMonth}) }}"
|
||||
hx-target="#calendar-wrapper"
|
||||
hx-swap="outerHTML">
|
||||
{{ nextLabel }} →
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<div id="htmx-modal"
|
||||
class="fixed inset-0 w-full h-full z-50" {{ stimulus_controller('modal') }} {{ stimulus_action('modal', 'close', 'modal-close@window') }}>
|
||||
<div class="absolute inset-0 w-full h-full bg-black/70" {{ stimulus_action('modal', 'close', 'click') }}></div>
|
||||
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 px-4 w-full max-w-3xl">
|
||||
<div class="relative bg-white py-8 rounded-md">
|
||||
<div class="flex justify-between pb-4 px-8">
|
||||
<div class="text-2xl font-bold">
|
||||
{% block title %}{% endblock %}
|
||||
</div>
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center bg-gray-200 rounded-md w-10 h-10"
|
||||
{{ stimulus_action('modal', 'close') }}>
|
||||
<svg class="w-8 h-8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="200" y1="56" x2="56" y2="200" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><line x1="200" y1="200" x2="56" y2="56" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="max-h-svh overflow-y-auto">
|
||||
<div class="px-8">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user