fix(ui): fix multiple no contract messages
With the refactoring of the "my clients" page we introduced a bug where the no contracts message for a client has been printed multiple times for one client.
This bug was fixed by removing the message from the contracts for loop.
Closes:
</span>
</div>
</div>
+ <ng-container
+ *ngIf="clientHasContracts(client.id); else noContracts">
<ng-container *ngFor="let contract of contracts$ | async">
- <ng-container *ngIf="!clientHasContracts(client.id)"
- ><app-no-data
- class="dp-center no-contracts-msg"
- [text]="'CLIENTS.NO_CONTRACTS' | translate"
- [textClass]="'text-big3'"></app-no-data
- ></ng-container>
-
<div
*ngIf="contract.client.id === client.id"
id="{{ contract.api.api.id }}"
<span
id="api-menu-use-api"
(click)="setSection(contract, 'use-api')"
- [ngClass]="{ primary: contract.section === 'use-api' }">
+ [ngClass]="{
+ primary: contract.section === 'use-api'
+ }">
{{ 'CLIENTS.USE_API' | translate }}
</span>
</div>
</div>
</div>
</ng-container>
+ </ng-container>
+ <ng-template #noContracts>
+ <app-no-data
+ class="dp-center no-contracts-msg"
+ [text]="'CLIENTS.NO_CONTRACTS' | translate"
+ [textClass]="'text-big3'"></app-no-data
+ ></ng-template>
</mat-card>
</ng-container>
</ng-container>
