Skip to content

Commit

Permalink
feat(dh): do not show download button for empty reports (#3580)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhavat authored Sep 25, 2024
1 parent 683cd63 commit f029d2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const wholesaleSettlementReportsQueryMock = (
period: { start: periodStart, end: periodEnd },
numberOfGridAreasInReport: 0,
includesBasisData: true,
statusType: SettlementReportStatusType.Error,
statusType: SettlementReportStatusType.Completed,
progress: 75,
actor: {
__typename: 'Actor',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@
</ng-container>

<ng-container *wattTableCell="columns['status']; header: t('columns.status'); let entry">
<dh-settlement-reports-status
[status]="entry.statusType"
[progress]="entry.progress"
(download)="downloadReport($event, entry)"
/>
@let reportIsEmpty = entry.statusType === "COMPLETED" && entry.gridAreas.length === 0;

@if (reportIsEmpty === false) {
<dh-settlement-reports-status
[status]="entry.statusType"
[progress]="entry.progress"
(download)="downloadReport($event, entry)"
/>
}
</ng-container>
</watt-table>
</vater-flex>
Expand Down

0 comments on commit f029d2a

Please sign in to comment.