2022-09-07 16:44:59 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2022-09-08 13:17:58 +02:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
2022-09-07 16:44:59 +02:00
|
|
|
<head>
|
|
|
|
<title>Redeems Dashboard</title>
|
|
|
|
</head>
|
2022-11-09 14:35:45 +01:00
|
|
|
<div id="script">
|
2022-10-18 14:04:15 +02:00
|
|
|
|
2022-11-09 14:35:45 +01:00
|
|
|
<script src="/static/dashboard.js"></script>
|
2022-10-12 15:48:57 +02:00
|
|
|
|
2022-11-09 14:35:45 +01:00
|
|
|
<div class="tab">
|
|
|
|
<button class="tablinks" onclick="openTab(event, 'dashboard')", id="defaultOpen">Redeems Dashboard</button>
|
|
|
|
<button class="tablinks" onclick="openTab(event, 'redeems-list')">List of Redeems</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id='dashboard' class="tabcontent">
|
|
|
|
<body>
|
|
|
|
<h3>Redeems Dashboard</h3>
|
|
|
|
{% if (username and users ) %}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Points balance:</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for user in users %}
|
|
|
|
<tbody>
|
|
|
|
<td> {{ user[0] }} </td>
|
|
|
|
<td> {{ user[1] }} </td>
|
|
|
|
</tbody>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2022-10-13 14:09:12 +02:00
|
|
|
{% endif %}
|
2022-11-09 14:35:45 +01:00
|
|
|
|
|
|
|
{% if counters %}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Counters</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for counter in counters %}
|
|
|
|
<tbody>
|
|
|
|
<td> {{ counter[0] }} </td>
|
|
|
|
<td> {{ counter[1] }} </td>
|
|
|
|
</tbody>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2022-11-07 17:30:00 +01:00
|
|
|
{% endif %}
|
2022-11-09 14:35:45 +01:00
|
|
|
|
|
|
|
{% if queue %}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Time</th>
|
|
|
|
<th>Redeem</th>
|
|
|
|
<th>Redeemer</th>
|
|
|
|
<th>Note</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for row in queue %}
|
|
|
|
<tbody>
|
|
|
|
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
|
|
|
<td>{{ row[1] }}</td>
|
|
|
|
<td>{{ row[3] }}</td>
|
|
|
|
{% if row[2] %}
|
|
|
|
<td>{{ row[2] }}</td>
|
|
|
|
{% endif %}
|
|
|
|
</tbody>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</body>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id='redeems-list' class="tabcontent">
|
|
|
|
<h3>Currently Active Redeems</h3>
|
|
|
|
<body>
|
|
|
|
{% if redeems %}
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Redeem</th>
|
|
|
|
<th>Price</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% for redeem, redeem_info in redeems.items() %}
|
|
|
|
<tbody>
|
|
|
|
<td>{{ redeem }}</td>
|
|
|
|
<td>{{ redeem_info["price"] }}</td>
|
|
|
|
<td>{{ redeem_info["type"] }}</td>
|
|
|
|
{% if redeem_info["info"] %}
|
|
|
|
<td>{{ redeem_info["info"] }}</td>
|
|
|
|
{% endif %}
|
|
|
|
</tbody>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</body>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
// Get the element with id="defaultOpen" and click on it
|
|
|
|
document.getElementById("defaultOpen").click();
|
|
|
|
</script>
|
|
|
|
|
2022-09-27 18:23:10 +02:00
|
|
|
</html>
|