update
This commit is contained in:
parent
09932ffe8a
commit
35be20ae4c
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Crossmatch Test - {{ blood_unit.unit_number }} & {{ patient.full_name }}{% endblock %}
|
{% block title %}Crossmatch Test - {{ blood_unit.unit_number }} & {{ patient.full_name }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -578,8 +578,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -113,8 +113,8 @@
|
|||||||
{% for stat in blood_group_stats %}
|
{% for stat in blood_group_stats %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span class="badge bg-primary">
|
<span class="badge bg-primary fs-6 fw-bold">
|
||||||
{{ stat.blood_group__abo_type }}{% if stat.blood_group__rh_factor == 'positive' %}+{% else %}-{% endif %}
|
{{ stat.blood_group__abo_type }}{% if stat.blood_group__rh_factor == 'POS' %}+{% else %}-{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ stat.count }}</td>
|
<td>{{ stat.count }}</td>
|
||||||
|
|||||||
@ -214,7 +214,7 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Enable delete button only when confirmation is checked
|
// Enable delete button only when confirmation is checked
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Donor Details - {{ donor.full_name }}{% endblock %}
|
{% block title %}Donor Details - {{ donor.full_name }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -308,11 +308,11 @@
|
|||||||
<!-- END action buttons -->
|
<!-- END action buttons -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Donor Eligibility Check - {{ donor.full_name }}{% endblock %}
|
{% block title %}Donor Eligibility Check - {{ donor.full_name }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<style>
|
<style>
|
||||||
.eligibility-card {
|
.eligibility-card {
|
||||||
border: 2px solid #e9ecef;
|
border: 2px solid #e9ecef;
|
||||||
@ -303,7 +303,7 @@
|
|||||||
<!-- END row -->
|
<!-- END row -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Check form validity on load and when inputs change
|
// Check form validity on load and when inputs change
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}{{ title }}{% endblock %}
|
{% block title %}{{ title }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -275,10 +275,10 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/jquery-mask/dist/jquery.mask.min.js' %}"></script>
|
{#<script src="{% static 'plugins/jquery-mask/dist/jquery.mask.min.js' %}"></script>#}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -218,7 +218,6 @@ $(document).ready(function() {
|
|||||||
// Initialize DataTable for enhanced functionality
|
// Initialize DataTable for enhanced functionality
|
||||||
$('#donorTable').DataTable({
|
$('#donorTable').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
{#pageLength: 25,#}
|
|
||||||
order: [[0, 'desc']],
|
order: [[0, 'desc']],
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ orderable: false, targets: [9] } // Actions column
|
{ orderable: false, targets: [9] } // Actions column
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
{% block title %}Blood Bank Inventory Dashboard{% endblock %}
|
{% block title %}Blood Bank Inventory Dashboard{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
|
||||||
<style>
|
<style>
|
||||||
.inventory-card {
|
.inventory-card {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -367,7 +367,7 @@
|
|||||||
<!-- END row -->
|
<!-- END row -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'plugins/chart.js/dist/chart.js' %}"></script>
|
<script src="{% static 'plugins/chart.js/dist/chart.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Issue Blood Unit - Request #{{ blood_request.request_number }}{% endblock %}
|
{% block title %}Issue Blood Unit - Request #{{ blood_request.request_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -533,8 +533,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var selectedUnits = [];
|
var selectedUnits = [];
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Delete QC Record - {{ qc_record.test_name }}{% endblock %}
|
{% block title %}Delete QC Record - {{ qc_record.test_name }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<style>
|
<style>
|
||||||
.delete-warning {
|
.delete-warning {
|
||||||
background: #f8d7da;
|
background: #f8d7da;
|
||||||
@ -443,7 +443,7 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Form validation
|
// Form validation
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Quality Control - {{ qc_record.test_name }}{% endblock %}
|
{% block title %}Quality Control - {{ qc_record.test_name }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<style>
|
<style>
|
||||||
.info-section {
|
.info-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -499,7 +499,7 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}{% if form.instance.pk %}Edit QC Record{% else %}New Quality Control Test{% endif %}{% endblock %}
|
{% block title %}{% if form.instance.pk %}Edit QC Record{% else %}New Quality Control Test{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -346,8 +346,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Quality Control Management{% endblock %}
|
{% block title %}Quality Control Management{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.qc-passed {
|
.qc-passed {
|
||||||
background-color: #d4edda;
|
background-color: #d4edda;
|
||||||
@ -427,11 +427,11 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Report Adverse Reaction - {{ transfusion.transfusion_id }}{% endblock %}
|
{% block title %}Report Adverse Reaction - {{ transfusion.transfusion_id }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -655,8 +655,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Blood Bank Reports{% endblock %}
|
{% block title %}Blood Bank Reports{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.report-card {
|
.report-card {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -397,9 +397,9 @@
|
|||||||
<!-- END analytics dashboard -->
|
<!-- END analytics dashboard -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/chart.js/dist/Chart.min.js' %}"></script>
|
<script src="{% static 'plugins/chart.js/dist/chart.umd.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Cancel Blood Request - {{ blood_request.request_number }}{% endblock %}
|
{% block title %}Cancel Blood Request - {{ blood_request.request_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<style>
|
<style>
|
||||||
.delete-warning {
|
.delete-warning {
|
||||||
background: #f8d7da;
|
background: #f8d7da;
|
||||||
@ -379,7 +379,7 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Form validation
|
// Form validation
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Blood Request Details - {{ blood_request.request_number }}{% endblock %}
|
{% block title %}Blood Request Details - {{ blood_request.request_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.request-header {
|
.request-header {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
@ -227,7 +227,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="fw-bold">Name:</td>
|
<td class="fw-bold">Name:</td>
|
||||||
<td>{{ blood_request.patient.full_name }}</td>
|
<td>{{ blood_request.patient.get_full_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="fw-bold">Age:</td>
|
<td class="fw-bold">Age:</td>
|
||||||
@ -246,7 +246,7 @@
|
|||||||
{% if blood_request.hemoglobin_level %}
|
{% if blood_request.hemoglobin_level %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="fw-bold">Hemoglobin:</td>
|
<td class="fw-bold">Hemoglobin:</td>
|
||||||
<td>{{ blood_request.hemoglobin_level }} g/dL</td>
|
<td>{{ blood_request.hemoglobin_level|floatformat:2 }} g/dL</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if blood_request.platelet_count %}
|
{% if blood_request.platelet_count %}
|
||||||
@ -556,7 +556,7 @@
|
|||||||
<!-- END action buttons -->
|
<!-- END action buttons -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
function checkAvailability() {
|
function checkAvailability() {
|
||||||
var bloodGroupId = {{ blood_request.patient_blood_group.id }};
|
var bloodGroupId = {{ blood_request.patient_blood_group.id }};
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}{% if form.instance.pk %}Edit Blood Request{% else %}New Blood Request{% endif %}{% endblock %}
|
{% block title %}{% if form.instance.pk %}Edit Blood Request{% else %}New Blood Request{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -389,8 +389,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Blood Request Management{% endblock %}
|
{% block title %}Blood Request Management{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.urgency-emergency {
|
.urgency-emergency {
|
||||||
animation: pulse 2s infinite;
|
animation: pulse 2s infinite;
|
||||||
@ -360,11 +360,11 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Blood Test - {{ blood_unit.unit_number }}{% endblock %}
|
{% block title %}Blood Test - {{ blood_unit.unit_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -480,8 +480,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}Transfusion Details - {{ transfusion.transfusion_id }}{% endblock %}
|
{% block title %}Transfusion Details - {{ transfusion.transfusion_id }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/chart.js/dist/Chart.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.transfusion-header {
|
.transfusion-header {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
@ -672,8 +672,8 @@
|
|||||||
<!-- END adverse reaction modal -->
|
<!-- END adverse reaction modal -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/chart.js/dist/Chart.min.js' %}"></script>
|
<script src="{% static 'plugins/chart.js/dist/chart.umd.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
{% block title %}{% if form.instance.pk %}Edit Transfusion{% else %}Start New Transfusion{% endif %}{% endblock %}
|
{% block title %}{% if form.instance.pk %}Edit Transfusion{% else %}Start New Transfusion{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -502,8 +502,8 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Transfusion Management{% endblock %}
|
{% block title %}Transfusion Management{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.transfusion-active {
|
.transfusion-active {
|
||||||
background-color: #e8f5e8;
|
background-color: #e8f5e8;
|
||||||
@ -433,11 +433,11 @@
|
|||||||
<!-- END vital signs modal -->
|
<!-- END vital signs modal -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Delete Blood Unit - {{ blood_unit.unit_number }}{% endblock %}
|
{% block title %}Delete Blood Unit - {{ blood_unit.unit_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<style>
|
<style>
|
||||||
.danger-zone {
|
.danger-zone {
|
||||||
background: #f8d7da;
|
background: #f8d7da;
|
||||||
@ -383,7 +383,7 @@
|
|||||||
<!-- END form actions -->
|
<!-- END form actions -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Disable delete button initially
|
// Disable delete button initially
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.status-timeline {
|
.status-timeline {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -501,9 +501,9 @@
|
|||||||
<!-- END action buttons -->
|
<!-- END action buttons -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function showCrossmatchModal() {
|
function showCrossmatchModal() {
|
||||||
|
|||||||
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
{% block title %}Blood Unit Details - {{ blood_unit.unit_number }}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.status-timeline {
|
.status-timeline {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -405,7 +406,7 @@
|
|||||||
<h4 class="panel-title">Crossmatch Results</h4>
|
<h4 class="panel-title">Crossmatch Results</h4>
|
||||||
<div class="panel-heading-btn">
|
<div class="panel-heading-btn">
|
||||||
{% if blood_unit.status == 'available' %}
|
{% if blood_unit.status == 'available' %}
|
||||||
<button type="button" class="btn btn-info btn-sm" onclick="showCrossmatchModal()">
|
<button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#crossmatchModal">
|
||||||
<i class="fa fa-plus"></i> Add Crossmatch
|
<i class="fa fa-plus"></i> Add Crossmatch
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -487,7 +488,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if blood_unit.status == 'available' %}
|
{% if blood_unit.status == 'available' %}
|
||||||
<button type="button" class="btn btn-warning" onclick="moveUnit()">
|
<button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#moveUnitModal">
|
||||||
<i class="fa fa-arrows-alt"></i> Move Location
|
<i class="fa fa-arrows-alt"></i> Move Location
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -498,108 +499,111 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Crossmatch Modal -->
|
||||||
|
<div class="modal fade" id="crossmatchModal" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Add Crossmatch Test</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="crossmatchForm">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Patient</label>
|
||||||
|
<select class="form-select" id="patientSelect">
|
||||||
|
<option value="">Select Patient</option>
|
||||||
|
<!-- Load patients via AJAX if needed -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Test Type</label>
|
||||||
|
<select class="form-select" id="testType">
|
||||||
|
<option value="major">Major Crossmatch</option>
|
||||||
|
<option value="minor">Minor Crossmatch</option>
|
||||||
|
<option value="immediate_spin">Immediate Spin</option>
|
||||||
|
<option value="antiglobulin">Antiglobulin Test</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||||
|
<button type="button" class="btn btn-primary" onclick="submitCrossmatch()">Create Crossmatch</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Move Unit Modal -->
|
||||||
|
<div class="modal fade" id="moveUnitModal" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Move Blood Unit</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="moveUnitForm">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">New Location</label>
|
||||||
|
<select class="form-select" id="newLocation">
|
||||||
|
<option value="">Select Location</option>
|
||||||
|
<option value="Refrigerator A">Refrigerator A</option>
|
||||||
|
<option value="Refrigerator B">Refrigerator B</option>
|
||||||
|
<option value="Freezer 1">Freezer 1</option>
|
||||||
|
<option value="Platelet Agitator">Platelet Agitator</option>
|
||||||
|
<option value="Quarantine">Quarantine</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="form-label">Reason</label>
|
||||||
|
<textarea class="form-control" id="moveReason" rows="3"></textarea>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||||
|
<button type="button" class="btn btn-warning" onclick="submitMoveUnit()">Move Unit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- END action buttons -->
|
<!-- END action buttons -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
|
<script src="{% static 'plugins/sweetalert/dist/sweetalert.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function showCrossmatchModal() {
|
|
||||||
Swal.fire({
|
function submitCrossmatch() {
|
||||||
title: 'Add Crossmatch Test',
|
const patient = document.getElementById("patientSelect").value;
|
||||||
html: `
|
const testType = document.getElementById("testType").value;
|
||||||
<div class="text-start">
|
|
||||||
<div class="mb-3">
|
if (!patient) {
|
||||||
<label class="form-label">Patient</label>
|
alert("Please select a patient");
|
||||||
<select class="form-select" id="patientSelect">
|
return;
|
||||||
<option value="">Select Patient</option>
|
}
|
||||||
<!-- Patients would be loaded via AJAX -->
|
|
||||||
</select>
|
// Redirect to your creation URL
|
||||||
</div>
|
window.location.href = `en/blood-bank/units/{{ blood_unit.id }}/crossmatch/${patient}/?test_type=${testType}`;
|
||||||
<div class="mb-3">
|
|
||||||
<label class="form-label">Test Type</label>
|
|
||||||
<select class="form-select" id="testType">
|
|
||||||
<option value="major">Major Crossmatch</option>
|
|
||||||
<option value="minor">Minor Crossmatch</option>
|
|
||||||
<option value="immediate_spin">Immediate Spin</option>
|
|
||||||
<option value="antiglobulin">Antiglobulin Test</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonText: 'Create Crossmatch',
|
|
||||||
cancelButtonText: 'Cancel',
|
|
||||||
preConfirm: () => {
|
|
||||||
const patient = document.getElementById('patientSelect').value;
|
|
||||||
const testType = document.getElementById('testType').value;
|
|
||||||
|
|
||||||
if (!patient) {
|
|
||||||
Swal.showValidationMessage('Please select a patient');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return { patient: patient, testType: testType };
|
|
||||||
}
|
|
||||||
}).then((result) => {
|
|
||||||
if (result.isConfirmed) {
|
|
||||||
// Redirect to crossmatch creation page
|
|
||||||
window.location.href = `/blood-bank/units/{{ blood_unit.id }}/crossmatch/${result.value.patient}/`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveUnit() {
|
function submitMoveUnit() {
|
||||||
Swal.fire({
|
const location = document.getElementById("newLocation").value;
|
||||||
title: 'Move Blood Unit',
|
const reason = document.getElementById("moveReason").value;
|
||||||
html: `
|
|
||||||
<div class="text-start">
|
if (!location) {
|
||||||
<div class="mb-3">
|
alert("Please select a new location");
|
||||||
<label class="form-label">New Location</label>
|
return;
|
||||||
<select class="form-select" id="newLocation">
|
}
|
||||||
<option value="">Select Location</option>
|
|
||||||
<option value="Refrigerator A">Refrigerator A</option>
|
// For now reload page, later replace with AJAX
|
||||||
<option value="Refrigerator B">Refrigerator B</option>
|
alert(`Blood unit moved to ${location} for reason: ${reason}`);
|
||||||
<option value="Freezer 1">Freezer 1</option>
|
location.reload();
|
||||||
<option value="Platelet Agitator">Platelet Agitator</option>
|
|
||||||
<option value="Quarantine">Quarantine</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="form-label">Reason</label>
|
|
||||||
<textarea class="form-control" id="moveReason" rows="3"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonText: 'Move Unit',
|
|
||||||
cancelButtonText: 'Cancel',
|
|
||||||
preConfirm: () => {
|
|
||||||
const location = document.getElementById('newLocation').value;
|
|
||||||
const reason = document.getElementById('moveReason').value;
|
|
||||||
|
|
||||||
if (!location) {
|
|
||||||
Swal.showValidationMessage('Please select a new location');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return { location: location, reason: reason };
|
|
||||||
}
|
|
||||||
}).then((result) => {
|
|
||||||
if (result.isConfirmed) {
|
|
||||||
// Here you would make an AJAX call to update the location
|
|
||||||
Swal.fire({
|
|
||||||
icon: 'success',
|
|
||||||
title: 'Unit Moved',
|
|
||||||
text: `Blood unit moved to ${result.value.location}`,
|
|
||||||
confirmButtonText: 'OK'
|
|
||||||
}).then(() => {
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-refresh page every 5 minutes to update status
|
// Auto-refresh page every 5 minutes to update status
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
{% block title %}{% if form.instance.pk %}Edit Blood Unit{% else %}Register Blood Unit{% endif %}{% endblock %}
|
{% block title %}{% if form.instance.pk %}Edit Blood Unit{% else %}Register Blood Unit{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'assets/plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'assets/plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.form-section {
|
.form-section {
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
@ -365,9 +365,9 @@
|
|||||||
<!-- END panel -->
|
<!-- END panel -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
<script src="{% static 'plugins/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block title %}Blood Unit Management{% endblock %}
|
{% block title %}Blood Unit Management{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block css %}
|
||||||
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' %}" rel="stylesheet" />
|
||||||
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
<link href="{% static 'plugins/select2/dist/css/select2.min.css' %}" rel="stylesheet" />
|
||||||
@ -320,12 +320,12 @@
|
|||||||
<!-- END move unit modal -->
|
<!-- END move unit modal -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block js %}
|
||||||
<script src="{% static 'assets/plugins/datatables.net/js/jquery.dataTables.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net/js/dataTables.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive/js/dataTables.responsive.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
<script src="{% static 'plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js' %}"></script>
|
||||||
<script src="{% static 'assets/plugins/select2/dist/js/select2.min.js' %}"></script>
|
<script src="{% static 'plugins/select2/dist/js/select2.min.js' %}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user