1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 10:19:29 +00:00

Turn a table of tests into a component

This commit is contained in:
2022-03-03 02:04:41 +00:00
parent 9c66a50973
commit f8982af977
2 changed files with 20 additions and 0 deletions

View File

@@ -2,3 +2,10 @@
<td>{{ date }}</td>
<td>{{ name }}</td>
</tr>
<script>
document.querySelector('.adminTable tr[data-id="{{id}}"]').addEventListener('click', (e) => {
const test = e.path[1];
window.location.href = `/admin/test/${test.getAttribute('data-id')}`;
});
</script>