forked from verdnatura/salix-front
fix: refs #6636 Call getEnumValues method
This commit is contained in:
parent
9310d863aa
commit
1a15ccec2c
|
@ -9,6 +9,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
import axios from 'axios';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
|
||||
const route = useRoute();
|
||||
|
@ -50,13 +51,20 @@ function setClaimStates(data) {
|
|||
claimStates.value = data;
|
||||
claimStatesCopy.value = data;
|
||||
}
|
||||
|
||||
// Simulate ENUM
|
||||
let optionsList = [
|
||||
{ id: null, description: t('claim.basicData.null') },
|
||||
{ id: 'agency', description: t('claim.basicData.agency') },
|
||||
{ id: 'delivery', description: t('claim.basicData.delivery') },
|
||||
];
|
||||
let optionsList;
|
||||
async function getEnumValues() {
|
||||
optionsList = [{ id: null, description: t('claim.basicData.null') }];
|
||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||
params: {
|
||||
schema: 'vn',
|
||||
table: 'claim',
|
||||
column: 'pickup',
|
||||
},
|
||||
});
|
||||
for (let value of data)
|
||||
optionsList.push({ id: value, description: t(`claim.basicData.${value}`) });
|
||||
}
|
||||
getEnumValues();
|
||||
|
||||
const workerFilter = {
|
||||
options: workers,
|
||||
|
|
Loading…
Reference in New Issue