fix: refs #6346 fix list and create #404

Merged
jon merged 15 commits from 6346-fixWagonModule into dev 2024-09-13 06:16:05 +00:00
2 changed files with 7 additions and 5 deletions
Showing only changes of commit e1adb1a8dd - Show all commits

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();
alexm marked this conversation as resolved
Review

emit('onSubmit', {
wagonTypeFk: entityId.value,
wagonTypeColorFk: selectedTrayColor.value,
height: trayHeight.value,
});

emit('onSubmit', { wagonTypeFk: entityId.value, wagonTypeColorFk: selectedTrayColor.value, height: trayHeight.value, });
</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);
}
}