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
|
|
@ -369,6 +369,19 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Request Actions -->
|
||||
<div class="section">
|
||||
<h2>Request Actions</h2>
|
||||
{% if req.status != 'cancelled' %}
|
||||
<form method="POST" onsubmit="return confirm('Mark request #{{ req.id }} as cancelled?')">
|
||||
<input type="hidden" name="action" value="cancel_request">
|
||||
<button type="submit" class="danger">Mark as Cancelled</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p class="copy-hint">This request is cancelled.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Revision History -->
|
||||
<div class="section">
|
||||
<h2>Revision History</h2>
|
||||
|
|
@ -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."));
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue