diff --git a/src/components/common/VnDropdown.vue b/src/components/common/VnDropdown.vue
index 63d6b96f6a2..1b3f2237b8f 100644
--- a/src/components/common/VnDropdown.vue
+++ b/src/components/common/VnDropdown.vue
@@ -11,14 +11,18 @@ const $props = defineProps({
type: Boolean,
default: null,
},
- moduleName: {
- type: String,
- default: null,
- },
options: {
type: Array,
default: null,
},
+ optionLabel: {
+ type: String,
+ default: 'name',
+ },
+ optionValue: {
+ type: String,
+ default: 'id',
+ },
});
async function changeState(value) {
@@ -37,24 +41,13 @@ async function changeState(value) {
>
-
-
-
-
- {{ scope.opt?.name }}
-
-
- {{ scope.opt?.description }}
-
-
-
-
diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue
index 4a47e79ed55..85f37f440be 100644
--- a/src/pages/Claim/Card/ClaimSummary.vue
+++ b/src/pages/Claim/Card/ClaimSummary.vue
@@ -174,9 +174,8 @@ function openDialog(dmsId) {
}
async function changeState(value) {
- const newState = claimStates.value.find((state) => state.code == value);
await axios.patch(`Claims/updateClaim/${entityId.value}`, {
- claimStateFk: newState.id,
+ claimStateFk: value,
});
router.go(route.fullPath);
}
@@ -184,14 +183,15 @@ async function changeState(value) {
function claimUrl(section) {
return '#/claim/' + entityId.value + '/' + section;
}
-
-onMounted(async () => {
- const { data } = await axios.get('ClaimStates');
- claimStates.value = data;
-});
+ (claimStates = data)"
+ auto-load
+ />
{
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index f2e381069d3..d79c5a9ac6e 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -114,10 +114,10 @@ onMounted(async () => {