Browse Source

Refactoring

pull/4118/head
Thomas Kaul 9 months ago
parent
commit
779f68ffbb
  1. 14
      libs/ui/src/lib/assistant/assistant.component.ts
  2. 2
      libs/ui/src/lib/assistant/assistant.html

14
libs/ui/src/lib/assistant/assistant.component.ts

@ -270,10 +270,6 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit {
this.filterForm.disable({ emitEvent: false });
if (this.hasPermissionToChangeFilters) {
this.filterForm.enable({ emitEvent: false });
}
this.tags =
this.user?.tags
?.filter(({ isUsed }) => {
@ -328,6 +324,9 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit {
this.searchElement?.nativeElement?.focus();
});
this.isLoading = false;
this.setIsOpen(true);
this.dataService
.fetchPortfolioHoldings()
.pipe(takeUntil(this.unsubscribeSubject))
@ -340,8 +339,11 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit {
return a.name?.localeCompare(b.name);
});
this.setFilterFormValues();
this.isLoading = false;
this.setIsOpen(true);
if (this.hasPermissionToChangeFilters) {
this.filterForm.enable({ emitEvent: false });
}
this.changeDetectorRef.markForCheck();
});
}

2
libs/ui/src/lib/assistant/assistant.html

@ -87,7 +87,7 @@
</div>
</div>
<form [formGroup]="filterForm">
<ng-container *ngIf="!(isLoading || searchFormControl.value)">
<ng-container *ngIf="!searchFormControl.value">
<div class="date-range-selector-container p-3">
<mat-form-field appearance="outline" class="w-100 without-hint">
<mat-label i18n>Date Range</mat-label>

Loading…
Cancel
Save