fix(fe smartblock): fixed showing smart block criteria on edit

This commit is contained in:
Marco Cavalli 2025-03-27 10:32:32 +01:00
parent 5daec331f8
commit c2b1ebee80
2 changed files with 60 additions and 15 deletions

View file

@ -65,5 +65,19 @@ export function blocks_page() {
})
}
return { items, listData, headers, selected, loading, search, getItems, editItem, deleteItem }
const getTracklist = async (item) => {
let params = null;
if (item.id === 0) {
params = item
}
return await axios.get(`/smartblock/${item.id}/tracks`, {
params: params
}).then((response) => {
return response.data
}).catch((error) => {
console.log("Error: "+error);
})
}
return { items, listData, headers, selected, loading, search, getItems, editItem, deleteItem, getTracklist }
}