refs #6943 remake, refactor, clean code Samples #677

Merged
carlossa merged 5 commits from 6943-fixCustomerSamples into master 2024-09-05 09:57:21 +00:00
1 changed files with 9 additions and 5 deletions
Showing only changes of commit 61c0f63eaf - Show all commits

View File

@ -158,11 +158,15 @@ const onSubmit = async () => {
}; };
const getSamples = async () => { const getSamples = async () => {
const filter = { where: { id: initialData.typeFk } }; try {
let { data } = await axios.get('Samples', { const filter = { where: { id: initialData.typeFk } };
params: { filter: JSON.stringify(filter) }, let { data } = await axios.get('Samples', {
}); params: { filter: JSON.stringify(filter) },
return data[0]; });
return data[0];
} catch (error) {
notify('errors.create', 'negative');
}
}; };
getSamples(); getSamples();