mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Allow to scan IPN barcodes using the built in barcode scanner
This improves issue #373
This commit is contained in:
parent
3953e36921
commit
5cfccab671
9 changed files with 1480 additions and 1397 deletions
|
@ -71,11 +71,12 @@ class ScanController extends AbstractController
|
|||
|
||||
if ($input === null && $form->isSubmitted() && $form->isValid()) {
|
||||
$input = $form['input']->getData();
|
||||
$mode = $form['mode']->getData();
|
||||
}
|
||||
|
||||
if ($input !== null) {
|
||||
try {
|
||||
$scan_result = $this->barcodeNormalizer->scanBarcodeContent($input);
|
||||
$scan_result = $this->barcodeNormalizer->scanBarcodeContent($input, $mode ?? null);
|
||||
try {
|
||||
return $this->redirect($this->barcodeParser->getRedirectURL($scan_result));
|
||||
} catch (EntityNotFoundException) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue