diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-11-15 21:59:09 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-11-15 21:59:09 +0100 |
| commit | fef09593445dcf3a56ee9074b88bde7b0a9f33f9 (patch) | |
| tree | 530480aedc17f110ca4888402bc697019c1bac51 /src/data.js | |
| parent | 4ff9794fa2b545134efe341ad012667c67f70d15 (diff) | |
Added the changes to fix the bug with class name and changed the SVG color to match the buttons
Diffstat (limited to 'src/data.js')
| -rw-r--r-- | src/data.js | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |
