mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
#4163 WBS abschließen ohne Wannennummer möglich
This commit is contained in:
@@ -73,10 +73,10 @@
|
||||
<ui-icon icon="documents_refresh" size="24px"></ui-icon>
|
||||
Remission
|
||||
</a>
|
||||
<a [routerLink]="['/filiale/package-inspection']" routerLinkActive="active" (click)="fetchAndOpenPackages()">
|
||||
<!-- <a [routerLink]="['/filiale/package-inspection']" routerLinkActive="active" (click)="fetchAndOpenPackages()">
|
||||
<ui-svg-icon icon="clipboard-check-outline" [size]="24"></ui-svg-icon>
|
||||
Wareneingang
|
||||
</a>
|
||||
</a> -->
|
||||
</ng-container>
|
||||
</shell-footer>
|
||||
</div>
|
||||
|
||||
@@ -47,8 +47,13 @@ export class FinishRemissionComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
const returnDto = await this._remissionService.getReturn(returnId).toPromise();
|
||||
this.clearProcessData();
|
||||
|
||||
let queryParams = { ...this._activatedRoute.snapshot.queryParams };
|
||||
|
||||
delete queryParams['complete'];
|
||||
|
||||
await this._router.navigate(['/filiale', 'remission', 'create', returnDto.returnGroup], {
|
||||
queryParams: { ...this._activatedRoute.snapshot.queryParams },
|
||||
queryParams,
|
||||
});
|
||||
} catch (err) {
|
||||
this._modal.open({
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||
import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { BreadcrumbService } from '@core/breadcrumb';
|
||||
@@ -85,7 +86,14 @@ export class FinishShippingDocumentComponent implements OnInit, OnDestroy {
|
||||
modal.afterClosed$.pipe(takeUntil(this._onDestroy$)).subscribe(async (result) => {
|
||||
if (result?.data === 'correct') {
|
||||
await this.createReceiptAndAssignPackageNumber(query);
|
||||
await this.navigateToRemissionList(query);
|
||||
|
||||
if (coerceBooleanProperty(this._activatedRoute.snapshot.queryParams?.complete)) {
|
||||
this._router.navigate(['/filiale', 'remission', this.returnId, 'shipping-document'], {
|
||||
queryParams: { complete: true },
|
||||
});
|
||||
} else {
|
||||
await this.navigateToRemissionList(query);
|
||||
}
|
||||
} else if (result?.data === 'rescan') {
|
||||
this.searchboxComponent.clear();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import { NEVER, Observable } from 'rxjs';
|
||||
import { catchError, filter, first, map, shareReplay, switchMap, tap, withLatestFrom } from 'rxjs/operators';
|
||||
import { ShortReceiptNumberPipe } from '../../pipes/short-receipt-number.pipe';
|
||||
import { RemissionListComponentStore } from '../../remission-list/remission-list.component-store';
|
||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||
|
||||
export interface ShippingDocumentDetailsState {
|
||||
remissionStarted?: boolean;
|
||||
@@ -159,8 +160,16 @@ export class ShippingDocumentDetailsComponent extends ComponentStore<ShippingDoc
|
||||
}
|
||||
|
||||
async complete() {
|
||||
if (await this.completeReceipt()) {
|
||||
await this.completeReturn();
|
||||
if (!this.get((s) => s.packageNumber)) {
|
||||
const returnId = this.return.id;
|
||||
const firstReceiptId = this.firstReceipt?.id;
|
||||
this._router.navigate(['/filiale/remission', returnId, 'finish-shipping-document', firstReceiptId], {
|
||||
queryParams: { complete: true },
|
||||
});
|
||||
} else {
|
||||
if (await this.completeReceipt()) {
|
||||
await this.completeReturn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +267,10 @@ export class ShippingDocumentDetailsComponent extends ComponentStore<ShippingDoc
|
||||
this.setReturn(r);
|
||||
|
||||
this.addOrUpdateBreadcrumbIfNotExists(r);
|
||||
|
||||
if (coerceBooleanProperty(this._activatedRoute.snapshot.queryParams?.complete)) {
|
||||
this.complete();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.navigateBack();
|
||||
|
||||
Reference in New Issue
Block a user