add nombre de la lista al editar

This commit is contained in:
2025-02-12 15:11:05 +01:00
parent cc96228fd3
commit 0101280404

View File

@@ -11,7 +11,7 @@
lista.items?.length : '0' }}
</q-badge>
<div class="text-h5">{{ lista.nombre }}
<q-icon name="edit" @click="changeNameList(lista.id)" class="cursor-pointer"
<q-icon name="edit" @click="changeNameList(lista.id, lista.nombre)" class="cursor-pointer"
v-if="store.user?.email === lista.email_owner" />
</div>
<div class="text-subtitle1">{{ lista.email_owner }}</div>
@@ -86,14 +86,14 @@ const onLoad = (index, done) => {
}, 1000)
}
const changeNameList = async (id) => {
const changeNameList = async (id, nombre) => {
try {
$q.dialog({
title: 'Escriba',
message: 'Nuevo nombre de la lista',
html: true,
prompt: {
model: '',
model: nombre,
isValid: val => val.length > 4, // << here is the magic
type: 'text'
},