Subscribe au bon endroit pour un refresh
correct de la liste des infos.
This commit is contained in:
@@ -31,8 +31,10 @@ export class NewAircraftComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
this.serviceApi.AddAircraft(formData.aircraftName, this.selectedFile);
|
||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
||||
this.serviceApi.AddAircraft(formData.aircraftName, this.selectedFile)
|
||||
.subscribe(() => {
|
||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
||||
});
|
||||
}
|
||||
|
||||
public onFileChanged(fileInput: any) {
|
||||
|
||||
@@ -49,16 +49,16 @@ export class NewDropZoneComponent implements OnInit {
|
||||
dzType.push("tunnel");
|
||||
}
|
||||
|
||||
this.dropzoneService.AddDropZone(
|
||||
splitGps[0],
|
||||
splitGps[1],
|
||||
formData.dzName,
|
||||
formData.address,
|
||||
formData.website,
|
||||
formData.contactMail,
|
||||
dzType,
|
||||
false
|
||||
);
|
||||
this.serviceComm.RefreshData(AddAction.Dropzone);
|
||||
this.dropzoneService.AddDropZone(splitGps[0],
|
||||
splitGps[1],
|
||||
formData.dzName,
|
||||
formData.address,
|
||||
formData.website,
|
||||
formData.contactMail,
|
||||
dzType,
|
||||
false)
|
||||
.subscribe(() => {
|
||||
this.serviceComm.RefreshData(AddAction.Dropzone);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class NewGearComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() { }
|
||||
|
||||
onSubmit(formData) {
|
||||
this.serviceApi.AddGear(formData.name,
|
||||
@@ -56,8 +56,9 @@ export class NewGearComponent implements OnInit {
|
||||
+formData.maxSize,
|
||||
formData.aad,
|
||||
formData.mainCanopy,
|
||||
formData.reserveCanopy
|
||||
);
|
||||
this.serviceComm.RefreshData(AddAction.Gear);
|
||||
formData.reserveCanopy)
|
||||
.subscribe(() => {
|
||||
this.serviceComm.RefreshData(AddAction.Gear);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export class NewJumpTypeComponent implements OnInit {
|
||||
public addForm: FormGroup;
|
||||
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private jumpTypeService: JumpTypeService) {
|
||||
private jumpTypeService: JumpTypeService) {
|
||||
this.addForm = new FormGroup(
|
||||
{
|
||||
jumptypeName: new FormControl("", Validators.required)
|
||||
@@ -22,10 +22,12 @@ export class NewJumpTypeComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() { }
|
||||
|
||||
onSubmit(formData) {
|
||||
this.jumpTypeService.AddJumpType(formData.jumptypeName);
|
||||
this.serviceComm.RefreshData(AddAction.JumpType);
|
||||
this.jumpTypeService.AddJumpType(formData.jumptypeName)
|
||||
.subscribe(() => {
|
||||
this.serviceComm.RefreshData(AddAction.JumpType);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user