diff --git a/client/src/modules/cart.ts b/client/src/modules/cart.ts
index 0f21f83..d177d1a 100644
--- a/client/src/modules/cart.ts
+++ b/client/src/modules/cart.ts
@@ -4,26 +4,29 @@ import * as I from "../types/types";
import * as UI from "./ui";
import * as Events from "./events";
-export function addItem(inSeatObj: I.JSCSelectedSeat) {
- const color = `#${XMLHelper.getVenuePricescalePropertyByPricescaleID("color", inSeatObj.data.seatsObj.id[0])}`;
- const category = XMLHelper.getVenuePricescalePropertyByPricescaleID("desc", inSeatObj.data.seatsObj.id[0]);
- const seat = config.state.layoutRows[inSeatObj.id][5];
- const row = config.state.layoutRows[inSeatObj.id][4];
- const sectionID = config.state.layoutRows[inSeatObj.id][3];
- const sectionDesc = XMLHelper.getSectionDescBySectionID(sectionID);
- const seatStr = `${sectionDesc}
Reihe ${row} Platz ${seat}`;
- const buyerTypes: (string | undefined)[][] | undefined = getBuyerTypesByPricescaleID(inSeatObj.data.seatsObj.id[0]);
- const cartId = `cartItem-${inSeatObj.id}`;
- const dropdownBuyerTypesSelector = `#${cartId} .dropdownBuyerTypes`;
+type buyerType = (string | undefined)[][] | undefined;
+type buyerTypeArr = (string | undefined)[];
- appendHTML(cartId, color, category, seatStr);
- addDropdownBuyerTypesOptions(buyerTypes, dropdownBuyerTypesSelector);
+export function addItem(inSeatObj: I.JSCSelectedSeat): void {
+ const color: string = `#${XMLHelper.getVenuePricescalePropertyByPricescaleID("color", inSeatObj.data.seatsObj.id[0])}`;
+ const category: string | undefined = XMLHelper.getVenuePricescalePropertyByPricescaleID("desc", inSeatObj.data.seatsObj.id[0]);
+ const seat: string = config.state.layoutRows[inSeatObj.id][5];
+ const row: string = config.state.layoutRows[inSeatObj.id][4];
+ const sectionID: string = config.state.layoutRows[inSeatObj.id][3];
+ const sectionDesc: string | undefined = XMLHelper.getSectionDescBySectionID(sectionID);
+ const seatStr: string | undefined = `${sectionDesc}
Reihe ${row} Platz ${seat}`;
+ const buyerTypes: buyerType = getBuyerTypesByPricescaleID(inSeatObj.data.seatsObj.id[0]);
+ const cartID: string = `cartItem-${inSeatObj.id}`;
+ const dropdownBuyerTypesSelector: string = `#${cartID} .dropdownBuyerTypes`;
+
+ appendHTML(cartID, color, category, seatStr);
+ addDropdownBuyerTypeOptions(buyerTypes, dropdownBuyerTypesSelector);
Events.addCartDropdownBuyerTypes(dropdownBuyerTypesSelector, inSeatObj);
}
-function appendHTML(inCartId: string, inColor: string, inCategory: string | undefined, inSeatStr: string) {
+function appendHTML(inCartID: string, inColor: string, inCategory: string | undefined, inSeatStr: string): void {
jQuery("#cartItemHTML .fl-html").append(`
-