From 5f2042932ce20847aa8e372b923a2e0d83c28f59 Mon Sep 17 00:00:00 2001 From: Araozu Date: Fri, 7 Feb 2020 19:07:59 -0500 Subject: [PATCH] Agregada reactividad al indicador de curso agregado. Arreglado error de persistencia de los cursos eliminados. --- src/components/Inicio/curso.vue | 54 +++++++++++++++++++++----- src/components/Inicio/curso/bloque.vue | 2 +- src/store/index.js | 5 ++- src/views/Inicio.vue | 2 +- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/components/Inicio/curso.vue b/src/components/Inicio/curso.vue index c8c79df..5fb60b1 100644 --- a/src/components/Inicio/curso.vue +++ b/src/components/Inicio/curso.vue @@ -1,12 +1,12 @@ diff --git a/src/store/index.js b/src/store/index.js index 95e8f86..522c585 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -15,8 +15,9 @@ export default new Vuex.Store({ agregarACelda(state, {idCelda, datos}) { state.celdas[idCelda].push(datos); }, - quitarDeCelda(state) { - + quitarDeCelda(state, idCelda) { + const ref = state.celdas[idCelda]; + while (ref.length > 0) ref.pop() }, agregarCursoAMiHorario(state, {nombre, datos} ) { if (!state.horarioUsuario[nombre]) { diff --git a/src/views/Inicio.vue b/src/views/Inicio.vue index 87788ab..02e9f36 100644 --- a/src/views/Inicio.vue +++ b/src/views/Inicio.vue @@ -1,7 +1,7 @@