Update with NPM
Fix css and function name
This commit is contained in:
@@ -5,6 +5,7 @@ import { JumpReq } from '../models/jump';
|
||||
import { environment } from '../environments/environment';
|
||||
import { DateService } from './date.service';
|
||||
import { AircraftReq } from '../models/aircraft';
|
||||
import { GearReq } from '../models/gear';
|
||||
|
||||
@Injectable()
|
||||
export class ServiceApiPost {
|
||||
@@ -105,4 +106,29 @@ export class ServiceApiPost {
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
|
||||
public AddGear(name: string,
|
||||
manufacturer: string,
|
||||
minSize: number,
|
||||
maxSize: number,
|
||||
aad: string,
|
||||
mainCanopy: string,
|
||||
reserveCanopy: string) {
|
||||
const bodyNewGear: GearReq = {
|
||||
id: 0,
|
||||
name: name,
|
||||
manufacturer: manufacturer,
|
||||
minSize: minSize,
|
||||
maxSize: maxSize,
|
||||
aad: aad,
|
||||
mainCanopy: mainCanopy,
|
||||
reserveCanopy: reserveCanopy
|
||||
};
|
||||
|
||||
this.http
|
||||
.post(`${environment.urlApi}/api/Gear`, bodyNewGear, {
|
||||
headers: this.headers
|
||||
})
|
||||
.subscribe(data => console.log(data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { AddAction } from '../models/add-action.enum';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ServiceComm {
|
||||
private componentTitleSource = new BehaviorSubject<string>('');
|
||||
componentTitle = this.componentTitleSource.asObservable();
|
||||
|
||||
private refreshRequestSource = new BehaviorSubject<AddAction>(AddAction.None);
|
||||
refreshRequest = this.refreshRequestSource.asObservable();
|
||||
|
||||
constructor() { }
|
||||
|
||||
updatedComponentTitle(title: string) {
|
||||
UpdatedComponentTitle(title: string) {
|
||||
this.componentTitleSource.next(title);
|
||||
}
|
||||
|
||||
RefreshData(refreshAfter: AddAction) {
|
||||
this.refreshRequestSource.next(refreshAfter);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user