Skip to content
Snippets Groups Projects
Commit 49a91e56 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-4527 fix layout and form validation' (#386) from...

Merge pull request 'OZG-4527 fix layout and form validation' (#386) from OZG-4527-aktenzeichen-manuell-eingeben-form-errors into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/alfa/pulls/386


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents e5b13922 96fa2f7a
Branches
Tags
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<mat-form-field class="compact-input" appearance="{{appearance}}" [floatLabel]="readOnly || autoFocus ? 'always' : 'auto'"> <mat-form-field [subscriptSizing]="subscriptSizing" class="compact-input" appearance="{{appearance}}" [floatLabel]="readOnly || autoFocus ? 'always' : 'auto'">
<mat-label>{{ label }}</mat-label> <mat-label>{{ label }}</mat-label>
<div class="wrapper"> <div class="wrapper">
<input #inputElement <input #inputElement
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
[readonly]="readOnly" [readonly]="readOnly"
(blur)="touch()" (blur)="touch()"
[attr.data-test-id]="(label | convertForDataTest) + '-text-input'" [attr.data-test-id]="(label | convertForDataTest) + '-text-input'"
[class.with-clear-button]="showClearButton$ | async"/> [class.with-clear-button]="showClearButton$ | async"
/>
<button *ngIf="showClearButton$ | async" <button *ngIf="showClearButton$ | async"
data-test-id="clear-button" data-test-id="clear-button"
class="clear-button" class="clear-button"
......
...@@ -75,4 +75,8 @@ describe('TextEditorComponent', () => { ...@@ -75,4 +75,8 @@ describe('TextEditorComponent', () => {
expect(element).toBeInstanceOf(HTMLElement); expect(element).toBeInstanceOf(HTMLElement);
}) })
it('should use fixed subscription sizing by default', () => {
expect(component.subscriptSizing).toBe('fixed');
})
}); });
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component'; import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component';
import { map, Observable, startWith } from 'rxjs'; import { map, Observable, startWith } from 'rxjs';
import { hasContent, isNotEmpty } from '@alfa-client/tech-shared'; import { hasContent } from '@alfa-client/tech-shared';
import { SubscriptSizing } from '@angular/material/form-field';
@Component({ @Component({
selector: 'ozgcloud-text-editor', selector: 'ozgcloud-text-editor',
...@@ -43,6 +44,7 @@ export class TextEditorComponent extends FormControlEditorAbstractComponent impl ...@@ -43,6 +44,7 @@ export class TextEditorComponent extends FormControlEditorAbstractComponent impl
@Input() readOnly: boolean; @Input() readOnly: boolean;
@Input() autoFocus: boolean; @Input() autoFocus: boolean;
@Input() clearable = false; @Input() clearable = false;
@Input() subscriptSizing: SubscriptSizing = 'fixed';
showClearButton$: Observable<boolean>; showClearButton$: Observable<boolean>;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
[autoFocus]="true" [autoFocus]="true"
[clearable]="true" [clearable]="true"
appearance="outline" appearance="outline"
subscriptSizing="dynamic"
[formControlName]="AktenzeichenEditDialogFormservice.AKTENZEICHEN_FIELD"> [formControlName]="AktenzeichenEditDialogFormservice.AKTENZEICHEN_FIELD">
</ozgcloud-text-editor> </ozgcloud-text-editor>
<ozgcloud-paste-text-button <ozgcloud-paste-text-button
......
...@@ -6,10 +6,6 @@ ...@@ -6,10 +6,6 @@
::ng-deep mat-form-field { ::ng-deep mat-form-field {
width: 100%; width: 100%;
} }
::ng-deep .mat-mdc-form-field-subscript-wrapper {
display: none;
}
} }
.content { .content {
...@@ -17,7 +13,7 @@ ...@@ -17,7 +13,7 @@
grid-template-columns: min-content auto min-content; grid-template-columns: min-content auto min-content;
grid-column-gap: 0.5rem; grid-column-gap: 0.5rem;
grid-row-gap: 0.25rem; grid-row-gap: 0.25rem;
align-items: center; align-items: flex-start;
grid-template-areas: grid-template-areas:
'az_icon az_text paste_icon' 'az_icon az_text paste_icon'
'. hinweis .'; '. hinweis .';
...@@ -26,6 +22,7 @@ ...@@ -26,6 +22,7 @@
.az_icon { .az_icon {
grid-area: az_icon; grid-area: az_icon;
color: #c2c2c2; color: #c2c2c2;
margin-top: 12px;
&--active { &--active {
color: black; color: black;
......
...@@ -4,11 +4,10 @@ import { AktenzeichenEditDialogData } from './aktenzeichen-edit-dialog.data'; ...@@ -4,11 +4,10 @@ import { AktenzeichenEditDialogData } from './aktenzeichen-edit-dialog.data';
import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice'; import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice';
import { VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { COMMAND_ERROR_MESSAGES, CommandResource, hasError, isSuccessfulDone } from '@alfa-client/command-shared'; import { COMMAND_ERROR_MESSAGES, CommandResource, hasError, isSuccessfulDone } from '@alfa-client/command-shared';
import { createEmptyStateResource, hasContent, isClipboardReadSupported, isNotNull, StateResource } from '@alfa-client/tech-shared'; import { createEmptyStateResource, hasContent, isClipboardReadSupported, StateResource } from '@alfa-client/tech-shared';
import { filter, map, Observable, of, startWith, tap } from 'rxjs'; import { map, Observable, of, startWith, tap } from 'rxjs';
import { SnackBarService } from '@alfa-client/ui'; import { SnackBarService } from '@alfa-client/ui';
import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message'; import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
import { trim } from 'lodash-es';
@Component({ @Component({
selector: 'alfa-aktenzeichen-edit-dialog', selector: 'alfa-aktenzeichen-edit-dialog',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment