mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
QA feedback for customer search
Search error must be deleted on clear
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
<app-search
|
||||
#searchInput
|
||||
(search)="search($event)"
|
||||
(input)="searchError = false; createTab()"
|
||||
(input)="searchError = ''; createTab()"
|
||||
placeholder="Name, E-Mail, PLZ"
|
||||
[error]="searchError ? 'Ergibt keine Suchergebnisse' : ''"
|
||||
[error]="searchError"
|
||||
></app-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ export class SearchCustomerCardComponent implements OnInit, AfterViewInit {
|
||||
products: Product[];
|
||||
filters: Filter[];
|
||||
processes: Process[];
|
||||
searchError = false;
|
||||
searchError = '';
|
||||
|
||||
@Input() searchParams = '';
|
||||
@ViewChild('searchInput') searchInput: SearchComponent;
|
||||
@@ -55,7 +55,6 @@ export class SearchCustomerCardComponent implements OnInit, AfterViewInit {
|
||||
search(searchParams) {
|
||||
this.searchParams = searchParams;
|
||||
if (!this.searchParams) {
|
||||
this.searchError = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,7 +64,7 @@ export class SearchCustomerCardComponent implements OnInit, AfterViewInit {
|
||||
if (users && users.length > 0) {
|
||||
this.navigateToRoute('customer-search-result');
|
||||
} else {
|
||||
this.searchError = true;
|
||||
this.searchError = 'Ergibt keine Suchergebnisse';
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -75,11 +74,6 @@ export class SearchCustomerCardComponent implements OnInit, AfterViewInit {
|
||||
this.router.navigate([route]);
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.searchParams = null;
|
||||
this.searchError = !this.searchError;
|
||||
}
|
||||
|
||||
loadProcesses() {
|
||||
this.processes$.subscribe((data: Process[]) => (this.processes = data));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ import {
|
||||
export class SearchComponent implements OnInit {
|
||||
@Input() placeholder = '';
|
||||
@Input() input = '';
|
||||
@Input() error;
|
||||
@Input() error = '';
|
||||
@Input() autocompletePlaceHolder = '';
|
||||
@Output() inputChange = new EventEmitter();
|
||||
@Output() search = new EventEmitter();
|
||||
@@ -66,6 +66,7 @@ export class SearchComponent implements OnInit {
|
||||
|
||||
clear() {
|
||||
this.change('');
|
||||
this.error ='';
|
||||
}
|
||||
|
||||
emitSearch(input: string) {
|
||||
|
||||
Reference in New Issue
Block a user