fc21471131
Problem: window.print() on the main page used A4 height (blank paper
after receipt), no RTL direction, and Tailwind styles leaked into print.
Solution — iframe isolation:
- lib/thermal-print.ts: builds a self-contained HTML document
(@page { size: 80mm auto; margin: 0 }, html { direction: rtl })
and fires it through a hidden off-screen <iframe>. The iframe
document contains only the receipt so height == content height.
- pos-slip-modal.tsx: Print button calls printThermal(buildThermalDocument())
instead of window.print(). Preview panel is unchanged (screen only).
- pos-receipt-print.css: updated @page + direction as fallback for any
remaining window.print() callers.
Works with USB driver (Atom A300) as default printer — OS print spooler
receives the job exactly as if it were any other document.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Meezi Dashboard
Next.js 14 POS dashboard for Meezi (میزی).
Setup
cd web/dashboard
npm install
cp .env.example .env.local
npm run dev
Open http://localhost:3000/fa/login
Ensure the API is running at NEXT_PUBLIC_API_URL (default https://localhost:7208).
Demo login
- Phone:
09121234567 - OTP: check API console log (
DEV OTP for ...) when Kavenegar is not configured
Features (Sprint 4)
- i18n:
fa(default, RTL),ar(RTL),en(LTR) - Dashboard layout with RTL-aware sidebar
- POS screen: menu grid + cart + order submit
- KDS screen: live orders + SignalR + status advance
- Placeholder pages for upcoming modules