fix(assessment-history): fix detail view

This commit is contained in:
arieeefajar 2025-02-11 17:06:45 +07:00
parent 753eda03ab
commit 36c55a22db
2 changed files with 27 additions and 18 deletions

View File

@ -11,18 +11,18 @@ function detailData(data) {
if (Array.isArray(data)) {
data.forEach((item) => {
let row = `
<tr class="text-center">
<tr>
<td>${item.indicator.name}</td>
<td>${item.md_value.toFixed(4)}</td>
<td>${item.md_value.toFixed(2)}</td>
</tr>
`;
tbody.innerHTML += row;
});
} else {
let row = `
<tr class="text-center">
<tr>
<td>${data.indicator.name}</td>
<td>${data.md_value.toFixed(4)}</td>
<td>${data.md_value.toFixed(2)}</td>
</tr>
`;
tbody.innerHTML += row;

View File

@ -242,20 +242,29 @@ class="fw-medium link-primary">#VZ2101</a>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
id="close-modal"></button>
</div>
<table class="table align-middle table-nowrap" id="detailTable">
<thead>
<tr class="text-center">
<th>Indikator</th>
<th>MD Value</th>
</tr>
</thead>
<tbody>
<tr class="text-center">
<td>pH</td>
<td>0.8</td>
</tr>
</tbody>
</table>
<div class="modal-body">
<table class="table align-middle table-nowrap" id="detailTable">
<thead>
<tr>
<th>Indikator</th>
<th>MD Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>pH</td>
<td>0.8</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<div class="hstack gap-2 justify-content-end">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
</div>