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

cleaned up student courses #620

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
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
67 changes: 33 additions & 34 deletions frontend/src/components/StudentProfile/StudentCourses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<v-alert v-if="!courses" class="container">
This student does not have any courses.
</v-alert>
<DisplayTable
<v-data-table
v-if="courses"
:items="courses"
:fields="fields"
:headers="fields"
:id="id"
showFilter="true"
title="studentCourse"
Expand All @@ -21,36 +21,40 @@
action: 'removeStudentCourse',
}"
>
<!-- <template #thead-top="">
<b-tr class="table-row-header-group top-row">
<b-th colspan="1" class="table-header-group text-center"></b-th>
<b-th colspan="3" class="table-header-group text-center">
<div></div
></b-th>
<b-th colspan="2" class="table-header-group text-center">
<div>Interim</div>
</b-th>
<b-th colspan="2" class="table-header-group text-center"
><div>Final</div></b-th
>
<b-th colspan="1">Eq/</b-th>
<b-th colspan="1"></b-th>
<b-th colspan="1">Fa</b-th>
</b-tr>
</template> -->
<!-- <template #cell(sessionDate)="row">
{{ $filters.formatYYYYMMDate(row.value) }}
</template> -->
<template
v-slot:item.data-table-expand="{
item,
internalItem,
toggleExpand,
isExpanded,
}"
>
<td v-if="item.hasRelatedCourse == 'Y'">
<v-btn
variant="text"
density="comfortable"
@click="toggleExpand(internalItem)"
class="v-data-table__expand-icon"
:class="{ 'v-data-table__expand-icon--active': isExpanded }"
:icon="
isExpanded(internalItem)
? 'mdi-chevron-down'
: 'mdi-chevron-right'
"
>
</v-btn>
</td>
</template>
<template v-slot:item.courseName="{ item }">
<v-dialog max-width="500">
<template v-slot:activator="{ props: activatorProps }">
<v-dialog max-width="500">
<template v-slot:activator="{ props: activatorProps }">
<v-btn
v-bind="activatorProps"
color="surface-variant"
:text="item.courseName"
variant="flat"
variant="plain"
class="v-btn-link"
></v-btn>
</template>

Expand Down Expand Up @@ -113,7 +117,7 @@
<v-spacer></v-spacer>

<v-btn
text="Close Dialog"
text="Close"
@click="isActive.value = false"
></v-btn>
</v-card-actions>
Expand All @@ -129,15 +133,13 @@
<v-card-actions>
<v-spacer></v-spacer>

<v-btn
text="Close Dialog"
@click="isActive.value = false"
></v-btn>
<v-btn text="Close" @click="isActive.value = false"></v-btn>
</v-card-actions>
</v-card>
</template>
</v-dialog>
</template>

<template v-slot:expanded-row="{ columns, item }">
<tr>
<td :colspan="columns.length">
Expand Down Expand Up @@ -181,7 +183,7 @@
</td>
</tr>
</template>
</DisplayTable>
</v-data-table>
</v-card-text>
</v-card>
</div>
Expand All @@ -190,12 +192,9 @@
<script>
import { useStudentStore } from "../../store/modules/student";
import { mapState, mapActions } from "pinia";
import DisplayTable from "@/components/DisplayTable.vue";
export default {
name: "StudentCourses",
components: {
DisplayTable: DisplayTable,
},
components: {},
computed: {
...mapState(useStudentStore, {
courses: "getStudentCourses",
Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineConfig({
},
},
server: {
port: 8082,
port: 8081,
proxy: {
// with options: http://localhost:5173/api/bar-> http://jsonplaceholder.typicode.com/bar
"/api": {
Expand Down
Loading