2024-05-15 16:02:38 +00:00
{% extends "base.html" %}
2024-05-16 21:52:09 +00:00
{% block title %}Room Wizard{% endblock %}
{% block head %}
< link rel = "stylesheet" href = "/res/styles/wizard.css" >
{% endblock %}
2024-05-15 16:02:38 +00:00
{% block main %}
< main class = "container" >
2024-05-16 21:52:09 +00:00
< script src = "/res/scripts/wizardManager.js" type = "text/javascript" defer = "defer" > < / script >
2024-05-15 16:02:38 +00:00
< header >
< picture >
< source srcset = "/res/furizon.png" media = "(prefers-color-scheme:dark)" >
< img src = "/res/furizon-light.png" style = "height:4rem;text-align:center;" >
< / picture >
< / header >
<!-- order = current order login
2024-05-16 21:52:09 +00:00
unconfirmed_orders = all non confirmed rooms orders
all_orders = all orders
2024-05-15 16:02:38 +00:00
data = assigned rooms -->
2024-05-19 19:07:31 +00:00
< h2 > Review rooms < a href = "#popover-empty-room-tip" onclick = "document.querySelector('#popover-wizard-tip').showPopover()" > ?< / a > < / h2 >
< div popover id = "popover-wizard-tip" > This is the preview page. Re-arrange users by dragging and dropping them in the rooms.< br > Once finished, scroll down to either < i > 'Confirm'< / i > changes or < i > 'Undo'< / i > them.< / div >
2024-05-15 16:02:38 +00:00
< hr >
{% for room in data.items() %}
2024-05-18 22:06:36 +00:00
{% if room[0] in all_orders %}
{%with room_order = unconfirmed_orders[room[0]] %}
2024-05-19 19:07:31 +00:00
< div class = "room" id = "room-{{room_order.code}}" room-type = "{{room_order.bed_in_room}}" room-size = "{{room_order.room_person_no - len(room_order.room_members)}}" current-size = "{{len(room[1]['to_add'])}}" >
2024-05-18 22:06:36 +00:00
< h4 style = "margin-top:1em;" >
< span > {{room_order.room_name if room_order.room_name else room[1]['room_name'] if room[1] and room[1]['room_name'] else ''}}< / span >
< / h4 >
< div class = "grid people" style = "padding-bottom:1em;" >
{% for m in room_order.room_members %}
{% if m in all_orders %}
{% with person = all_orders[m] %}
< div class = "edit-disabled" style = "margin-bottom: 1em;" >
{% with current=None, order=person, imgSrc='/res/propic/' + (person.ans('propic') or 'default.png'), effects = false, flag = true %}
{% include 'blocks/propic.html' %}
{% endwith %}
< h5 > {{person.ans('fursona_name')}}< / h5 >
< / div >
{% endwith %}
{% endif %}
{% endfor %}
{% for m in room[1]['to_add'] %}
{% if m in unconfirmed_orders %}
{% with person = unconfirmed_orders[m] %}
< div class = "edit-drag" id = "{{person.code}}" room-type = "{{person.bed_in_room}}" style = "margin-bottom: 1em;" draggable = "true" >
{% with current=None, order=person, imgSrc='/res/propic/' + (person.ans('propic') or 'default.png'), effects = false, flag = true %}
{% include 'blocks/propic.html' %}
{% endwith %}
< h5 > {{person.ans('fursona_name')}}< / h5 >
< / div >
{% endwith %}
{% endif %}
{% endfor %}
< / div >
2024-05-16 21:52:09 +00:00
< / div >
2024-05-18 22:06:36 +00:00
{% endwith %}
{% endif %}
2024-05-15 16:02:38 +00:00
{% endfor %}
2024-05-16 21:52:09 +00:00
< div class = "room" infinite = "true" id = "room-infinite" room-size = "999999999" current-size = "0" >
2024-05-18 22:06:36 +00:00
< h4 style = "margin-top:1em;" > Empty room < a href = "#popover-empty-room-tip" onclick = "document.querySelector('#popover-empty-room-tip').showPopover()" > ?< / a > < / button > < / h4 >
< div popover id = "popover-empty-room-tip" > This is a placeholder room. Place users temporarily in order to free space and arrange rooms< / div >
2024-05-16 21:52:09 +00:00
< div class = "grid people" style = "padding-bottom:1em;" > < / div >
< / div >
2024-05-18 22:06:36 +00:00
< a href = "/manage/admin" role = "button" title = "Discard all changes and go back to the admin page" > Undo< / a >
< a href = "#" class = "align-right" onclick = "onSave()" role = "button" title = "Will try saving current changes." > Confirm changes< / a >
< dialog id = "modalConfirmDialog" >
< article >
2024-05-19 19:07:31 +00:00
< a href = "#close" id = "modalClose" aria-label = "Close" class = "close" onClick = "javascript:this.parentElement.parentElement.removeAttribute('open')" > < / a >
2024-05-18 22:06:36 +00:00
< h3 id = "intentText" > Confirm arrangement?< / h3 >
< p id = "intentDescription" >
Roomless guests will be moved around existing rooms and newly generated ones.< br >
This will also confirm all rooms.
< / p >
2024-05-19 19:07:31 +00:00
< div popover id = "popover-status" > < span id = "popover-status-text" > < / span > < / div >
2024-05-18 22:06:36 +00:00
< footer >
2024-05-19 19:07:31 +00:00
< button id = "intentSend" onclick = "submitData(this)" > Confirm< / button >
2024-05-18 22:06:36 +00:00
< / footer >
< / article >
< / dialog >
< script type = "text/javascript" >
let saveData = JSON.parse('{{jsondata|safe}}');
< / script >
2024-05-15 16:02:38 +00:00
< / main >
{% endblock %}