small improvements

This commit is contained in:
Edi Cziszter 2022-02-15 12:30:42 +02:00
parent 1094495e26
commit 36b1ec2557
6 changed files with 36 additions and 26 deletions

View File

@ -6,24 +6,26 @@
<div class="dialog-content">
<div class="heading">{{ 'confirm-delete-dossier-state.warning' | translate: translateArgs }}</div>
<div class="replacement-suggestion">{{ 'confirm-delete-dossier-state.suggestion' | translate }}</div>
<ng-container *ngIf="data.dossierCount !== 0">
<div class="replacement-suggestion">{{ 'confirm-delete-dossier-state.suggestion' | translate }}</div>
<form [formGroup]="form">
<div class="flex">
<div class="iqser-input-group required w-300">
<label translate="confirm-delete-dossier-state.form.status"></label>
<mat-select
[placeholder]="'confirm-delete-dossier-state.form.status-placeholder' | translate"
formControlName="replaceDossierStatusId"
>
<mat-option>{{ 'confirm-delete-dossier-state.form.status-placeholder' | translate }}</mat-option>
<mat-option *ngFor="let state of data.otherStates" [value]="state.dossierStatusId">
{{ state.name }}
</mat-option>
</mat-select>
<form [formGroup]="form">
<div class="flex">
<div class="iqser-input-group w-300">
<label translate="confirm-delete-dossier-state.form.status"></label>
<mat-select
[placeholder]="'confirm-delete-dossier-state.form.status-placeholder' | translate"
formControlName="replaceDossierStatusId"
>
<mat-option>{{ 'confirm-delete-dossier-state.form.status-placeholder' | translate }}</mat-option>
<mat-option *ngFor="let state of data.otherStates" [value]="state.dossierStatusId">
{{ state.name }}
</mat-option>
</mat-select>
</div>
</div>
</div>
</form>
</form>
</ng-container>
</div>
<div class="dialog-actions">

View File

@ -49,7 +49,7 @@ export class DossiersListingDetailsComponent {
config.push({
value: notAssignedLength,
label: this._translateService.instant('edit-dossier-dialog.general-info.form.dossier-status.placeholder'),
color: '#D8DAE0',
color: '#E2E4E9',
});
// TODO: deleted dossiers count should come with stats
return config;

View File

@ -7,8 +7,7 @@
<ng-container *ngIf="!dossier.dossierStatusId">
<div class="flex-align-items-center dossier-status-container">
<div class="dossier-status-text">No status assigned</div>
<div class="dossier-status-text">{{ 'edit-dossier-dialog.general-info.form.dossier-status.placeholder' | translate }}</div>
<redaction-small-chip [color]="'#E2E4E9'"></redaction-small-chip>
</div>
</ng-container>
<redaction-dossiers-listing-actions [dossier]="dossier" [stats]="stats"></redaction-dossiers-listing-actions>

View File

@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { Dossier, DossierStats } from '../../../../../../../../../../libs/red-domain/src';
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core';
import { Dossier } from '../../../../../../../../../../libs/red-domain/src';
import { DossierStateService } from '../../../../../../services/entity-services/dossier-state.service';
import { DossierState } from '@red/domain';
@ -9,14 +9,21 @@ import { DossierState } from '@red/domain';
styleUrls: ['./dossiers-listing-status.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DossiersListingStatusComponent implements OnChanges {
@Input() stats: DossierStats;
export class DossiersListingStatusComponent implements OnInit, OnChanges {
@Input() dossier: Dossier;
currentState: DossierState;
constructor(private readonly _dossierStateService: DossierStateService) {}
ngOnInit(): void {
this.#setState();
}
ngOnChanges(): void {
this.#setState();
}
#setState(): void {
if (this.dossier.dossierStatusId) {
this.currentState = this._dossierStateService.all.find(s => s.dossierStatusId === this.dossier.dossierStatusId);
}

View File

@ -16,6 +16,8 @@
</div>
<div class="cell">
<redaction-dossiers-listing-status [stats]="stats" [dossier]="dossier"></redaction-dossiers-listing-status>
<redaction-dossiers-listing-status [dossier]="dossier"></redaction-dossiers-listing-status>
<redaction-dossiers-listing-actions [dossier]="dossier" [stats]="stats"></redaction-dossiers-listing-actions>
</div>
</ng-container>

View File

@ -1010,7 +1010,7 @@
},
"dossier-status": {
"label": "Dossier Status",
"placeholder": "No status assigned"
"placeholder": "Undefined"
},
"due-date": "Due Date",
"name": {