implemented check tick selected seat

This commit is contained in:
zino
2021-03-24 21:37:06 +01:00
parent c7a6267975
commit 04cf55e4fe
10 changed files with 252 additions and 78 deletions

View File

@@ -1,8 +1,9 @@
import * as I from "../types/types";
var jQuery = require("jquery");
export function getVenueLocation(): string {
let span: string[] = [];
jQuery(".venue span").each(function () {
jQuery(".venue span").each(function (this: any) {
span.push(jQuery(this).text());
});
@@ -25,15 +26,17 @@ export function getInputs(inContent: string): I.Inputs {
// todo: check with different venues
export function getImportantNote(): { importantNote: string, importantNoteEncoded: string } | undefined {
const importantNote: string | null = jQuery(".important_note")[0].textContent;
if (jQuery(".important_note").length) {
const importantNote: string | null = jQuery(".important_note")[0].textContent;
if (importantNote?.trim().length) {
const importantNoteEncoded: string = encodeURIComponent(importantNote);
return {
"importantNote": importantNote,
"importantNoteEncoded": importantNoteEncoded
}
}
if (importantNote?.trim().length) {
const importantNoteEncoded: string = encodeURIComponent(importantNote);
return {
"importantNote": importantNote,
"importantNoteEncoded": importantNoteEncoded
}
}
}
return undefined;
}
@@ -54,4 +57,18 @@ export function getAdditionalInputs(inContent: string): { [key: string]: string
"posturl": posturl,
"venueLocation": venueLocation
}
}
export function getVenueImage(): { venueImageSrc: string, venueImageHeight: number, venueImageWidth: number } | undefined {
const img: HTMLImageElement = jQuery("#static_venue_map img").get(0);
if (img) {
return {
venueImageSrc: img.src,
venueImageHeight: img.height,
venueImageWidth: img.width
}
}
return undefined;
}