function makeUsersgrid() { window.requestsGrid = new gridjs.Grid({ columns: ['UUID', { name: 'Requested At', }, { name: 'Status', }, { name: 'Actions', formatter: (cell, row) => { if (cell == 'f') { return ""; } return gridjs.h('button', { className: 'py-2 mb-4 px-4 border rounded-md text-white bg-blue-600', onClick: () => downloadOneFile(row.cells[0].data) }, 'Download'); } }], search: false, server: { url: BASE_URL + '/backend/data/fetch_request_list.php', then: data => data.map(reqs => [reqs.uuid, reqs.criterias, reqs.requested_at, reqs.status, reqs.downloadable]) } }).render(document.getElementById('grid-requests')); }