Merged PR 274: Mit der letzten Integration ersetzt

Mit der letzten Integration ersetzt
This commit is contained in:
Lorenz Hilpert
2020-09-08 15:33:34 +00:00
committed by Sebastian Neumair
4 changed files with 5 additions and 32 deletions

View File

@@ -4,7 +4,5 @@
Halten Sie den Artikel an den externen Barcodescanner oder nutzen Sie die Scanfunktion des iPads.
</caption>
<button class="btn-active medium" type="button" (click)="openScanner()">
Artikel scannen
</button>
<lib-barcode-scanner #scanner (scan)="triggerSearch($event)"></lib-barcode-scanner>
</div>

View File

@@ -38,15 +38,3 @@ lib-barcode-scanner-scandit {
.btn {
margin-top: 15px;
}
button {
background-color: #f70400;
border: none;
border-radius: 25px;
color: #fff;
text-align: center;
padding: 12px 25px;
font-family: 'Open Sans';
font-size: 18px;
font-weight: bold;
}

View File

@@ -14,7 +14,6 @@ import { AddBreadcrumb } from '../../../../core/store/actions/breadcrumb.actions
import { takeUntil } from 'rxjs/operators';
import { ProcessSelectors } from '../../../../core/store/selectors/process.selectors';
import { ItemDTO } from '@swagger/cat';
import { NativeContainerService } from 'native-container';
@Component({
selector: 'app-barcode-search',
@@ -28,12 +27,7 @@ export class BarcodeSearchComponent implements OnInit, OnDestroy {
scanningVisible = false;
destroy$ = new Subject();
constructor(
private store: Store,
private router: Router,
protected productService: ProductService,
private nativeContainer: NativeContainerService
) {}
constructor(private store: Store, private router: Router, protected productService: ProductService) {}
ngOnInit() {
this.processes$.pipe(takeUntil(this.destroy$)).subscribe((p: Process[]) => (this.processes = p));
@@ -86,15 +80,8 @@ export class BarcodeSearchComponent implements OnInit, OnDestroy {
);
}
openScanner() {
if (this.nativeContainer.isUiWebview()) {
this.nativeContainer
.openScanner('scanBook')
.pipe(takeUntil(this.destroy$))
.subscribe((message) => {
this.triggerSearch(message.data);
});
}
toggleScan() {
this.scanningVisible = !this.scanningVisible;
}
ngOnDestroy() {

View File

@@ -15,4 +15,4 @@
<div *ngSwitchCase="'search'" [@fadeIn]="active">
<app-text-search></app-text-search>
</div>
</div>
</div>