Add comprehensive printer configuration support: - New Printers.php config with role-based printer defaults (lab, phlebo, reception) - Update LabelController for configurable printer routing with error handling - Add ResponseTrait for proper JSON responses (success/error status) - Update routes to accept optional printer parameter for label printing - Add default printer configuration per role in shared config Enhance report generation workflow: - Support REPORT_LANG from CM_REQUESTS table for language preference - Prioritize URL parameter, then database value, then default - Add language info to PDF generation response (Indonesian/English) - Update all report methods (view, eng, preview, generate) with unified logic Improve UI and user experience: - Add dialog_results_generate to all role dashboards (superuser, admin, lab, phlebo, cs) - Update skeleton loading states widths in content requests - Add printer selection capability in sample collection flow Add comprehensive UAT documentation: - New UAT_GDC_CMOD_Checklist.md with 150+ test cases - Cover all roles: superuser, admin, lab, phlebo, cs, and cross-role scenarios - Include acceptance criteria (functional, security, performance, usability, data integrity) - Test categories: authentication, user management, validation, sample management, audit trail, reporting - Detailed sign-off structure for stakeholders Add barcode printing documentation: - docs/barcode_print_all.php - all labels printing implementation - docs/barcode_print_coll.php - collection label implementation - docs/barcode_print_disp.php - dispatch label implementation Update TODO tracking: - Mark Reprint Label and PDF Generation as completed - Update pending tasks for testing and audit trails
139 lines
4.6 KiB
PHP
139 lines
4.6 KiB
PHP
<dialog class="modal" :open="isDialogSampleOpen">
|
|
<div class="modal-box w-2/3 max-w-5xl">
|
|
<div class='flex justify-between items-center mb-2'>
|
|
|
|
|
|
<div class='flex items-center gap-2'>
|
|
<label class="text-xs font-medium text-base-content/70">Printer:</label>
|
|
<select x-model="selectedPrinter" class="select select-bordered select-xs w-32">
|
|
<option value="lab">Lab Printer</option>
|
|
<option value="phlebo">Phlebo Printer</option>
|
|
<option value="reception">Reception Printer</option>
|
|
</select>
|
|
</div>
|
|
<div class='flex gap-2 ml-auto'>
|
|
<template x-if="item.accessnumber">
|
|
<button class="btn btn-xs btn-outline btn-info" @click="openAuditDialog(item.accessnumber)">
|
|
<i class="fa fa-history"></i> Audit
|
|
</button>
|
|
</template>
|
|
<button class="btn btn-xs btn-neutral" @click="closeSampleDialog()">X</button>
|
|
</div>
|
|
</div>
|
|
|
|
<template x-if="isSampleLoading">
|
|
<div class="text-center py-10">
|
|
<span class="loading loading-spinner loading-lg text-primary"></span>
|
|
<p class="mt-2">Loading data...</p>
|
|
</div>
|
|
</template>
|
|
|
|
<template x-if="!isSampleLoading">
|
|
<div>
|
|
<table class="table table-xs table-compact w-full mb-4">
|
|
<tr>
|
|
<td>MR# </td>
|
|
<td x-text="': '+item.patnumber"></td>
|
|
<td>Patient Name </td>
|
|
<td x-text="': '+item.patname"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>KTP# </td>
|
|
<td x-text="': '+item.ktp"></td>
|
|
<td>Sex / Age </td>
|
|
<td x-text="': '+item.placeofbirth+' '+item.gender+' / '+item.age"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Note</td>
|
|
<td colspan='3'>
|
|
<textarea x-text="item.comment" class="textarea textarea-bordered w-full"
|
|
<?= ($config['sampleDialog']['commentEditable'] ?? true) ? '' : 'disabled' ?>></textarea>
|
|
<?php if ($config['sampleDialog']['commentEditable'] ?? true): ?>
|
|
<button class="btn btn-sm btn-primary mt-2" @click="saveComment(item.accessnumber)">Save</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table class="table table-xs table-compact w-full">
|
|
<thead>
|
|
<tr>
|
|
<th>Sample Code</th>
|
|
<th>Sample Name</th>
|
|
<th class='text-center'>Collected</th>
|
|
<th class='text-center'>Received</th>
|
|
<th>Action</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr>
|
|
<td></td>
|
|
|
|
<td></td>
|
|
<td>All</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td>
|
|
<button class="btn btn-sm btn-secondary px-2 py-1" @click="printAllLabels(item.accessnumber)"><i class="fa-solid fa-print"></i></button>
|
|
<?php if ($config['sampleDialog']['showCollectButtons'] ?? true): ?>
|
|
<button class="btn btn-sm btn-success px-2 py-1" onclick="">
|
|
<h6 class="p-0 m-0">Coll.</h6>
|
|
</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>Collection</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td>
|
|
<button class="btn btn-sm btn-secondary px-2 py-1" @click="printCollectionLabel(item.accessnumber)"><i class="fa-solid fa-print"></i></button>
|
|
<?php if ($config['sampleDialog']['showCollectButtons'] ?? true): ?>
|
|
<button class="btn btn-sm btn-success px-2 py-1" onclick="">
|
|
<h6 class="p-0 m-0">Coll.</h6>
|
|
</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<template x-for="sample in item.samples">
|
|
<tr>
|
|
<td x-text="sample.sampcode"></td>
|
|
<td x-text="sample.name"></td>
|
|
<td class='text-center'>
|
|
<input type="checkbox" class="checkbox" x-bind:checked="sample.colstatus == 1" disabled>
|
|
</td>
|
|
<td class='text-center'>
|
|
<input type="checkbox" class="checkbox" x-bind:checked="sample.tubestatus != 0" disabled>
|
|
</td>
|
|
<td>
|
|
|
|
<button class="btn btn-sm btn-secondary px-2 py-1" @click="printSampleLabel(item.accessnumber, sample.sampcode)"><i class="fa-solid fa-print"></i></button>
|
|
<?php if ($config['sampleDialog']['showCollectButtons'] ?? true): ?>
|
|
<template x-if="sample.colstatus == 0">
|
|
<button class="btn btn-sm btn-success px-2 py-1"
|
|
@click="collect(sample.sampcode, item.accessnumber)">
|
|
<h6 class="p-0 m-0">Coll.</h6>
|
|
</button>
|
|
</template>
|
|
<template x-if="sample.tubestatus != 0">
|
|
<button class="btn btn-sm btn-error px-2 py-1"
|
|
@click="unreceive(sample.sampcode, item.accessnumber)">
|
|
<h6 class="p-0 m-0">Un-Recv.</h6>
|
|
</button>
|
|
</template>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</dialog>
|