notification on off widget

This commit is contained in:
2026-08-14 08:04:22 +02:00
parent 1dbb93b139
commit 5f2137d8ec
2 changed files with 20 additions and 1 deletions
@@ -6,6 +6,12 @@
* - orange -> approaching deadlines (in scadenza)
* Scope: deadlines assigned directly to the user OR to their department.
*/
/* Check user webapp notification preference */
$_notifyStmt = $pdo->prepare("SELECT notify_webapp FROM auth_users WHERE id = ? LIMIT 1");
$_notifyStmt->execute([(int)$iduserlogin]);
if ((int)$_notifyStmt->fetchColumn() !== 1) {
return;
}
$_empStmt = $pdo->prepare("SELECT id, department FROM employees WHERE auth_user_id = ? LIMIT 1");
$_empStmt->execute([(int)$iduserlogin]);
@@ -131,4 +137,4 @@ if (!$_emp || ($_overdue === 0 && $_approaching === 0)) {
<span class="mdw-arrow"><i class="fa-solid fa-arrow-right"></i></span>
</a>
<?php endif; ?>
</div>
</div>