feat(print): separate kitchen & bar printers via print stations UI
CI/CD / CI · API (dotnet build + test) (push) Successful in 47s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 28s
CI/CD / CI · Dashboard (tsc) (push) Has been cancelled
CI/CD / CI · Admin Web (tsc) (push) Has been cancelled
CI/CD / CI · Website (tsc) (push) Has been cancelled
CI/CD / CI · Koja (tsc) (push) Has been cancelled
CI/CD / Deploy · all services (push) Has been cancelled

The print engine already routed items to per-station printers (MenuCategory →
KitchenStation.PrinterIp, falling back to the branch kitchen printer) and prints
the customer receipt to the receipt printer — but there was no UI to set it up.
This exposes it:

- Settings → "Kitchen & bar printers": create/edit/delete print stations, each
  with its own printer IP/port, with a per-station test print (gated by
  ManageKitchenStations).
- Menu category editor: a "Print station" dropdown to route each category to a
  station (food → Kitchen, drinks → Bar); no station = branch kitchen printer.

Result: kitchen and bar tickets print on separate printers, while the customer
factor/receipt keeps printing on the receipt printer. fa/en/ar strings added.
No backend/migration changes — purely wiring the existing capability.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-21 09:56:14 +03:30
parent 97bd63015f
commit fb6a20eaa1
8 changed files with 386 additions and 4 deletions
+20 -1
View File
@@ -329,7 +329,23 @@
"configurePrinters": "فتح إعدادات الطابعة",
"posDeviceSection": "جهاز نقطة البيع (بطاقة)",
"posDeviceHint": "عند الدفع بالبطاقة، يُرسل المبلغ عبر HTTP (POST /pay) إلى الجهاز على الشبكة المحلية.",
"posDeviceIp": "عنوان IP لجهاز نقطة البيع"
"posDeviceIp": "عنوان IP لجهاز نقطة البيع",
"testSent": "تم إرسال الاختبار إلى الطابعة.",
"stations": {
"title": "محطات طباعة المطبخ والبار",
"subtitle": "امنح كل قسم تحضير طابعته الخاصة ووجّه فئات القائمة إليها.",
"help": "أنشئ محطة (مثل المطبخ أو البار) بطابعتها الخاصة، ثم من «القائمة» اختر محطة الطباعة لكل فئة — الطعام ← المطبخ، المشروبات ← البار. أصناف الفئات بدون محطة تُطبع على طابعة مطبخ الفرع. أما فاتورة العميل فتُطبع دائمًا على طابعة الفواتير.",
"add": "إضافة محطة",
"name": "اسم المحطة",
"namePlaceholder": "مثل المطبخ، البار",
"printerIp": "IP الطابعة",
"noPrinter": "بدون طابعة — تُستخدم طابعة المطبخ",
"categoryCount": "{count} فئات",
"test": "اختبار",
"empty": "لا توجد محطات بعد. أضف «المطبخ» و«البار» لطباعة أصنافهما بشكل منفصل.",
"deleteConfirm": "حذف المحطة «{name}»؟ ستعود فئاتها إلى طابعة المطبخ.",
"saveError": "تعذّر حفظ المحطة."
}
},
"receipt": {
"table": "الطاولة",
@@ -873,6 +889,8 @@
"newItem": "صنف جديد",
"newCategory": "فئة جديدة",
"editCategoryTitle": "تعديل الفئة",
"printStation": "محطة الطباعة",
"printStationNone": "طابعة المطبخ (افتراضي)",
"close": "إغلاق",
"saving": "جاري الحفظ…",
"model3d": "نموذج ثلاثي الأبعاد",
@@ -1203,6 +1221,7 @@
"shopNotifications": "الإشعارات والصوت",
"printer": "الطابعة",
"printerSettings": "إعدادات الطابعة",
"printerStations": "طابعات المطبخ والبار",
"printTest": "صفحة اختبار الطباعة",
"shopDiscover": "اكتشاف و AI",
"team": "الفريق والموظفون",