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
@@ -38,6 +38,7 @@
|
||||
$answer['auto_approved'] = $auto_approve;
|
||||
$answer['auto_invoice'] = $auto_invoice;
|
||||
notify_node('order_updated', [], $company_id);
|
||||
emit_notification_user($company_id, $user_id, 'Order Confirmed', 'The sales order has been confirmed.', 'success');
|
||||
if ($auto_invoice) {
|
||||
(new UsageGuard($pdo1, $company_id, $packages))->increment();
|
||||
notify_node('invoice_updated', [], $company_id);
|
||||
|
||||
Reference in New Issue
Block a user