0
0
Fork 0

fix: refs #6636 Call getEnumValues method

This commit is contained in:
Guillermo Bonet 2024-04-05 11:01:48 +02:00
parent 9310d863aa
commit 1a15ccec2c
1 changed files with 15 additions and 7 deletions

View File

@ -9,6 +9,7 @@ import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
import axios from 'axios';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
const route = useRoute(); const route = useRoute();
@ -50,13 +51,20 @@ function setClaimStates(data) {
claimStates.value = data; claimStates.value = data;
claimStatesCopy.value = data; claimStatesCopy.value = data;
} }
let optionsList;
// Simulate ENUM async function getEnumValues() {
let optionsList = [ optionsList = [{ id: null, description: t('claim.basicData.null') }];
{ id: null, description: t('claim.basicData.null') }, const { data } = await axios.get(`Applications/get-enum-values`, {
{ id: 'agency', description: t('claim.basicData.agency') }, params: {
{ id: 'delivery', description: t('claim.basicData.delivery') }, schema: 'vn',
]; table: 'claim',
column: 'pickup',
},
});
for (let value of data)
optionsList.push({ id: value, description: t(`claim.basicData.${value}`) });
}
getEnumValues();
const workerFilter = { const workerFilter = {
options: workers, options: workers,