feat: delete actions for warehouse/reservations/coupons/customers + Koja listing toggle
CI/CD / CI · API (dotnet build + test) (push) Successful in 1m10s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 52s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m5s
CI/CD / CI · Admin Web (tsc) (push) Successful in 35s
CI/CD / CI · Website (tsc) (push) Successful in 45s
CI/CD / CI · Koja (tsc) (push) Successful in 55s
CI/CD / Deploy · all services (push) Successful in 3m29s

Delete (every manageable entity that only had "add" now has delete):
- Ingredients (warehouse): new DELETE /inventory/ingredients/{id} (soft-delete via
  the global DeletedAt filter — no FK trouble with recipes/movements) + NoOp stub +
  trash button in the materials cards.
- Reservations: new DELETE /reservations/{id} (soft-delete) + per-card delete button.
- Coupons & Customers: backend DELETE already existed; wired delete buttons in the UI.
- Shared ConfirmDialog component used by all delete flows (RTL-aware).
- Audit result: tables/branches/taxes/kitchen-stations/expenses/menu/terminals already
  had delete; HR has no "add" so no delete needed; shifts intentionally excluded
  (financial open/close records, not add-style entities).

Koja visibility:
- New Cafe.ShowOnKoja flag, default TRUE (DB default true so existing cafés stay
  listed). Discover query now filters IsVerified && !Deleted && ShowOnKoja.
- public-profile GET/PUT expose showOnKoja; dashboard public-profile panel has an
  on-by-default toggle that persists immediately. Platform IsVerified gate unchanged.
- EF migration AddCafeShowOnKoja (defaultValue: true).

Also: added the missing errors.generic i18n key (fa/en/ar) so useApiError's fallback
resolves instead of rendering the literal "errors.generic". 81 API tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-02 16:14:40 +03:30
parent 60e2ac1355
commit 15def7ff1c
22 changed files with 3765 additions and 133 deletions
+24 -36
View File
@@ -21,31 +21,11 @@
"errorGeneric": "Something went wrong. Please try again."
},
"errors": {
"generic": "Something went wrong. Please try again.",
"REQUEST_FAILED": "Request failed. Please try again.",
"VALIDATION_ERROR": "The information entered is invalid.",
"FORBIDDEN": "You don't have permission to do this.",
"OWNER_REQUIRED": "Only the café owner can do this.",
"MANAGER_REQUIRED": "This action requires manager access.",
"PLAN_LIMIT_REACHED": "You've reached your plan limit. Upgrade to continue.",
"PLAN_FEATURE_DISABLED": "This feature isn't available on your current plan.",
"NOT_FOUND": "Not found.",
"ORDER_NOT_FOUND": "Order not found.",
"ITEM_NOT_FOUND": "Item not found.",
"ITEM_ALREADY_VOIDED": "This item is already voided.",
"ORDER_ALREADY_CLOSED": "This order is already closed.",
"TABLE_OCCUPIED": "This table is currently occupied.",
"TABLE_CLEANING": "This table is being cleaned.",
"TABLE_NOT_FOUND": "Table not found.",
"TABLE_HAS_OPEN_ORDER": "This table has an open order and can't be removed.",
"TABLE_SECTION_HAS_TABLES": "This section has tables and can't be removed.",
"BRANCH_NOT_FOUND": "Branch not found.",
"SECTION_NOT_FOUND": "Section not found.",
"RATE_LIMITED": "Too many requests. Please wait a moment.",
"SMS_FAILED": "Could not send the SMS. Please try again.",
"INVALID_OTP": "Invalid or expired verification code.",
"TICKET_CLOSED": "This ticket is closed and can't receive messages.",
"ALREADY_REGISTERED": "An account already exists for this number. Please sign in."
"planLimit": "Plan limit reached. Please upgrade.",
"notFound": "Not found",
"unauthorized": "Unauthorized",
"network": "Network error",
"generic": "Something went wrong. Please try again."
},
"brand": {
"name": "Meezi"
@@ -419,7 +399,10 @@
"duplicatePhone": "This phone number is already registered.",
"generic": "Could not save. Please try again."
}
}
},
"deleted": "Customer deleted",
"deleteConfirmTitle": "Delete customer",
"deleteConfirmDesc": "Delete “{name}”?"
},
"coupons": {
"title": "Coupons",
@@ -435,7 +418,10 @@
"FixedAmount": "Fixed amount",
"FreeItem": "Free item"
},
"noCoupons": "No coupons yet"
"noCoupons": "No coupons yet",
"deleted": "Coupon deleted",
"deleteConfirmTitle": "Delete coupon",
"deleteConfirmDesc": "Delete coupon “{code}”?"
},
"hr": {
"title": "Human resources",
@@ -932,7 +918,10 @@
"purchasesThisMonth": "Material purchases this month",
"purchaseCount": "{count} purchases",
"viewInExpenses": "View in expenses",
"selectBranchForPurchases": "Select a branch in the top bar to record warehouse purchases."
"selectBranchForPurchases": "Select a branch in the top bar to record warehouse purchases.",
"deleted": "Material deleted",
"deleteConfirmTitle": "Delete material",
"deleteConfirmDesc": "Delete “{name}”? This cant be undone."
},
"qr": {
"brand": "Meezi",
@@ -1048,7 +1037,10 @@
"Cancelled": "Cancelled",
"Seated": "Seated",
"Completed": "Completed"
}
},
"deleted": "Reservation deleted",
"deleteConfirmTitle": "Delete reservation",
"deleteConfirmDesc": "Delete the reservation for “{name}”?"
},
"branchesPage": {
"title": "Branches",
@@ -1476,12 +1468,6 @@
}
}
},
"errors": {
"planLimit": "Plan limit reached. Please upgrade.",
"notFound": "Not found",
"unauthorized": "Unauthorized",
"network": "Network error"
},
"discoverPublic": {
"brand": "Meezi",
"title": "Discover cafés",
@@ -1586,7 +1572,9 @@
"save": "Save",
"saved": "Saved",
"saveFailed": "Save failed",
"loading": "Loading…"
"loading": "Loading…",
"showOnKoja": "Show on Koja",
"showOnKojaHint": "List your café in the public Koja directory (koja.meezi.ir). On by default."
},
"discoverProfile": {
"sections": {