Update job-queue-notifications.blade.php

This commit is contained in:
Bozhidar 2024-05-10 16:54:25 +03:00
parent e72e6c220a
commit e82d70fb3a

View file

@ -1,14 +1,24 @@
<div>
<script>
let hiddenJobQueueNotifications = [];
function hideJobQueueNotification(jobId) {
hiddenJobQueueNotifications.push(jobId);
document.getElementById('job-queue-' + jobId).style.display = 'none';
document.cookie = "hideJobQueueIds=" + JSON.stringify(hiddenJobQueueNotifications);
}
</script>
@foreach($jobs as $job)
<div class="fixed z-50 bottom-5 right-5 w-[24rem] rounded-xl text-black dark:text-white px-4 py-4 shadow-sm bg-white ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
<div id="job-queue-{{$job['id']}}" class="fixed z-50 bottom-5 right-5 w-[24rem] rounded-xl text-black dark:text-white px-4 py-4 shadow-sm bg-white ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
<div class="w-full flex justify-between">
<div class="text-gray-500 dark:text-gray-400">
{{ $job['displayName'] }}
</div>
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 text-gray-500 dark:text-gray-400 cursor-pointer" viewBox="0 0 24 24">
<svg onclick="hideJobQueueNotification('{{$job['id']}}')" xmlns="http://www.w3.org/2000/svg" class="w-4 text-gray-500 dark:text-gray-400 cursor-pointer" viewBox="0 0 24 24">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m7 7l10 10M7 17L17 7" />
</svg>
</div>