Changeset 6a80231 for trip-planner-front/src/app/planner
- Timestamp:
- 11/02/21 22:14:57 (3 years ago)
- Branches:
- master
- Children:
- 6c1585f
- Parents:
- 188ee53
- Location:
- trip-planner-front/src/app/planner
- Files:
-
- 7 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/planner/planner.component.css
r188ee53 r6a80231 1 .example-card { 2 3 } 1 mat-card { 2 width: 280px; 3 height: 160px; 4 5 } 6 .example-card button { 7 box-shadow:none !important; 8 cursor:pointer; 9 } -
trip-planner-front/src/app/planner/planner.component.html
r188ee53 r6a80231 1 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> 1 2 2 3 <button mat-raised-button (click)="openDialog()">Create initial planner</button> 3 4 4 <mat-grid-list cols="4" rowHeight="250px">5 <mat-grid-tile *ngFor="let planner of planners" 6 <mat-card class=" example-card">5 <mat-grid-list cols="4" > 6 <mat-grid-tile *ngFor="let planner of planners"> 7 <mat-card class="d-flex flex-column"> 7 8 <mat-card-title>{{planner.name}}</mat-card-title> 8 9 <mat-card-content> 9 10 {{planner.description}} 10 11 </mat-card-content> 11 <mat-card-actions >12 <button mat-raised-button color="primary" >12 <mat-card-actions class="mt-auto"> 13 <button mat-raised-button color="primary" (click)="onClickEditPlanner(planner.id)"> 13 14 <mat-icon>edit</mat-icon> Edit 14 15 </button> -
trip-planner-front/src/app/planner/planner.component.ts
r188ee53 r6a80231 4 4 import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; 5 5 import { CreateInitialPlannerComponent } from '../create-initial-planner/create-initial-planner.component'; 6 import { Router } from '@angular/router'; 6 7 7 8 … … 14 15 15 16 planners: Planner[]; 16 constructor(private plannerService: PlannerService, public dialog: MatDialog) { 17 plannerId: number; 18 19 constructor(private plannerService: PlannerService, public dialog: MatDialog, private router: Router) { 17 20 this.planners = []; 21 this.plannerId = 1; 18 22 }; 19 23 … … 33 37 } 34 38 39 onClickEditPlanner(id: number){ 40 console.log(id); 41 42 43 this.router.navigate(['edit/planner/', this.plannerId]) 44 45 } 35 46 }
Note:
See TracChangeset
for help on using the changeset viewer.