fix: misc improvements to badge flow

This commit is contained in:
Jannat Patel
2025-07-08 19:41:08 +05:30
parent efb317191c
commit f2c18fad52
3 changed files with 6 additions and 8 deletions

View File

@@ -179,13 +179,13 @@ const columns = computed(() => {
label: __('Member'),
key: 'member_name',
icon: 'user',
width: '80%',
width: '60%',
},
{
label: __('Issued On'),
key: 'issued_on',
icon: 'calendar',
align: 'right',
align: 'center',
},
]
})

View File

@@ -159,13 +159,11 @@ const setValue = (close: () => void) => {
onSuccess() {
badges.value?.reload()
close()
toast.success(__('Zoom Account updated successfully'))
toast.success(__('Badge updated successfully'))
},
onError(err: any) {
close()
toast.error(
cleanError(err.messages[0]) || __('Error updating Zoom Account')
)
toast.error(cleanError(err.messages[0]) || err)
},
}
)

View File

@@ -34,7 +34,7 @@
<ListHeader
class="mb-2 grid items-center space-x-4 rounded bg-surface-gray-2 p-2"
>
<ListHeaderItem :item="item" v-for="item in columns">
<ListHeaderItem :item="item" v-for="item in columns" :key="item.key">
<template #prefix="{ item }">
<FeatherIcon
v-if="item.icon"
@@ -45,7 +45,7 @@
</ListHeaderItem>
</ListHeader>
<ListRows>
<ListRow :row="row" v-for="row in badges.data">
<ListRow :row="row" v-for="row in badges.data" :key="row.name">
<template #default="{ column, item }">
<ListRowItem :item="row[column.key]" :align="column.align">
<div v-if="column.key == 'enabled'">