mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
[HIMA-790] fixed/updated QA issues mentioned in ticked HIMA-790
This commit is contained in:
@@ -11,26 +11,53 @@
|
||||
*ngIf="!ddloading"
|
||||
class="dropdown-selected-text"
|
||||
id="drop_txt"
|
||||
[ngClass]="{ 'dropdown-selected-text-active': isOpen }"
|
||||
[ngClass]="{ 'dropdown-selected-text-active': isOpen, simplified: simplified }"
|
||||
>
|
||||
<span>{{ selected }}</span>
|
||||
<div [ngClass]="{ 'open-icon': !isOpen, 'close-icon': isOpen }" id="drop_img"></div>
|
||||
<div
|
||||
[ngClass]="{
|
||||
'open-icon': !isOpen && mode === 'customer',
|
||||
'close-icon': isOpen && mode === 'customer',
|
||||
'open-icon-branch': !isOpen && mode === 'branch',
|
||||
'close-icon-branch': isOpen && mode === 'branch'
|
||||
}"
|
||||
id="drop_img"
|
||||
></div>
|
||||
</div>
|
||||
<div class="dropdown-options" *ngIf="!ddloading" [ngClass]="{ visible: isOpen }" id="drop">
|
||||
<ul>
|
||||
<li (click)="deleteItems()"><img src="assets/images/trash.svg" id="0" /></li>
|
||||
<li *ngFor="let item of options" (click)="onChange(item)" [ngClass]="{ selected: item === selected }" id="{{ item }}">
|
||||
<li *ngIf="!simplified" (click)="deleteItems()"><img src="assets/images/trash.svg" id="0" /></li>
|
||||
<li
|
||||
*ngFor="let item of options"
|
||||
(click)="onChange(item)"
|
||||
[ngClass]="{ selected: item === selected, branch: mode === 'branch' }"
|
||||
id="{{ item }}"
|
||||
>
|
||||
{{ item === -1 ? '10+' : item }}
|
||||
<img src="assets/images/Arrow_Down_2.svg" *ngIf="item === selected" [ngStyle]="{ 'margin-left': '3px' }" />
|
||||
<img src="assets/images/Arrow_Down_2.svg" *ngIf="item === selected && mode === 'customer'" [ngStyle]="{ 'margin-left': '3px' }" />
|
||||
<img
|
||||
src="assets/images/Arrow_Down_2_branch.svg"
|
||||
*ngIf="item === selected && mode === 'branch'"
|
||||
[ngStyle]="{ 'margin-left': '3px' }"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="spinner" *ngIf="ddloading"></div>
|
||||
</div>
|
||||
<app-button *ngIf="!notUpdatable" (click)="onSwitch()" #changeButton [load]="true" [stayOnPage]="true">Ändern</app-button>
|
||||
<app-button *ngIf="!notUpdatable && !simplified" (click)="onSwitch()" #changeButton [load]="true" [stayOnPage]="true">Ändern</app-button>
|
||||
</div>
|
||||
<div *ngIf="showInput === true" class="ten-plus">
|
||||
<input type="number" class="align-center" *ngIf="!ddloading" [(ngModel)]="inputValue" placeholder="..." #customInput autofocus />
|
||||
<input
|
||||
type="number"
|
||||
(keydown.enter)="validateInput()"
|
||||
class="align-center"
|
||||
*ngIf="!ddloading"
|
||||
[(ngModel)]="inputValue"
|
||||
placeholder="..."
|
||||
#customInput
|
||||
autofocus
|
||||
/>
|
||||
<div class="input-spinner" *ngIf="ddloading"></div>
|
||||
<app-button (click)="validateInput()">Aktualisieren</app-button>
|
||||
<app-button (click)="validateInput()" *ngIf="!simplified">Aktualisieren</app-button>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
&.simplified {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -41,6 +45,15 @@
|
||||
padding: 5px 4px;
|
||||
}
|
||||
|
||||
.open-icon-branch {
|
||||
background-image: url('../../../../../apps/sales/src/assets/images/Arrow_Down_2_branch.svg');
|
||||
height: 9px;
|
||||
width: 17px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
padding: 5px 4px;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
background-image: url('../../../../../apps/sales/src/assets/images/Arrow_Up.svg');
|
||||
height: 9px;
|
||||
@@ -49,6 +62,15 @@
|
||||
background-repeat: no-repeat;
|
||||
padding: 5px 4px;
|
||||
}
|
||||
|
||||
.close-icon-branch {
|
||||
background-image: url('../../../../../apps/sales/src/assets/images/Arrow_Up_branch.svg');
|
||||
height: 9px;
|
||||
width: 17px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
padding: 5px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-options {
|
||||
@@ -90,6 +112,10 @@
|
||||
|
||||
.selected {
|
||||
background-color: #e6eff9;
|
||||
|
||||
&.branch {
|
||||
background-color: #cfd4d8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,22 @@ import {
|
||||
ElementRef,
|
||||
ChangeDetectorRef,
|
||||
ChangeDetectionStrategy,
|
||||
AfterViewChecked,
|
||||
AfterViewChecked
|
||||
} from '@angular/core';
|
||||
import { ButtonComponent } from '../button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-delete-dropdown',
|
||||
templateUrl: './delete-dropdown.component.html',
|
||||
styleUrls: ['./delete-dropdown.component.scss'],
|
||||
styleUrls: ['./delete-dropdown.component.scss']
|
||||
})
|
||||
export class DeleteDropdownComponent implements AfterViewInit, AfterViewChecked, OnInit {
|
||||
@Input() options: number[];
|
||||
@Input() selected: number;
|
||||
@Input() deactivateTenPlus = false;
|
||||
@Input() notUpdatable = false;
|
||||
@Input() simplified = false;
|
||||
@Input() mode = 'customer';
|
||||
@Output() valueChanges: EventEmitter<number> = new EventEmitter();
|
||||
@Output() delete: EventEmitter<boolean> = new EventEmitter();
|
||||
@Output() switch: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
Reference in New Issue
Block a user