Little test with AI + Add the equipment #8
@@ -7,6 +7,7 @@
|
||||
[(ngModel)]="jump.isSpecial"
|
||||
name="isSpecial"
|
||||
labelPosition="before"
|
||||
[disabled]="!editMode"
|
||||
>Special jump</mat-checkbox
|
||||
>
|
||||
</p>
|
||||
@@ -15,6 +16,7 @@
|
||||
[(ngModel)]="jump.withCutaway"
|
||||
name="withCutaway"
|
||||
labelPosition="before"
|
||||
[disabled]="!editMode"
|
||||
>Cutaway</mat-checkbox
|
||||
>
|
||||
</p>
|
||||
@@ -26,31 +28,22 @@
|
||||
[(ngModel)]="jump.notes"
|
||||
name="comments"
|
||||
type="text"
|
||||
[disabled]="!editMode"
|
||||
></textarea>
|
||||
</mat-form-field>
|
||||
<p>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ "NewJump_Equipment" | translate }}</mat-label>
|
||||
<mat-select [(value)]="selectedEquipment">
|
||||
<mat-select [(value)]="jump.equipment" [disabled]="!editMode">
|
||||
@for (equipment of listOfEquipment; track equipment) {
|
||||
<mat-option [value]="equipment.value">{{
|
||||
equipment.viewValue
|
||||
}}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<!-- <input
|
||||
type="text"
|
||||
matInput
|
||||
placeholder="equipment"
|
||||
name="equipment"
|
||||
[(ngModel)]="jump.equipment"
|
||||
name="equipment"
|
||||
type="text"
|
||||
/> -->
|
||||
</mat-form-field>
|
||||
</p>
|
||||
<br />
|
||||
@if (editMode) {
|
||||
<button mat-raised-button color="accent">Update</button>
|
||||
}
|
||||
</p>
|
||||
</form>
|
||||
|
||||
@@ -38,7 +38,7 @@ interface Equipment {
|
||||
export class JumpInfosComponent implements OnInit {
|
||||
public editMode: boolean;
|
||||
public jump: JumpResp;
|
||||
public selectedEquipment: string = "";
|
||||
public selectedEquipment: string;
|
||||
public listOfEquipment: Array<Equipment> = [
|
||||
{ value: "", viewValue: "<None>" },
|
||||
{ value: "Freak 6", viewValue: "Freak 6" },
|
||||
@@ -54,6 +54,7 @@ export class JumpInfosComponent implements OnInit {
|
||||
private serviceComm: ServiceComm,
|
||||
) {
|
||||
this.jump = new JumpResp(data.jump);
|
||||
this.selectedEquipment = this.jump.equipment;
|
||||
this.editMode = data.editMode;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
openDialog(item: Jump, editMode: boolean) {
|
||||
this.dialog.open(JumpInfosComponent, {
|
||||
data: { jump: item, editMode: editMode },
|
||||
maxHeight: "400px",
|
||||
maxHeight: "450px",
|
||||
minWidth: "350px",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user