mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
ComponentRef,
|
||||
} from '@angular/core';
|
||||
import { Subject, Observable, BehaviorSubject } from 'rxjs';
|
||||
import { takeUntil, filter, take, switchMap, catchError, delay, withLatestFrom, map, first, startWith } from 'rxjs/operators';
|
||||
import { takeUntil, filter, take, switchMap, catchError, delay, withLatestFrom, map, first, startWith, tap } from 'rxjs/operators';
|
||||
import { RemissionResourceType, RemissionTargetType } from '../../models/remission-resource-type.model';
|
||||
import { ResourceTypeSpecificModel } from '../../models/resource-type-specific-model.model';
|
||||
import { CapacityTypeClientWrapper } from '../../models/capacity-type-client-wrapper.model';
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
SetRemissionCreated,
|
||||
SetRemissionFinishedProcessStatus,
|
||||
SetRemissionActiveView,
|
||||
ResetRemissionState,
|
||||
} from 'apps/sales/src/app/core/store/actions/remission.actions';
|
||||
import { RemissionHelperService } from '../../services/remission-helper.service';
|
||||
import { RemissionListComponent } from '../../components/remission-list/remission-list.component';
|
||||
@@ -173,11 +174,19 @@ export class RemissionListStartedComponent implements OnInit, OnDestroy {
|
||||
process$ = this.continueProcess();
|
||||
}
|
||||
|
||||
return process$.pipe(filter((process) => !isNullOrUndefined(process)));
|
||||
return process$.pipe(
|
||||
tap((process) => console.log('initRemissionProcess', { process })),
|
||||
filter((process) => !isNullOrUndefined(process))
|
||||
);
|
||||
}),
|
||||
take(1)
|
||||
take(1),
|
||||
withLatestFrom(this.shippingDocument$)
|
||||
)
|
||||
.subscribe((process) => {
|
||||
.subscribe(([process, document]) => {
|
||||
if (process.completed || document.isCompleted) {
|
||||
this.store.dispatch(new ResetRemissionState());
|
||||
this.navigateToFinishRemission();
|
||||
}
|
||||
this.store.dispatch(new SetRemissionProcess(process));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user