new trim system, capacity available added
This commit is contained in:
@@ -176,7 +176,7 @@ function enterSeatsInMatrix(inRows: I.LayoutRow2[], inArrMatrix: string[][], inP
|
||||
|
||||
inRows.forEach(element => {
|
||||
const row: I.LayoutRow2 = element;
|
||||
const Y: number = parseInt(row.y_cell_coord[0]);
|
||||
const Y: number = parseInt(row.y_cell_coord[0]) - 1;
|
||||
const seatsArr: string[] = row.seats[0].split("|");
|
||||
|
||||
seatsArr.forEach(element => {
|
||||
@@ -198,7 +198,7 @@ function enterSeatsInMatrix(inRows: I.LayoutRow2[], inArrMatrix: string[][], inP
|
||||
return;
|
||||
|
||||
// const X: number = parseInt(seatArr[5]);
|
||||
const X: number = parseInt(seatArr[2]);
|
||||
const X: number = parseInt(seatArr[2]) - 1;
|
||||
const seatsKey = getSeatsKey(seatArr[0], inPricescaleArr);
|
||||
|
||||
if (seatsKey)
|
||||
|
||||
@@ -18,9 +18,9 @@ export function setOptionSelect(inSeatmapListing: I.Seatmap[], inId: string) {
|
||||
|
||||
export function setEventInfo(inEventInfo: I.EventInfo, inInputswithValue: I.InputsWithValue): void {
|
||||
jQuery("#eventInfoDesc span.fl-heading-text")[0].childNodes[0].textContent = inEventInfo.desc[0];
|
||||
jQuery("#eventInfoDate p")[0].childNodes[0].textContent = inEventInfo.start[0];
|
||||
jQuery("#eventInfoCapacity p")[0].childNodes[0].textContent = inEventInfo.venue_config_capacity[0];
|
||||
jQuery("#eventInfoDate p")[0].childNodes[0].textContent = inEventInfo.start[0];
|
||||
jQuery("#eventInfoLocation p")[0].childNodes[0].textContent = inInputswithValue.venueLocation;
|
||||
jQuery("#eventInfoCapacity p")[0].childNodes[0].textContent = `Verfügbare Plätze: ${inEventInfo.seats_available} von ${inEventInfo.venue_config_capacity[0]}`;
|
||||
}
|
||||
|
||||
export function createDialog(): void {
|
||||
|
||||
@@ -31,12 +31,15 @@ export function getSeatmapListing(inVenueXML: I.VenueXML): I.Seatmap[] {
|
||||
}
|
||||
|
||||
export function getEventInfo(inVenueXML: I.VenueXML): I.EventInfo {
|
||||
const sectionArr = inVenueXML.master_config[0].section_inventory[0].section;
|
||||
const eventObj: I.Event = inVenueXML.event[0];
|
||||
const event = inVenueXML.event[0];
|
||||
const venue_config = inVenueXML.venue_config[0];
|
||||
const dateObj: Date = new Date(parseInt(event.year[0]), parseInt(event.month[0])-1, parseInt(event.hour[0]), parseInt(event.minute[0]));
|
||||
const start: string[] = [ dateObj.toLocaleString(["de-DE"], { weekday: "long", day: "2-digit", month: "2-digit", year: "numeric", hour: "2-digit", minute: "2-digit", timeZoneName: "short" }) ];
|
||||
const weekday = [ Utils.getDayName(dateObj, "de-DE") ];
|
||||
const seats_available = sectionArr.map(item => parseInt(item.available[0])).reduce((prev, curr) => prev + curr);
|
||||
|
||||
|
||||
const eventExtend: I.EventExtend = {
|
||||
venue_config_capacity: venue_config.capacity,
|
||||
@@ -48,6 +51,7 @@ export function getEventInfo(inVenueXML: I.VenueXML): I.EventInfo {
|
||||
venue_config_nav_image_width: venue_config.nav_image_width,
|
||||
start: start,
|
||||
weekday: weekday,
|
||||
seats_available: seats_available,
|
||||
};
|
||||
|
||||
let eventInfo: I.EventInfo = { ...eventObj, ...eventExtend };
|
||||
|
||||
Reference in New Issue
Block a user