Update 07/04/2023
This commit is contained in:
38
auto-test/table.js
Normal file
38
auto-test/table.js
Normal file
@@ -0,0 +1,38 @@
|
||||
const table = {
|
||||
// Tạo bảng kiểm tra
|
||||
renderTableCheck,
|
||||
createCheckList,
|
||||
}
|
||||
module.exports = table;
|
||||
|
||||
// Tạo danh sách kiểm tra
|
||||
function createCheckList(checkList) {
|
||||
let finfalList = '';
|
||||
checkList.forEach((item, index) => {
|
||||
finfalList += `
|
||||
<tr>
|
||||
<td style="text-align:center">${index + 1}</td>
|
||||
<td>${item.label}</td>
|
||||
<td id='js-${item.id}' style="text-align:center">Wait</td>
|
||||
</tr>
|
||||
`;
|
||||
})
|
||||
return finfalList;
|
||||
}
|
||||
|
||||
function renderTableCheck(checkListTable) {
|
||||
$("body").append(`
|
||||
<div id="js-table-check"
|
||||
style="position:fixed;right:10px;bottom:50px;background:#fff;box-shadow:0 1px 5px rgb(0 0 0 / 30%);padding:20px;">
|
||||
<h2 class="text-center font-weight-700 mb-4">BẢNG KIỂM TRA AUTO-TEST</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="padding:10px;">STT</th>
|
||||
<th style="padding:10px;">Công việc</th>
|
||||
<th style="padding:10px;">Kết quả</th>
|
||||
</tr>
|
||||
${checkListTable}
|
||||
</table>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
Reference in New Issue
Block a user