Added sticker validation resource blade file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 30s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 27s
Laravel Pint / pint (pull_request) Successful in 4m12s
Laravel Larastan / larastan (pull_request) Failing after 4m38s

This commit is contained in:
dhanabalan
2026-08-12 09:28:04 +05:30
parent 8cc77d0e01
commit 26dd1bddc1

View File

@@ -0,0 +1,69 @@
<x-filament::page>
<form wire:submit.prevent="create" class="space-y-6">
{{-- Form Section --}}
<div class="filament-form space-y-6">
{{ $this->form }}
</div>
{{-- <livewire:notification-sound /> --}}
{{-- Livewire Component (Invoice Table) --}}
{{-- <div class="bg-white shadow rounded-xl p-4">
<livewire:sticker-validation :ref-data="$ref_number" />
</div> --}}
{{-- Actions --}}
<div class="filament-actions mt-6">
<x-filament::actions>
@foreach ($this->getFormActions() as $action)
{{ $action }}
@endforeach
</x-filament::actions>
</div>
</form>
</x-filament::page>
<script>
window.addEventListener('open-stickers-sequence', async (event) => {
const urls = event.detail.urls;
for (const url of urls) {
const win = window.open(url, '_blank');
win.onload = () => {
win.focus();
win.print();
};
// wait before next
await new Promise(r => setTimeout(r, 1500));
}
});
</script>
<script>
window.addEventListener('open-sticker-pdf', event => {
console.log('PDF event:', event.detail);
let url = null;
// Livewire v3 wraps payload in array
if (Array.isArray(event.detail)) {
url = event.detail[0]?.url;
}
// fallback (if direct object comes)
else if (event.detail?.url) {
url = event.detail.url;
}
if (url) {
window.open(url, '_blank');
} else {
console.error('PDF URL missing', event.detail);
}
});
</script>