feat: add operator-only notes field per request
This commit is contained in:
parent
41ca43b9c2
commit
3e25c3638b
5 changed files with 38 additions and 17 deletions
13
app.py
13
app.py
|
|
@ -572,9 +572,9 @@ def admin_request(rid):
|
|||
"""
|
||||
Detail/edit page for a single request.
|
||||
GET -> render customer info (email editable), prompt, upload status,
|
||||
email status, and delivery forms.
|
||||
POST -> handle one of five actions:
|
||||
update_customer_email, save_prompt, upload_songs,
|
||||
email status, operator notes, and delivery forms.
|
||||
POST -> handle one of six actions:
|
||||
update_customer_email, save_operator_notes, save_prompt, upload_songs,
|
||||
notify_customer, mark_paid_deliver
|
||||
Uploaded MP3s are tagged with metadata defaults from /admin/settings.
|
||||
"""
|
||||
|
|
@ -614,6 +614,11 @@ def admin_request(rid):
|
|||
flash('Customer email updated.', 'success')
|
||||
return redirect(url_for('admin_request', rid=rid))
|
||||
|
||||
elif action == 'save_operator_notes':
|
||||
update_request(rid, operator_notes=request.form.get('operator_notes', '').strip())
|
||||
flash('Operator notes saved.', '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,
|
||||
|
|
@ -786,7 +791,7 @@ def admin_settings():
|
|||
'style_genre', 'extra_requests', 'vocal_gender', 'status', 'suno_title', 'suno_style',
|
||||
'suno_lyrics', 'song_a_path', 'song_b_path', 'customer_approved',
|
||||
'approval_notified_at', 'preview_sent_at', 'delivery_sent_at',
|
||||
'square_payment_ref', 'admin_alert_email', 'player_token', 'revision_note', 'revision_count'
|
||||
'square_payment_ref', 'admin_alert_email', 'player_token', 'revision_note', 'revision_count', 'operator_notes'
|
||||
}
|
||||
health = {'ok': True, 'missing_columns': [], 'message': 'Database schema looks good.'}
|
||||
try:
|
||||
|
|
|
|||
Reference in a new issue