Removed generate sticker button in bulk sticker printing
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 12s
Laravel Larastan / larastan (pull_request) Failing after 5m17s
Laravel Pint / pint (pull_request) Successful in 4m3s

This commit is contained in:
dhanabalan
2026-09-10 17:41:01 +05:30
parent 7650b5d01b
commit 049f15eb3c

View File

@@ -0,0 +1,85 @@
<x-filament-panels::page>
{{ $this->form }}
<div class="flex flex-row gap-2 mt-4">
{{-- <button
type="button"
wire:click="generateSticker"
class="px-3 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
>
Generate Sticker
</button> --}}
<button
type="button"
wire:click="generateStickerId"
class="px-3 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
>
Generate Sticker ID
</button>
</div>
{{-- <script>
document.addEventListener('livewire:init', () => {
Livewire.on('open-sticker-pdf', (event) => {
console.log('PDF EVENT RECEIVED', event);
const urls = event.urls;
console.log('PDF URLs:', urls);
urls.forEach(url => {
window.open(url, '_blank');
});
});
});
</script> --}}
<script>
document.addEventListener('livewire:init', () => {
if (window.stickerPdfListenerRegistered) {
return;
}
window.stickerPdfListenerRegistered = true;
Livewire.on('open-sticker-pdf', (event) => {
const urls = event.urls || [];
if (!urls.length) {
return;
}
urls.forEach((url, index) => {
setTimeout(() => {
const link = document.createElement('a');
link.href = url;
link.download = '';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}, index * 1000);
});
});
});
</script>
</x-filament-panels::page>