Revert "Add connected user when updating gear"

This reverts commit 76ef368700.
This commit is contained in:
2026-05-05 23:18:03 +02:00
parent 76ef368700
commit b951c947dd
10 changed files with 1981 additions and 1934 deletions
@@ -1,63 +0,0 @@
import { Component, Inject, OnInit } from "@angular/core";
import { MAT_DIALOG_DATA } from "@angular/material/dialog";
import { TranslateModule } from "@ngx-translate/core";
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatFormFieldModule } from "@angular/material/form-field";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { MatInputModule } from "@angular/material/input";
import { MatButtonModule } from "@angular/material/button";
import { AddAction } from "../../models/add-action.enum";
import { GearResp } from "../../models/gear";
import { GearService } from "../../services/gear.service";
import { ServiceComm } from "../../services/service-comm.service";
@Component({
selector: "app-gear-infos",
templateUrl: "./gear-infos.component.html",
styleUrls: ["./gear-infos.component.css"],
imports: [
TranslateModule,
FormsModule,
MatCheckboxModule,
MatFormFieldModule,
ReactiveFormsModule,
MatInputModule,
MatButtonModule,
],
})
export class GearInfosComponent implements OnInit {
public editMode: boolean;
public gear: GearResp;
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
private serviceGear: GearService,
private serviceComm: ServiceComm,
) {
this.gear = new GearResp(data.gear);
this.editMode = data.editMode;
}
ngOnInit(): void {}
public updateGear() {
this.serviceGear
.updateGear(
this.gear.id,
this.gear.name,
this.gear.manufacturer,
this.gear.minSize,
this.gear.maxSize,
this.gear.aad,
this.gear.mainCanopy,
this.gear.reserveCanopy,
this.gear.equipment,
)
.subscribe(() => {
this.serviceComm.refreshData(AddAction.Gear);
});
}
}