[HIMA-845] QA fixes for customer negative filters

This commit is contained in:
Eraldo Hasanaj
2019-10-08 14:44:30 +02:00
parent fe6463c20f
commit 0a9cb43406
8 changed files with 26 additions and 35 deletions

View File

@@ -232,5 +232,5 @@
.filter-mode-switcher {
padding-top: 15px;
padding-bottom: 8px;
padding-bottom: 10px;
}

View File

@@ -208,10 +208,9 @@ export class CustomerSearchResultComponent implements OnInit {
: false
: false;
this.filters = {
...this.filters,
guestaccount: !isNullOrUndefined(this.filters.guestaccount) ? (this.selectedFilterMode === Side.LEFT ? true : false) : undefined,
bonuscard: !isNullOrUndefined(this.filters.bonuscard) ? (this.selectedFilterMode === Side.LEFT ? true : false) : undefined,
onlineshop: !isNullOrUndefined(this.filters.onlineshop) ? (this.selectedFilterMode === Side.LEFT ? true : false) : undefined,
guestaccount: undefined,
bonuscard: undefined,
onlineshop: undefined,
};
if (!noFilters) {
this.ds = new CustomerSearchDataSource(

View File

@@ -3,6 +3,7 @@
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
"@angular/core": "^7.2.0",
"ngx-toggle-switch": "^2.0.5"
}
}
}

View File

@@ -1,7 +1,7 @@
<span class="option">
<span class="checkbox" (click)="onChange()">
<img class="checkbox-icon" src="/assets/images/Check_box_1.svg" />
<img class="checked" src="/assets/images/close.svg" *ngIf="option.selected && _negative" />
<img class="checked negative" src="/assets/images/close.svg" *ngIf="option.selected && _negative" />
<img class="checked" src="/assets/images/Check.svg" *ngIf="option.selected && !_negative" />
</span>
<span class="text">{{ option.value }}</span>

View File

@@ -6,7 +6,7 @@
.text {
padding-left: 10px;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -30,4 +30,10 @@
width: 15px;
cursor: pointer;
}
}
.negative {
margin-left: 5px;
width: 14px;
height: 15px;
}
}

View File

@@ -1,7 +1,11 @@
<div class="wrapper">
<div class="label left align-right" [ngClass]="{ selected: selectedSide === 0 }">{{ leftValue }}</div>
<div class="switch">
<div class="switch-ball" [ngClass]="{ flipped: selectedSide === 1 }" (click)="switchPressed()"></div>
</div>
<ui-switch
(change)="switchPressed()"
color="#9cb1c6"
defaultBgColor="#9cb1c6"
switchColor="#1f466c"
[checked]="selectedSide === 1"
></ui-switch>
<div class="label right" [ngClass]="{ selected: selectedSide === 1 }">{{ rightValue }}</div>
</div>

View File

@@ -8,7 +8,7 @@
color: #1f466c;
font-family: 'Open Sans';
font-size: 16px;
margin-top: 4px;
margin-top: 6px;
width: 200px;
&.selected {
@@ -23,23 +23,3 @@
margin-left: 15px;
}
}
.switch {
background-color: #9cb1c6;
height: 28px;
width: 50px;
border-radius: 20px;
.switch-ball {
background-color: #1f466c;
height: 28px;
width: 28px;
border-radius: 20px;
cursor: pointer;
&.flipped {
transform: translate(22px);
}
}
}

View File

@@ -1,10 +1,11 @@
import { NgModule, Input, Output } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SmallDoubleChoiceSwitchComponent } from './small-double-choice-switch.component';
import { UiSwitchModule } from 'ngx-toggle-switch';
@NgModule({
declarations: [SmallDoubleChoiceSwitchComponent],
imports: [CommonModule],
imports: [CommonModule, UiSwitchModule],
exports: [SmallDoubleChoiceSwitchComponent],
})
export class SmallDoubleChoiceSwitchModule {}