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)) { if (Array.isArray(data)) {
data.forEach((item) => { data.forEach((item) => {
let row = ` let row = `
<tr class="text-center"> <tr>
<td>${item.indicator.name}</td> <td>${item.indicator.name}</td>
<td>${item.md_value.toFixed(4)}</td> <td>${item.md_value.toFixed(2)}</td>
</tr> </tr>
`; `;
tbody.innerHTML += row; tbody.innerHTML += row;
}); });
} else { } else {
let row = ` let row = `
<tr class="text-center"> <tr>
<td>${data.indicator.name}</td> <td>${data.indicator.name}</td>
<td>${data.md_value.toFixed(4)}</td> <td>${data.md_value.toFixed(2)}</td>
</tr> </tr>
`; `;
tbody.innerHTML += row; 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" <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
id="close-modal"></button> id="close-modal"></button>
</div> </div>
<table class="table align-middle table-nowrap" id="detailTable"> <div class="modal-body">
<thead> <table class="table align-middle table-nowrap" id="detailTable">
<tr class="text-center"> <thead>
<th>Indikator</th> <tr>
<th>MD Value</th> <th>Indikator</th>
</tr> <th>MD Value</th>
</thead> </tr>
<tbody> </thead>
<tr class="text-center"> <tbody>
<td>pH</td> <tr>
<td>0.8</td> <td>pH</td>
</tr> <td>0.8</td>
</tbody> </tr>
</table> </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> </div>
</div> </div>