Skip to content

Commit 796bd87

Browse files
committed
feat: class list
1 parent 1b4c0af commit 796bd87

1 file changed

Lines changed: 37 additions & 69 deletions

File tree

components/ClassesList.vue

Lines changed: 37 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,52 @@
11
<template>
22
<v-row justify="center" align="center">
33
<v-col cols="12" sm="12" md="10" lg="8">
4-
<v-data-table
5-
:headers="headers"
6-
:items="desserts"
7-
item-key="name"
8-
sort-by="name"
9-
group-by="category"
10-
class="elevation-1"
11-
show-group-by
12-
></v-data-table>
4+
<v-card>
5+
<v-card-title>
6+
<v-text-field
7+
v-model="search"
8+
append-icon="mdi-magnify"
9+
label="Search"
10+
single-line
11+
hide-details
12+
></v-text-field>
13+
</v-card-title>
14+
15+
<v-data-table
16+
:headers="headers"
17+
:items="classes"
18+
item-key="crn"
19+
sort-by="semster_index"
20+
:dense="true"
21+
:loading="loading"
22+
group-by="semster_index"
23+
class="elevation-1"
24+
:search="search"
25+
show-group-by
26+
></v-data-table>
27+
</v-card>
1328
</v-col>
1429
</v-row>
1530
</template>
1631

1732
<script>
1833
export default {
34+
props: {
35+
classes: { type: Array, default: {} },
36+
loading: { type: Boolean, default: false },
37+
},
1938
data() {
2039
return {
40+
search: '',
2141
headers: [
22-
{
23-
text: 'Dessert (100g serving)',
24-
align: 'start',
25-
value: 'name',
26-
groupable: false,
27-
},
28-
{ text: 'Category', value: 'category', align: 'right' },
29-
{ text: 'Dairy', value: 'dairy', align: 'right' },
30-
],
31-
desserts: [
32-
{
33-
name: 'Frozen Yogurt',
34-
category: 'Ice cream',
35-
dairy: 'Yes',
36-
},
37-
{
38-
name: 'Ice cream sandwich',
39-
category: 'Ice cream',
40-
dairy: 'Yes',
41-
},
42-
{
43-
name: 'Eclair',
44-
category: 'Cookie',
45-
dairy: 'Yes',
46-
},
47-
{
48-
name: 'Cupcake',
49-
category: 'Pastry',
50-
dairy: 'Yes',
51-
},
52-
{
53-
name: 'Gingerbread',
54-
category: 'Cookie',
55-
dairy: 'No',
56-
},
57-
{
58-
name: 'Jelly bean',
59-
category: 'Candy',
60-
dairy: 'No',
61-
},
62-
{
63-
name: 'Lollipop',
64-
category: 'Candy',
65-
dairy: 'No',
66-
},
67-
{
68-
name: 'Honeycomb',
69-
category: 'Toffee',
70-
dairy: 'No',
71-
},
72-
{
73-
name: 'Donut',
74-
category: 'Pastry',
75-
dairy: 'Yes',
76-
},
77-
{
78-
name: 'KitKat',
79-
category: 'Candy',
80-
dairy: 'Yes',
81-
},
42+
{ text: 'Course Name', align: 'start', value: 'name' },
43+
{ text: 'Code', value: 'code', align: 'right', groupable: false },
44+
{ text: 'CRN', value: 'crn', align: 'right', groupable: false },
45+
{ text: 'Section', value: 'section', align: 'right', groupable: false },
46+
{ text: 'Days', value: 'days', align: 'right', groupable: false },
47+
{ text: 'time', value: 'time', align: 'right', groupable: false },
48+
{ text: 'Instructor', value: 'instructor', align: 'right' },
49+
{ text: 'Semster', value: 'semster_index', align: 'right' },
8250
],
8351
}
8452
},

0 commit comments

Comments
 (0)