Files
2026-06-18 20:15:24 +01:00

125 lines
6.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reports - Drug Inventory System</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="toastContainer" class="toast-container"></div>
<div id="reportsApp" class="main-app" style="display: none;">
<div class="container">
<header>
<div class="header-top">
<h1>Audit Reports</h1>
<div class="user-menu reports-user-menu">
<span id="reportsCurrentUser">User</span>
<button id="backToInventoryBtn" class="btn btn-small">Back To Inventory</button>
<button id="reportsLogoutBtn" class="btn btn-small">Logout</button>
</div>
</div>
</header>
<main>
<section class="list-section reports-page-section">
<div class="section-header">
<h2 id="reportsHeading">Dispensing History</h2>
<div class="reports-controls reports-page-controls">
<div class="form-group report-control">
<label for="reportTypeSelect">Report</label>
<select id="reportTypeSelect">
<option value="dispensing" selected>Dispensing History</option>
<option value="global_inventory">Stock Check</option>
<option value="batch_attention">Expired Batches</option>
<option value="audit">Audit Trail (Raw)</option>
</select>
</div>
<div class="form-group report-control">
<label for="reportFromDate">From Date</label>
<input type="date" id="reportFromDate">
</div>
<div class="form-group report-control">
<label for="reportToDate">To Date</label>
<input type="date" id="reportToDate">
</div>
<div class="form-group report-control">
<label for="reportUserFilter">User</label>
<select id="reportUserFilter">
<option value="">All Users</option>
</select>
</div>
<div class="form-group report-control">
<label for="reportDrugFilter">Drug</label>
<select id="reportDrugFilter">
<option value="">All Drugs</option>
</select>
</div>
<div class="form-group report-control report-text-search">
<label for="reportActionSearch">Search</label>
<input type="text" id="reportActionSearch" placeholder="Search user, action, notes, details...">
</div>
<div class="report-actions">
<button id="applyReportFiltersBtn" type="button" class="btn btn-primary btn-small">Apply Filters</button>
<button id="clearReportFiltersBtn" type="button" class="btn btn-secondary btn-small">Clear</button>
<button id="refreshReportsBtn" type="button" class="btn btn-secondary btn-small">Refresh</button>
<button id="stockCheckPdfBtn" type="button" class="btn btn-secondary btn-small" style="display: none;">Print Stock Check</button>
</div>
</div>
</div>
<div id="reportsSummary" class="reports-summary"></div>
<div id="reportsTableContainer" class="reports-table-container">
<p class="loading" style="padding: 14px;">Loading audit trail...</p>
</div>
</section>
</main>
<footer>
<p>Many Tears Confidential</p>
</footer>
</div>
</div>
<div id="reportsErrorState" class="login-page" style="display: none;">
<div class="login-container">
<h1>Audit Reports</h1>
<p id="reportsErrorMessage">Access denied.</p>
<button id="goToLoginBtn" class="btn btn-primary">Go To Login</button>
</div>
</div>
<div id="disposeBatchModal" class="modal">
<div class="modal-content">
<span class="close">&times;</span>
<h2>Dispose Expired Batch</h2>
<form id="disposeBatchForm" novalidate>
<input type="hidden" id="disposeBatchId">
<div class="form-group">
<label for="disposeBatchName">Batch</label>
<input type="text" id="disposeBatchName" disabled>
</div>
<div class="form-group">
<p style="margin: 0; color: #666;">This will mark the expired batch as disposed and remove its remaining stock from inventory.</p>
</div>
<div class="form-group">
<label for="disposeBatchNotes">Disposal Note</label>
<textarea id="disposeBatchNotes" rows="4" placeholder="Optional note for the audit log"></textarea>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-danger">Confirm Disposal</button>
<button type="button" class="btn btn-secondary" id="cancelDisposeBatchBtn">Cancel</button>
</div>
</form>
</div>
</div>
<script src="reports.js"></script>
</body>
</html>