diff --git a/package.json b/package.json index 55b00ff..a684239 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "ofetch": "^1.4.0", "toastify-js": "^1.12.0", "vue": "^3.5.12", - "vue-sonner": "^1.2.1", + "vue-sonner": "^1.2.5", "vuedraggable": "^4.1.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84dc2df..a550060 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,7 +48,7 @@ importers: specifier: ^3.5.12 version: 3.5.13(typescript@5.6.3) vue-sonner: - specifier: ^1.2.1 + specifier: ^1.2.5 version: 1.2.5 vuedraggable: specifier: ^4.1.0 diff --git a/src/entrypoints/matricula.content/UFABC-Matricula.vue b/src/entrypoints/matricula.content/UFABC-Matricula.vue index 571af87..b29a046 100644 --- a/src/entrypoints/matricula.content/UFABC-Matricula.vue +++ b/src/entrypoints/matricula.content/UFABC-Matricula.vue @@ -8,6 +8,7 @@ import { useStorage } from '@/composables/useStorage' import { getStudentCourseId, getStudentId } from '@/utils/ufabc-matricula-student' import type { UFABCMatriculaStudent } from '.'; import type { Student } from '@/scripts/sig/homepage'; +import { toast, Toaster } from 'vue-sonner' type Filter = { @@ -142,9 +143,8 @@ function changeCursadas() { } return; } - - if (!student.value) { - console.warn('Não encontramos suas disciplinas cursadas, por favor acesse o sigaa') + if (student.value) { + toast.warning('Não encontramos suas disciplinas cursadas, por favor acesse o sigaa') return } @@ -329,6 +329,7 @@ onUnmounted(() => {

Filtros

+ diff --git a/src/scripts/sig/homepage.ts b/src/scripts/sig/homepage.ts index 2d36136..2498863 100644 --- a/src/scripts/sig/homepage.ts +++ b/src/scripts/sig/homepage.ts @@ -122,10 +122,9 @@ export async function scrapeMenu( const { data: classesPage, error: classesError } = await fetchClasses(); if (classesError || !classesPage) { - console.log({ - msg: 'Ocorreu um erro ao extrair as turmas, por favor tente novamente mais tarde!', - error, - }); + const msg = 'Ocorreu um erro ao extrair as turmas, por favor tente novamente mais tarde!' + console.error(error) + scrappingErrorToast(msg).showToast(); return null; }