mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merge branch 'development' of https://bitbucket.org/umwerk/instore-ma-app into development
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
.breadacrumb-grid {
|
||||
display: grid;
|
||||
grid-template-columns: min-content auto;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.grid-with-arrow {
|
||||
|
||||
@@ -146,9 +146,9 @@ export class ProcessState {
|
||||
const processes = state.processes.map(
|
||||
(process: Process) => {
|
||||
if (process.selected === true) {
|
||||
return { ...process, selected: false };
|
||||
return { ...process, selected: false, new: false };
|
||||
}
|
||||
return { ...process };
|
||||
return { ...process, new: false };
|
||||
}
|
||||
);
|
||||
ctx.patchState({
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<div class="spacer"></div>
|
||||
<div [@staggerAnimation]="active">
|
||||
<app-card
|
||||
*ngFor="let item of navigation"
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
line-height: 21px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
height: 20px;
|
||||
}
|
||||
.header {
|
||||
padding-left: 20px;
|
||||
padding-bottom: 28px;
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
.item-container {
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
max-height: 400px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import {
|
||||
trigger,
|
||||
transition,
|
||||
stagger,
|
||||
animate,
|
||||
style,
|
||||
query,
|
||||
state
|
||||
} from '@angular/animations';
|
||||
|
||||
export const fadeInAnimation = trigger('fadeIn', [
|
||||
state('true', style({ opacity: 1, transform: 'translateY(0)' })),
|
||||
state('false', style({ opacity: 0, transform: 'translateY(0)' })),
|
||||
transition('false => true', [
|
||||
style({ opacity: 0 }),
|
||||
animate('200ms 500ms ease-in')
|
||||
]),
|
||||
transition('true => false', animate(200, style({ opacity: 0 })))
|
||||
]);
|
||||
@@ -16,8 +16,8 @@
|
||||
error="{{ error }}"
|
||||
></app-search>
|
||||
</div>
|
||||
<div *ngIf="searchParams">
|
||||
<app-filter></app-filter>
|
||||
<div [@fadeIn]="!!searchParams">
|
||||
<app-filter (filters)="updateFilters()"></app-filter>
|
||||
</div>
|
||||
<div class="recent-search-continer align-center">
|
||||
<div class="recent-search-header">
|
||||
@@ -30,7 +30,10 @@
|
||||
</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
|
||||
class="recent-article-container align-left"
|
||||
(click)="showRecentSearchResults(article)"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
class="lupe-icon"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
.article-search-container {
|
||||
background-image: linear-gradient(-180deg, #ffffff 0%, #ffffff 100%);
|
||||
box-shadow: 0px -2px 24px 0px #dce2e9;
|
||||
margin-bottom: 90px;
|
||||
}
|
||||
|
||||
.article-section {
|
||||
@@ -71,7 +72,8 @@
|
||||
grid-template-columns: auto;
|
||||
width: 68%;
|
||||
padding-left: 16%;
|
||||
padding-top: 40px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1190px) {
|
||||
|
||||
@@ -30,13 +30,21 @@ import { FilterState } from 'src/app/core/store/state/filter.state';
|
||||
import { AutocompleteState } from 'src/app/core/store/state/autocomplete.state';
|
||||
import { LoadAutocomplete } from 'src/app/core/store/actions/autocomplete.actions';
|
||||
import { ProductService } from '../../../../core/services/product.service';
|
||||
import { throttle, debounceTime, distinctUntilChanged, switchMap, map } from 'rxjs/operators';
|
||||
import {
|
||||
throttle,
|
||||
debounceTime,
|
||||
distinctUntilChanged,
|
||||
switchMap,
|
||||
map
|
||||
} from 'rxjs/operators';
|
||||
import { ItemDTO } from 'projects/cat-service/src/lib';
|
||||
import { fadeInAnimation } from './fadeIn.animation';
|
||||
|
||||
@Component({
|
||||
selector: 'app-text-search',
|
||||
templateUrl: './text-search.component.html',
|
||||
styleUrls: ['./text-search.component.scss']
|
||||
styleUrls: ['./text-search.component.scss'],
|
||||
animations: [fadeInAnimation]
|
||||
})
|
||||
export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
@Select(ProcessState.getRecentProducts) recentArticles$: Observable<
|
||||
@@ -45,12 +53,13 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
recentArticles: RecentArticleSearch[];
|
||||
products$: Observable<Product[]>;
|
||||
products: Product[];
|
||||
filters: Filter[];
|
||||
filters: Filter[] = [];
|
||||
timer: any;
|
||||
autocompletePlaceHolder = '';
|
||||
@Select(ProcessState.getProcesses) processes$: Observable<Process[]>;
|
||||
@Select(FilterState.getSelectedFilters) filters$: Observable<Filter[]>;
|
||||
@Select(AutocompleteState.getAutocompleteResults) autocompleteResults: Observable<string>;
|
||||
@Select(AutocompleteState.getAutocompleteResults)
|
||||
autocompleteResults: Observable<string>;
|
||||
processes: Process[];
|
||||
error = '';
|
||||
|
||||
@@ -59,7 +68,11 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
|
||||
@ViewChild('searchInput') searchInput: SearchComponent;
|
||||
|
||||
constructor(private store: Store, private router: Router, private productService: ProductService) { }
|
||||
constructor(
|
||||
private store: Store,
|
||||
private router: Router,
|
||||
private productService: ProductService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.loadRecentArticles();
|
||||
@@ -74,7 +87,9 @@ 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) {
|
||||
@@ -89,17 +104,20 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
query: searchParams,
|
||||
skip: 0,
|
||||
take: 1,
|
||||
fitlers: [],
|
||||
fitlers: this.filters,
|
||||
firstLoad: true
|
||||
}
|
||||
};
|
||||
|
||||
this.productService.searchItems(exists).pipe(
|
||||
this.productService
|
||||
.searchItems(exists)
|
||||
.pipe(
|
||||
map((data: ItemDTO[]) => {
|
||||
return data ? data : null;
|
||||
}),
|
||||
debounceTime(1000),
|
||||
distinctUntilChanged(),
|
||||
).subscribe(data => {
|
||||
distinctUntilChanged()
|
||||
)
|
||||
.subscribe(data => {
|
||||
if (data && data.length === 0) {
|
||||
this.error = 'Ergibt keine Suchergebnisse';
|
||||
} else {
|
||||
@@ -110,7 +128,6 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
private submitSearch() {
|
||||
this.filters = this.store.selectSnapshot(FilterState.getFilters);
|
||||
const search = <Search>{
|
||||
query: this.searchParams,
|
||||
fitlers: this.filters,
|
||||
@@ -199,11 +216,9 @@ export class TextSearchComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
this.timer = setTimeout(() => {
|
||||
this.store.dispatch(new LoadAutocomplete(search));
|
||||
this.autocompleteResults.subscribe(
|
||||
(res: string) => {
|
||||
this.autocompleteResults.subscribe((res: string) => {
|
||||
this.autocompletePlaceHolder = res;
|
||||
}
|
||||
);
|
||||
});
|
||||
}, 1);
|
||||
} else {
|
||||
this.autocompletePlaceHolder = '';
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 700px;
|
||||
padding-bottom: 30px;
|
||||
height: 650px;
|
||||
padding-bottom: 00px;
|
||||
margin-bottom: 90px;
|
||||
box-shadow: 0px -2px 24px 0px #dce2e9;
|
||||
|
||||
background-image: linear-gradient(-180deg, #ffffff 0%, #ffffff 100%);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<div class="spacer"></div>
|
||||
<div [@listAnimation]="active">
|
||||
<app-card
|
||||
*ngFor="let item of navigation"
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
line-height: 21px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
height: 20px;
|
||||
}
|
||||
.header {
|
||||
padding-left: 20px;
|
||||
padding-bottom: 28px;
|
||||
@@ -50,6 +47,7 @@
|
||||
min-height: 400px;
|
||||
position: relative;
|
||||
margin-top: -5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.content > * {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="container">
|
||||
<div class="header" (click)="nextStage()">
|
||||
<div class="header">
|
||||
<img class="icon" src="/assets/images/Empfehlungen_Icon_blue.svg" />
|
||||
<span>Empfehlungen</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user