mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Compare commits
4 Commits
release-20
...
1.5.423
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9908eaa57 | ||
|
|
34a6c6d997 | ||
|
|
fa2c0d101f | ||
|
|
c3f6cef14e |
@@ -105,7 +105,7 @@ export class GoodsInCleanupListComponent implements OnInit, OnDestroy {
|
||||
for (const crumb of crumbs) {
|
||||
this._breadcrumb.patchBreadcrumb(crumb.id, {
|
||||
name: crumb.name,
|
||||
params: { scroll_position: this.scrollContainer.scrollPos },
|
||||
params: { scroll_position: this.scrollContainer?.scrollPos ?? 0 },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,22 +73,16 @@ export class GoodsInListStore extends ComponentStore<GoodsInListState> {
|
||||
}).pipe(
|
||||
tapResponse(
|
||||
(res) => {
|
||||
if (options.clear) {
|
||||
this.patchState({
|
||||
hits: res.hits,
|
||||
results: res.result,
|
||||
take: 25,
|
||||
loading: false,
|
||||
});
|
||||
} else {
|
||||
const items = this.get((s) => s.results);
|
||||
this.patchState({
|
||||
hits: res.hits,
|
||||
results: [...items, ...res.result],
|
||||
take: 25,
|
||||
loading: false,
|
||||
});
|
||||
}
|
||||
const result = res.result ?? [];
|
||||
|
||||
const items = options.clear ? result : [..._results, ...result];
|
||||
this.patchState({
|
||||
hits: res.hits,
|
||||
results: items,
|
||||
take: 25,
|
||||
loading: false,
|
||||
});
|
||||
|
||||
this._searchResultSubject.next(res);
|
||||
if (res.hits > 1) {
|
||||
const path = '/goods/in/list/';
|
||||
@@ -98,6 +92,7 @@ export class GoodsInListStore extends ComponentStore<GoodsInListState> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
options?.cb?.call(undefined);
|
||||
},
|
||||
(err: Error) => {
|
||||
|
||||
@@ -105,7 +105,7 @@ export class GoodsInReservationComponent implements OnInit, OnDestroy {
|
||||
for (const crumb of crumbs) {
|
||||
this._breadcrumb.patchBreadcrumb(crumb.id, {
|
||||
name: crumb.name,
|
||||
params: { scroll_position: this.scrollContainer.scrollPos, take: this._store.results?.length },
|
||||
params: { scroll_position: this.scrollContainer?.scrollPos ?? 0, take: this._store.results?.length },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user