Merge remote-tracking branch 'origin/master' into master

add-license-1
Araozu 2020-08-18 07:49:33 -05:00
commit 0fd503ca34
2 changed files with 5 additions and 2 deletions

View File

@ -35,6 +35,7 @@ div.info_curso(:style="estiloCurso")
| {{ cursoAgregado? "remove": "add" }} | {{ cursoAgregado? "remove": "add" }}
span.material-icons(@click.stop="ocultar_mostrarCursoV" :title="cursoOculto? 'Mostrar': 'Ocultar'") span.material-icons(@click.stop="ocultar_mostrarCursoV" :title="cursoOculto? 'Mostrar': 'Ocultar'")
| {{ cursoOculto? 'visibility_off': 'visibility' }} | {{ cursoOculto? 'visibility_off': 'visibility' }}
span {{ idCurso }}
// //
@ -99,8 +100,8 @@ div.info_curso(:style="estiloCurso")
cursoAgregado = computed (=> cursoAgregado = computed (=>
cursosUsuario = store.state.horarioUsuario cursosUsuario = store.state.horarioUsuario
for idCurso, _ of cursosUsuario for idCursoC, _ of cursosUsuario
if idCurso is idCurso.value then return true if idCursoC is idCurso.value then return true
false false
) )

View File

@ -54,6 +54,8 @@ export default createStore({
while (ref.length > 0) ref.pop() while (ref.length > 0) ref.pop()
}, },
agregarCursoAMiHorario(state, {nombre, datos}) { agregarCursoAMiHorario(state, {nombre, datos}) {
console.log(nombre);
if (nombre === undefined) throw new Error("Error al agregar curso al horario. Nombre undefined.");
if (!state.horarioUsuario[nombre]) { if (!state.horarioUsuario[nombre]) {
state.horarioUsuario[nombre] = datos; state.horarioUsuario[nombre] = datos;
state.horarioUsuario = Object.assign({}, state.horarioUsuario); state.horarioUsuario = Object.assign({}, state.horarioUsuario);