0
0
Fork 0

refactor: refs #6346 requested changes

This commit is contained in:
Jon Elias 2024-09-10 08:01:28 +02:00
parent e702e9d1a1
commit e1adb1a8dd
2 changed files with 7 additions and 5 deletions

View File

@ -39,7 +39,7 @@ watch(wagonColors, () => {
const emit = defineEmits(['onSubmit']);
async function getTrays() {
const data = await axios.get('WagonTypeTrays', undefined, {
const { data } = await axios.get('WagonTypeTrays', undefined, {
filter: { wagonTypeFk: entityId.value },
});
existingTrayHeight.value = data.data.filter(
@ -49,13 +49,11 @@ async function getTrays() {
}
function onSubmit() {
const newTray = {
emit('onSubmit', {
wagonTypeFk: entityId.value,
wagonTypeColorFk: selectedTrayColor.value,
height: trayHeight.value,
};
emit('onSubmit', newTray);
});
}
getTrays();
</script>

View File

@ -56,6 +56,10 @@ async function deleteTray(trayToDelete) {
type: 'positive',
});
} catch (err) {
notify({
message: t('Error deleting tray'),
type: 'negative',
});
console.log('err: ', err);
}
}