First full release
This commit is contained in:
@@ -16,15 +16,20 @@ async function onListClick({ target }) {
|
||||
modalUseBtn.addEventListener('click', async () => {
|
||||
await axios.delete(`/api/v1/extraction/${extractionId}`)
|
||||
extractionEl.remove()
|
||||
// TODO This (page refresh) is an unneeded workaround for an otherwise simple user friendlier solution.
|
||||
location.reload()
|
||||
})
|
||||
} else if (target.classList.contains('btn-begin')) {
|
||||
} else if (target.closest('.btn-begin')) {
|
||||
const extractionEl = target.closest('.task')
|
||||
const extractionId = extractionEl.dataset.id
|
||||
await axios.put(`/api/v1/extraction/${extractionId}/begin`)
|
||||
const responseModal = new bootstrap.Modal(
|
||||
document.getElementById('begin-response')
|
||||
)
|
||||
const beginExtractionModalEl = document.getElementById('begin-response')
|
||||
const responseModal = new bootstrap.Modal(beginExtractionModalEl)
|
||||
responseModal.toggle()
|
||||
// TODO This (page refresh) is a temporary hack. Replace with proper UI updating logic.
|
||||
beginExtractionModalEl.addEventListener('hide.bs.modal', () =>
|
||||
location.reload()
|
||||
)
|
||||
} else if (target.classList.contains('btn-duplicate')) {
|
||||
const extractionEl = target.closest('.task')
|
||||
const extractionId = extractionEl.dataset.id
|
||||
|
||||
Reference in New Issue
Block a user