diff --git a/README.md b/README.md index 3868ff5..4fd2671 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ pending → prompt_ready → songs_uploaded → awaiting_payment → paid → de | `templates/player.html` | Customer audio player, approval, and revision form. | | `templates/admin/login.html` | Admin login page. | | `templates/admin/dashboard.html` | Operator queue with filters and auto-refresh. | -| `templates/admin/request.html` | Single-request detail / prompt / upload / delivery page. Customer email is editable here. | +| `templates/admin/request.html` | Single-request detail / prompt / upload / delivery page. Customer email and operator notes are editable here. | | `templates/admin/settings.html` | Maintenance, settings, backup/restore, and reset page. | | `static/Trollgorithm_booth.jpg` | Banner image on the request page. | | `static/DM-Logo_email.png` | Inline Dionysis Media logo attached to emails. | diff --git a/REVIEW.md b/REVIEW.md index 0f5892d..4ab21d6 100644 --- a/REVIEW.md +++ b/REVIEW.md @@ -31,7 +31,7 @@ Flask app that lets convention attendees request custom AI-generated theme songs | `config.py` | Env vars. `ADMIN_PASSWORD` is plain text. | | `models.py` | SQLite schema + CRUD. `player_token` is a secret URL-safe token. | | `init_db.py` | Run once after deploy: `python init_db.py`. | -| `templates/admin/request.html` | Biggest template; prompt copy helpers and JS live here. Customer email is editable here. | +| `templates/admin/request.html` | Biggest template; prompt copy helpers and JS live here. Customer email and operator notes are editable here. | | `templates/admin/dashboard.html` | Queue table + filters + auto-refresh + topbar Reset System button. | | `templates/admin/settings.html` | SMTP config, MP3 metadata defaults, DB backup/restore, health check, reset. | | `templates/faq.html` | Customer FAQ page. | diff --git a/app.py b/app.py index b03b671..69736ae 100644 --- a/app.py +++ b/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: diff --git a/models.py b/models.py index a780064..c094311 100644 --- a/models.py +++ b/models.py @@ -44,7 +44,8 @@ CREATE TABLE IF NOT EXISTS requests ( admin_alert_email TEXT, -- reserved for future operator alerts; currently unused player_token TEXT NOT NULL UNIQUE, revision_count INTEGER DEFAULT 0, - revision_note TEXT + revision_note TEXT, + operator_notes TEXT ); CREATE INDEX IF NOT EXISTS idx_requests_status ON requests(status); diff --git a/templates/admin/request.html b/templates/admin/request.html index c328173..26b2aaf 100644 --- a/templates/admin/request.html +++ b/templates/admin/request.html @@ -9,10 +9,11 @@ Single-request admin detail page. Sections: 1. Customer info (with revisions note if any) - 2. Generate and save Suno prompt - 3. Upload Version A and Version B MP3s - 4. Send preview email with private player link - 5. Mark paid and deliver selected MP3(s) + 2. Operator notes (internal, operator-only) + 3. Generate and save Suno prompt + 4. Upload Version A and Version B MP3s + 5. Send preview email with private player link + 6. Mark paid and deliver selected MP3(s) */ body{ font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; @@ -162,9 +163,23 @@ {% endif %} - +
Internal notes for the booth team. Customers cannot see this.
+ +Paste Hermes' Title, Style, and Lyrics directly into the fields below, then save.
@@ -190,7 +205,7 @@@@ -222,7 +237,7 @@
Customer approved: {% if req.customer_approved == 'none' %}