Redesign seat map layout
This commit is contained in:
@@ -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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user