Update to add an equipment in a gear

This commit is contained in:
2026-05-05 23:27:21 +02:00
parent 96f84cdc84
commit 855d85ef67
3 changed files with 34 additions and 1 deletions
@@ -6,12 +6,14 @@ import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import { MatButtonModule } from "@angular/material/button";
import { MatIconModule } from "@angular/material/icon";
import { GearService } from "../../services/gear.service";
import { ServiceComm } from "../../services/service-comm.service";
import { GearResp } from "../../models/gear";
import { AddAction } from "../../models/add-action.enum";
import { NewGearComponent } from "../new-gear/new-gear.component";
import { GearInfosComponent } from "../gear-infos/gear-infos.component";
@Component({
selector: "app-list-of-gears",
@@ -23,6 +25,7 @@ import { NewGearComponent } from "../new-gear/new-gear.component";
MatProgressSpinnerModule,
MatTableModule,
MatButtonModule,
MatIconModule,
],
})
export class ListOfGearsComponent implements OnInit {
@@ -34,6 +37,7 @@ export class ListOfGearsComponent implements OnInit {
"mainCanopy",
"reserveCanopy",
"equipment",
"actions",
];
public dataSourceTable: MatTableDataSource<GearResp>;
public resultsLength = 0;
@@ -81,6 +85,14 @@ export class ListOfGearsComponent implements OnInit {
});
}
openDialog(item: GearResp, editMode: boolean) {
this.dialog.open(GearInfosComponent, {
data: { gear: item, editMode: editMode },
maxHeight: "400px",
minWidth: "350px",
});
}
private updateTitle() {
this.translateService.get("ListGears_Title").subscribe((data) => {
this.serviceComm.updatedComponentTitle(data);