Merge pull request #9387 from ArtemDzhereleiko/AD/bug-fix/tenant-profile-autocompolete

Fixed tenant profile autocomplete hide edit button and add create new button
This commit is contained in:
Igor Kulikov 2023-10-13 13:12:15 +03:00 committed by GitHub
commit 6c7c0748c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@
(click)="clear()">
<mat-icon class="material-icons">close</mat-icon>
</button>
<button *ngIf="selectTenantProfileFormGroup.get('tenantProfile').value && !disabled"
<button *ngIf="selectTenantProfileFormGroup.get('tenantProfile').value?.id && !disabled"
type="button"
matSuffix mat-icon-button aria-label="Edit"
matTooltip="{{ 'tenant-profile.edit' | translate }}"
@ -43,6 +43,11 @@
(click)="editTenantProfile($event)">
<mat-icon class="material-icons">edit</mat-icon>
</button>
<button mat-button color="primary" matSuffix
(click)="createTenantProfile($event, '')"
*ngIf="!selectTenantProfileFormGroup.get('tenantProfile').value && !disabled">
<span style="white-space: nowrap">{{ 'notification.create-new' | translate }}</span>
</button>
<mat-autocomplete
class="tb-autocomplete"
#tenantProfileAutocomplete="matAutocomplete"