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