fix: remove Queue button from Waiting tab for confirmed paid OPDs
This commit is contained in:
parent
67664ab8ff
commit
2fc3d3ddbc
|
|
@ -26,7 +26,8 @@ if ($authUser) {
|
|||
<?php $isBookedTab = ($tabType ?? '') === 'booking'; ?>
|
||||
<?php $isConfirmedForQueue = (int) ($row->is_confirmed_for_queue ?? 0) === 1; ?>
|
||||
<?php $hasPrescription = (int) ($row->has_prescription ?? 0) === 1; ?>
|
||||
<tr data-opd-id="<?= esc((int) ($row->opd_id ?? 0)) ?>" data-has-vitals="<?= esc((int) ($row->has_vitals ?? 0)) ?>" data-has-prescription="<?= esc((int) ($row->has_prescription ?? 0)) ?>">
|
||||
<?php $showFullActions = $hasPrescription || $isConfirmedForQueue; ?>
|
||||
<tr data-opd-id="<?= esc((int) ($row->opd_id ?? 0)) ?>" data-has-vitals="<?= esc((int) ($row->has_vitals ?? 0)) ?>" data-has-prescription="<?= esc($showFullActions ? 1 : 0) ?>">
|
||||
<td><?= esc($row->opd_code ?? '') ?></td>
|
||||
<td><?= esc(($row->P_name ?? '') . ' { ' . ($row->p_rname ?? '') . ' }') ?></td>
|
||||
<?php if (!empty($showQueue)) : ?><td><?= $hasPrescription ? esc((int) ($row->queue_no ?? 0)) : '-' ?></td><?php endif; ?>
|
||||
|
|
@ -44,17 +45,12 @@ if ($authUser) {
|
|||
</a>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php if (! $hasPrescription && $isConfirmedForQueue) : ?>
|
||||
<button type="button" class="btn btn-outline-success btn-sm btn-opd-create-queue" data-opdid="<?= esc((int) ($row->opd_id ?? 0)) ?>" title="Queue">
|
||||
Queue
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php if ($canOpenPrescription && $hasPrescription) : ?>
|
||||
<?php if ($canOpenPrescription && $showFullActions) : ?>
|
||||
<a class="btn btn-outline-primary btn-sm" title="Consult" href="javascript:load_form('/Opd_prescription/Prescription/<?= esc((int) ($row->opd_id ?? 0)) ?>','Consult');">
|
||||
Consult
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($hasPrescription) : ?>
|
||||
<?php if ($showFullActions) : ?>
|
||||
<button type="button" class="btn <?= $hasVitals ? 'btn-success' : 'btn-warning text-dark' ?> btn-sm btn-opd-vitals" title="<?= $hasVitals ? 'Vitals Filled' : 'Vitals' ?>" data-opdid="<?= esc((int) ($row->opd_id ?? 0)) ?>" data-patient="<?= esc(($row->P_name ?? '') . ' { ' . ($row->p_rname ?? '') . ' }') ?>">
|
||||
<?= $hasVitals ? 'Vitals ✓' : 'Vitals' ?>
|
||||
</button>
|
||||
|
|
@ -70,7 +66,7 @@ if ($authUser) {
|
|||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($tabType ?? '') === 'waiting' && $hasPrescription) : ?>
|
||||
<?php if (($tabType ?? '') === 'waiting' && $showFullActions) : ?>
|
||||
<button type="button" class="btn btn-outline-success btn-sm btn-opd-status" data-opd-id="<?= esc((int) ($row->opd_id ?? 0)) ?>" data-opd-status="2" title="Visit Done">
|
||||
Visit Done
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user