mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
SCANNER TEST 1
This commit is contained in:
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
import { UiFilterScanProvider } from '@ui/filter';
|
||||
import { NativeContainerService } from 'native-container';
|
||||
import { NEVER, Observable, of } from 'rxjs';
|
||||
import { catchError, map, mergeMap } from 'rxjs/operators';
|
||||
import { catchError, map, mergeMap, tap } from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class ArticleSearchMainScanProviderService extends UiFilterScanProvider {
|
||||
@@ -14,6 +14,7 @@ export class ArticleSearchMainScanProviderService extends UiFilterScanProvider {
|
||||
|
||||
scan(): Observable<string> {
|
||||
return this.nativeContainer.openScanner('scanBook').pipe(
|
||||
tap((result) => alert(JSON.stringify(result))),
|
||||
mergeMap((result) => {
|
||||
if (result.status === 'RESULT') {
|
||||
return of(result.data);
|
||||
|
||||
Reference in New Issue
Block a user