Fix sur les ajouts d'infos
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -14,3 +14,4 @@
|
|||||||
/Back/skydiveLogs-api.Ioc/obj
|
/Back/skydiveLogs-api.Ioc/obj
|
||||||
/Back/skydiveLogs-api.Data/bin
|
/Back/skydiveLogs-api.Data/bin
|
||||||
/Back/skydiveLogs-api.Business/bin
|
/Back/skydiveLogs-api.Business/bin
|
||||||
|
/Back/dist
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ export class ListOfAircraftsComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serviceComm.refreshRequest.subscribe(action => {
|
this.serviceComm.refreshRequest.subscribe(action => {
|
||||||
if (action === AddAction.Gear) {
|
if (action === AddAction.Aircraft) {
|
||||||
|
this.dialog.closeAll();
|
||||||
this.getListOfAircrafts();
|
this.getListOfAircrafts();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ export class ListOfDzsComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serviceComm.refreshRequest.subscribe(action => {
|
this.serviceComm.refreshRequest.subscribe(action => {
|
||||||
if (action === AddAction.Gear) {
|
if (action === AddAction.Dropzone) {
|
||||||
|
this.dialog.closeAll();
|
||||||
this.getListOfDropZones();
|
this.getListOfDropZones();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export class ListOfGearsComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serviceComm.refreshRequest.subscribe(action => {
|
this.serviceComm.refreshRequest.subscribe(action => {
|
||||||
if (action === AddAction.Gear) {
|
if (action === AddAction.Gear) {
|
||||||
|
this.dialog.closeAll();
|
||||||
this.getListOfGears();
|
this.getListOfGears();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ export class ListOfJumpTypesComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.serviceComm.refreshRequest.subscribe(action => {
|
this.serviceComm.refreshRequest.subscribe(action => {
|
||||||
if (action === AddAction.Gear) {
|
if (action === AddAction.JumpType) {
|
||||||
|
this.dialog.closeAll();
|
||||||
this.getListOfJumpTypes();
|
this.getListOfJumpTypes();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,3 +11,9 @@ table {
|
|||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.smallSpanWithBreakWord {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 50px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,21 +7,32 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="jumpDate">
|
<ng-container matColumnDef="jumpDate">
|
||||||
<th mat-header-cell *matHeaderCellDef>Date</th>
|
<th mat-header-cell *matHeaderCellDef>Date</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.jumpDate | date: 'yyyy-MM-dd'}} </td>
|
<td mat-cell *matCellDef="let element">
|
||||||
|
<span class="smallSpanWithBreakWord" [innerHTML]="element.jumpDate | date: 'yyyy-MM-dd'"></span>
|
||||||
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="jumpType">
|
<ng-container matColumnDef="jumpType">
|
||||||
<th mat-header-cell *matHeaderCellDef>Jump Type</th>
|
<th mat-header-cell *matHeaderCellDef>Jump Type</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.jumpType.name}}</td>
|
<td mat-cell *matCellDef="let element">
|
||||||
|
<span class="smallSpanWithBreakWord" [innerHTML]="element.jumpType.name"></span>
|
||||||
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="aircraft">
|
<ng-container matColumnDef="aircraft">
|
||||||
<th mat-header-cell *matHeaderCellDef>Aircraft</th>
|
<th mat-header-cell *matHeaderCellDef>Aircraft</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.aircraft.name}}</td>
|
<td mat-cell *matCellDef="let element">
|
||||||
|
<span class="smallSpanWithBreakWord" [innerHTML]="element.aircraft.name"></span>
|
||||||
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="dropZone">
|
<ng-container matColumnDef="dropZone">
|
||||||
<th mat-header-cell *matHeaderCellDef>Drop Zone</th>
|
<th mat-header-cell *matHeaderCellDef>Drop Zone</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.dropZone.name}}</td>
|
<td mat-cell *matCellDef="let element">
|
||||||
|
<span class="spanWithBreakWord" [innerHTML]="element.dropZone.name"></span>
|
||||||
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="gear">
|
<ng-container matColumnDef="gear">
|
||||||
<th mat-header-cell *matHeaderCellDef>Gear</th>
|
<th mat-header-cell *matHeaderCellDef>Gear</th>
|
||||||
<td mat-cell *matCellDef="let element">{{element.gear.name}}</td>
|
<td mat-cell *matCellDef="let element">{{element.gear.name}}</td>
|
||||||
|
|||||||
@@ -16,18 +16,18 @@ export class NewAircraftComponent implements OnInit {
|
|||||||
private serviceComm: ServiceComm,
|
private serviceComm: ServiceComm,
|
||||||
private serviceApi: AircraftService
|
private serviceApi: AircraftService
|
||||||
) {
|
) {
|
||||||
this.addForm = new FormGroup({
|
this.addForm = new FormGroup(
|
||||||
aircraftName: new FormControl("", Validators.required)
|
{
|
||||||
});
|
aircraftName: new FormControl("", Validators.required)
|
||||||
|
},
|
||||||
|
{ updateOn: "blur" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
onSubmit(formData) {
|
onSubmit(formData) {
|
||||||
this.serviceApi.AddAircraft(formData.value.aircraftName);
|
this.serviceApi.AddAircraft(formData.aircraftName);
|
||||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
this.serviceComm.RefreshData(AddAction.Aircraft);
|
||||||
|
|
||||||
this.serviceComm.RefreshData(AddAction.Aircraft);
|
|
||||||
this.addForm.reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,12 @@
|
|||||||
<textarea matInput formControlName="address"></textarea>
|
<textarea matInput formControlName="address"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-label>Web site</mat-label>
|
||||||
|
<input matInput type="text" formControlName="website" />
|
||||||
|
</mat-form-field>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Mail of contact</mat-label>
|
<mat-label>Mail of contact</mat-label>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
|
|||||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||||
import { AddAction } from "../../models/add-action.enum";
|
import { AddAction } from "../../models/add-action.enum";
|
||||||
import { ServiceComm } from "../../services/service-comm.service";
|
import { ServiceComm } from "../../services/service-comm.service";
|
||||||
|
import { DropzoneService } from "../../services/dropzone.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-new-drop-zone",
|
selector: "app-new-drop-zone",
|
||||||
@@ -11,27 +12,53 @@ import { ServiceComm } from "../../services/service-comm.service";
|
|||||||
export class NewDropZoneComponent implements OnInit {
|
export class NewDropZoneComponent implements OnInit {
|
||||||
public addForm: FormGroup;
|
public addForm: FormGroup;
|
||||||
|
|
||||||
constructor(private serviceComm: ServiceComm) {
|
constructor(
|
||||||
this.addForm = new FormGroup({
|
private serviceComm: ServiceComm,
|
||||||
dzName: new FormControl("", Validators.required),
|
private dropzoneService: DropzoneService
|
||||||
gps: new FormControl("x.x,y.y", [
|
) {
|
||||||
Validators.required,
|
this.addForm = new FormGroup(
|
||||||
Validators.pattern("d+.d+,d+.d+")
|
{
|
||||||
]),
|
dzName: new FormControl("", Validators.required),
|
||||||
address: new FormControl("", Validators.required),
|
gps: new FormControl("x.x,y.y", [
|
||||||
contactMail: new FormControl("", [Validators.required, Validators.email]),
|
Validators.required,
|
||||||
isDz: new FormControl(true),
|
Validators.pattern("d+.d+,d+.d+")
|
||||||
isTunnel: new FormControl(false)
|
]),
|
||||||
});
|
address: new FormControl("", Validators.required),
|
||||||
|
website: new FormControl("", Validators.required),
|
||||||
|
contactMail: new FormControl("", [
|
||||||
|
Validators.required,
|
||||||
|
Validators.email
|
||||||
|
]),
|
||||||
|
isDz: new FormControl(true),
|
||||||
|
isTunnel: new FormControl(false)
|
||||||
|
},
|
||||||
|
{ updateOn: "blur" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
onSubmit(formData) {
|
onSubmit(formData) {
|
||||||
console.log(formData.status);
|
const splitGps: Array<string> = formData.gps.split(",");
|
||||||
console.warn("New data : ", formData);
|
let dzType: Array<string> = new Array<string>();
|
||||||
|
|
||||||
this.serviceComm.RefreshData(AddAction.Gear);
|
if (formData.isDz === true) {
|
||||||
this.addForm.reset();
|
dzType.push("dz");
|
||||||
|
}
|
||||||
|
if (formData.isTunnel === true) {
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,47 +17,48 @@ export class NewGearComponent implements OnInit {
|
|||||||
private serviceComm: ServiceComm,
|
private serviceComm: ServiceComm,
|
||||||
private serviceApi: GearService
|
private serviceApi: GearService
|
||||||
) {
|
) {
|
||||||
this.addForm = new FormGroup({
|
this.addForm = new FormGroup(
|
||||||
name: new FormControl("", Validators.required),
|
{
|
||||||
manufacturer: new FormControl("", Validators.required),
|
name: new FormControl("", Validators.required),
|
||||||
minSize: new FormControl("", [
|
manufacturer: new FormControl("", Validators.required),
|
||||||
Validators.required,
|
minSize: new FormControl("", [
|
||||||
Validators.min(60),
|
Validators.required,
|
||||||
Validators.max(320)
|
Validators.min(60),
|
||||||
]),
|
Validators.max(320)
|
||||||
maxSize: new FormControl("", [
|
]),
|
||||||
Validators.required,
|
maxSize: new FormControl("", [
|
||||||
Validators.min(60),
|
Validators.required,
|
||||||
Validators.max(320)
|
Validators.min(60),
|
||||||
]),
|
Validators.max(320)
|
||||||
aad: new FormControl("", Validators.required),
|
]),
|
||||||
mainCanopy: new FormControl("", [
|
aad: new FormControl("", Validators.required),
|
||||||
Validators.required,
|
mainCanopy: new FormControl("", [
|
||||||
Validators.min(60),
|
Validators.required,
|
||||||
Validators.max(320)
|
Validators.min(60),
|
||||||
]),
|
Validators.max(320)
|
||||||
reserveCanopy: new FormControl("", [
|
]),
|
||||||
Validators.required,
|
reserveCanopy: new FormControl("", [
|
||||||
Validators.min(60),
|
Validators.required,
|
||||||
Validators.max(320)
|
Validators.min(60),
|
||||||
])
|
Validators.max(320)
|
||||||
});
|
])
|
||||||
|
},
|
||||||
|
{ updateOn: "blur" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
onSubmit(formData) {
|
onSubmit(formData) {
|
||||||
this.serviceApi.AddGear(
|
this.serviceApi.AddGear(
|
||||||
formData.value.name,
|
formData.name,
|
||||||
formData.value.manufacturer,
|
formData.manufacturer,
|
||||||
formData.value.minSize,
|
+formData.minSize,
|
||||||
formData.value.maxSize,
|
+formData.maxSize,
|
||||||
formData.value.aad,
|
formData.aad,
|
||||||
formData.value.mainCanopy,
|
formData.mainCanopy,
|
||||||
formData.value.reserveCanopy
|
formData.reserveCanopy
|
||||||
);
|
);
|
||||||
|
|
||||||
this.serviceComm.RefreshData(AddAction.Gear);
|
this.serviceComm.RefreshData(AddAction.Gear);
|
||||||
this.addForm.reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Component, OnInit } from "@angular/core";
|
|||||||
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
import { FormControl, FormGroup, Validators } from "@angular/forms";
|
||||||
import { AddAction } from "../../models/add-action.enum";
|
import { AddAction } from "../../models/add-action.enum";
|
||||||
import { ServiceComm } from "../../services/service-comm.service";
|
import { ServiceComm } from "../../services/service-comm.service";
|
||||||
|
import { JumpTypeService } from "../../services/jump-type.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-new-jump-type",
|
selector: "app-new-jump-type",
|
||||||
@@ -11,19 +12,22 @@ import { ServiceComm } from "../../services/service-comm.service";
|
|||||||
export class NewJumpTypeComponent implements OnInit {
|
export class NewJumpTypeComponent implements OnInit {
|
||||||
public addForm: FormGroup;
|
public addForm: FormGroup;
|
||||||
|
|
||||||
constructor(private serviceComm: ServiceComm) {
|
constructor(
|
||||||
this.addForm = new FormGroup({
|
private serviceComm: ServiceComm,
|
||||||
jumptypeName: new FormControl("", Validators.required)
|
private jumpTypeService: JumpTypeService
|
||||||
});
|
) {
|
||||||
|
this.addForm = new FormGroup(
|
||||||
|
{
|
||||||
|
jumptypeName: new FormControl("", Validators.required)
|
||||||
|
},
|
||||||
|
{ updateOn: "blur" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
onSubmit(formData) {
|
onSubmit(formData) {
|
||||||
console.log(formData.status);
|
this.jumpTypeService.AddJumpType(formData.jumptypeName);
|
||||||
console.warn("New data : ", formData);
|
this.serviceComm.RefreshData(AddAction.JumpType);
|
||||||
|
|
||||||
this.serviceComm.RefreshData(AddAction.Gear);
|
|
||||||
this.addForm.reset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from "@angular/core";
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
import { AircraftResp, AircraftReq } from '../models/aircraft';
|
import { AircraftResp, AircraftReq } from "../models/aircraft";
|
||||||
|
|
||||||
import { BaseService } from './base.service';
|
|
||||||
|
|
||||||
|
import { BaseService } from "./base.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AircraftService extends BaseService {
|
export class AircraftService extends BaseService {
|
||||||
@@ -14,10 +13,9 @@ export class AircraftService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getListOfAircrafts(): Observable<Array<AircraftResp>> {
|
public getListOfAircrafts(): Observable<Array<AircraftResp>> {
|
||||||
return this.http.get<Array<AircraftResp>>(
|
return this.http.get<Array<AircraftResp>>(`${this.apiUrl}/Aircraft`, {
|
||||||
`${this.apiUrl}/Aircraft`,
|
headers: this.headers
|
||||||
{ headers: this.headers }
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddAircraft(aircraftName: string) {
|
public AddAircraft(aircraftName: string) {
|
||||||
@@ -32,5 +30,4 @@ export class AircraftService extends BaseService {
|
|||||||
})
|
})
|
||||||
.subscribe(data => console.log(data));
|
.subscribe(data => console.log(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from "@angular/core";
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from "rxjs/operators";
|
||||||
|
|
||||||
import { DropZoneResp } from '../models/dropzone';
|
import { DropZoneResp, DropZoneReq } from "../models/dropzone";
|
||||||
|
|
||||||
import { BaseService } from './base.service';
|
|
||||||
|
|
||||||
|
import { BaseService } from "./base.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DropzoneService extends BaseService {
|
export class DropzoneService extends BaseService {
|
||||||
@@ -48,4 +47,33 @@ export class DropzoneService extends BaseService {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AddDropZone(
|
||||||
|
latitude: string,
|
||||||
|
longitude: string,
|
||||||
|
name: string,
|
||||||
|
address: string,
|
||||||
|
website: string,
|
||||||
|
email: string,
|
||||||
|
type: Array<string>,
|
||||||
|
isFavorite: boolean
|
||||||
|
) {
|
||||||
|
const bodyNewDropZone: DropZoneReq = {
|
||||||
|
id: 0,
|
||||||
|
latitude: latitude,
|
||||||
|
longitude: longitude,
|
||||||
|
name: name,
|
||||||
|
address: address,
|
||||||
|
website: website,
|
||||||
|
email: email,
|
||||||
|
type: type,
|
||||||
|
isFavorite: isFavorite
|
||||||
|
};
|
||||||
|
|
||||||
|
this.http
|
||||||
|
.post(`${this.apiUrl}/DropZone`, bodyNewDropZone, {
|
||||||
|
headers: this.headers
|
||||||
|
})
|
||||||
|
.subscribe(data => console.log(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from "@angular/core";
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
import { GearResp, GearReq } from '../models/gear';
|
import { GearResp, GearReq } from "../models/gear";
|
||||||
|
|
||||||
import { BaseService } from './base.service';
|
|
||||||
|
|
||||||
|
import { BaseService } from "./base.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GearService extends BaseService {
|
export class GearService extends BaseService {
|
||||||
@@ -19,13 +18,15 @@ export class GearService extends BaseService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddGear(name: string,
|
public AddGear(
|
||||||
|
name: string,
|
||||||
manufacturer: string,
|
manufacturer: string,
|
||||||
minSize: number,
|
minSize: number,
|
||||||
maxSize: number,
|
maxSize: number,
|
||||||
aad: string,
|
aad: string,
|
||||||
mainCanopy: string,
|
mainCanopy: string,
|
||||||
reserveCanopy: string) {
|
reserveCanopy: string
|
||||||
|
) {
|
||||||
const bodyNewGear: GearReq = {
|
const bodyNewGear: GearReq = {
|
||||||
id: 0,
|
id: 0,
|
||||||
name: name,
|
name: name,
|
||||||
@@ -43,5 +44,4 @@ export class GearService extends BaseService {
|
|||||||
})
|
})
|
||||||
.subscribe(data => console.log(data));
|
.subscribe(data => console.log(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from "@angular/core";
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from "rxjs";
|
||||||
|
|
||||||
import { JumpTypeResp } from '../models/jumpType';
|
import { JumpTypeResp, JumpTypeReq } from "../models/jumpType";
|
||||||
|
|
||||||
import { BaseService } from './base.service';
|
|
||||||
|
|
||||||
|
import { BaseService } from "./base.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class JumpTypeService extends BaseService {
|
export class JumpTypeService extends BaseService {
|
||||||
@@ -14,9 +13,21 @@ export class JumpTypeService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getListOfJumpTypes(): Observable<Array<JumpTypeResp>> {
|
public getListOfJumpTypes(): Observable<Array<JumpTypeResp>> {
|
||||||
return this.http.get<Array<JumpTypeResp>>(
|
return this.http.get<Array<JumpTypeResp>>(`${this.apiUrl}/JumpType`, {
|
||||||
`${this.apiUrl}/JumpType`,
|
headers: this.headers
|
||||||
{ headers: this.headers }
|
});
|
||||||
);
|
}
|
||||||
|
|
||||||
|
public AddJumpType(jumptypetName: string) {
|
||||||
|
const bodyJumpType: JumpTypeReq = {
|
||||||
|
id: 0,
|
||||||
|
name: jumptypetName
|
||||||
|
};
|
||||||
|
|
||||||
|
this.http
|
||||||
|
.post(`${this.apiUrl}/JumpType`, bodyJumpType, {
|
||||||
|
headers: this.headers
|
||||||
|
})
|
||||||
|
.subscribe(data => console.log(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user