redeems dashboard improvement

This commit is contained in:
Lili (Tlapka) 2022-10-13 14:09:12 +02:00
parent 796febb91f
commit 5c6b070a7a
2 changed files with 6 additions and 2 deletions

View File

@ -20,14 +20,16 @@ def handle_redeem(message, user_id):
if use_points(db, user_id, price):
if redeem_type == "counter":
add_to_counter(db, redeem)
send_chat(f"{redeem} redeemed for {price} points.")
elif redeem_type == "list":
add_to_redeem_queue(db, user_id, redeem)
send_chat(f"{redeem} redeemed for {price} points.")
elif redeem_type == "note":
if note is not None:
add_to_redeem_queue(db, user_id, redeem, note)
send_chat(f"{redeem} redeemed for {price} points.")
else:
send_chat(f"Cannot redeem {redeem}, no note included.")
send_chat(f"{redeem} redeemed for {price} points.")
else:
send_chat(f"{redeem} not redeemed because of an error.")
else:

View File

@ -35,8 +35,10 @@
<tbody>
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
<td>{{ row[1] }}</td>
<td>{{ row[2] }}</td>
<td>{{ row[3] }}</td>
{% if row[2] %}
<td>{{ row[2] }}</td>
{% endif %}
</tbody>
{% endfor %}
</table>