Fix pour ajouter en base les nouveaux sauts

+ affichage plus complet des sauts
This commit is contained in:
Sébastien André
2019-11-19 17:47:40 +01:00
parent 52a3280719
commit fb2699f974
5 changed files with 27 additions and 10 deletions

Binary file not shown.

View File

@@ -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>

View File

@@ -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;

View File

@@ -25,8 +25,7 @@ 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(

View File

@@ -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));
} }
} }
} }