From fef09593445dcf3a56ee9074b88bde7b0a9f33f9 Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sat, 15 Nov 2025 21:59:09 +0100 Subject: Added the changes to fix the bug with class name and changed the SVG color to match the buttons --- src/data.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/data.js') diff --git a/src/data.js b/src/data.js index 3e133ee..f1cf7c9 100644 --- a/src/data.js +++ b/src/data.js @@ -1,8 +1,8 @@ class Switch { - constructor(id, status) { + constructor(id, description, status) { this.id = id; this.status = typeof status !== "undefined" ? status : false; - this.description = this.constructor.name; + this.description = description; this.name = this.description + " " + (id + 1); } toggle() { @@ -22,13 +22,13 @@ class Switch { export class Court extends Switch { constructor(id, status) { - super(id, status); + super(id, "Court", status); } } export class Regular extends Switch { constructor(id, status, level, games, firstName, lastName) { - super(id, status); + super(id, "Regular", status); this.level = typeof level !== "undefined" ? level : 1; this.games = typeof games !== "undefined" ? games : 0; this.firstName = @@ -49,7 +49,7 @@ export class Guest extends Switch { categoryCount = 3; constructor(id, status, games) { - super(id, status); + super(id, "Guest", status); const categoryId = Math.floor(id / this.maxCount) || 0; this.level = guestCategories[categoryId].level; this.games = typeof games !== "undefined" ? games : 0; @@ -83,7 +83,7 @@ export class Team { export class Game extends Switch { constructor(id, status, teamOne, teamTwo) { - super(id, status); + super(id, "Game", status); this.teamOne = teamOne; this.teamTwo = teamTwo; } -- cgit v1.3.1