Import "TranslateModule"

This commit is contained in:
2026-01-14 10:56:01 +01:00
parent 7a667f10c3
commit c4cc91bb06
23 changed files with 653 additions and 569 deletions

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
import { MatPaginator, PageEvent } from "@angular/material/paginator";
import { MatTableDataSource } from "@angular/material/table";
import { MatDialog } from "@angular/material/dialog";
import { TranslateService } from "@ngx-translate/core";
import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { AddAction } from "../../models/add-action.enum";
import { Jump } from "../../models/jump";
@@ -12,10 +12,10 @@ import { JumpInfosComponent } from "../jump-infos/jump-infos.component";
import { StatsService } from "../../services/stats.service";
@Component({
selector: "app-list-of-jumps",
templateUrl: "./list-of-jumps.component.html",
styleUrls: ["./list-of-jumps.component.css"],
standalone: false
selector: "app-list-of-jumps",
templateUrl: "./list-of-jumps.component.html",
styleUrls: ["./list-of-jumps.component.css"],
imports: [TranslateModule],
})
export class ListOfJumpsComponent implements OnInit {
public displayedColumns: Array<string> = [
@@ -31,11 +31,12 @@ export class ListOfJumpsComponent implements OnInit {
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
public isLoading: boolean = false;
constructor(private serviceApi: JumpService,
private serviceComm: ServiceComm,
public dialog: MatDialog,
private translateService: TranslateService,
private statsService: StatsService
constructor(
private serviceApi: JumpService,
private serviceComm: ServiceComm,
public dialog: MatDialog,
private translateService: TranslateService,
private statsService: StatsService
) {}
ngAferViewInit(): void {
@@ -62,15 +63,16 @@ export class ListOfJumpsComponent implements OnInit {
getListOfJumps(pageSize: number = 20, pageIndex: number = 0) {
this.isLoading = true;
this.serviceApi.getJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize)
.subscribe((data) => {
this.dataSourceTable.data = data.rows;
setTimeout(() => {
this.paginator.length = data.count;
this.paginator.pageIndex = pageIndex;
this.isLoading = false;
}, 500);
});
this.serviceApi
.getJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize)
.subscribe((data) => {
this.dataSourceTable.data = data.rows;
setTimeout(() => {
this.paginator.length = data.count;
this.paginator.pageIndex = pageIndex;
this.isLoading = false;
}, 500);
});
}
openDialog(item: Jump, editMode: boolean) {