mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
[HIMA-128] Removed filters from article search
This commit is contained in:
@@ -17,31 +17,30 @@
|
||||
error="{{ error }}"
|
||||
></app-search>
|
||||
</div>
|
||||
<div [@fadeIn]="!!searchParams">
|
||||
<app-filter (filters)="updateFilters()"></app-filter>
|
||||
</div>
|
||||
<div class="recent-search-continer align-center">
|
||||
<div class="recent-search-header">
|
||||
<div class="align-left">
|
||||
<span class="recent-searches-label">Deine letzten Suchanfragen</span>
|
||||
<div class="recent-searches-container">
|
||||
<div class="recent-search-body align-center">
|
||||
<div class="recent-search-header">
|
||||
<div class="align-left">
|
||||
<span class="recent-searches-label">Deine letzten Suchanfragen</span>
|
||||
</div>
|
||||
<div class="align-right">
|
||||
<span class="show-all-label">Alle ansehen</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="align-right">
|
||||
<span class="show-all-label">Alle ansehen</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recent-search-content">
|
||||
<div *ngFor="let article of recentArticles" class="recent-article">
|
||||
<div
|
||||
class="recent-article-container align-left"
|
||||
(click)="showRecentSearchResults(article)"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lupe-icon"
|
||||
src="../../../assets/images/Lupe_Icon.svg"
|
||||
/>
|
||||
<div class="recent-search-content">
|
||||
<div *ngFor="let article of recentArticles" class="recent-article">
|
||||
<div
|
||||
class="recent-article-container align-left"
|
||||
(click)="showRecentSearchResults(article)"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lupe-icon"
|
||||
src="../../../assets/images/Lupe_Icon.svg"
|
||||
/>
|
||||
</div>
|
||||
<div class="recent-article-label">{{ article.name }}</div>
|
||||
</div>
|
||||
<div class="recent-article-label">{{ article.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,57 +67,56 @@
|
||||
}
|
||||
}
|
||||
|
||||
.recent-search-continer {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
width: 68%;
|
||||
padding-left: 16%;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.recent-searches-container{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@media screen and (max-width: 1190px) {
|
||||
.recent-search-continer {
|
||||
width: 72%;
|
||||
padding-left: 14%;
|
||||
.recent-search-body {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
width: 70%;
|
||||
padding-top: 25px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.recent-search-header {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
}
|
||||
|
||||
.recent-search-content {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.recent-searches-label {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.show-all-label {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #f70400;
|
||||
}
|
||||
|
||||
.recent-article-container {
|
||||
display: grid;
|
||||
grid-template-columns: min-content auto;
|
||||
grid-gap: 12px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.lupe-icon {
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.recent-article-label {
|
||||
font-size: 16px;
|
||||
line-height: 21px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.recent-search-header {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
}
|
||||
|
||||
.recent-search-content {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.recent-searches-label {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.show-all-label {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #f70400;
|
||||
}
|
||||
|
||||
.recent-article-container {
|
||||
display: grid;
|
||||
grid-template-columns: min-content auto;
|
||||
grid-gap: 12px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.lupe-icon {
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.recent-article-label {
|
||||
font-size: 16px;
|
||||
line-height: 21px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { SearchInputComponent } from '@libs/ui';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Breadcrumb } from 'apps/sales/src/app/core/models/breadcrumb.model';
|
||||
import { Filter } from 'apps/sales/src/app/core/models/filter.model';
|
||||
import { Process } from 'apps/sales/src/app/core/models/process.model';
|
||||
import { Product } from 'apps/sales/src/app/core/models/product.model';
|
||||
import { RecentArticleSearch } from 'apps/sales/src/app/core/models/recent-article-search.model';
|
||||
@@ -19,24 +18,19 @@ import { getRandomPic } from 'apps/sales/src/app/core/utils/process.util';
|
||||
import {
|
||||
AfterViewInit,
|
||||
Component,
|
||||
ElementRef,
|
||||
Input,
|
||||
OnInit,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Select, Store } from '@ngxs/store';
|
||||
import { FilterState } from 'apps/sales/src/app/core/store/state/filter.state';
|
||||
import { AutocompleteState } from 'apps/sales/src/app/core/store/state/autocomplete.state';
|
||||
import { LoadAutocomplete } from 'apps/sales/src/app/core/store/actions/autocomplete.actions';
|
||||
import { ProductService } from '../../../../core/services/product.service';
|
||||
import {
|
||||
throttle,
|
||||
debounceTime,
|
||||
distinctUntilChanged,
|
||||
switchMap,
|
||||
map,
|
||||
take
|
||||
map
|
||||
} from 'rxjs/operators';
|
||||
import { ItemDTO } from 'cat-service';
|
||||
import { fadeInAnimation } from './fadeIn.animation';
|
||||
@@ -54,12 +48,10 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
recentArticles: RecentArticleSearch[];
|
||||
products$: Observable<Product[]>;
|
||||
products: Product[];
|
||||
filters: Filter[] = [];
|
||||
timer: any;
|
||||
showAutocomplete = false;
|
||||
autocompleteResults = [];
|
||||
@Select(ProcessState.getProcesses) processes$: Observable<Process[]>;
|
||||
@Select(FilterState.getSelectedFilters) filters$: Observable<Filter[]>;
|
||||
@Select(AutocompleteState.getAutocompleteResults)
|
||||
autocompleteResults$: Observable<string[]>;
|
||||
processes: Process[];
|
||||
@@ -89,9 +81,7 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
ngAfterViewInit() {
|
||||
this.searchInput.focus();
|
||||
}
|
||||
updateFilters() {
|
||||
this.filters = this.store.selectSnapshot(FilterState.getFilters);
|
||||
}
|
||||
|
||||
search(searchParams) {
|
||||
this.searchParams = searchParams;
|
||||
if (!this.searchParams) {
|
||||
@@ -106,7 +96,7 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
query: searchParams,
|
||||
skip: 0,
|
||||
take: 1,
|
||||
fitlers: this.filters,
|
||||
fitlers: [],
|
||||
firstLoad: true
|
||||
};
|
||||
|
||||
@@ -132,7 +122,7 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
private submitSearch() {
|
||||
const search = <Search>{
|
||||
query: this.searchParams,
|
||||
fitlers: this.filters,
|
||||
fitlers: [],
|
||||
take: 5,
|
||||
skip: 0,
|
||||
firstLoad: true
|
||||
|
||||
Reference in New Issue
Block a user