per-worker ntfy topics for targeted push notifications

Evelin receives all booking notifications via the shared ntfy topic in config.
Each worker also gets notified on their own personal ntfy topic (set per-worker
in the admin panel) — so workers only see their own booking events.

- _ntfy() now accepts optional $workerTopic and sends to both topics if different
- All three call sites (new/modify/cancel) pass $worker->ntfy_topic
- Admin worker form + worker_process() wired for ntfy_topic field
- DB: ALTER TABLE workers ADD COLUMN ntfy_topic VARCHAR(100) NULL DEFAULT NULL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 15:30:08 +01:00
co-authored by Claude Sonnet 4.6
parent 1b96632f9b
commit 993e0cb8b1
3 changed files with 30 additions and 17 deletions
+2 -1
View File
@@ -650,7 +650,8 @@ class Admin extends CI_Controller {
'is_barber' => $_POST['is_barber'],
'service_category_id' => $_POST['service_category_id'],
'is_active' => $_POST['is_active'],
'google_calendar_id' => isset($_POST['google_calendar_id']) ? $_POST['google_calendar_id'] : ''
'google_calendar_id' => isset($_POST['google_calendar_id']) ? $_POST['google_calendar_id'] : '',
'ntfy_topic' => isset($_POST['ntfy_topic']) ? $_POST['ntfy_topic'] : ''
);
$this->Service_model->updateWorker($_POST['worker_id'], $workerArray);
$this->Log_model->addLog('workers', $data['currentUser']->username.' módosította a(z) '.$_POST['worker_name'].' nevű dolgozót ('.implode(',',$workerArray).')', $data['currentUser']->username);