Skip to content

Commit

Permalink
Insert Button Delete Route Version
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreu Pérez committed Jan 22, 2024
1 parent 14e7857 commit 004ac83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {WaypointListComponent} from "./waypoint/waypoint-list/waypoint-list.comp
import {WaypointDetailComponent} from "./waypoint/waypoint-detail/waypoint-detail.component";
import {WaypointEditComponent} from "./waypoint/waypoint-edit/waypoint-edit.component";
import {WaypointDeleteComponent} from "./waypoint/waypoint-delete/waypoint-delete.component";
import {RouteVersionsDeleteComponent} from "./route-versions/route-versions-delete/route-versions-delete.component";

const routes: Routes = [
{ path: 'users/create', component: UserRegisterComponent},
Expand All @@ -42,6 +43,7 @@ const routes: Routes = [
{ path: 'routes', component: RouteListComponent, canActivate: [CheckLoggedInGuard] },

{ path: 'route-versions-create', component: RouteVersionsCreateComponent, canActivate: [CheckIsNotAdminGuard] },
{ path: 'route-versions/delete', component: RouteVersionsDeleteComponent, canActivate: [CheckIsNotAdminGuard] },

{ path: 'routeFollowed/create', component: RouteFollowedCreateComponent, canActivate: [CheckIsNotAdminGuard] },
{ path: 'routeFollowed/:id/delete', component: RouteFollowedDeleteComponent, canActivate: [CheckIsNotAdminGuard]},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ <h6 class="card-subtitle text-muted">Title</h6>
<p class="card-text">{{version.title}}</p>
</div>
</div>
<div class="card-footer text-right row">
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" *ngIf="!isRole('admin')" (click)="delete(version)" class="btn col-6 m-1 btn-outline-danger">Delete</button>
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 004ac83

Please sign in to comment.