Phase 2: scaffold Waiter PWA — React+Vite, PWA manifest, all pages and components

This commit is contained in:
2026-04-20 12:03:26 +03:00
parent 803358e52c
commit 36cc67dbbc
30 changed files with 8129 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
export default function TableCard({ table, order, currentUserId, onClick }) {
const hasOrder = !!order
const isMyTable = hasOrder && order.waiters?.some(w => w.waiter_id === currentUserId)
let statusLabel = 'Ελεύθερο'
let cardClass = 'table-card table-card--free'
if (hasOrder && isMyTable) {
statusLabel = 'Δικό μου'
cardClass = 'table-card table-card--mine'
} else if (hasOrder) {
statusLabel = 'Ενεργό'
cardClass = 'table-card table-card--active'
}
return (
<button className={cardClass} onClick={onClick}>
<span className="table-card__number">{table.number}</span>
{table.name && <span className="table-card__name">{table.name}</span>}
<span className="table-card__status">{statusLabel}</span>
</button>
)
}