mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 272: #274 - Artikel Scan Fehler
#274 - Artikel Scan Fehler Related work items: #274
This commit is contained in:
@@ -4,5 +4,7 @@
|
||||
Halten Sie den Artikel an den externen Barcodescanner oder nutzen Sie die Scanfunktion des iPads.
|
||||
</caption>
|
||||
|
||||
<lib-barcode-scanner #scanner (scan)="triggerSearch($event)"></lib-barcode-scanner>
|
||||
</div>
|
||||
<button class="btn-active medium" type="button" (click)="openScanner()">
|
||||
Artikel scannen
|
||||
</button>
|
||||
</div>
|
||||
@@ -38,3 +38,15 @@ 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;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ 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',
|
||||
@@ -27,7 +28,12 @@ export class BarcodeSearchComponent implements OnInit, OnDestroy {
|
||||
scanningVisible = false;
|
||||
destroy$ = new Subject();
|
||||
|
||||
constructor(private store: Store, private router: Router, protected productService: ProductService) { }
|
||||
constructor(
|
||||
private store: Store,
|
||||
private router: Router,
|
||||
protected productService: ProductService,
|
||||
private nativeContainer: NativeContainerService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.processes$.pipe(takeUntil(this.destroy$)).subscribe((p: Process[]) => (this.processes = p));
|
||||
@@ -80,8 +86,15 @@ export class BarcodeSearchComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
|
||||
toggleScan() {
|
||||
this.scanningVisible = !this.scanningVisible;
|
||||
openScanner() {
|
||||
if (this.nativeContainer.isUiWebview()) {
|
||||
this.nativeContainer
|
||||
.openScanner('scanBook')
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((message) => {
|
||||
this.triggerSearch(message.data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user