fix: refs #6346 fix list and create #404
|
@ -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
|
||||
</script>
|
||||
|
|
|
@ -56,6 +56,10 @@ async function deleteTray(trayToDelete) {
|
|||
type: 'positive',
|
||||
});
|
||||
} catch (err) {
|
||||
notify({
|
||||
message: t('Error deleting tray'),
|
||||
type: 'negative',
|
||||
});
|
||||
console.log('err: ', err);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
emit('onSubmit', {
wagonTypeFk: entityId.value,
wagonTypeColorFk: selectedTrayColor.value,
height: trayHeight.value,
});