Merged in feature/HIMA-1051-remission-quantity (pull request #1026)

[HIMA-1051] - updated dropdown element to emmit selected values (when 0 or different)
This commit is contained in:
Peter Skrlj
2020-02-11 10:47:02 +00:00
committed by Adrian Toczydłowski
3 changed files with 7 additions and 7 deletions

View File

@@ -108,7 +108,6 @@ export class AddProductToRemissionDialogComponent implements OnInit, OnDestroy {
this.reasonError = true;
return;
}
this.remissionService
.addProductToRemit({ product: this.product, remissionReason: this.reason, remissionQuantity: this.quantity })
.pipe(take(1))

View File

@@ -27,12 +27,7 @@
<div class="dropdown-options" *ngIf="!ddloading" [ngClass]="{ visible: isOpen }" id="drop">
<ul>
<li class="dropdown-arrow-container">
<img
src="assets/images/Arrow_Down.svg"
class="drop-down-arrow"
*ngIf="mode === 'customer'"
(click)="toggleDropdown()"
/>
<img src="assets/images/Arrow_Down.svg" class="drop-down-arrow" *ngIf="mode === 'customer'" (click)="toggleDropdown()" />
<img
src="assets/images/Arrow_Down_2_branch.svg"
*ngIf="mode === 'branch'"
@@ -61,6 +56,7 @@
(keydown.enter)="validateInput()"
*ngIf="!ddloading"
[(ngModel)]="inputValue"
(ngModelChange)="inputValueChange($event)"
class="spin-no-appearance"
placeholder="..."
#customInput

View File

@@ -109,6 +109,11 @@ export class DeleteDropdownComponent implements AfterViewInit, AfterViewChecked,
this.toggleDropdown();
}
inputValueChange(value) {
this.inputValue = value;
this.valueChanges.emit(this.inputValue);
}
ngOnInit() {
const hasPlusTenOption = this.options.findIndex(t => t === -1) !== -1;
if (hasPlusTenOption === false && !this.deactivateTenPlus && !this.notUpdatable) {