Rename the methods

This commit is contained in:
Sébastien ANDRE
2023-06-29 15:59:58 +02:00
parent f789a4269a
commit 8598f4e087
23 changed files with 62 additions and 67 deletions

View File

@@ -46,7 +46,7 @@ export class DefaultComponent implements OnInit {
private updateTitle() {
this.translateService.get("Default_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -25,12 +25,12 @@ export class JumpInfosComponent implements OnInit {
ngOnInit(): void {}
public updateJump() {
this.serviceJump.UpdateJump(this.jump.id,
this.serviceJump.updateJump(this.jump.id,
this.jump.isSpecial,
this.jump.withCutaway,
this.jump.notes)
.subscribe(() => {
this.serviceComm.RefreshData(AddAction.Jump);
this.serviceComm.refreshData(AddAction.Jump);
});
}
}

View File

@@ -65,7 +65,7 @@ export class ListOfAircraftsComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListAircrafts_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -67,7 +67,7 @@ export class ListOfDzsComponent implements OnInit {
public setToFavorite(dropzone: DropZoneResp) {
dropzone.isFavorite = true;
this.serviceApi.SetFavoriteDropZone(dropzone);
this.serviceApi.setFavoriteDropZone(dropzone);
const data = this.dataSourceTable.data;
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
@@ -77,7 +77,7 @@ export class ListOfDzsComponent implements OnInit {
public removeToFavorite(dropzone: DropZoneResp) {
dropzone.isFavorite = false;
this.serviceApi.RemoveFavoriteDropZone(dropzone);
this.serviceApi.removeFavoriteDropZone(dropzone);
const data = this.dataSourceTable.data;
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
@@ -99,7 +99,7 @@ export class ListOfDzsComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListDz_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -71,7 +71,7 @@ export class ListOfGearsComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListGears_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -108,7 +108,7 @@ export class ListOfImagesComponent implements OnInit {
return;
}
this.serviceApi.AddImage(formData.comment, this.selectedFile)
this.serviceApi.addImage(formData.comment, this.selectedFile)
.subscribe(
() => { this.getListOfImages(); }
);

View File

@@ -65,7 +65,7 @@ export class ListOfJumpTypesComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListJumpTypes_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -61,7 +61,7 @@ export class ListOfJumpsComponent implements OnInit {
getListOfJumps(pageSize: number = 20, pageIndex: number = 0) {
this.isLoading = true;
this.serviceApi.GetJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize)
this.serviceApi.getJumps(pageIndex * pageSize, pageIndex * pageSize + pageSize)
.subscribe((data) => {
this.dataSourceTable.data = data.rows;
setTimeout(() => {
@@ -86,7 +86,7 @@ export class ListOfJumpsComponent implements OnInit {
this.dataSourceTable.data = data;
this.serviceApi.DeleteJump(item);
this.serviceApi.deleteJump(item);
this.statsService.resetStats();
}
@@ -96,7 +96,7 @@ export class ListOfJumpsComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListJumps_Title").subscribe((data) => {
this.serviceComm.UpdatedComponentTitle(data);
this.serviceComm.updatedComponentTitle(data);
});
}
}

View File

@@ -38,7 +38,7 @@ export class ListOfTunnelFlightsComponent implements OnInit {
private updateTitle() {
this.translateService.get("ListTunnelFlight_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}

View File

@@ -31,9 +31,9 @@ export class NewAircraftComponent implements OnInit {
return;
}
this.serviceApi.AddAircraft(formData.aircraftName, this.selectedFile)
this.serviceApi.addAircraft(formData.aircraftName, this.selectedFile)
.subscribe(() => {
this.serviceComm.RefreshData(AddAction.Aircraft);
this.serviceComm.refreshData(AddAction.Aircraft);
});
}

View File

@@ -49,7 +49,7 @@ export class NewDropZoneComponent implements OnInit {
dzType.push("tunnel");
}
this.dropzoneService.AddDropZone(splitGps[0],
this.dropzoneService.addDropZone(splitGps[0],
splitGps[1],
formData.dzName,
formData.address,
@@ -58,7 +58,7 @@ export class NewDropZoneComponent implements OnInit {
dzType,
false)
.subscribe(() => {
this.serviceComm.RefreshData(AddAction.Dropzone);
this.serviceComm.refreshData(AddAction.Dropzone);
});
}
}

View File

@@ -49,7 +49,7 @@ export class NewGearComponent implements OnInit {
ngOnInit() { }
onSubmit(formData) {
this.serviceApi.AddGear(formData.name,
this.serviceApi.addGear(formData.name,
formData.manufacturer,
+formData.minSize,
+formData.maxSize,
@@ -57,7 +57,7 @@ export class NewGearComponent implements OnInit {
formData.mainCanopy,
formData.reserveCanopy)
.subscribe(() => {
this.serviceComm.RefreshData(AddAction.Gear);
this.serviceComm.refreshData(AddAction.Gear);
});
}
}

View File

@@ -25,9 +25,9 @@ export class NewJumpTypeComponent implements OnInit {
ngOnInit() { }
onSubmit(formData) {
this.jumpTypeService.AddJumpType(formData.jumptypeName)
this.jumpTypeService.addJumpType(formData.jumptypeName)
.subscribe(() => {
this.serviceComm.RefreshData(AddAction.JumpType);
this.serviceComm.refreshData(AddAction.JumpType);
});
}
}

View File

@@ -90,7 +90,7 @@ export class NewJumpComponent implements OnInit {
onFormSubmit() {
this.pendingAddRequest = true;
this.serviceJump.AddListOfJump(this.selectedJumpType.id,
this.serviceJump.addListOfJump(this.selectedJumpType.id,
this.selectedAircraft.id,
this.selectedDz.id,
this.selectedGear.id,
@@ -172,7 +172,7 @@ export class NewJumpComponent implements OnInit {
private initForm() {
this.endDate = new Date();
this.endDate.setHours(0, 0, 0, 0);
this.beginDate = this.dateService.AddDays(this.endDate, -1);
this.beginDate = this.dateService.addDays(this.endDate, -1);
this.exitAltitude = 4000;
this.deployAltitude = 1000;
@@ -225,7 +225,7 @@ export class NewJumpComponent implements OnInit {
private updateTitle() {
this.translateService.get("NewJump_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}

View File

@@ -129,7 +129,7 @@ export class SummaryComponent implements OnInit {
private updateTitle() {
this.translateService.get("Summary_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
data => { this.serviceComm.updatedComponentTitle(data); }
);
}
}