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