Gole na frontendzie
This commit is contained in:
parent
ea37b0ecb6
commit
43fa41d6fb
@ -10,7 +10,7 @@
|
||||
<p-table #dt [value]="matches" dataKey="id" [rowHover]="true"
|
||||
[rows]="10" [showCurrentPageReport]="true" [rowsPerPageOptions]="[10,25,50]" [loading]="loading"
|
||||
[paginator]="true" currentPageReportTemplate="{first} - {last} z {totalRecords}"
|
||||
[filterDelay]="0" [globalFilterFields]="['teamName1','teamName2','date','season', 'result', 'predictedResult']">
|
||||
[filterDelay]="0" [globalFilterFields]="['teamName1','teamName2','date','season', 'result', 'predictedResult', 'goals', 'predictedGoals']">
|
||||
<ng-template pTemplate="caption">
|
||||
<div class="ui-table-globalfilter-container">
|
||||
<input pInputText type="text" (input)="dt.filterGlobal($event.target.value, 'contains')" placeholder="Szukaj..." />
|
||||
@ -24,7 +24,8 @@
|
||||
<th pSortableColumn="season">Sezon <p-sortIcon field="season"></p-sortIcon></th>
|
||||
<th pSortableColumn="result">Wygrana <p-sortIcon field="result"></p-sortIcon></th>
|
||||
<th pSortableColumn="predictedResult">Przewidywana wygrana <p-sortIcon field="predictedResult"></p-sortIcon></th>
|
||||
<!--<th pSortableColumn="predictedGoals">Przewidywane gole<p-sortIcon field="predictedGoals"></p-sortIcon></th>-->
|
||||
<th pSortableColumn="goals">Gole <p-sortIcon field="goals"></p-sortIcon></th>
|
||||
<th pSortableColumn="predictedGoals">Przewidywane gole <p-sortIcon field="predictedGoals"></p-sortIcon></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@ -45,9 +46,12 @@
|
||||
<th>
|
||||
<input pInputText type="text" (input)="dt.filter($event.target.value, 'predictedResult', 'startsWith')" placeholder="Przewidywana wygrana" class="ui-column-filter">
|
||||
</th>
|
||||
<!--<th>
|
||||
<th>
|
||||
<input pInputText type="text" (input)="dt.filter($event.target.value, 'goals', 'startsWith')" placeholder="Gole" class="ui-column-filter">
|
||||
</th>
|
||||
<th>
|
||||
<input pInputText type="text" (input)="dt.filter($event.target.value, 'predictedGoals', 'startsWith')" placeholder="Przewidywane gole" class="ui-column-filter">
|
||||
</th>-->
|
||||
</th>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="body" let-match>
|
||||
@ -76,21 +80,25 @@
|
||||
<span class="ui-column-title"></span>
|
||||
{{match.predictedResult}}
|
||||
</td>
|
||||
<!--<td>
|
||||
<span class="ui-column-title">Przewidywane gole</span>
|
||||
{{match.predictedGoals1}}
|
||||
</td>-->
|
||||
<td>
|
||||
<span class="ui-column-title"></span>
|
||||
{{match.goals}}
|
||||
</td>
|
||||
<td>
|
||||
<span class="ui-column-title"></span>
|
||||
{{match.predictedGoals}}
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
<ng-template pTemplate="emptymessage">
|
||||
<tr>
|
||||
<td colspan="6" style="text-align:center;">Brak danych</td>
|
||||
<td colspan="8" style="text-align:center;">Brak danych</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
</p-table>
|
||||
<br />
|
||||
<div>
|
||||
<p>Procent trafionych predykcji: {{ ((TP / matches.length) * 100).toFixed(2) }}%</p>
|
||||
<p>Procent trafionych predykcji wygranej: {{ ((TP / matches.length) * 100).toFixed(2) }}%</p>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
@ -4,6 +4,7 @@ export class PredictedMatch {
|
||||
public result?: string;
|
||||
public predictedResult?: string;
|
||||
public predictedGoals?: string;
|
||||
public goals?: number;
|
||||
public season?: string;
|
||||
public date?: string;
|
||||
public teamName1?: string;
|
||||
|
Loading…
Reference in New Issue
Block a user