mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1157: #2977 Fix Clear Cart after Process gets closed and reopened via Footer Proces...
#2977 Fix Clear Cart after Process gets closed and reopened via Footer Process generation
This commit is contained in:
committed by
Lorenz Hilpert
parent
dfd1847a2d
commit
c92649a8d4
@@ -18,8 +18,6 @@ import { ShellProcessTabComponent } from '@shell/process';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ShellComponent {
|
||||
private readonly _now = Date.now();
|
||||
|
||||
@ViewChildren('processTabs')
|
||||
readonly processTabs: QueryList<ShellProcessTabComponent>;
|
||||
|
||||
@@ -32,7 +30,14 @@ export class ShellComponent {
|
||||
}
|
||||
|
||||
get lastCartProcessId$() {
|
||||
return this._appService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(map((process) => process?.id ?? this._now));
|
||||
return this._appService.getLastActivatedProcessWithSectionAndType$('customer', 'cart').pipe(
|
||||
/*
|
||||
* Date.now() muss falls keine Prozesse existieren immer erneut aufgerufen werden,
|
||||
* da sonst der neue Vorgang die gleiche ID vom zuvor geschlossenen Vorgang bekommt,
|
||||
* wenn man über den Footer einen neuen Vorgang generiert
|
||||
*/
|
||||
map((process) => process?.id ?? Date.now())
|
||||
);
|
||||
}
|
||||
|
||||
get section$() {
|
||||
|
||||
Reference in New Issue
Block a user