feat(ui): add mark-delivered button on sent postcards with auto today date

This commit is contained in:
2026-07-05 21:45:32 +08:00
parent 7a62ff0818
commit 5607485c6a
3 changed files with 31 additions and 0 deletions

View File

@@ -5,6 +5,11 @@
<h1>{{ postcard.card_number }}</h1>
<div>
<a href="/postcards/{{ postcard.id }}/edit" class="btn">编辑</a>
{% if postcard.status == 'sent' %}
<form method="post" action="/postcards/{{ postcard.id }}/mark-delivered" class="inline">
<button type="submit" class="btn btn-primary" onclick="return confirm('确认已送达?')">标记已送达</button>
</form>
{% endif %}
<form method="post" action="/postcards/{{ postcard.id }}/delete" class="inline">
<button type="submit" class="btn btn-danger" onclick="return confirm('确定删除?')">删除</button>
</form>