Skip to content

Commit

Permalink
Use queryParams for routerLink
Browse files Browse the repository at this point in the history
  • Loading branch information
henrist committed Jul 13, 2024
1 parent 12482e9 commit 29f1cf2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions frontend/src/admin/daytheme/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>
<a class="btn btn-success" routerLink="/a/order/new/{{ group.id }}"
>Ny ordre</a
>
<a class="btn btn-default" routerLink="/a/orders?eventgroup_id={{ group.id }}"
<a class="btn btn-default" routerLink="/a/orders" [queryParams]="{ eventgroup_id: group.id }"
>Ordreliste</a
>
</span>
Expand Down Expand Up @@ -136,7 +136,8 @@ <h2>
"
>
<a
routerLink="/a/orders?tickets.event.id={{ event.id }}"
routerLink="/a/orders"
[queryParams]="{ 'tickets.event.id': event.id }"
>{{::event.ticket_count.totals.valid}}</a
>
</span>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/admin/event/checkin.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ <h1>
</button>
<a
class="btn btn-default"
routerLink="/a/orders?eventgroup_id={{ ctrl.event.eventgroup.id }}"
routerLink="/a/orders"
[queryParams]="{ eventgroup_id: ctrl.event.eventgroup.id }"
target="_blank"
>Avansert ordresøk</a
>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/admin/event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ <h1>
>Innsjekking</a
>
<a
routerLink="/a/orders?tickets.event.id={{ event.id }}"
routerLink="/a/orders"
[queryParams]="{ 'tickets.event.id': event.id }"
[hidden]="!event.has_tickets"
class="btn btn-default"
>Vis ordre</a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ <h2>
) {
<span>
<a
routerLink="/a/orders?tickets.event.id={{ event.id }}"
routerLink="/a/orders"
[queryParams]="{ 'tickets.event.id': event.id }"
>{{ event.ticket_count.totals.valid }}</a
>
</span>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/admin/order/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ <h1>
<span class="pull-right">
<a
class="btn btn-default"
routerLink="/a/orders?eventgroup_id={{ ctrl.eventgroup.id }}"
routerLink="/a/orders"
[queryParams]="{ eventgroup_id: ctrl.eventgroup.id }"
>Ordreliste</a
>
</span>
Expand Down Expand Up @@ -272,7 +273,7 @@ <h2>Ordrehistorikk</h2>
<div>
<p>
Dette er en liste over de siste ordrene opprettet i en billettluke.
<a routerLink="/a/orders?eventgroup_id={{ ctrl.eventgroup.id }}">Full liste</a>
<a routerLink="/a/orders" [queryParams]="{ eventgroup_id: ctrl.eventgroup.id }">Full liste</a>
</p>

<table class="table table-striped table-condensed order-list-table">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/admin/order/order.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="page-header">
<h1>
<span class="eventgroup">
<a routerLink="/a/orders?eventgroup_id={{ ctrl.order.eventgroup.id }}">{{
<a routerLink="/a/orders" [queryParams]="{ eventgroup_id: ctrl.order.eventgroup.id }">{{
ctrl.order.eventgroup.title
}}</a>
</span>
Expand Down

0 comments on commit 29f1cf2

Please sign in to comment.