Fix pour ajouter en base les nouveaux sauts
+ affichage plus complet des sauts
This commit is contained in:
BIN
Back/skydiveLogs-api/Data/JumpsDb-log.db
Normal file
BIN
Back/skydiveLogs-api/Data/JumpsDb-log.db
Normal file
Binary file not shown.
@@ -4,6 +4,24 @@
|
|||||||
<td mat-cell *matCellDef="let element">{{element.id}}</td>
|
<td mat-cell *matCellDef="let element">{{element.id}}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="jumpDate">
|
||||||
|
<th mat-header-cell *matHeaderCellDef>Date</th>
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.jumpDate | date: 'yyyy-MM-dd'}} </td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="jumpTypeId">
|
||||||
|
<th mat-header-cell *matHeaderCellDef>Jump Type</th>
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.jumpTypeId}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="aircraftId">
|
||||||
|
<th mat-header-cell *matHeaderCellDef>Aircraft</th>
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.aircraftId}}</td>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container matColumnDef="dropZoneId">
|
||||||
|
<th mat-header-cell *matHeaderCellDef>Drop Zone</th>
|
||||||
|
<td mat-cell *matCellDef="let element">{{element.dropZoneId}}</td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { ServiceComm } from '../../services/serviceComm';
|
|||||||
})
|
})
|
||||||
export class ListOfJumpsComponent implements OnInit {
|
export class ListOfJumpsComponent implements OnInit {
|
||||||
public listOfJumps: Observable<Array<JumpResp>>;
|
public listOfJumps: Observable<Array<JumpResp>>;
|
||||||
public displayedColumns: Array<string> = ['id'];
|
public displayedColumns: Array<string> = ['id', 'jumpDate', 'jumpTypeId', 'aircraftId', 'dropZoneId',];
|
||||||
public dataSourceTable;
|
public dataSourceTable;
|
||||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,9 @@ export class ServiceApiGet {
|
|||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
public getListOfDropZones(): Observable<Array<DropZoneResp>> {
|
public getListOfDropZones(): Observable<Array<DropZoneResp>> {
|
||||||
return this.http
|
return this.http.get<Array<DropZoneResp>>(`${environment.urlApi}/api/DropZone`, {
|
||||||
.get<Array<DropZoneResp>>(`${environment.urlApi}/api/DropZone`, {
|
headers: this.headers
|
||||||
headers: this.headers
|
})
|
||||||
})
|
|
||||||
.pipe(
|
.pipe(
|
||||||
map(response => {
|
map(response => {
|
||||||
const details = response.map(data => new DropZoneResp(data));
|
const details = response.map(data => new DropZoneResp(data));
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ export class ServiceApiPost {
|
|||||||
jumpDate: jumpDate
|
jumpDate: jumpDate
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(bodyNewjump.jumpDate);
|
// console.log(bodyNewjump.jumpDate);
|
||||||
// this.http.post('http://localhost:5000/api/Jump',
|
this.http.post(`${environment.urlApi}/api/Jump`,
|
||||||
// bodyNewjump,
|
bodyNewjump,
|
||||||
// { headers: this.headers })
|
{ headers: this.headers })
|
||||||
// .subscribe(data => console.log(data));
|
.subscribe(data => console.log(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user