diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php
index 7ec32e0..42b3c92 100644
--- a/resources/views/fields/camera-capture.blade.php
+++ b/resources/views/fields/camera-capture.blade.php
@@ -730,6 +730,8 @@ function cameraCapture() {
+
+
@@ -742,6 +744,7 @@ function cameraCapture() {
currentFacingMode: 'user',
textDetectionInterval: null,
capturedPhoto: null, // store captured image
+ serialNumbers: [],
async initCamera() {
try {
@@ -812,6 +815,10 @@ function cameraCapture() {
const detectedText = result.data.text.trim();
alert("Detected Text:\n" + (detectedText || "[No text detected]"));
+ // Extract serial numbers (digits only)
+ const matches = detectedText.match(/\d+/g) || [];
+ this.serialNumbers = matches.slice(0, 4); // take first 4 serials
+ this.$refs.serialInput.value = JSON.stringify(this.serialNumbers);
}
} catch (err) {
console.error("OCR verify error:", err);