[ACS-7351] ng15 Manage rules fixes (#3751)

* [ACS-7351] ng15 manage rules fixes

* [ACS-7351] cr fix

* [ACS-7351] cr fix
This commit is contained in:
Mykyta Maliarchuk
2024-04-02 11:07:25 +02:00
committed by MichalKinas
parent cadc21e2f7
commit 3896b19c30
6 changed files with 45 additions and 44 deletions

View File

@@ -49,7 +49,7 @@
z-index: 1;
display: flex;
flex-direction: row;
align-items: center;
align-items: flex-start;
overflow-x: auto;
justify-content: space-between;
padding: 12px 20px;
@@ -75,7 +75,7 @@
}
}
&__buttons {
.aca-manage-rules__container__rule-details__header__buttons {
display: flex;
flex-direction: row;
align-items: stretch;
@@ -86,7 +86,16 @@
&#delete-rule-btn {
padding: 0 8px;
margin: 0;
min-width: unset;
mat-icon {
margin: 0;
padding: 0;
width: 24px;
height: 24px;
font-size: 24px;
}
}
}
}

View File

@@ -176,8 +176,13 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh
ngOnChanges(changes: SimpleChanges): void {
const readOnly = changes['readOnly']?.currentValue;
if (readOnly !== undefined && readOnly !== null) {
this.readOnly = readOnly;
this.setDisabledState(readOnly);
if (readOnly) {
this.readOnly = true;
this.form.disable();
} else {
this.readOnly = false;
this.form.enable();
}
}
}
@@ -337,16 +342,6 @@ export class RuleActionUiComponent implements ControlValueAccessor, OnInit, OnCh
});
}
setDisabledState(isDisabled: boolean) {
if (isDisabled) {
this.readOnly = true;
this.form.disable();
} else {
this.readOnly = false;
this.form.enable();
}
}
private parseConstraintsToSelectOptions(constraints: ConstraintValue[]): CardViewSelectItemOption<unknown>[] {
return constraints
.sort((a, b) => {

View File

@@ -8,7 +8,7 @@
flex-direction: column;
}
&.aca-read-only &__checkbox label > span:first-child {
&.aca-read-only &__checkbox > div > div:first-child {
display: none;
}

View File

@@ -81,6 +81,10 @@
.mat-mdc-select-disabled .mat-mdc-select-value {
color: inherit;
}
.mat-mdc-select-arrow-wrapper {
display: none;
}
}
}
}