diff --git a/client/src/modules/cart.ts b/client/src/modules/cart.ts index 50a443a..2c00d15 100644 --- a/client/src/modules/cart.ts +++ b/client/src/modules/cart.ts @@ -1,8 +1,8 @@ import * as XMLHelper from "./xmlhelper"; import { config } from "./config"; import * as I from "../types/types"; -import * as UI from "./ui"; import * as Events from "./events"; +import * as CartButtons from "./cartButtons"; export function addItem(inSeatObj: I.JSCSelectedSeat): void { const color: string = `#${XMLHelper.getVenuePricescalePropertyByPricescaleID("color", inSeatObj.data.seatsObj.id[0])}`; @@ -38,7 +38,7 @@ export function changedDropdownBuyerType(inSelect: HTMLSelectElement, inSeatObj: config.state.selectedSeatsArr[index][2] = buyerTypeCode; calcOverallPrice(); - UI.setBtnCartText(); + CartButtons.setBtnCartText(); const url = XMLHelper.generateCheckoutUrl(); Events.addRedirectCheckout(url); diff --git a/client/src/modules/state.ts b/client/src/modules/state.ts index 35732ad..cf45bca 100644 --- a/client/src/modules/state.ts +++ b/client/src/modules/state.ts @@ -1,7 +1,6 @@ import { config } from "./config"; import * as I from "../types/types"; import * as XMLHelper from "./xmlhelper"; -import * as UI from "./ui"; import * as jBoxHelper from "./jBoxHelper"; export function addSeatToState(inSelectedSeat: I.JSCSelectedSeat): void { diff --git a/client/src/modules/xmlhelper.ts b/client/src/modules/xmlhelper.ts index cf96d5d..6b3e00c 100644 --- a/client/src/modules/xmlhelper.ts +++ b/client/src/modules/xmlhelper.ts @@ -2,9 +2,9 @@ import axios, { AxiosResponse } from 'axios'; var xml2jsParser = require('xml2js').parseString; import * as I from "../types/types"; import Utils from './utils'; -import * as UI from "./ui"; import { config } from "./config"; import * as Communication from "./communication"; +import * as CartButtons from "./cartButtons"; export function getXMLPromise(url: string): Promise { return axios.get(url) @@ -68,7 +68,7 @@ export function isValidSeatSelection() { if (!config.state.selectedSeatsArr.length) return; - UI.showHideBtnCartLoading("show"); + CartButtons.showHideBtnCartLoading("show"); jQuery("#modalCart i").hide(); jQuery("#modalCart .uabb-button-text").addClass("dot-pulse"); diff --git a/client/src/seatmap.ts b/client/src/seatmap.ts index b6bccd3..4fb0825 100644 --- a/client/src/seatmap.ts +++ b/client/src/seatmap.ts @@ -14,12 +14,7 @@ import * as Legend from "./modules/legend"; import * as BookingBtn from "./modules/bookingButton"; import * as Panzoom from "./modules/panzoom"; import * as CartButtons from "./modules/cartButtons"; - -// let inputsWithValue: I.InputsWithValue; -// let seatmap: any; -// let panzoom: PanzoomObject | undefined; -// let inVenueXML: I.VenueXML; -// let seatmapXML: any; +import * as jBoxHelper from "./modules/jBoxHelper"; window.addEventListener('load', () => { // Inject JSC (jQuery Seat Charts) @@ -129,7 +124,7 @@ function messageHandler(inE: any) { XMLHelper.processSMAP(); config.state.panzoom = Panzoom.addPanzoom("#containerSeatmapInner", ".panzoomZoomIn", ".panzoomZoomOut", "#panzoomResetZoom"); UI.controlLoftloader("hide"); - UI.createSeatTooltips(); + jBoxHelper.createSeatTooltips(); break; } @@ -140,7 +135,7 @@ function messageHandler(inE: any) { console.log(data.message); if (!config.state.isValidSeatSelection) { - UI.showJBoxNotice(`Auswahl nicht möglich: Bitte lassen Sie keinen einzelnen Platz frei.`); + jBoxHelper.showJBoxNotice(`Auswahl nicht möglich: Bitte lassen Sie keinen einzelnen Platz frei.`); CartButtons.showHideBtnCartLoading("hide"); } else {