Merge Angular 16 Irish Monitor to develop #33

Merged
k.triantafyllou merged 151 commits from angular-16-irish-monitor into develop 2024-02-13 09:32:41 +01:00
7 changed files with 15 additions and 14 deletions
Showing only changes of commit 1853b1cf57 - Show all commits

View File

@ -368,7 +368,7 @@ export class SearchDataProvidersComponent {
} }
let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId); let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId);
filter.isOpen = true; filter.isViewAllOpen = true;
this.filters[index] = filter; this.filters[index] = filter;
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },

View File

@ -347,7 +347,7 @@ export class SearchOrganizationsComponent {
} }
let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId); let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId);
filter.isOpen = true; filter.isViewAllOpen = true;
this.filters[index] = filter; this.filters[index] = filter;
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },

View File

@ -376,7 +376,7 @@ export class SearchProjectsComponent {
} }
let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId); let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId);
filter.isOpen = true; filter.isViewAllOpen = true;
this.filters[index] = filter; this.filters[index] = filter;
this.cdr.detectChanges(); this.cdr.detectChanges();
}, },

View File

@ -535,7 +535,7 @@ export class SearchResearchResultsComponent {
} }
let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId); let index: number = this.filters.findIndex((fltr: Filter) => fltr.filterId == filter.filterId);
filter.isOpen = true; filter.isViewAllOpen = true;
filter.countSelectedValues = oldFilter.countSelectedValues; filter.countSelectedValues = oldFilter.countSelectedValues;
filter.radioValue = oldFilter.radioValue; filter.radioValue = oldFilter.radioValue;
this.filters[index] = filter; this.filters[index] = filter;

View File

@ -12,10 +12,10 @@
</div> </div>
<div *ngIf="addShowMore && hasMoreValues"> <div *ngIf="addShowMore && hasMoreValues">
<a *ngIf="filterValuesNum > 0 " class="uk-text-small view-more-less-link uk-margin-small-top" [ngClass]="((isDisabled)?'uk-disabled uk-link-muted ':'')" (click)="toggle($event)"> <a *ngIf="filterValuesNum > 0 " class="uk-text-small view-more-less-link uk-margin-small-top" [ngClass]="((isDisabled)?'uk-disabled uk-link-muted ':'')" (click)="toggle($event)">
<span *ngIf="!filter.isOpen">View all</span> <span *ngIf="!filter.isViewAllOpen">View all</span>
<span *ngIf="filter.isOpen">View less </span> <span *ngIf="filter.isViewAllOpen">View less </span>
</a> </a>
<div *ngIf="filter.isOpen" class="uk-text-small uk-margin-small-top uk-margin-small-bottom"> <div *ngIf="filter.isViewAllOpen" class="uk-text-small uk-margin-small-top uk-margin-small-bottom">
<div *ngIf="filter.countAllValues == -1"> <div *ngIf="filter.countAllValues == -1">
<loading class="uk-height-small uk-display-block" size="medium"></loading> <loading class="uk-height-small uk-display-block" size="medium"></loading>
</div> </div>
@ -65,7 +65,7 @@
{{value.name=='true'?'Yes':'No'}} {{value.name=='true'?'Yes':'No'}}
</span> </span>
<ng-template #noboolean> <ng-template #noboolean>
{{_formatName(value)}} <span class="uk-text-capitalize">{{_formatName(value)}} </span>
</ng-template> </ng-template>
<span *ngIf="showResultCount">({{value.number|number}})</span> <span *ngIf="showResultCount">({{value.number|number}})</span>

View File

@ -43,7 +43,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
@Input() actionRoute: boolean = false; @Input() actionRoute: boolean = false;
@Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string }; @Input() quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string };
sub; sub;
@Input() isOpen: boolean = false; // @Input() isViewAllOpen: boolean = false;
sortedValues; sortedValues;
hasMatch: boolean = false; hasMatch: boolean = false;
@ -60,11 +60,11 @@ export class SearchFilterComponent implements OnInit, OnChanges {
ngOnInit() { ngOnInit() {
if(this.filterValuesNum == 0){ if(this.filterValuesNum == 0){
this.filter.isOpen = true; this.filter.isViewAllOpen = true;
this.sortBy = "num"; this.sortBy = "num";
} }
// else{ // else{
// this.filter.isOpen = false; // this.filter.isViewAllOpen = false;
// } // }
this.sub = this.route.queryParams.subscribe(params => { this.sub = this.route.queryParams.subscribe(params => {
this.queryParams = Object.assign({}, params); this.queryParams = Object.assign({}, params);
@ -272,7 +272,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
} }
toggle(event) { toggle(event) {
this.filter.isOpen = !this.filter.isOpen; this.filter.isViewAllOpen = !this.filter.isViewAllOpen;
event.stopPropagation(); event.stopPropagation();
this.toggleWithoutUpdate(); this.toggleWithoutUpdate();
} }
@ -281,7 +281,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
if(this.filter.countAllValues == 0) { if(this.filter.countAllValues == 0) {
this.filter.countAllValues = -1; // if request failed, try again automatically if toggled again this.filter.countAllValues = -1; // if request failed, try again automatically if toggled again
} }
if(this.filter.isOpen && this.filter.countAllValues < 0) { if(this.filter.isViewAllOpen && this.filter.countAllValues < 0) {
this.onFilterToggle.emit(this.filter); this.onFilterToggle.emit(this.filter);
} }
} }

View File

@ -12,7 +12,8 @@ export class Filter{
public radioValue?: string = ""; public radioValue?: string = "";
// public uniqueValueIdSelected: string; // public uniqueValueIdSelected: string;
public countAllValues?: number = -1; // -1: not yet requested, 0: request failed, >0 OK public countAllValues?: number = -1; // -1: not yet requested, 0: request failed, >0 OK
public isOpen?: boolean = false; // public isOpen?: boolean = false;
public isViewAllOpen?: boolean = false;
} }
export class Value{ export class Value{