Skip to content

Commit cc54c0c

Browse files
committed
Consertando problema com o mês final de um evento recorrente
1 parent 35f4230 commit cc54c0c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/BaixaHorario.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<button class="btn btn-primary" v-on:click="exportarHorario()">
2+
<button class="btn btn-primary" v-on:click="exportarHorario()" v-bind:disabled="!this.tableTurmas">
33
Exportar Horário
44
<span class="glyphicon glyphicon-circle-arrow-down"></span>
55
</button>
@@ -29,14 +29,14 @@ const getFimPeriodo = () => {
2929
const { periodo, ano } = ufcg.hoje
3030
const date = new Date()
3131
date.setFullYear(ano)
32-
date.setDate('15') // because
33-
date.setMonth(periodo == '1' ? 5 : 12)
32+
date.setDate('15') // just because
33+
date.setMonth(periodo == '1' ? 5 : 11)
3434
return date
3535
}
3636
3737
const getTableTurmas = async () => {
3838
const doc = await ufcg.getPaginaHorario()
39-
return doc.querySelectorAll('table')[0]
39+
return doc && doc.querySelectorAll('table')[0]
4040
}
4141
4242
const getNomeDisciplina = tr => {

src/components/Home.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default {
119119
this.horario = ufcg.professor ? null : horario.innerHTML
120120
this.tableTurmas = turmas
121121
this.calcularAulaAtual()
122+
this.temTurmas = true
122123
})
123124
124125
setInterval(() => {

webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const config = {
1414
util: './util.js',
1515
background: './background.js',
1616
'popup/popup': './popup/popup.js',
17-
home: './home.js',
1817
'injectors/frequencia': './injectors/frequencia.js',
1918
'injectors/notas': './injectors/notas.js',
2019
'injectors/historico': './injectors/historico.js',

0 commit comments

Comments
 (0)