Added camera capture in ocr

This commit is contained in:
dhanabalan
2025-10-17 10:21:28 +05:30
parent 1dec47a05f
commit fbc6ca82e1

View File

@@ -52,7 +52,8 @@ document.addEventListener('DOMContentLoaded', () => {
<x-filament::button color="gray" @click="switchCamera" x-show="!photoTaken">Switch Camera</x-filament::button> <x-filament::button color="gray" @click="switchCamera" x-show="!photoTaken">Switch Camera</x-filament::button>
</div> </div>
<input type="hidden" name="{{ $getName() }}" x-ref="hiddenInput"> {{-- <input type="hidden" name="{{ $getName() }}" x-ref="hiddenInput"> --}}
<input type="hidden" x-ref="hiddenInput" x-model="photo1">
</div> </div>
<script> <script>
@@ -103,7 +104,8 @@ function cameraCapture() {
snapshot.classList.remove('hidden'); snapshot.classList.remove('hidden');
this.photoTaken = true; this.photoTaken = true;
this.$refs.hiddenInput.value = dataUrl; // this.$refs.hiddenInput.value = dataUrl;
@this.set('photo1', dataUrl);
}, },
async retakePhoto() { async retakePhoto() {