Indent
This commit is contained in:
@@ -14,10 +14,8 @@ export class NewAircraftComponent implements OnInit {
|
||||
public imageError: string;
|
||||
private selectedFile: string;
|
||||
|
||||
constructor(
|
||||
private serviceComm: ServiceComm,
|
||||
private serviceApi: AircraftService
|
||||
) {
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private serviceApi: AircraftService) {
|
||||
this.addForm = new FormGroup(
|
||||
{
|
||||
aircraftName: new FormControl('', Validators.required)
|
||||
@@ -38,9 +36,7 @@ export class NewAircraftComponent implements OnInit {
|
||||
}
|
||||
|
||||
public onFileChanged(fileInput: any) {
|
||||
const file = fileInput.dataTransfer
|
||||
? fileInput.dataTransfer.files[0]
|
||||
: fileInput.target.files[0];
|
||||
const file = fileInput.dataTransfer ? fileInput.dataTransfer.files[0] : fileInput.target.files[0];
|
||||
const allowed_types = ['image/png', 'image/jpeg'];
|
||||
const max_size = 20971520;
|
||||
|
||||
|
||||
@@ -50,14 +50,13 @@ export class NewGearComponent implements OnInit {
|
||||
ngOnInit() {}
|
||||
|
||||
onSubmit(formData) {
|
||||
this.serviceApi.AddGear(
|
||||
formData.name,
|
||||
formData.manufacturer,
|
||||
+formData.minSize,
|
||||
+formData.maxSize,
|
||||
formData.aad,
|
||||
formData.mainCanopy,
|
||||
formData.reserveCanopy
|
||||
this.serviceApi.AddGear(formData.name,
|
||||
formData.manufacturer,
|
||||
+formData.minSize,
|
||||
+formData.maxSize,
|
||||
formData.aad,
|
||||
formData.mainCanopy,
|
||||
formData.reserveCanopy
|
||||
);
|
||||
this.serviceComm.RefreshData(AddAction.Gear);
|
||||
}
|
||||
|
||||
@@ -12,10 +12,8 @@ import { JumpTypeService } from "../../services/jump-type.service";
|
||||
export class NewJumpTypeComponent implements OnInit {
|
||||
public addForm: FormGroup;
|
||||
|
||||
constructor(
|
||||
private serviceComm: ServiceComm,
|
||||
private jumpTypeService: JumpTypeService
|
||||
) {
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private jumpTypeService: JumpTypeService) {
|
||||
this.addForm = new FormGroup(
|
||||
{
|
||||
jumptypeName: new FormControl("", Validators.required)
|
||||
|
||||
Reference in New Issue
Block a user