Add Cancelled status and cancel request button
This commit is contained in:
parent
fd58cf47da
commit
968a6fb43c
2 changed files with 20 additions and 1 deletions
6
app.py
6
app.py
|
|
@ -87,6 +87,7 @@ STATUS_LABELS = {
|
|||
'awaiting_payment': 'Awaiting Payment',
|
||||
'paid': 'Paid',
|
||||
'delivered': 'Delivered',
|
||||
'cancelled': 'Cancelled',
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
@ -990,6 +991,11 @@ def admin_request(rid):
|
|||
flash('Stems share link saved.', 'success')
|
||||
return redirect(url_for('admin_request', rid=rid))
|
||||
|
||||
elif action == 'cancel_request':
|
||||
update_request(rid, status='cancelled')
|
||||
flash('Request marked as cancelled.', 'success')
|
||||
return redirect(url_for('admin_request', rid=rid))
|
||||
|
||||
elif action == 'save_prompt':
|
||||
# Store the generated title/style/lyrics and mark prompt ready.
|
||||
update_request(rid,
|
||||
|
|
|
|||
Reference in a new issue