Skip to content

Commit

Permalink
wip: reviewTeacher vue2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Sep 16, 2024
1 parent 3ba247b commit ce2e2a6
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 246 deletions.
19 changes: 4 additions & 15 deletions src/components/ReviewSubject.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,7 @@ const loading = ref(false);
const helpData = ref(null);
const filterSelected = ref(null);
const samplesCount = ref(null);
const concepts = ref([
{ conceito: 'A' },
{ conceito: 'B' },
{ conceito: 'C' },
{ conceito: 'D' },
{ conceito: 'F' },
]);
const pieChart = ref();
const studentCr = ref(null);
watch(props.subjectInfo.notifier, (val) => {
if(val) {
Expand All @@ -125,8 +116,8 @@ watch(() => props.subjectInfo, (newVal) => {
// i miss optional chaining :(
const subject = computed(() => {
// biome-ignore lint/complexity/useOptionalChain: Babel version does not support it
return helpData.value && helpData.value.subject && helpData.value.subject.name
? helpData.value.subject.name
return helpData.value && helpData.value.subject && helpData.value.subject.name
? helpData.value.subject.name
: '';
});
Expand Down Expand Up @@ -167,6 +158,7 @@ function closeDialog() {
async function setupSubjectStats() {
const subjectId = props.subjectInfo.subject.id;
console.log(subjectId)
if (!subjectId) {
return;
}
Expand All @@ -189,9 +181,6 @@ async function setupSubjectStats() {
closeDialog();
}
}
console.log(pieChart.value)
function updateFilter() {
pieChart.value.delegateMethod('showLoading', 'Carregando...');
Expand All @@ -201,7 +190,7 @@ function updateFilter() {
if (filterSelected.value === 'all') {
filter = helpData.value.general;
} else {
filter = helpData.value.specific.find((specific) =>
filter = helpData.value.specific.find((specific) =>
specific._id._id === filterSelected.value
);
}
Expand Down
Loading

0 comments on commit ce2e2a6

Please sign in to comment.