before remove getcolumnsnaming
This commit is contained in:
@@ -30,15 +30,12 @@ export function getXMLPromise(url: string): Promise<unknown> {
|
||||
})
|
||||
}
|
||||
|
||||
export function getSeatmapListing(inVenueXML: I.VenueXML): I.Seatmap[] {
|
||||
return inVenueXML.seatmap_config[0].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];
|
||||
export function getEventInfo(): I.EventInfo {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const sectionArr = venueXML.master_config[0].section_inventory[0].section;
|
||||
const eventObj: I.Event = venueXML.event[0];
|
||||
const event = venueXML.event[0];
|
||||
const venue_config = venueXML.venue_config[0];
|
||||
const dateObj: Date = new Date(parseInt(event.year[0]), parseInt(event.month[0])-1, parseInt(event.day[0]), 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") ];
|
||||
@@ -63,9 +60,10 @@ export function getEventInfo(inVenueXML: I.VenueXML): I.EventInfo {
|
||||
return eventInfo;
|
||||
}
|
||||
|
||||
export function isValidSeatSelection(inInputsWithValue: I.InputsWithValue) {
|
||||
export function isValidSeatSelection() {
|
||||
const inputsWithValue = config.state.inputsWithValue!;
|
||||
console.log("checking seat selection");
|
||||
console.log(inInputsWithValue);
|
||||
console.log(inputsWithValue);
|
||||
jQuery("#modalCart-overlay").hide();
|
||||
|
||||
if (!config.state.selectedSeatsArr.length)
|
||||
@@ -76,7 +74,7 @@ export function isValidSeatSelection(inInputsWithValue: I.InputsWithValue) {
|
||||
jQuery("#modalCart i").hide();
|
||||
jQuery("#modalCart .uabb-button-text").addClass("dot-pulse");
|
||||
|
||||
const url = generateCheckoutUrl(inInputsWithValue);
|
||||
const url = generateCheckoutUrl();
|
||||
|
||||
// const selectedSeatIndexes: string = generateSelectedSeatIndexes();
|
||||
// const url: string = `${inputsWithValue["ticketPurchaseUrl"]}?user_context=${inputsWithValue.user_context}&pid=${inputsWithValue["pid"]}&selected_seat_indexes=${selectedSeatIndexes}&trxstate=148`;
|
||||
@@ -92,13 +90,15 @@ export function isValidSeatSelection(inInputsWithValue: I.InputsWithValue) {
|
||||
Communication.sendMessage(message, "parent");
|
||||
}
|
||||
|
||||
export function generateCheckoutUrl(inInputsWithValue: I.InputsWithValue): string | undefined {
|
||||
console.log(inInputsWithValue);
|
||||
export function generateCheckoutUrl(): string | undefined {
|
||||
const inputsWithValue = config.state.inputsWithValue!;
|
||||
console.log(inputsWithValue);
|
||||
|
||||
if (!config.state.selectedSeatsArr.length)
|
||||
return;
|
||||
else {
|
||||
const selectedSeatIndexes: string = generateSelectedSeatIndexes();
|
||||
return `${inInputsWithValue["ticketPurchaseUrl"]}?user_context=${inInputsWithValue.user_context}&pid=${inInputsWithValue["pid"]}&selected_seat_indexes=${selectedSeatIndexes}&trxstate=148`;
|
||||
return `${inputsWithValue["ticketPurchaseUrl"]}?user_context=${inputsWithValue.user_context}&pid=${inputsWithValue["pid"]}&selected_seat_indexes=${selectedSeatIndexes}&trxstate=148`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +108,9 @@ function generateSelectedSeatIndexes(): string {
|
||||
})).join("|");
|
||||
}
|
||||
|
||||
export function getSectionDescBySectionID(inVenueXML: I.VenueXML, sectionID: string): string | undefined {
|
||||
const sectionArr = inVenueXML.master_config[0].section_config[0].section;
|
||||
export function getSectionDescBySectionID(sectionID: string): string | undefined {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const sectionArr = venueXML.master_config[0].section_config[0].section;
|
||||
|
||||
const sectionDesc = sectionArr.find(arr => {
|
||||
return sectionID === arr.id[0];
|
||||
@@ -118,18 +119,20 @@ export function getSectionDescBySectionID(inVenueXML: I.VenueXML, sectionID: str
|
||||
return sectionDesc;
|
||||
}
|
||||
|
||||
export function processSMAP(inInputsWithValue: I.InputsWithValue) {
|
||||
if (!inInputsWithValue.smap)
|
||||
export function processSMAP() {
|
||||
const inputsWithValue = config.state.inputsWithValue!;
|
||||
if (!inputsWithValue.smap)
|
||||
return;
|
||||
|
||||
const smapArr = inInputsWithValue.smap.split("").map(Number);
|
||||
const smapArr = inputsWithValue.smap.split("").map(Number);
|
||||
|
||||
if (!smapArr[0])
|
||||
jQuery("#eventInfoCapacity").hide();
|
||||
}
|
||||
|
||||
export function getVenuePricescalePropertyByPricescaleID(property: I.Pricescale2Properties, pricescaleID: string, inVenueXML: I.VenueXML) {
|
||||
const venuePricescaleArr: I.Pricescale2[] = inVenueXML.venue[0].pricescales[0].pricescale;
|
||||
export function getVenuePricescalePropertyByPricescaleID(property: I.Pricescale2Properties, pricescaleID: string) {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const venuePricescaleArr: I.Pricescale2[] = venueXML.venue[0].pricescales[0].pricescale;
|
||||
|
||||
return venuePricescaleArr.find(obj => {
|
||||
if (obj.id[0] === pricescaleID)
|
||||
@@ -139,8 +142,9 @@ export function getVenuePricescalePropertyByPricescaleID(property: I.Pricescale2
|
||||
})?.[property][0];
|
||||
}
|
||||
|
||||
export function getBuyerTypeCodeByBuyerTypeID(inVenueXML: I.VenueXML, inBuyerTypeID: string): string | undefined {
|
||||
const venueBuyerTypeArr = inVenueXML.venue[0].buyer_types[0].buyer_type;
|
||||
export function getBuyerTypeCodeByBuyerTypeID(inBuyerTypeID: string): string | undefined {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const venueBuyerTypeArr = venueXML.venue[0].buyer_types[0].buyer_type;
|
||||
return venueBuyerTypeArr.find(arr => {
|
||||
return inBuyerTypeID === arr.id[0];
|
||||
})?.code[0];
|
||||
@@ -157,15 +161,17 @@ export function getPriceByBuyertypeID(inBuyertypeID: string, inPricescaleObj: I.
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function getVenuePriceStructurePropertyByPricescaleID(inVenueXML: I.VenueXML, inID: string): I.Pricescale5 | undefined {
|
||||
const venuePricescaleArr: I.Pricescale5[] = inVenueXML.price_structure[0].pricescale;
|
||||
export function getVenuePriceStructurePropertyByPricescaleID(inID: string): I.Pricescale5 | undefined {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const venuePricescaleArr: I.Pricescale5[] = venueXML.price_structure[0].pricescale;
|
||||
return venuePricescaleArr.find(obj => {
|
||||
return obj.id[0] === inID;
|
||||
});
|
||||
}
|
||||
|
||||
export function generatePricescaleCSS(inVenueXML: I.VenueXML): string {
|
||||
const venuePricescalesArr: I.Pricescale2[] = inVenueXML.venue[0].pricescales[0].pricescale;
|
||||
export function generatePricescaleCSS(): string {
|
||||
const venueXML = config.state.inVenueXML!;
|
||||
const venuePricescalesArr: I.Pricescale2[] = venueXML.venue[0].pricescales[0].pricescale;
|
||||
let cssArr: string[] = [];
|
||||
|
||||
venuePricescalesArr.forEach(element => {
|
||||
|
||||
Reference in New Issue
Block a user