mirror of
https://github.com/ershisan99/flashcards-admin-bot.git
synced 2025-12-16 12:33:09 +00:00
28 lines
606 B
Plaintext
28 lines
606 B
Plaintext
const data = /* USERS */;
|
|
|
|
const root = document.getElementById('root');
|
|
|
|
const html = `<div>${data
|
|
.map((group) => {
|
|
return `<table><thead>
|
|
<tr>
|
|
<th>Имя</th>
|
|
<th>Время</th>
|
|
<th>Telegram</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>${group
|
|
.map((el) => {
|
|
return `<tr>
|
|
<td >${el.name}</td>
|
|
<td style='width: 200px'">${el.availableTime.from} - ${el.availableTime.to}</td>
|
|
<td style='width: 200px'>${el.tgUsername}</td>
|
|
</tr>`;
|
|
})
|
|
.join('')}</tbody>
|
|
</table>`;
|
|
})
|
|
.join('')}</div>`;
|
|
|
|
root.innerHTML = html;
|