This commit is contained in:
2026-06-06 00:02:56 +02:00
parent 51d3a734e8
commit 922a185208
10 changed files with 941 additions and 131 deletions
+54
View File
@@ -164,6 +164,7 @@ export namespace award {
validated: boolean;
bands: string[];
confirmed_bands: string[];
validated_bands: string[];
static createFrom(source: any = {}) {
return new Ref(source);
@@ -180,6 +181,7 @@ export namespace award {
this.validated = source["validated"];
this.bands = source["bands"];
this.confirmed_bands = source["confirmed_bands"];
this.validated_bands = source["validated_bands"];
}
}
export class Result {
@@ -676,6 +678,58 @@ export namespace main {
this.can_update = source["can_update"];
}
}
export class AwardStatRow {
label: string;
cells: number[];
total: number;
grand_total: number;
static createFrom(source: any = {}) {
return new AwardStatRow(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.label = source["label"];
this.cells = source["cells"];
this.total = source["total"];
this.grand_total = source["grand_total"];
}
}
export class AwardStatsResult {
code: string;
bands: string[];
rows: AwardStatRow[];
static createFrom(source: any = {}) {
return new AwardStatsResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.code = source["code"];
this.bands = source["bands"];
this.rows = this.convertValues(source["rows"], AwardStatRow);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
}
if (a.slice && a.map) {
return (a as any[]).map(elem => this.convertValues(elem, classs));
} else if ("object" === typeof a) {
if (asMap) {
for (const key of Object.keys(a)) {
a[key] = new classs(a[key]);
}
return a;
}
return new classs(a);
}
return a;
}
}
export class BackupSettings {
enabled: boolean;
folder: string;