You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
848 B
29 lines
848 B
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')); |
|
|
|
}
|
|
|