WIP compliance
This commit is contained in:
+132
-18
@@ -13,7 +13,7 @@
|
||||
<!-- Login Page -->
|
||||
<div id="loginPage" class="login-page">
|
||||
<div class="login-container">
|
||||
<h1>🐶 MTAR Drug Inventory System 🐶</h1>
|
||||
<h1>MTAR Drug Inventory System</h1>
|
||||
<form id="loginForm" class="login-form">
|
||||
<h2>Login</h2>
|
||||
<div class="form-group">
|
||||
@@ -36,13 +36,14 @@
|
||||
<div class="container">
|
||||
<header>
|
||||
<div class="header-top">
|
||||
<h1>🐶 MTAR Drug Inventory System 🐶</h1>
|
||||
<h1>MTAR Drug Inventory System</h1>
|
||||
<div class="user-menu">
|
||||
<span id="currentUser">User</span>
|
||||
<button id="userMenuBtn" class="btn btn-small">⋮</button>
|
||||
<div id="userDropdown" class="user-dropdown" style="display: none;">
|
||||
<button id="changePasswordBtn" class="dropdown-item">🔑 Change Password</button>
|
||||
<button id="adminBtn" class="dropdown-item" style="display: none;">👤 Admin</button>
|
||||
<button id="locationsBtn" class="dropdown-item" style="display: none;">📍 Storage Locations</button>
|
||||
<button id="logoutBtn" class="dropdown-item">🚪 Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,20 +55,23 @@
|
||||
<section id="listSection" class="list-section">
|
||||
<div class="section-header">
|
||||
<h2>Current Inventory</h2>
|
||||
<div class="header-actions">
|
||||
<button id="printNotesBtn" class="btn btn-primary btn-small">📝 Print Notes</button>
|
||||
<button id="addDrugBtn" class="btn btn-primary btn-small">➕ Add Drug</button>
|
||||
<div class="inventory-toolbar">
|
||||
<div class="header-actions">
|
||||
<button id="printNotesBtn" class="btn btn-primary btn-small">📝 Print Notes</button>
|
||||
<button id="addDrugBtn" class="btn btn-primary btn-small">➕ Add Drug</button>
|
||||
</div>
|
||||
<div class="toolbar-search">
|
||||
<input type="text" id="drugSearch" placeholder="Search drugs by name..." class="search-input">
|
||||
</div>
|
||||
<div class="filters">
|
||||
<button id="showAllBtn" class="filter-btn active">All</button>
|
||||
<button id="showLowStockBtn" class="filter-btn">Low Stock Only</button>
|
||||
<select id="locationFilterSelect" class="filter-select" aria-label="Filter by location">
|
||||
<option value="">All Locations</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filters">
|
||||
<button id="showAllBtn" class="filter-btn active">All</button>
|
||||
<button id="showLowStockBtn" class="filter-btn">Low Stock Only</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Search Section -->
|
||||
<div class="search-section">
|
||||
<input type="text" id="drugSearch" placeholder="🔍 Search drugs by name..." class="search-input">
|
||||
</div>
|
||||
|
||||
<div id="drugsList" class="drugs-list">
|
||||
<p class="loading">Loading drugs...</p>
|
||||
@@ -97,7 +101,12 @@
|
||||
<input type="text" id="editDrugDescription">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="editDrugIsControlled">
|
||||
This is a Controlled Substance
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Save Changes</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancelEditBtn">Cancel</button>
|
||||
</div>
|
||||
@@ -121,6 +130,13 @@
|
||||
<input type="text" id="drugDescription">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="drugIsControlled">
|
||||
This is a Controlled Substance
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<hr style="margin: 20px 0; border: none; border-top: 1px solid #ddd;">
|
||||
<h3 style="margin-top: 0;">Initial Variant (Optional)</h3>
|
||||
|
||||
@@ -161,20 +177,49 @@
|
||||
|
||||
<!-- Dispense Drug Modal -->
|
||||
<div id="dispenseModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content modal-large dispense-modal-content">
|
||||
<span class="close">×</span>
|
||||
<h2>Dispense Drug</h2>
|
||||
<form id="dispenseForm" novalidate>
|
||||
<div class="form-group">
|
||||
<label for="dispenseDrugSelect">Drug Variant *</label>
|
||||
<select id="dispenseDrugSelect">
|
||||
<select id="dispenseDrugSelect" onchange="updateBatchInfo()">
|
||||
<option value="">-- Select a drug variant --</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="batchInfoSection" style="display: none; margin: 15px 0; padding: 10px; background: #f5f5f5; border-radius: 4px;">
|
||||
<h4 style="margin-top: 0;">Available Batches (FEFO Order)</h4>
|
||||
<div id="batchInfoContent">
|
||||
<p class="loading">Loading batches...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="dispenseBatchSelect">Preferred Batch Override</label>
|
||||
<select id="dispenseBatchSelect" onchange="updateAllocationPreview()">
|
||||
<option value="">Automatic FEFO Selection</option>
|
||||
</select>
|
||||
<small style="display: block; margin-top: 6px; color: #666;">Leave on automatic to use the earliest-expiry batch first. Choose a batch here to consume that batch first instead.</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="dispenseQuantity">Quantity *</label>
|
||||
<input type="number" id="dispenseQuantity" step="0.1">
|
||||
<input type="number" id="dispenseQuantity" step="0.1" onchange="updateAllocationPreview()">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="dispenseAllowSplit" onchange="updateAllocationPreview()">
|
||||
Allow Split Across Multiple Batches
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="allocationPreviewSection" style="display: none; margin: 15px 0; padding: 10px; background: #f0f8ff; border-radius: 4px; border-left: 3px solid #2196F3;">
|
||||
<h4 style="margin-top: 0;">Allocation Preview</h4>
|
||||
<div id="allocationPreviewContent">
|
||||
<p class="loading">Loading allocation...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -437,6 +482,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location Management Modal -->
|
||||
<div id="locationManagementModal" class="modal">
|
||||
<div class="modal-content modal-large">
|
||||
<span class="close">×</span>
|
||||
<h2>Storage Locations</h2>
|
||||
<div class="location-management-content">
|
||||
<div class="form-group">
|
||||
<h3>Add New Location</h3>
|
||||
<form id="createLocationForm">
|
||||
<div class="form-row">
|
||||
<input type="text" id="newLocationName" placeholder="Location name (e.g., Fridge, Cupboard)" required>
|
||||
<button type="submit" class="btn btn-primary btn-small">Add Location</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="locationsList" class="locations-list">
|
||||
<h3>Active Locations</h3>
|
||||
<p class="loading">Loading locations...</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="button" class="btn btn-secondary" id="closeLocationManagementBtn">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Print Notes Modal -->
|
||||
<div id="printNotesModal" class="modal">
|
||||
<div class="modal-content">
|
||||
@@ -460,6 +531,49 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Batch Receive Modal -->
|
||||
<div id="batchReceiveModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="close">×</span>
|
||||
<h2>Receive New Batch</h2>
|
||||
<form id="batchReceiveForm" novalidate>
|
||||
<input type="hidden" id="batchVariantId">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="batchNumber">Batch Number *</label>
|
||||
<input type="text" id="batchNumber" placeholder="e.g., LOT-2026-001" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="batchQuantity">Quantity *</label>
|
||||
<input type="number" id="batchQuantity" step="0.1" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="batchExpiryDate">Expiry Date *</label>
|
||||
<input type="date" id="batchExpiryDate" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="batchLocation">Storage Location *</label>
|
||||
<select id="batchLocation" required>
|
||||
<option value="">-- Select location --</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="batchNotes">Notes</label>
|
||||
<input type="text" id="batchNotes" placeholder="Optional notes about this batch">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Receive Batch</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancelBatchReceiveBtn">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user