fix multiple subscribes
This commit is contained in:
parent
6311fab415
commit
31f1ab09d9
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
<mat-menu #menu="matMenu" class="search-menu" xPosition="after">
|
<mat-menu #menu="matMenu" class="search-menu" xPosition="after">
|
||||||
<ng-template matMenuContent>
|
<ng-template matMenuContent>
|
||||||
<div class="wrapper">
|
<div *ngIf="currentActionIdx$ | async as currentIndex" class="wrapper">
|
||||||
<button
|
<button
|
||||||
(click)="item.action(valueChanges$.getValue())"
|
(click)="item.action(valueChanges$.getValue())"
|
||||||
*ngFor="let item of shownActions; let index = index"
|
*ngFor="let item of shownActions; let index = index"
|
||||||
[class.highlight]="(currentActionIdx$ | async) === index"
|
[class.highlight]="currentIndex === index"
|
||||||
class="spotlight-row pointer"
|
class="spotlight-row pointer"
|
||||||
>
|
>
|
||||||
<mat-icon [svgIcon]="item.icon"></mat-icon>
|
<mat-icon [svgIcon]="item.icon"></mat-icon>
|
||||||
|
|||||||
@ -22,9 +22,11 @@
|
|||||||
type="text"
|
type="text"
|
||||||
/>
|
/>
|
||||||
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption>
|
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption>
|
||||||
<mat-option *ngFor="let field of filteredKeyOptions | async" [value]="field">
|
<ng-container *ngIf="filteredKeyOptions | async as fields">
|
||||||
{{ field }}
|
<mat-option *ngFor="let field of fields" [value]="field">
|
||||||
</mat-option>
|
{{ field }}
|
||||||
|
</mat-option>
|
||||||
|
</ng-container>
|
||||||
</mat-autocomplete>
|
</mat-autocomplete>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
@ -95,12 +97,12 @@
|
|||||||
width="full"
|
width="full"
|
||||||
></iqser-input-with-action>
|
></iqser-input-with-action>
|
||||||
</div>
|
</div>
|
||||||
<div [class.search-open]="isSearchOpen" class="csv-header-pill-content">
|
<div *ngIf="sortedDisplayedEntities$ | async as fields" [class.search-open]="isSearchOpen" class="csv-header-pill-content">
|
||||||
<div
|
<div
|
||||||
(click)="toggleFieldActive(field)"
|
(click)="toggleFieldActive(field)"
|
||||||
(mouseenter)="setHoveredColumn(field.csvColumn)"
|
(mouseenter)="setHoveredColumn(field.csvColumn)"
|
||||||
(mouseleave)="setHoveredColumn()"
|
(mouseleave)="setHoveredColumn()"
|
||||||
*ngFor="let field of sortedDisplayedEntities$ | async"
|
*ngFor="let field of fields"
|
||||||
class="csv-header-pill-wrapper"
|
class="csv-header-pill-wrapper"
|
||||||
>
|
>
|
||||||
<div [class.selected]="isActive(field)" class="csv-header-pill">
|
<div [class.selected]="isActive(field)" class="csv-header-pill">
|
||||||
|
|||||||
@ -48,10 +48,10 @@
|
|||||||
></redaction-simple-doughnut-chart>
|
></redaction-simple-doughnut-chart>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="dossier.hasFiles" class="mt-24 legend pb-32">
|
<div *ngIf="dossier.hasFiles && needsWorkFilters$ | async as filters" class="mt-24 legend pb-32">
|
||||||
<div
|
<div
|
||||||
(click)="filterService.toggleFilter('needsWorkFilters', filter.id)"
|
(click)="filterService.toggleFilter('needsWorkFilters', filter.id)"
|
||||||
*ngFor="let filter of needsWorkFilters$ | async"
|
*ngFor="let filter of filters"
|
||||||
[class.active]="filter.checked"
|
[class.active]="filter.checked"
|
||||||
>
|
>
|
||||||
<redaction-type-filter [filter]="filter"></redaction-type-filter>
|
<redaction-type-filter [filter]="filter"></redaction-type-filter>
|
||||||
|
|||||||
@ -94,18 +94,18 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #viewModeSelection>
|
<ng-template #viewModeSelection>
|
||||||
<div class="view-mode-selection">
|
<div *ngIf="listingMode$ | async as mode" class="view-mode-selection">
|
||||||
<div class="all-caps-label" translate="view-mode.view-as"></div>
|
<div class="all-caps-label" translate="view-mode.view-as"></div>
|
||||||
<iqser-circle-button
|
<iqser-circle-button
|
||||||
(action)="listingMode = listingModes.workflow"
|
(action)="listingMode = listingModes.workflow"
|
||||||
[attr.aria-expanded]="(listingMode$ | async) === listingModes.workflow"
|
[attr.aria-expanded]="mode === listingModes.workflow"
|
||||||
[tooltip]="'view-mode.workflow' | translate"
|
[tooltip]="'view-mode.workflow' | translate"
|
||||||
icon="iqser:lanes"
|
icon="iqser:lanes"
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<iqser-circle-button
|
<iqser-circle-button
|
||||||
(action)="listingMode = listingModes.table"
|
(action)="listingMode = listingModes.table"
|
||||||
[attr.aria-expanded]="(listingMode$ | async) === listingModes.table"
|
[attr.aria-expanded]="mode === listingModes.table"
|
||||||
[tooltip]="'view-mode.list' | translate"
|
[tooltip]="'view-mode.list' | translate"
|
||||||
icon="iqser:list"
|
icon="iqser:list"
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
ChangeDetectionStrategy,
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
@ -57,6 +58,7 @@ import { DossierTemplatesService } from '../../../services/dossier-templates.ser
|
|||||||
templateUrl: './dossier-overview-screen.component.html',
|
templateUrl: './dossier-overview-screen.component.html',
|
||||||
styleUrls: ['./dossier-overview-screen.component.scss'],
|
styleUrls: ['./dossier-overview-screen.component.scss'],
|
||||||
providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DossierOverviewScreenComponent) }],
|
providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DossierOverviewScreenComponent) }],
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class DossierOverviewScreenComponent extends ListingComponent<File> implements OnInit, OnDestroy, OnDetach, OnAttach {
|
export class DossierOverviewScreenComponent extends ListingComponent<File> implements OnInit, OnDestroy, OnDetach, OnAttach {
|
||||||
readonly listingModes = ListingModes;
|
readonly listingModes = ListingModes;
|
||||||
|
|||||||
@ -1,4 +1,14 @@
|
|||||||
import { AfterViewInit, Component, forwardRef, Injector, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
import {
|
||||||
|
AfterViewInit,
|
||||||
|
ChangeDetectionStrategy,
|
||||||
|
Component,
|
||||||
|
forwardRef,
|
||||||
|
Injector,
|
||||||
|
OnDestroy,
|
||||||
|
OnInit,
|
||||||
|
TemplateRef,
|
||||||
|
ViewChild,
|
||||||
|
} from '@angular/core';
|
||||||
import { DossierStatuses } from '@redaction/red-ui-http';
|
import { DossierStatuses } from '@redaction/red-ui-http';
|
||||||
import { AppStateService } from '@state/app-state.service';
|
import { AppStateService } from '@state/app-state.service';
|
||||||
import { Dossier } from '@state/model/dossier';
|
import { Dossier } from '@state/model/dossier';
|
||||||
@ -25,10 +35,12 @@ import { DossiersService } from '../../../services/dossiers.service';
|
|||||||
{ provide: EntitiesService, useExisting: DossiersService },
|
{ provide: EntitiesService, useExisting: DossiersService },
|
||||||
{ provide: ListingComponent, useExisting: forwardRef(() => DossiersListingScreenComponent) },
|
{ provide: ListingComponent, useExisting: forwardRef(() => DossiersListingScreenComponent) },
|
||||||
],
|
],
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class DossiersListingScreenComponent
|
export class DossiersListingScreenComponent
|
||||||
extends ListingComponent<Dossier>
|
extends ListingComponent<Dossier>
|
||||||
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach {
|
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach
|
||||||
|
{
|
||||||
readonly currentUser = this._userService.currentUser;
|
readonly currentUser = this._userService.currentUser;
|
||||||
readonly tableColumnConfigs = this._configService.tableConfig;
|
readonly tableColumnConfigs = this._configService.tableConfig;
|
||||||
readonly tableHeaderLabel = _('dossier-listing.table-header.title');
|
readonly tableHeaderLabel = _('dossier-listing.table-header.title');
|
||||||
|
|||||||
@ -32,10 +32,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="filterByDossierTemplate">
|
<ng-container *ngIf="filterByDossierTemplate">
|
||||||
<div class="iqser-input-group w-200 mt-0 mr-8">
|
<div *ngIf="dossierTemplatesService.all$ | async as templates" class="iqser-input-group w-200 mt-0 mr-8">
|
||||||
<mat-select [(ngModel)]="dossierTemplate" [disabled]="!compare">
|
<mat-select [(ngModel)]="dossierTemplate" [disabled]="!compare">
|
||||||
<mat-option [value]="selectDossierTemplate">{{ selectDossierTemplate.name | translate }}</mat-option>
|
<mat-option [value]="selectDossierTemplate">{{ selectDossierTemplate.name | translate }}</mat-option>
|
||||||
<mat-option *ngFor="let dossierTemplate of dossierTemplatesService.all$ | async" [value]="dossierTemplate">
|
<mat-option *ngFor="let dossierTemplate of templates" [value]="dossierTemplate">
|
||||||
{{ dossierTemplate.name }}
|
{{ dossierTemplate.name }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@ -51,10 +51,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<div *ngIf="!filterByDossierTemplate" class="iqser-input-group w-200 mt-0">
|
<div *ngIf="!filterByDossierTemplate && dossiersService.all$ | async as dossiers" class="iqser-input-group w-200 mt-0">
|
||||||
<mat-select [(ngModel)]="dossier" [disabled]="!compare">
|
<mat-select [(ngModel)]="dossier" [disabled]="!compare">
|
||||||
<mat-option [value]="selectDossier">{{ selectDossier.dossierName | translate }}</mat-option>
|
<mat-option [value]="selectDossier">{{ selectDossier.dossierName | translate }}</mat-option>
|
||||||
<mat-option *ngFor="let dossier of dossiersService.all$ | async" [value]="dossier">
|
<mat-option *ngFor="let dossier of dossiers" [value]="dossier">
|
||||||
{{ dossier.dossierName }}
|
{{ dossier.dossierName }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit adf27211ddb6547dea0b2c570d1681cb00e84cdf
|
Subproject commit feaaa5d8dc9ebc1075e03a6e7b92f3ccec893fc3
|
||||||
Loading…
x
Reference in New Issue
Block a user