Skip to content

Commit

Permalink
wip: toast
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Dec 16, 2024
1 parent ed38979 commit caa30a0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/entrypoints/matricula.content/UFABC-Matricula.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -329,6 +329,7 @@ onUnmounted(() => {

<section class="pr-5">
<h3 class="font-medium text-[14px] mb-0.5 text-black/90">Filtros</h3>
<Toaster position="top-right"/>
<el-switch class="mr-3" active-text="Disciplinas escolhidas" v-model="selected" @change="changeSelected()">
</el-switch>

Expand Down
7 changes: 3 additions & 4 deletions src/scripts/sig/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit caa30a0

Please sign in to comment.