Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix teacher subject note bar #39

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/components/TheLecturerSearchCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@
{{ lecturer.first_name }} {{ lecturer.middle_name }}
</div>
<div class="text-body-2">
<v-chip-group>
<v-chip-group v-if="lecturer.subjects && lecturer.subjects.length > 0">
<v-chip
v-for="subject in lecturer.subjects"
v-for="subject in lecturer.subjects.slice(0, 2)"
:key="subject"
:text="subject"
size="small"
></v-chip>
<v-chip
v-if="lecturer.subjects.length > 2"
:key="'more'"
size="small"
>
еще {{ lecturer.subjects.length - 2 }}
</v-chip>
</v-chip-group>
<div v-else-if="lecturer.subjects === null"> </div>

Check warning on line 38 in src/components/TheLecturerSearchCard.vue

View workflow job for this annotation

GitHub Actions / Проверяем стили

Delete `·`
<div v-else>Нет предметов</div>
<div>отзывы: {{ lecturer.comments?.length ?? "—" }}</div>
<div>
оценка: {{ lecturer.mark_general > 0 ? "+" : ""
Expand Down Expand Up @@ -60,8 +69,9 @@
const props = defineProps({
lecturer: { type: Object, required: true },
photo: { type: String, required: true },
});

Check warning on line 72 in src/components/TheLecturerSearchCard.vue

View workflow job for this annotation

GitHub Actions / Проверяем стили

Delete `⏎`


function toReviewPage() {
router.push({ path: "review", query: { lecturer_id: props.lecturer.id } });
}
Expand Down