Skip to content

Commit

Permalink
Merge pull request #2 from generEOS/master
Browse files Browse the repository at this point in the history
Vote table enhancements
  • Loading branch information
EOS Rio authored Jun 14, 2018
2 parents 366e878 + f6fc496 commit 76b270a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/app/dashboard/vote/vote.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,19 @@
<h4 class="title">Vote for Block Producers! </h4>
<h5 class="subtitle mt-0">You can vote for up to 30</h5>
</div>
<div class="col-lg-4 col-md-6 text-right">
<div class="col-lg-3 col-md-6 text-right">
<mat-form-field class="searchbar">
<input type="text" matInput placeholder="Search..."
(input)="dt.filterGlobal($event.target.value, 'contains')">
<fa-icon matSuffix [icon]="['far', 'search']" size="lg"></fa-icon>
</mat-form-field>
</div>
<div class="col-lg text-right">
<button (click)="shuffleBps()" class="btn btn-info-outline"
style="margin-top: 12px; margin-right: 25px">
SHUFFLE
</button>
</div>
<div class="col-lg text-right">
<button (click)="processVotes()" class="btn btn-info-outline"
style="margin-top: 12px; margin-right: 25px" [disabled]="nVotes > 30">
Expand All @@ -97,14 +103,17 @@ <h5 class="subtitle mt-0">You can vote for up to 30</h5>
<tr>
<th style="width: 50px;">
</th>
<th>
<th [pSortableColumn]="'name'">
name
<p-sortIcon [field]="'name'"></p-sortIcon>
</th>
<th>
<th [pSortableColumn]="'account'">
account
<p-sortIcon [field]="'account'"></p-sortIcon>
</th>
<th>
<th [pSortableColumn]="'location'">
location
<p-sortIcon [field]="'location'"></p-sortIcon>
</th>
<th>
social
Expand Down
4 changes: 4 additions & 0 deletions src/app/dashboard/vote/vote.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export class VoteComponent implements OnInit, AfterViewInit {
this.voteService.listProducers();
}

shuffleBps() {
this.voteService.randomizeList();
}

processVotes() {
this.selectedBPs = [];
this.voteService.bps.forEach((bp) => {
Expand Down

0 comments on commit 76b270a

Please sign in to comment.