Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (51 sloc) 1.85 KB
<ng-container *ngIf="{state$: store.state$ | async} as subs">
<ce-url-sort-selector
class="ce-url-sort-selector ce-coffee-list-view__sort-selector"
[sort]="subs.state$.candidateList.sort"
[fields]="[{name: 'Votes', field: 'votes'}, {name: 'Name', field: 'name'}]"
></ce-url-sort-selector>
<div
class="ce-panel ce-coffee-list-view__list-item"
*ngIf="subs.state$.requests.listCandidates.inProgress"
>
<div class="ce-loader ce-loader--takeover"></div>
</div>
<ng-container *ngIf="!subs.state$.requests.listCandidates.inProgress">
<div
class="ce-panel ce-coffee-list-view__list-item"
*ngFor="let candidate of subs.state$.candidateList.candidates"
>
<ce-coffee-candidate
class="ce-coffee-candidate ce-coffee-list-view__candidate"
[candidate]="candidate"
(onUserAction)="store.submitUserAction(candidate, $event)"
>
<button
class="ce-button"
(click)="store.openDetailsModal(candidate)"
>
Details
</button>
</ce-coffee-candidate>
</div>
</ng-container>
<ce-modal
#detailsModal
class="ce-modal"
(onClose)="store.setDetailsModalState(null)"
>
<ce-candidate-details
class="ce-coffee-list-view__candidate-details"
*ngIf="subs.state$.detailsModal.candidate"
[candidate]="subs.state$.detailsModal.candidate"
></ce-candidate-details>
<div class="ce-modal__actions">
<button
class="ce-button ce-button--outline"
(click)="store.closeDetailsModal()"
>
Close
</button>
</div>
</ce-modal>
</ng-container>
You can’t perform that action at this time.