Redesign seat map layout

This commit is contained in:
2024-10-10 14:11:09 +02:00
parent fe2cea5529
commit 58c7282701
14 changed files with 1967 additions and 90 deletions

View File

@@ -7,7 +7,6 @@ import { Band } from "../models/acts/band.model";
import { SeatGroup } from "../models/locations/seatGroup.model";
import { Seat } from "../models/locations/seat.model";
import { SeatRow } from "../models/locations/seatRow.model";
import { Op } from "sequelize";
export const location = Router()
@@ -107,6 +106,15 @@ location.get("/:urlName", (req: Request, res: Response) => {
})
}
for (let seatGroup of location.dataValues.seatGroups) {
for (let seatRow of seatGroup.dataValues.seatRows) {
for (let seat of seatRow.dataValues.seats) {
seat.dataValues["state"] = 0
}
}
}
res.status(200).json(location)
})
})