mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
#2323 Wannennummer muß zweimal geklickt werden
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
</div>
|
||||
<div class="image" *ngIf="pageStatus === 0">
|
||||
<ng-container *ngIf="emptyOrInvalidBarcode">
|
||||
<app-barcode-scanner *ngIf="isSafari" (scan)="handleScanResult($event)"></app-barcode-scanner>
|
||||
<lib-remission-container-scanner *ngIf="isNative" #scanner (scan)="handleScanResult($event)"></lib-remission-container-scanner>
|
||||
<!-- <app-barcode-scanner *ngIf="isSafari" (scan)="handleScanResult($event)"></app-barcode-scanner> -->
|
||||
<lib-remission-container-scanner *ngIf="isNative" (scan)="handleScanResult($event)"></lib-remission-container-scanner>
|
||||
<ui-searchbox *ngIf="isDesktop" placeholder="Wannennummer scannen" (search)="handleScanResult($event)"></ui-searchbox>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
@@ -36,6 +36,7 @@ import { UiSearchboxNextComponent } from '@ui/searchbox';
|
||||
import { isResponseArgs } from '@utils/object';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { ResponseArgs } from '@swagger/cat';
|
||||
import { RemissionContainerScannerScanditComponent } from 'shared/public_api';
|
||||
|
||||
@Component({
|
||||
selector: 'app-remission-finish',
|
||||
@@ -107,6 +108,9 @@ export class RemissionFinishComponent implements OnInit, OnDestroy {
|
||||
@ViewChild(UiSearchboxNextComponent, { static: false })
|
||||
searchbox: UiSearchboxNextComponent;
|
||||
|
||||
@ViewChild(RemissionContainerScannerScanditComponent, { static: false })
|
||||
scanner: RemissionContainerScannerScanditComponent;
|
||||
|
||||
constructor(
|
||||
private store: Store,
|
||||
private router: Router,
|
||||
@@ -273,6 +277,10 @@ export class RemissionFinishComponent implements OnInit, OnDestroy {
|
||||
})
|
||||
.afterClosed$.toPromise();
|
||||
|
||||
if (this.scanner) {
|
||||
this.scanner.code = '';
|
||||
}
|
||||
|
||||
if (result.data) {
|
||||
this.completeScan(barcode);
|
||||
} else {
|
||||
|
||||
@@ -30,6 +30,10 @@ export class RemissionContainerScannerScanditComponent implements AfterViewInit,
|
||||
.openScanner()
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((data) => {
|
||||
const code = JSON.stringify(data);
|
||||
if (this.code === code) {
|
||||
return;
|
||||
}
|
||||
this.code = JSON.stringify(data);
|
||||
|
||||
if (data.status === 'SUCCESS') {
|
||||
|
||||
Reference in New Issue
Block a user