js file init
This commit is contained in:
parent
c4996cf8d2
commit
c2619f50f9
2 changed files with 18 additions and 0 deletions
18
app/static/index.js
Normal file
18
app/static/index.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
const delButtons = document.getElementsByClassName('del-button');
|
||||
|
||||
|
||||
async function deleteCategory(id){
|
||||
console.log(id)
|
||||
var result = await fetch(`/delete_budget_category/${id}`, {method:'POST'});
|
||||
var data = await result.json();
|
||||
document.getElementById(`${id}-row`).remove();
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
for(let i = 0; i < delButtons.length; i++){
|
||||
delButtons[i].addEventListener('click', e => {
|
||||
deleteCategory(parseInt(e.target.id))
|
||||
})
|
||||
}
|
||||
});
|
||||
BIN
app/static/uploadable/Bulk_Line_Item_Upload.xlsx
Normal file
BIN
app/static/uploadable/Bulk_Line_Item_Upload.xlsx
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue