feat: conditionally disable preview based on request status - Show pending button for Pend/PartColl/Coll statuses instead of preview
This commit is contained in:
parent
0d8e998c50
commit
0b30d76a86
@ -215,10 +215,16 @@ $previewEnabled = $configFile[$configKey]['previewEnabled'] ?? false;
|
|||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($previewEnabled): ?>
|
<?php if ($previewEnabled): ?>
|
||||||
<template x-if="!req.VAL1USER || !req.VAL2USER">
|
<template x-if="['Pend', 'PartColl', 'Coll'].includes(req.STATS)">
|
||||||
|
<button disabled class="btn btn-xs w-full btn-warning opacity-70 cursor-not-allowed">
|
||||||
|
<i class="fa fa-clock mr-1"></i>
|
||||||
|
<span class="text-xs">Pending</span>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
<template x-if="!['Pend', 'PartColl', 'Coll'].includes(req.STATS) && (!req.VAL1USER || !req.VAL2USER)">
|
||||||
<button @click="openPreviewDialog(req)"
|
<button @click="openPreviewDialog(req)"
|
||||||
class="btn btn-xs w-full btn-warning">
|
class="btn btn-xs w-full btn-warning">
|
||||||
<i class="fa fa-clock mr-1"></i>
|
<i class="fa fa-eye mr-1"></i>
|
||||||
<span class="text-xs">Preview</span>
|
<span class="text-xs">Preview</span>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user