Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ACS-8027] Inputs for create rules #3860

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</mat-menu>
</div>

<button mat-flat-button data-automation-id="rule-action-list-add-action-button" (click)="addAction()" *ngIf="!readOnly">
<mat-icon>add</mat-icon>
<button mat-flat-button class="aca-rule-action-list-add-action-button" data-automation-id="rule-action-list-add-action-button" (click)="addAction()" *ngIf="!readOnly">
<mat-icon class="aca-rule-action-list-add-action-button-icon">add</mat-icon>
<span>{{ 'ACA_FOLDER_RULES.RULE_DETAILS.ACTION_BUTTONS.ADD_ACTION' | translate }}</span>
</button>
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.aca-rule-action-list {
.aca-rule-action-list-add-action-button {
margin: 4px 0 20px;

.aca-rule-action-list-add-action-button-icon {
width: 24px;
height: 24px;
font-size: 24px;
margin-right: 0;
margin-left: 1px;
}
}

&__item {
padding: 8px;
border-radius: 8px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form class="aca-rule-action__form" [formGroup]="form">

<mat-form-field class="aca-rule-action-full-width" appearance="outline" subscriptSizing="dynamic">
<mat-form-field class="aca-rule-action-full-width" appearance="fill" subscriptSizing="dynamic">
<mat-select
formControlName="actionDefinitionId"
data-automation-id="rule-action-select"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@

<div class="aca-rule-composite-condition__form__actions" *ngIf="!readOnly" data-automation-id="add-actions">
<button mat-flat-button (click)="addSimpleCondition()" data-automation-id="add-condition-button">
<mat-icon>add</mat-icon>
<mat-icon class="aca-rule-composite-condition__form__actions-add">add</mat-icon>
<span>{{ 'ACA_FOLDER_RULES.RULE_DETAILS.CONDITION_BUTTONS.ADD_CONDITION' | translate }}</span>
</button>
<button mat-flat-button (click)="addCompositeCondition()" data-automation-id="add-group-button">
<mat-icon>add</mat-icon>
<mat-icon class="aca-rule-composite-condition__form__actions-add">add</mat-icon>
<span>{{ 'ACA_FOLDER_RULES.RULE_DETAILS.CONDITION_BUTTONS.ADD_GROUP' | translate }}</span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,18 @@
}

&__actions {
padding-left: 8px;

button:not(:disabled) {
background-color: unset;
}

.aca-rule-composite-condition__form__actions-add {
width: 24px;
height: 24px;
font-size: 24px;
margin-right: 0;
}
}

&__row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<mat-form-field
data-automation-id="rule-option-form-field-errorScript"
floatLabel="always"
appearance="outline"
appearance="fill"
class="aca-rule-options__error-script-dropdown"
[ngClass]="{ 'aca-hide-error-script-dropdown': hideErrorScriptDropdown }">
<mat-label>{{ 'ACA_FOLDER_RULES.RULE_DETAILS.OPTIONS.ERROR_SCRIPT' | translate }}</mat-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<ng-container *ngIf="!preview">
<div class="aca-rule-details__form__row">
<label for="rule-details-name-input">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.NAME' | translate }}</label>
<label class="aca-rule-details__name__label" for="rule-details-name-input">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.NAME' | translate }}</label>
<div>
<mat-form-field appearance="outline" floatLabel='auto' class="aca-rule-details__form__row__field">
<mat-form-field appearance="fill" floatLabel='auto' class="aca-rule-details__form__row__field">
<input
id="rule-details-name-input"
matInput type="text" formControlName="name" data-automation-id="rule-details-name-input"
Expand All @@ -17,7 +17,7 @@
<div class="aca-rule-details__form__row aca-rule-details__form__description">
<label for="rule-details-description-textarea">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.DESCRIPTION' | translate }}</label>
<div>
<mat-form-field floatLabel='auto' appearance="outline" class="aca-rule-details__form__row__field">
<mat-form-field floatLabel='auto' appearance="fill" class="aca-rule-details__form__row__field">
<textarea
class="aca-rule-details__form__row__field__textarea"
id="rule-details-description-textarea"
Expand Down Expand Up @@ -53,7 +53,7 @@
</aca-rule-action-list>
</div>

<div class="aca-rule-details__form__row" *ngIf="showOptionsSection">
<div class="aca-rule-details__form__row aca-rule-details__form__others" *ngIf="showOptionsSection">
<div class="aca-label">{{ 'ACA_FOLDER_RULES.RULE_DETAILS.LABEL.OPTIONS' | translate }}</div>
<aca-rule-options
formControlName="options"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
.aca-rule-details {
.aca-rule-details__form__triggers {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it used anywhere?

margin-top: 10px;
}

.aca-rule-details__name__label {
padding-top: 1.5em;
}

.aca-rule-details__form__others {
margin-bottom: 12px;
}

&__form {
position: relative;

& > div {
padding: 8px 20px;
padding: 0 20px;
width: 100%;
box-sizing: border-box;

Expand All @@ -25,7 +37,7 @@
width: 20%;
min-width: 100px;
max-width: 150px;
padding: 0.75em 0;
padding: 0.5em 0;
}

& > div {
Expand All @@ -49,6 +61,7 @@

&__conditions {
width: 100%;
margin: 14px 0 36px;

& > .aca-rule-details-error {
margin-left: 16px;
Expand Down Expand Up @@ -92,5 +105,15 @@
display: none;
}
}

.aca-rule-details__form__row .mat-mdc-form-field-flex .mat-mdc-form-field-infix {
padding-top: 0.375em;
padding-bottom: 0.375em;
}

.aca-rule-details__form__row aca-rule-action .mat-mdc-form-field-flex .mat-mdc-form-field-infix {
padding-top: 0.1em;
padding-bottom: 0.1em;
}
}
}