| ... | ... |
@@ -1,88 +1,99 @@ |
| 1 | 1 |
{% extends "@ContaoCore/Backend/be_page.html.twig" %}
|
| 2 | 2 |
{% block headline %}
|
| 3 |
- <span>Weinanlieferung</span> <span>Buchungsübersicht</span> |
|
| 3 |
+ <span>Weinanlieferung</span> <span>Buchungsübersicht</span> |
|
| 4 | 4 |
{% endblock %}
|
| 5 | 5 |
|
| 6 | 6 |
{% block error %}
|
| 7 | 7 |
{% endblock %}
|
| 8 | 8 |
|
| 9 | 9 |
{% block main %}
|
| 10 |
- <div id="tl_buttons"> |
|
| 11 |
- <a href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=create&rt={{ request_token }}&ref={{ ref }}" class="header_new" title="" accesskey="n" onclick="Backend.getScrollOffset()">Neu</a>
|
|
| 12 |
- </div> |
|
| 13 |
- <div class="tl_listing_container"> |
|
| 14 |
- <div> |
|
| 10 |
+ <div id="tl_buttons"> |
|
| 11 |
+ <a href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=create&rt={{ request_token }}&ref={{ ref }}" class="header_new" title="" accesskey="n" onclick="Backend.getScrollOffset()">Neu</a>
|
|
| 12 |
+ </div> |
|
| 13 |
+ <div class="tl_listing_container"> |
|
| 14 |
+ <div> |
|
| 15 | 15 |
|
| 16 |
- {% block content %}
|
|
| 17 |
- {% if days is defined and days|length %}
|
|
| 18 |
- <div class="list"> |
|
| 19 |
- {% for day,slots in days %}
|
|
| 20 |
- <h3 class="tl_folder_list px-1 text-lg text-primary mt-2">{{ day|date('d.m.Y') }}</h3>
|
|
| 21 |
- {% for time,bookings in slots %}
|
|
| 22 |
- <h3 class="tl_folder_list px-1 row u-items-center"> |
|
| 23 |
- <div class="col-2 pl-0">{{ time|date('H:i') }}</div>
|
|
| 24 |
- <div class="col-3"> |
|
| 25 |
- <div class="t-label">Verfügbare Behälterkapazität</div> |
|
| 26 |
- {{ bookings.behaelterAvailable }}
|
|
| 27 |
- </div> |
|
| 28 |
- <div class="col"> |
|
| 29 |
- <div class="t-label">Verarbeitete Sorten</div> |
|
| 30 |
- {{ bookings.sorten|join(', ') }}
|
|
| 31 |
- </div> |
|
| 32 |
- </h3> |
|
| 33 |
- <div class="bookings u-row-striped"> |
|
| 34 |
- {% for booking in bookings.items %}
|
|
| 35 |
- <div class="row u-items-center"> |
|
| 36 |
- <div class="col-1 time icon-uhr-outline"> |
|
| 37 |
- <div class="t-label">Uhrzeit</div> |
|
| 38 |
- {{ booking.slot.time|date('H:i') }}
|
|
| 39 |
- <div class="t-label">Standort</div> |
|
| 40 |
- {{ booking.standort }}
|
|
| 41 |
- </div> |
|
| 42 |
- <div class="col-3 behaelter icon-behaelter-outline"> |
|
| 43 |
- <div class="t-label">Gebuchte Behälterkapazität</div> |
|
| 44 |
- {{ booking.behaelter }}
|
|
| 45 |
- <div class="t-label">Ernteart</div> |
|
| 46 |
- {{ booking.ernteart|join(', ') }}
|
|
| 47 |
- </div> |
|
| 48 |
- <div class="col-3 behaelter icon-behaelter-outline"> |
|
| 49 |
- <div class="t-label">Anliefernde Sorten</div> |
|
| 50 |
- {{ booking.sorte|join(', ') }}
|
|
| 51 |
- <div class="t-label">Lage</div> |
|
| 52 |
- {{ booking.lage|join(', ') }}
|
|
| 53 |
- </div> |
|
| 54 |
- <div class="col-3 rebsorten icon-reben-outline"> |
|
| 55 |
- <div class="t-label">Mitglied</div> |
|
| 56 |
- {% if booking.member is not null %}
|
|
| 57 |
- {% if booking.member.memberno is defined %}<div>{{booking.member.memberno }}</div>{% endif %}
|
|
| 58 |
- <div>{{ booking.member.firstname }} {{ booking.member.lastname }}</div>
|
|
| 59 |
- {% if booking.member.phone is defined %}<div>{{booking.member.phone }}</div>{% endif %}
|
|
| 60 |
- {% if booking.member.email is defined %}<div><a href="mailto:{{ booking.member.email }}">{{ booking.member.email }}</a></div>{% endif %}
|
|
| 61 |
- {% endif %}
|
|
| 62 |
- </div> |
|
| 63 |
- <div class="col-1 u-text-right action"> |
|
| 64 |
- <a |
|
| 65 |
- href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=edit&id={{ booking.id }}&rt={{ request_token }}&ref={{ ref }}"
|
|
| 66 |
-{# onclick="Backend.openModalIframe({'title':'Quellelement ID {{ booking.id }} bearbeiten','url':this.href});return false"#}
|
|
| 67 |
- title="Element ID {{ booking.id }} bearbeiten"
|
|
| 68 |
- ><img src="/system/themes/flexible/icons/edit.svg" width="16" height="16" alt="Element ID {{ booking.id }} bearbeiten"></a>
|
|
| 69 |
- <a |
|
| 70 |
- href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=delete&id={{ booking.id }}&rt={{ request_token }}"
|
|
| 71 |
- onclick="if(!confirm('Soll das Element ID {{ booking.id }} wirklich gelöscht werden?'))return false;Backend.getScrollOffset()"
|
|
| 72 |
- title="Element ID {{ booking.id }} löschen"
|
|
| 73 |
- ><img src="/system/themes/flexible/icons/delete.svg" width="16" height="16" alt="Element ID {{ booking.id }} löschen"></a>
|
|
| 16 |
+ {% block content %}
|
|
| 17 |
+ {% if days is defined and days|length %}
|
|
| 18 |
+ <div class="list"> |
|
| 19 |
+ {% for day,standorte in days %}
|
|
| 20 |
+ <h3 class="tl_folder_list px-1 text-lg text-primary mt-2">{{ day|date('d.m.Y') }}</h3>
|
|
| 21 |
+ {% for standort in standorte %}
|
|
| 22 |
+ {% for time,bookings in standort.times %}
|
|
| 23 |
+ <h3 class="tl_folder_list px-1 row u-items-center"> |
|
| 24 |
+ <div class="col-2 pl-0">{{ time|date('H:i') }}</div>
|
|
| 25 |
+ <div class="col-3"> |
|
| 26 |
+ <div class="t-label">Standort</div> |
|
| 27 |
+ {{ standort.standort }}
|
|
| 28 |
+ </div> |
|
| 29 |
+ <div class="col-3"> |
|
| 30 |
+ <div class="t-label">Verfügbare Behälterkapazität</div> |
|
| 31 |
+ {{ bookings.behaelterAvailable }}
|
|
| 32 |
+ </div> |
|
| 33 |
+ <div class="col"> |
|
| 34 |
+ <div class="t-label">Verarbeitete Sorten</div> |
|
| 35 |
+ {{ bookings.sorten|join(', ') }}
|
|
| 36 |
+ </div> |
|
| 37 |
+ </h3> |
|
| 38 |
+ <div class="bookings u-row-striped"> |
|
| 39 |
+ {% for booking in bookings.items %}
|
|
| 40 |
+ <div class="row u-items-center"> |
|
| 41 |
+ <div class="col-1 time icon-uhr-outline"> |
|
| 42 |
+ <div class="t-label">Uhrzeit</div> |
|
| 43 |
+ {{ booking.slot.time|date('H:i') }}
|
|
| 44 |
+ <div class="t-label">Standort</div> |
|
| 45 |
+ {{ booking.standort }}
|
|
| 46 |
+ </div> |
|
| 47 |
+ <div class="col-3 behaelter icon-behaelter-outline"> |
|
| 48 |
+ <div class="t-label">Gebuchte Behälterkapazität</div> |
|
| 49 |
+ {{ booking.behaelter }}
|
|
| 50 |
+ <div class="t-label">Ernteart</div> |
|
| 51 |
+ {{ booking.ernteart|join(', ') }}
|
|
| 52 |
+ </div> |
|
| 53 |
+ <div class="col-3 behaelter icon-behaelter-outline"> |
|
| 54 |
+ <div class="t-label">Anliefernde Sorten</div> |
|
| 55 |
+ {{ booking.sorte|join(', ') }}
|
|
| 56 |
+ <div class="t-label">Lage</div> |
|
| 57 |
+ {{ booking.lage|join(', ') }}
|
|
| 58 |
+ </div> |
|
| 59 |
+ <div class="col-3 rebsorten icon-reben-outline"> |
|
| 60 |
+ <div class="t-label">Mitglied</div> |
|
| 61 |
+ {% if booking.member is not null %}
|
|
| 62 |
+ {% if booking.member.memberno is defined %}
|
|
| 63 |
+ <div>{{ booking.member.memberno }}</div>{% endif %}
|
|
| 64 |
+ <div>{{ booking.member.firstname }} {{ booking.member.lastname }}</div>
|
|
| 65 |
+ {% if booking.member.phone is defined %}
|
|
| 66 |
+ <div>{{ booking.member.phone }}</div>{% endif %}
|
|
| 67 |
+ {% if booking.member.email is defined %}
|
|
| 68 |
+ <div> |
|
| 69 |
+ <a href="mailto:{{ booking.member.email }}">{{ booking.member.email }}</a>
|
|
| 70 |
+ </div>{% endif %}
|
|
| 71 |
+ {% endif %}
|
|
| 72 |
+ </div> |
|
| 73 |
+ <div class="col-1 u-text-right action"> |
|
| 74 |
+ <a |
|
| 75 |
+ href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=edit&id={{ booking.id }}&rt={{ request_token }}&ref={{ ref }}"
|
|
| 76 |
+ {# onclick="Backend.openModalIframe({'title':'Quellelement ID {{ booking.id }} bearbeiten','url':this.href});return false" #}
|
|
| 77 |
+ title="Element ID {{ booking.id }} bearbeiten"
|
|
| 78 |
+ ><img src="/system/themes/flexible/icons/edit.svg" width="16" height="16" alt="Element ID {{ booking.id }} bearbeiten"></a>
|
|
| 79 |
+ <a |
|
| 80 |
+ href="/contao?do=weinanlieferung&table=tl_vr_wa_reservation&act=delete&id={{ booking.id }}&rt={{ request_token }}"
|
|
| 81 |
+ onclick="if(!confirm('Soll das Element ID {{ booking.id }} wirklich gelöscht werden?'))return false;Backend.getScrollOffset()"
|
|
| 82 |
+ title="Element ID {{ booking.id }} löschen"
|
|
| 83 |
+ ><img src="/system/themes/flexible/icons/delete.svg" width="16" height="16" alt="Element ID {{ booking.id }} löschen"></a>
|
|
| 84 |
+ </div> |
|
| 85 |
+ </div> |
|
| 86 |
+ {% endfor %}
|
|
| 87 |
+ </div> |
|
| 88 |
+ {% endfor %}
|
|
| 89 |
+ {% endfor %}
|
|
| 90 |
+ {% endfor %}
|
|
| 74 | 91 |
</div> |
| 75 |
- </div> |
|
| 76 |
- {% endfor %}
|
|
| 77 |
- </div> |
|
| 78 |
- {% endfor %}
|
|
| 79 |
- {% endfor %}
|
|
| 80 |
- </div> |
|
| 81 |
- {% else %}
|
|
| 82 |
- <h6 class="placeholder-title">Es wurden noch keine Anlieferungszeiten reserviert</h6> |
|
| 83 |
- {% endif %}
|
|
| 84 |
- {% endblock %}
|
|
| 92 |
+ {% else %}
|
|
| 93 |
+ <h6 class="placeholder-title">Es wurden noch keine Anlieferungszeiten reserviert</h6> |
|
| 94 |
+ {% endif %}
|
|
| 95 |
+ {% endblock %}
|
|
| 85 | 96 |
|
| 97 |
+ </div> |
|
| 86 | 98 |
</div> |
| 87 |
- </div> |
|
| 88 | 99 |
{% endblock %}
|
| ... | ... |
@@ -78,7 +78,17 @@ class WeinanlieferungBookingsController extends AbstractController |
| 78 | 78 |
$arrErnteart = []; |
| 79 | 79 |
$arrLagen = []; |
| 80 | 80 |
|
| 81 |
- if (!isset($arrData['days'][$day->dayBegin][$Slot->time])) |
|
| 81 |
+ if (!isset($arrData['days'][$day->dayBegin][$Slot->pid])) |
|
| 82 |
+ {
|
|
| 83 |
+ $Standort = $Slot->getRelated('pid');
|
|
| 84 |
+ |
|
| 85 |
+ $arrData['days'][$day->dayBegin][$Slot->pid] = [ |
|
| 86 |
+ 'standort' => $Standort !== null ? $Standort->title : '' |
|
| 87 |
+ ]; |
|
| 88 |
+ |
|
| 89 |
+ } |
|
| 90 |
+ |
|
| 91 |
+ if (!isset($arrData['days'][$day->dayBegin][$Slot->pid]['times'][$Slot->time])) |
|
| 82 | 92 |
{
|
| 83 | 93 |
$arrSortenAvailable = []; |
| 84 | 94 |
$Sorten = StringUtil::deserialize($Slot->sorten,true); |
| ... | ... |
@@ -88,7 +98,7 @@ class WeinanlieferungBookingsController extends AbstractController |
| 88 | 98 |
$objLeseart = WeinanlieferungLeseartModel::findByPk($sorte['leseart']); |
| 89 | 99 |
$arrSortenAvailable[] = ($objSorte !== null ? $objSorte->title : '') . ' ' . ($objLeseart !== null ? $objLeseart->title : ''); |
| 90 | 100 |
} |
| 91 |
- $arrData['days'][$day->dayBegin][$Slot->time] = array_merge($Slot->row(),[ |
|
| 101 |
+ $arrData['days'][$day->dayBegin][$Slot->pid]['times'][$Slot->time] = array_merge($Slot->row(),[ |
|
| 92 | 102 |
'sorten' => $arrSortenAvailable, |
| 93 | 103 |
'behaelterAvailable' => $Slot->getAvailableBehaelter(), |
| 94 | 104 |
]); |
| ... | ... |
@@ -128,7 +138,7 @@ class WeinanlieferungBookingsController extends AbstractController |
| 128 | 138 |
$strStandort = $Standort->title; |
| 129 | 139 |
} |
| 130 | 140 |
|
| 131 |
- $arrData['days'][$day->dayBegin][$Slot->time]['items'][] = array_merge($booking->row(), [ |
|
| 141 |
+ $arrData['days'][$day->dayBegin][$Slot->pid]['times'][$Slot->time]['items'][] = array_merge($booking->row(), [ |
|
| 132 | 142 |
'sorte' => $arrSorten, |
| 133 | 143 |
'ernteart' => $arrErnteart, |
| 134 | 144 |
'lage' => $arrLagen, |