Added option to define daily tickets, added fixes for daily tickets
This commit is contained in:
parent
1519272463
commit
c735144dca
1
app.py
1
app.py
|
@ -60,6 +60,7 @@ async def main_start(*_):
|
|||
app.ctx.tpl = Environment(loader=FileSystemLoader("tpl"), autoescape=True)
|
||||
app.ctx.tpl.globals.update(time=time)
|
||||
app.ctx.tpl.globals.update(PROPIC_DEADLINE=PROPIC_DEADLINE)
|
||||
app.ctx.tpl.globals.update(ITEM_IDS=ITEM_IDS)
|
||||
app.ctx.tpl.globals.update(int=int)
|
||||
app.ctx.tpl.globals.update(len=len)
|
||||
|
||||
|
|
5
ext.py
5
ext.py
|
@ -39,9 +39,10 @@ class Order:
|
|||
self.country = idata['country']
|
||||
|
||||
for p in self.data['positions']:
|
||||
if p['item'] in ITEM_IDS['ticket']:
|
||||
if p['item'] in (ITEM_IDS['ticket'] + ITEM_IDS['daily']):
|
||||
self.position_id = p['id']
|
||||
self.position_positionid = p['positionid']
|
||||
self.position_positiontypeid = p['item']
|
||||
self.answers = p['answers']
|
||||
self.barcode = p['secret']
|
||||
self.checked_in = bool(p['checkins'])
|
||||
|
@ -176,7 +177,7 @@ class Quotas:
|
|||
|
||||
def get_left(self, capacity):
|
||||
for quota in self.data['results']:
|
||||
if quota['id'] == ROOM_MAP[capacity]:
|
||||
if quota['id'] == ROOM_QUOTA_ID[capacity]:
|
||||
return quota['available_number']
|
||||
return 0
|
||||
|
||||
|
|
4
room.py
4
room.py
|
@ -289,7 +289,7 @@ async def confirm_room(request, order: Order, quotas: Quotas):
|
|||
if res.status_code != 201:
|
||||
raise exceptions.BadRequest("Something has gone wrong! Please contact support immediately")
|
||||
|
||||
for rm in room_members:
|
||||
'''for rm in room_members:
|
||||
if rm.code == order.code: continue
|
||||
thing = {
|
||||
'order': rm.code,
|
||||
|
@ -297,7 +297,7 @@ async def confirm_room(request, order: Order, quotas: Quotas):
|
|||
'item': ITEM_IDS['room'],
|
||||
'variation': ROOM_MAP[len(room_members)]
|
||||
}
|
||||
res = await client.post(join(base_url, "orderpositions/"), headers=headers, json=thing)
|
||||
res = await client.post(join(base_url, "orderpositions/"), headers=headers, json=thing) '''
|
||||
|
||||
for rm in room_members:
|
||||
await rm.send_answers()
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<h2>Your room {% if room_members %}- {{room_members[0].ans('room_name')}}{% endif %}</h2>
|
||||
|
||||
{# Show alert if room owner has wrong people inside #}
|
||||
|
||||
{% if room_members and quota.get_left(len(room_members)) == 0 and (not order.room_confirmed) %}
|
||||
<p class="notice">⚠️ Your room contains {{len(room_members)}} people inside, but sadly there are no more {{[None,'single','double','triple','quadruple','quintuple'][len(room_members)]}} rooms. You need to add or remove people until you reach the size of an available room if you want to confirm it.</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<h1>Unconfirmed rooms</h1>
|
||||
<p>These unconfirmed rooms are still being organized and may be subject to change. These rooms may also have openings for additional roommates. If you are interested in sharing a room, you can use this page to find potential roommates</p>
|
||||
{% endif %}
|
||||
<h3>{% if o.room_confirmed %}🔒{% endif %}{{o.room_name}}</h3>
|
||||
<h3>{{o.room_name}}</h3>
|
||||
<div class="grid people" style="padding-bottom:1em;">
|
||||
{% for m in o.room_members %}
|
||||
{% if m in orders %}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<p>From here, you can easily manage all aspects of your booking, including composing your hotel room, designing your badge, and updating your payment information. Simply use the buttons below to navigate between the different sections.</p>
|
||||
<p>Buttons marked with ⚠️ require your attention</p>
|
||||
|
||||
<p>If you have any questions or issues while using this page, please don't hesitate to contact us for assistance. We look forward to seeing you at Furizon Beyond!</p>
|
||||
<p>If you have any questions or issues while using this page, please don't hesitate to contact us for assistance. We look forward to seeing you at Furizon Riverside!</p>
|
||||
<hr />
|
||||
<h2 id="info">Useful information</h2>
|
||||
<table>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<tr>
|
||||
<th>When (check-in)?</th>
|
||||
<td>
|
||||
{{('29' if order.has_early else '30')|safe}} May → {{('4' if order.has_late else '3')|safe}} June 2023
|
||||
{{('12' if order.has_early else '13')|safe}} October → {{('16' if order.has_late else '15')|safe}} October 2023
|
||||
{% if order.has_early %}
|
||||
<span class="tag">EARLY</span>
|
||||
{% endif %}
|
||||
|
@ -61,7 +61,9 @@
|
|||
|
||||
<h2>Manage your booking</h2>
|
||||
{% include 'blocks/payment.html' %}
|
||||
{% if order.position_positiontypeid not in ITEM_IDS['daily'] %}
|
||||
{% include 'blocks/room.html' %}
|
||||
{% endif %}
|
||||
{% include 'blocks/badge.html' %}
|
||||
|
||||
<details id="barcard">
|
||||
|
@ -76,8 +78,6 @@
|
|||
<a href="/manage/nosecount" role="button">Nose count</a>
|
||||
</details>
|
||||
|
||||
{% include 'blocks/karaoke.html' %}
|
||||
|
||||
<details id="carpooling">
|
||||
<summary role="button"><img src="/res/icons/car.svg" class="icon" />Carpooling</summary>
|
||||
<p>We want to make it easy for attendees to find and offer carpooling options. If you have seats available in your car, you can use our carpooling system to offer rides to other attendees. And if you need a ride, you can search for leftover seats in cars that are already heading to the convention. This is a great way to save money on gas and reduce your carbon footprint, while also getting to know other attendees and making new friends.</p>
|
||||
|
|
Loading…
Reference in New Issue