2023-11-29 14:26:40 +01:00
|
|
|
<div class="template-container">
|
2024-02-28 14:41:36 +01:00
|
|
|
<div mat-dialog-title class="row d-flex p-0 m-0 header">
|
|
|
|
<span class="col template-title align-self-center">{{'PREFILL-DESCRIPTION-DIALOG.TITLE' | translate}}</span>
|
|
|
|
<span class="col-auto d-flex ml-auto align-self-center" (click)="closeDialog()"><mat-icon
|
2023-11-29 14:26:40 +01:00
|
|
|
class="close-icon">close</mat-icon></span>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="progressIndication" class="progress-bar">
|
|
|
|
<mat-progress-bar color="primary" mode="indeterminate"></mat-progress-bar>
|
|
|
|
</div>
|
|
|
|
<div mat-dialog-content *ngIf="prefillForm" [formGroup]="prefillForm" class="definition-content">
|
|
|
|
<div class="row d-flex align-items-center justify-content-center">
|
|
|
|
<div class="pb-4 pl-4 pr-4">
|
2024-02-28 14:41:36 +01:00
|
|
|
{{'PREFILL-DESCRIPTION-DIALOG.HINT' | translate}}
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-02-28 14:41:36 +01:00
|
|
|
<div class="row d-flex align-items-center justify-content-center" [class.pb-4]="prefillSelected">
|
2023-11-29 14:26:40 +01:00
|
|
|
<button mat-raised-button type="button" class="empty-btn"
|
2024-02-28 14:41:36 +01:00
|
|
|
(click)="closeDialog()">{{'PREFILL-DESCRIPTION-DIALOG.ACTIONS.MANUALLY' | translate}}</button>
|
|
|
|
<div class="ml-2 mr-2">{{'PREFILL-DESCRIPTION-DIALOG.OR' | translate}}</div>
|
2023-11-29 14:26:40 +01:00
|
|
|
<button mat-raised-button type="button" class="prefill-btn"
|
2024-02-28 14:41:36 +01:00
|
|
|
(click)="prefillSelected = true">{{'PREFILL-DESCRIPTION-DIALOG.ACTIONS.PREFILL' | translate}}</button>
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
2024-02-28 14:41:36 +01:00
|
|
|
<div *ngIf="prefillSelected" class="row">
|
2023-11-29 14:26:40 +01:00
|
|
|
<div class="col-12 pl-0 pr-0 pb-2 d-flex flex-row">
|
2024-02-28 14:41:36 +01:00
|
|
|
<h4 class="col-auto heading">{{'PREFILL-DESCRIPTION-DIALOG.DESCRIPTION-TEMPLATE' | translate}}</h4>
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
|
|
|
<mat-form-field class="col-md-12">
|
2024-03-01 17:45:32 +01:00
|
|
|
<mat-select placeholder="{{'PREFILL-DESCRIPTION-DIALOG.DESCRIPTION-TEMPLATE'| translate}}" [required]="true" [compareWith]="compareWith" [formControl]="prefillForm.get('descriptionTemplateId')">
|
|
|
|
<mat-option *ngFor="let descriptionTemplate of availableDescriptionTemplates" [value]="descriptionTemplate.id">
|
2024-02-28 14:41:36 +01:00
|
|
|
<div>
|
2024-03-01 17:45:32 +01:00
|
|
|
{{descriptionTemplate.label}}
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
2024-03-01 17:45:32 +01:00
|
|
|
<mat-error *ngIf="prefillForm.get('descriptionTemplateId').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<div class="col-12 pl-0 pr-0 pb-2 d-flex flex-row">
|
|
|
|
<h4 class="col-auto heading">{{'PREFILL-DESCRIPTION-DIALOG.PREFILLING-SOURCE' | translate}}</h4>
|
|
|
|
</div>
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
<app-single-auto-complete [required]="true" [formControl]="prefillForm.get('prefillingSourceId')"
|
|
|
|
placeholder="{{'PREFILL-DESCRIPTION-DIALOG.PREFILLING-SOURCE' | translate}}"
|
|
|
|
[configuration]="prefillingSourceService.singleAutocompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
|
|
|
<mat-error *ngIf="prefillForm.get('prefillingSourceId').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2023-11-29 14:26:40 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2024-03-05 12:41:58 +01:00
|
|
|
<div *ngIf="prefillForm.get('prefillingSourceId').value != null" class="row">
|
2023-11-29 14:26:40 +01:00
|
|
|
<div class="col-12 pl-0 pr-0 pb-2 d-flex flex-row">
|
2024-02-28 14:41:36 +01:00
|
|
|
<h4 class="col-auto heading">{{'PREFILL-DESCRIPTION-DIALOG.SEARCH-HEADER' | translate}}</h4>
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
|
|
|
<mat-form-field class="col-md-12">
|
2024-03-05 12:41:58 +01:00
|
|
|
<app-single-auto-complete [required]="true" [formControl]="prefillForm.get('prefillId')"
|
2024-02-28 14:41:36 +01:00
|
|
|
placeholder="{{'PREFILL-DESCRIPTION-DIALOG.SEARCH' | translate}}"
|
2023-11-29 14:26:40 +01:00
|
|
|
[configuration]="prefillAutoCompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
|
|
|
</mat-form-field>
|
2024-03-05 12:41:58 +01:00
|
|
|
</div>
|
2023-11-29 14:26:40 +01:00
|
|
|
|
|
|
|
</div>
|
2024-02-28 14:41:36 +01:00
|
|
|
<div *ngIf="prefillSelected">
|
2023-11-29 14:26:40 +01:00
|
|
|
<div class="col-auto d-flex pb-4 pt-2">
|
|
|
|
<button mat-raised-button type="button" class="prefill-btn ml-auto" [disabled]="prefillForm.invalid"
|
2024-02-28 14:41:36 +01:00
|
|
|
(click)="next()">{{'PREFILL-DESCRIPTION-DIALOG.ACTIONS.NEXT' | translate}}</button>
|
2023-11-29 14:26:40 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|