fix audio

This commit is contained in:
2025-02-10 23:29:06 +01:00
parent 12308af1c4
commit 68190a4bae

View File

@ -22,11 +22,11 @@ export default function Home() {
if (!data) return; if (!data) return;
const justPlayed = (data as Order[]) const justPlayed = (data as Order[])
.filter( .filter((o) => {
(o) => const diff =
new Date(o.updated_on).getTime() - new Date(o.created_on).getTime() < new Date().getTime() - new Date(o.created_on).getTime();
10000 && o.status == 1 return diff < 10000 && o.status == 2;
) })
.map((o) => o.id) .map((o) => o.id)
.filter((id) => !playedIDs.includes(id)); .filter((id) => !playedIDs.includes(id));
@ -75,7 +75,11 @@ export default function Home() {
> >
<OrderID order={order} /> <OrderID order={order} />
<h2 className="text-xl">{order.waiter_name}</h2> <h2 className="text-xl">{order.waiter_name}</h2>
{ (order.client) ? <h2 className="text-xl">Klient: {order.client}</h2> : <></>} {order.client ? (
<h2 className="text-xl">Klient: {order.client}</h2>
) : (
<></>
)}
<h3> <h3>
<select <select
value={order.status} value={order.status}
@ -103,7 +107,11 @@ export default function Home() {
onChange={(e) => update_finished(oi, i, e.target.checked)} onChange={(e) => update_finished(oi, i, e.target.checked)}
/> />
<div> <div>
<p className="text-lg">{dish.item}{dish.times > 1 ? ` - x${dish.times}`: ''} - {dish.takeout ? 'Na wynos' : 'Na miejscu'}</p> <p className="text-lg">
{dish.item}
{dish.times > 1 ? ` - x${dish.times}` : ''} -{' '}
{dish.takeout ? 'Na wynos' : 'Na miejscu'}
</p>
<div>{dish.additional_info}</div> <div>{dish.additional_info}</div>
</div> </div>
</li> </li>