Refactor GroupsPage: Replace VButton and VIcon components with standard HTML button and SVG for improved compatibility and maintainability. Added console logs for better debugging during the create list dialog flow.

This commit is contained in:
mohamad 2025-06-01 19:59:45 +02:00
parent e52ab871bc
commit ca1ac94b57

View File

@ -31,10 +31,12 @@
<div v-for="group in groups" :key="group.id" class="neo-group-card" @click="selectGroup(group)"> <div v-for="group in groups" :key="group.id" class="neo-group-card" @click="selectGroup(group)">
<h1 class="neo-group-header">{{ group.name }}</h1> <h1 class="neo-group-header">{{ group.name }}</h1>
<div class="neo-group-actions"> <div class="neo-group-actions">
<VButton variant="secondary" size="sm" @click.stop="openCreateListDialog(group)"> <button class="btn btn-sm btn-secondary" @click.stop="openCreateListDialog(group)">
<VIcon name="plus" class="mr-1" /> <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-plus" />
</svg>
List List
</VButton> </button>
</div> </div>
</div> </div>
<div class="neo-create-group-card" @click="openCreateGroupDialog"> <div class="neo-create-group-card" @click="openCreateGroupDialog">
@ -268,13 +270,16 @@ const selectGroup = (group: Group) => {
}; };
const openCreateListDialog = (group: Group) => { const openCreateListDialog = (group: Group) => {
console.log('Opening create list dialog for group:', group);
// Ensure we have the latest groups data // Ensure we have the latest groups data
fetchGroups().then(() => { fetchGroups().then(() => {
console.log('Setting up modal with group:', group);
availableGroupsForModal.value = [{ availableGroupsForModal.value = [{
label: group.name, label: group.name,
value: group.id value: group.id
}]; }];
showCreateListModal.value = true; showCreateListModal.value = true;
console.log('Modal should be visible now:', showCreateListModal.value);
}); });
}; };