gdc_cmod/app/Views/admin/dialog_preview.php
mahdahar b29f807295 Refactor: Remove V2 namespace and consolidate role-based architecture
- Moved all V2 controllers (Lab, Requests, Samples, Users) to App\Controllers
- Removed deprecated role controllers (Admin, Doctor, Analyst, CustomerService)
- Simplified routes by removing /v2 prefix
- Added AGENTS.md with project conventions and TODO.md with task tracking
- Updated README.md with RBAC documentation
- Fixed hardcoded dates, status color mappings, and duplicate database calls
2026-01-19 10:55:10 +07:00

46 lines
2.4 KiB
PHP

<dialog class="modal" :open="isDialogPreviewOpen">
<template x-if="previewAccessnumber">
<div class="modal-box w-11/12 max-w-7xl h-[90vh] flex flex-col p-0 overflow-hidden bg-base-100">
<!-- Header -->
<div class="flex justify-between items-center p-3 bg-base-200 border-b border-base-300">
<h3 class="font-bold text-lg flex items-center gap-2">
<i class="fa fa-eye text-primary"></i>
Preview
<span class="badge badge-ghost text-xs" x-text="previewAccessnumber"></span>
</h3>
<div class="flex items-center gap-2">
<div class="join shadow-sm">
<button @click="previewType = 'preview'" :class="previewType === 'preview' ? 'btn-active btn-neutral text-white' : 'btn-ghost'" class="btn btn-sm join-item">Preview</button>
<button @click="setPreviewType('ind')" :class="previewType === 'ind' ? 'btn-active btn-neutral text-white' : 'btn-ghost'" class="btn btn-sm join-item">IND</button>
<button @click="setPreviewType('eng')" :class="previewType === 'eng' ? 'btn-active btn-neutral text-white' : 'btn-ghost'" class="btn btn-sm join-item">ENG</button>
<button @click="setPreviewType('pdf')" :class="previewType === 'pdf' ? 'btn-active btn-neutral text-white' : 'btn-ghost'" class="btn btn-sm join-item">PDF</button>
</div>
<button class="btn btn-sm btn-circle btn-ghost" @click="closePreviewDialog()">
<i class="fa fa-times"></i>
</button>
</div>
</div>
<!-- Content -->
<div class="flex-1 bg-base-300 relative p-1">
<iframe id="preview-iframe" x-ref="previewIframe" :src="getPreviewUrl()" class="w-full h-full rounded shadow-sm bg-white"></iframe>
</div>
<!-- Footer -->
<div class="p-3 bg-base-200 border-t border-base-300 flex justify-end items-center gap-4">
<label class="label cursor-pointer gap-2 mb-0">
<input type="checkbox" x-model="reviewed" class="checkbox checkbox-sm checkbox-primary" />
<span class="label-text text-sm">I have reviewed the results</span>
</label>
<div class="flex gap-2">
<button class="btn btn-sm btn-ghost" @click="closePreviewDialog()">Cancel</button>
<button id="validate-btn" x-ref="validateBtn" class="btn btn-sm btn-success"
@click="validate(previewAccessnumber, '<?=session('userid');?>')" :disabled="!reviewed">
<i class="fa fa-check mr-1"></i> Validate
</button>
</div>
</div>
</div>
</template>
</dialog>