Another batch of important updates and fixes
This commit is contained in:
@@ -544,6 +544,7 @@ function initDictionaries() {
|
||||
}
|
||||
|
||||
function handleClick({ target }) {
|
||||
// TODO Fix leaks and related server request spam. Many click action create a new object or attach a new event listener on every click.
|
||||
const term = target.closest('.terms-label')
|
||||
const versionEl = target.closest('.date-element')
|
||||
const deleteEntryEl = target.closest('#delete-entry')
|
||||
@@ -652,11 +653,11 @@ function initDictionaries() {
|
||||
} = window.dictionaryElements
|
||||
event?.preventDefault()
|
||||
const dictionaryIdElem = document.getElementById('hidden-dictionary-id')
|
||||
const dictctionaryId = dictionaryIdElem.value
|
||||
const dictionaryId = dictionaryIdElem.value
|
||||
const deleteEntry = document.getElementById('delete-entry')
|
||||
try {
|
||||
const { data } = await axios.get('/api/v1/entries', {
|
||||
params: { id: entryId, dictctionaryId: dictctionaryId }
|
||||
params: { id: entryId, dictionaryId }
|
||||
})
|
||||
insertTermData(entryId, data)
|
||||
const isPublishedEl = data.entry.is_published
|
||||
@@ -947,7 +948,7 @@ function initDictionaries() {
|
||||
const dictionaryId = hiddenEl.value
|
||||
try {
|
||||
const { data } = await axios.get('/api/v1/entries/fetch-terms', {
|
||||
params: { id: dictionaryId }
|
||||
params: { dictionaryId }
|
||||
})
|
||||
renderTerms(data, entryId)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user