Allow to pass infos from barcodes to creation dialog

This commit is contained in:
Jan Böhmer
2026-03-07 21:48:27 +01:00
parent a722608ae8
commit 70919d953a
3 changed files with 47 additions and 20 deletions

View File

@@ -187,7 +187,7 @@ readonly class EIGP114BarcodeScanResult implements BarcodeScanResultInterface
*
* @param array<string, string> $data The fields of the EIGP114 barcode, where the key is the field name and the value is the field content
*/
public function __construct(public array $data)
public function __construct(public array $data, public readonly ?string $rawInput = null)
{
//IDs per EIGP 114.2018
$this->shipDate = $data['6D'] ?? null;
@@ -306,7 +306,7 @@ readonly class EIGP114BarcodeScanResult implements BarcodeScanResultInterface
$results[$key] = $fieldValue;
}
return new self($results);
return new self($results, $input);
}
public function getDecodedForInfoMode(): array