Wire targeted toast notifications to document status transitions
Adds emit_notification_user() to 7 endpoints so the acting user and all admins/owners receive a real-time toast on key document actions: confirm/cancel order, issue/void invoice, confirm return, confirm PO, receive PO goods. Other staff and viewers are not notified. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
bbe89b0380
commit
b8798bc02d
@@ -23,6 +23,7 @@
|
||||
$answer['success'] = 1;
|
||||
$answer['message'] = 'Order cancelled.';
|
||||
notify_node('order_updated', [], $company_id);
|
||||
emit_notification_user($company_id, $user_id, 'Order Cancelled', 'The sales order has been cancelled.', 'warning');
|
||||
|
||||
} catch (PDOException $e) {
|
||||
$answer['message'] = 'Database error, please try again.';
|
||||
|
||||
Reference in New Issue
Block a user