fix: allow admin and superuser to unvalidate any validated record

This commit is contained in:
mahdahar 2026-03-10 12:17:55 +07:00
parent 8b91bc8dc3
commit 2b1cccd2be

View File

@ -326,7 +326,7 @@ $canUnval = $userLevel <= 1;
<ul tabindex="0" <ul tabindex="0"
class="dropdown-content menu bg-base-100 rounded-box z-50 w-48 p-2 shadow-lg border border-base-300 text-xs"> class="dropdown-content menu bg-base-100 rounded-box z-50 w-48 p-2 shadow-lg border border-base-300 text-xs">
<?php if ($isAdminSuper): ?> <?php if ($isAdminSuper): ?>
<li x-show="req.ISVAL == 1 && req.ISPENDING != 1 && (req.VAL1USER == '<?= $userId; ?>' || req.VAL2USER == '<?= $userId; ?>')"> <li x-show="req.ISVAL == 1 && req.ISPENDING != 1">
<?php if ($canUnval): ?> <?php if ($canUnval): ?>
<a @click="openUnvalDialog(req.SP_ACCESSNUMBER)" class="text-error hover:bg-error/10"> <a @click="openUnvalDialog(req.SP_ACCESSNUMBER)" class="text-error hover:bg-error/10">
<i class="fa fa-times-circle mr-2"></i> UnVal <i class="fa fa-times-circle mr-2"></i> UnVal