|
|
@ -77,11 +77,13 @@ export async function createSeatWidget($roomGrid, roomId) {
|
|
|
|
if (occupiedBy.length === 0) {
|
|
|
|
if (occupiedBy.length === 0) {
|
|
|
|
const confirmResponse = confirm('Occupare il posto?')
|
|
|
|
const confirmResponse = confirm('Occupare il posto?')
|
|
|
|
if (confirmResponse) {
|
|
|
|
if (confirmResponse) {
|
|
|
|
|
|
|
|
$seat.classList.remove('libero')
|
|
|
|
Database.occupySeat(seatId)
|
|
|
|
Database.occupySeat(seatId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (occupiedBy.length === 1 && occupiedBy[0] === user.id) {
|
|
|
|
} else if (occupiedBy.length === 1 && occupiedBy[0] === user.id) {
|
|
|
|
const answer = confirm('Lasciare veramente il posto?')
|
|
|
|
const answer = confirm('Lasciare veramente il posto?')
|
|
|
|
if (answer) {
|
|
|
|
if (answer) {
|
|
|
|
|
|
|
|
$seat.classList.remove('mio')
|
|
|
|
Database.leaveSeat(seatId)
|
|
|
|
Database.leaveSeat(seatId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|