mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 17:55:03 +02:00
Added capability to scan Digikey barcodes and open the local part part page based on the result (#811)
* added capability to scan digikey barcodes and open the local part page based on the digikey part number or manufacturer part number * had replaced one too many doublequotes * Generalized interpretation of format06 barcodes, added ids for mouser * Renamed vendor_barcode to user_barcode in entities * Added a own class to parse EIGP114 barcodes * Added tests to EIGP114Barcode parser * Refactored code * Changed BarcodeRedirector to support the new Barcode EIGP114BarcodeScanResult class * Added possibility to just show all information contained in a barcode * Dont require trailer for EIGP114 barcodes, as digikey does not seem to put them onto their barcodes * Fixed inspection issues --------- Co-authored-by: jona <a@b.c> Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
This commit is contained in:
parent
9c99217dee
commit
9e85b70c17
20 changed files with 868 additions and 177 deletions
|
@ -41,8 +41,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Form\LabelSystem;
|
||||
|
||||
use App\Services\LabelSystem\Barcodes\BarcodeSourceType;
|
||||
use App\Services\LabelSystem\BarcodeScanner\BarcodeSourceType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
|
@ -55,6 +56,8 @@ class ScanDialogType extends AbstractType
|
|||
{
|
||||
$builder->add('input', TextType::class, [
|
||||
'label' => 'scan_dialog.input',
|
||||
//Do not trim the input, otherwise this damages Format06 barcodes which end with non-printable characters
|
||||
'trim' => false,
|
||||
'attr' => [
|
||||
'autofocus' => true,
|
||||
'id' => 'scan_dialog_input',
|
||||
|
@ -71,9 +74,14 @@ class ScanDialogType extends AbstractType
|
|||
null => 'scan_dialog.mode.auto',
|
||||
BarcodeSourceType::INTERNAL => 'scan_dialog.mode.internal',
|
||||
BarcodeSourceType::IPN => 'scan_dialog.mode.ipn',
|
||||
BarcodeSourceType::VENDOR => 'scan_dialog.mode.vendor',
|
||||
BarcodeSourceType::USER_DEFINED => 'scan_dialog.mode.user',
|
||||
BarcodeSourceType::EIGP114 => 'scan_dialog.mode.eigp'
|
||||
},
|
||||
]);
|
||||
|
||||
$builder->add('info_mode', CheckboxType::class, [
|
||||
'label' => 'scan_dialog.info_mode',
|
||||
'required' => false,
|
||||
]);
|
||||
|
||||
$builder->add('submit', SubmitType::class, [
|
||||
|
|
|
@ -103,8 +103,8 @@ class PartLotType extends AbstractType
|
|||
'help' => 'part_lot.owner.help',
|
||||
]);
|
||||
|
||||
$builder->add('vendor_barcode', TextType::class, [
|
||||
'label' => 'part_lot.edit.vendor_barcode',
|
||||
$builder->add('user_barcode', TextType::class, [
|
||||
'label' => 'part_lot.edit.user_barcode',
|
||||
'help' => 'part_lot.edit.vendor_barcode.help',
|
||||
'required' => false,
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue