add nombre de la lista al editar
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
lista.items?.length : '0' }}
|
lista.items?.length : '0' }}
|
||||||
</q-badge>
|
</q-badge>
|
||||||
<div class="text-h5">{{ lista.nombre }}
|
<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" />
|
v-if="store.user?.email === lista.email_owner" />
|
||||||
</div>
|
</div>
|
||||||
<div class="text-subtitle1">{{ lista.email_owner }}</div>
|
<div class="text-subtitle1">{{ lista.email_owner }}</div>
|
||||||
@@ -86,14 +86,14 @@ const onLoad = (index, done) => {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeNameList = async (id) => {
|
const changeNameList = async (id, nombre) => {
|
||||||
try {
|
try {
|
||||||
$q.dialog({
|
$q.dialog({
|
||||||
title: 'Escriba',
|
title: 'Escriba',
|
||||||
message: 'Nuevo nombre de la lista',
|
message: 'Nuevo nombre de la lista',
|
||||||
html: true,
|
html: true,
|
||||||
prompt: {
|
prompt: {
|
||||||
model: '',
|
model: nombre,
|
||||||
isValid: val => val.length > 4, // << here is the magic
|
isValid: val => val.length > 4, // << here is the magic
|
||||||
type: 'text'
|
type: 'text'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user