Compare commits

...

4 Commits

Author SHA1 Message Date
Michael Auer
f9908eaa57 merge branch 'release/1.5' 2021-12-22 11:23:09 +01:00
Lorenz Hilpert
34a6c6d997 Merged PR 1015: #2542 bei leere Liste wirf klick auf Abholfach Fehler
#2542 bei leere Liste wirf klick auf Abholfach Fehler

Related work items: #2542
2021-12-15 16:33:34 +00:00
Lorenz Hilpert
fa2c0d101f Merged PR 1014: #2541 Load-Ansicht dauerhaft bei leere Liste
#2541 Load-Ansicht dauerhaft bei leere Liste

Related work items: #2541
2021-12-15 15:01:00 +00:00
Lorenz Hilpert
c3f6cef14e Merged PR 1013: #2533 Reservierungsliste - bei leerer Liste wirf klick auf Abholfach Fehler
#2533  Reservierungsliste - bei leerer Liste wirf klick auf Abholfach Fehler

Related work items: #2533
2021-12-15 14:56:41 +00:00
3 changed files with 13 additions and 18 deletions

View File

@@ -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 },
});
}
}

View File

@@ -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) => {

View File

@@ -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 },
});
}
}