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;
const justPlayed = (data as Order[])
.filter(
(o) =>
new Date(o.updated_on).getTime() - new Date(o.created_on).getTime() <
10000 && o.status == 1
)
.filter((o) => {
const diff =
new Date().getTime() - new Date(o.created_on).getTime();
return diff < 10000 && o.status == 2;
})
.map((o) => o.id)
.filter((id) => !playedIDs.includes(id));
@ -75,7 +75,11 @@ export default function Home() {
>
<OrderID order={order} />
<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>
<select
value={order.status}
@ -103,7 +107,11 @@ export default function Home() {
onChange={(e) => update_finished(oi, i, e.target.checked)}
/>
<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>
</li>