diff --git a/app.py b/app.py
index 8f7a82e..9d3d310 100644
--- a/app.py
+++ b/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,
diff --git a/templates/admin/request.html b/templates/admin/request.html
index 69a8d89..1999fdf 100644
--- a/templates/admin/request.html
+++ b/templates/admin/request.html
@@ -369,6 +369,19 @@
+
+
+
Request Actions
+ {% if req.status != 'cancelled' %}
+
+ {% else %}
+
This request is cancelled.
+ {% endif %}
+
+
Revision History
@@ -407,7 +420,7 @@
vocal_gender: {{ req.vocal_gender | tojson }},
extra_requests: {{ req.extra_requests | tojson }}
};
- const text = `Booth request: ${data.request_id}\nCustomer email: ${data.email}\nCallback URL: ${callbackUrl}\n\nGenerate a Suno Custom Mode prompt for this customer and POST it back to the Callback URL as JSON.\n\nCustomer data:\nName: ${data.name}\nHobbies: ${data.hobbies || '-'}\nNotable facts: ${data.notable_facts || '-'}\nStyle / genre: ${data.style_genre || '-'}\nPreferred singer voice / gender: ${data.vocal_gender || 'No preference'}\nExtra requests: ${data.extra_requests || '-'}\n\nExpected JSON response format:\n{\n \"request_id\": ${data.request_id},\n \"email\": \"${data.email}\",\n \"suno_title\": \"...\",\n \"suno_style\": \"...\",\n \"suno_lyrics\": \"...\"\n}`;
+ const text = `Booth request: ${data.request_id}\\nCustomer email: ${data.email}\\nCallback URL: ${callbackUrl}\\n\\nGenerate a Suno Custom Mode prompt for this customer and POST it back to the Callback URL as JSON.\\n\\nCustomer data:\\nName: ${data.name}\\nHobbies: ${data.hobbies || '-'}\\nNotable facts: ${data.notable_facts || '-'}\\nStyle / genre: ${data.style_genre || '-'}\\nPreferred singer voice / gender: ${data.vocal_gender || 'No preference'}\\nExtra requests: ${data.extra_requests || '-'}\\n\\nExpected JSON response format:\\n{\\n \\"request_id\\": ${data.request_id},\\n \\"email\\": \\"${data.email}\\",\\n \\"suno_title\\": \\"...\\",\\n \\"suno_style\\": \\"...\\",\\n \\"suno_lyrics\\": \\"...\\"\\n}`;
navigator.clipboard.writeText(text).then(() => alert("Copied! Paste into Hermes. Hermes will POST the generated prompt back to the Callback URL."));
}