fix(dashboard): review fixes — error toasts, dedupe socket, POS guards
CI/CD / CI · API (dotnet build + test) (push) Successful in 42s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 30s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m11s
CI/CD / CI · Admin Web (tsc) (push) Successful in 39s
CI/CD / CI · Website (tsc) (push) Successful in 47s
CI/CD / CI · Koja (tsc) (push) Successful in 52s
CI/CD / Deploy · all services (push) Successful in 3m20s

- Global MutationCache.onError safety net so mutations without their own onError
  no longer fail silently (skips ones that handle errors → no double toast).
- Notifications feed no longer opens its own SignalR connection; it reuses the
  one in useOrderAlerts (was double sockets + double cache churn per session).
- "Send test notification" now works on the settings page (force flag bypasses
  the tab-visible guard) instead of silently doing nothing.
- POS: re-entry guard on payment confirm (no duplicate payment on double-tap);
  notes on already-sent lines are read-only (a note-only edit was silently lost);
  ORDER_ALREADY_CLOSED surfaced with a clear Persian message.
- Reservation Confirm/Cancel/Complete buttons disabled while pending.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-22 15:54:02 +03:30
parent 63e3cb6962
commit 72abf05a5f
6 changed files with 53 additions and 46 deletions
@@ -234,6 +234,7 @@ export function ReservationsScreen() {
<Can permission="EditReservation">
<Button
size="sm"
disabled={updateStatus.isPending}
onClick={() => updateStatus.mutate({ id: r.id, status: "Confirmed" })}
>
{t("confirm")}
@@ -243,6 +244,7 @@ export function ReservationsScreen() {
<Button
size="sm"
variant="outline"
disabled={updateStatus.isPending}
onClick={() => updateStatus.mutate({ id: r.id, status: "Cancelled" })}
>
{t("cancel")}
@@ -260,6 +262,7 @@ export function ReservationsScreen() {
<Button
size="sm"
variant="outline"
disabled={updateStatus.isPending}
onClick={() => updateStatus.mutate({ id: r.id, status: "Completed" })}
>
{t("markCompleted")}