refactoring

This commit is contained in:
frankknoll
2022-02-19 15:14:23 +01:00
parent b2d4e93df6
commit 608f268a84
14 changed files with 25 additions and 22 deletions

View File

@@ -14,7 +14,7 @@
<script>
function createEmptyBatchCodeTable() {
const columnIndex = {
'VAX_LOT': 0,
'Batch': 0,
'Total Number of Adverse Reaction Reports': 1,
'Deaths': 2,
'Disabilities': 3,
@@ -48,10 +48,10 @@
},
{
render: (data, type, row) => {
const lethality = parseFloat(data);
return !isNaN(lethality) ? lethality.toFixed(2) + " %" : '';
const severeReports = parseFloat(data);
return !isNaN(severeReports) ? severeReports.toFixed(2) + " %" : '';
},
targets: [columnIndex['Lethality']]
targets: [columnIndex['Severe reports (%)']]
}
]
});
@@ -107,7 +107,7 @@
<table class="display" id="batchCodeTable">
<thead>
<tr>
<th>VAX_LOT</th>
<th>Batch</th>
<th>Total Number of Adverse Reaction Reports</th>
<th>Deaths</th>
<th>Disabilities</th>