{% block title %}{{order.name}}'s Booking{% endblock %}
{% block main %}
<mainclass="container">
<header>
<h1>{{order.name}}'s Booking</h1>
</header>
<!-- Payment section -->
<section>
<h2>Payment</h2>
{% if order.status == 'pending' %}
<pclass="notice">⚠️ Your order is still pending due to incomplete payment. You will not be able to reserve a room for now. However, you will be able to create one with your friends and confirm it once all attendants have completed the order!</p>
<p>If you wish to <strong>change payment method, check payment instructions or complete a failed payment</strong> please access the payment area.</p>
{% elif order.status == 'paid' %}
<pclass="notice"style="background:#050;">✅ Your order has been completed and approved! See you at furizon!</p>
{% endif %}
<table>
<tr>
<td>Reference ID</td>
<td>{{order.code}}</td>
</tr>
<tr>
<td>Order total</td>
<td>{{order.data['total']}}€ by {{'Credit card' if order.data['payment_provider'] == 'stripe' else 'Bank Transfer'}}</td>
<h2>Your room {% if room_members %}- {{room_members[0].ans('room_name')}}{% endif %}</h2>
{# Show alert if room owner has wrong people inside #}
{% if order.room_owner and quota.get_left(len(room_members)) == 0 and (not order.room_confirmed) %}
<pclass="notice">⚠️ Your room contains {{len(room_members)}} people inside, but sadly there are 0 rooms of this size available. Add or remove people until you reach the size of an available room.</p>
{% endif %}
{# Show alert if room was not confirmed #}
{% if order.room_id and not order.room_confirmed %}
<pclass="notice">⚠️ Your room hasn't been confirmed yet. Unconfirmed rooms are subject to changes by the staff as we optimize for hotel capacity.</p>
<pclass="notice"style="background:#060">✅ Your <strong>{{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}}</strong> room has been confirmed</p>
<pclass="notice">🎲 If you don't join a room or create your one within the room deadline, we will randomly put you into a room with free spots.</p>
<p>To join a room, ask somebody to send you their room code.</p>
<pclass="grid">
<arole="button"href="/manage/room/create">Create a room</a>
<arole="button"href="javascript:document.getElementById('modal-joinroom').setAttribute('open', 'true');">Join a room</a>
</p>
{% endif %}
{% if order.room_owner %}
{% if quota.get_left(len(room_members)) == 0 %}
<pclass="notice">⚠️ There are no more {{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}}, therefore you will not be able to confirm this room. Please add or remove people until you reach an available room.</p>
{% elif room.forbidden %}
<pclass="notice">⚠️ There are roommates who still didn't pay for the order, therefore you will not be able to confirm this room. Please ask them to pay or kick them out from your room.</p>
<pclass="notice">⚠️ One or more badge pictures are missing! This will cause you badge to be empty, so make sure to upload something before the deadline!</p>