Skip to content

Commit d3ce86a

Browse files
added changes for Nancy
1 parent 8abb7de commit d3ce86a

File tree

1 file changed

+89
-64
lines changed

1 file changed

+89
-64
lines changed
Lines changed: 89 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
<template>
2-
<div>
3-
<h3 class="ml-2 mt-5">Student Grade Codes</h3>
4-
<p class="ml-2 w-66">
5-
Student grade codes refer to a students' grade codes in the GRAD system.
6-
</p>
7-
<DisplayTable
8-
v-bind:items="studentGradeCodes"
9-
v-bind:fields="studentGradeCodesFields"
10-
id="code"
11-
showFilter="true"
12-
>
13-
</DisplayTable>
14-
</div>
15-
</template>
16-
17-
<script>
18-
import DisplayTable from "@/components/DisplayTable.vue";
19-
import { useSnackbarStore } from "@/store/modules/snackbar";
20-
import { mapState, mapActions } from "pinia";
21-
import { useAppStore } from "@/store/modules/app";
22-
export default {
23-
name: "GradeCodes",
24-
components: {
25-
DisplayTable: DisplayTable,
26-
},
27-
async beforeMount() {
2+
<div>
3+
<h3 class="ml-2 mt-5">Student Grade Codes</h3>
4+
<p class="ml-2 w-66">
5+
Student grade codes refer to a students' grade codes in the GRAD system.
6+
</p>
7+
<DisplayTable
8+
v-bind:items="studentGradeCodes"
9+
v-bind:fields="studentGradeCodesFields"
10+
id="code"
11+
showFilter="true"
12+
>
13+
<template v-slot:item.effectiveDate="{ item }">
14+
{{ $filters.formatYYYYMMDate(item.effectiveDate) }}
15+
</template>
16+
<template v-slot:item.expiryDate="{ item }">
17+
{{ $filters.formatYYYYMMDate(item.expiryDate) }}
18+
</template>
19+
</DisplayTable>
20+
</div>
21+
</template>
22+
23+
<script>
24+
import DisplayTable from "@/components/DisplayTable.vue";
25+
import { useSnackbarStore } from "@/store/modules/snackbar";
26+
import { mapState, mapActions } from "pinia";
27+
import { useAppStore } from "@/store/modules/app";
28+
export default {
29+
name: "GradeCodes",
30+
components: {
31+
DisplayTable: DisplayTable,
32+
},
33+
async beforeMount() {
2834
try {
2935
await this.getStudentGradeCodes(false);
3036
} catch (e) {
@@ -37,45 +43,64 @@
3743
}
3844
}
3945
},
40-
data: function () {
41-
return {
42-
snackbarStore: useSnackbarStore(),
43-
studentGradeCodesFields: [
44-
{
45-
key: "studentGradeCode",
46-
title: "Code",
47-
sortable: true,
48-
sortDirection: "desc",
49-
class: "w-15",
50-
},
51-
{
52-
key: "label",
53-
title: "Label",
54-
sortable: true,
55-
},
56-
{
57-
key: "description",
58-
title: "Description",
59-
sortable: true,
60-
}
61-
],
62-
};
63-
},
64-
computed: {
46+
data: function () {
47+
return {
48+
snackbarStore: useSnackbarStore(),
49+
studentGradeCodesFields: [
50+
{
51+
key: "studentGradeCode",
52+
title: "Code",
53+
sortable: true,
54+
sortDirection: "desc",
55+
class: "w-15",
56+
},
57+
{
58+
key: "label",
59+
title: "Label",
60+
sortable: true,
61+
},
62+
{
63+
key: "description",
64+
title: "Description",
65+
sortable: true,
66+
},
67+
{
68+
key: "effectiveDate",
69+
title: "Effective Date",
70+
sortable: true,
71+
},
72+
{
73+
key: "expiryDate",
74+
title: "Expiry Date",
75+
sortable: true,
76+
},
77+
{
78+
key: "expected",
79+
title: "Expected",
80+
sortable: true,
81+
},
82+
{
83+
key: "displayOrder",
84+
title: "Display Order",
85+
sortable: true,
86+
},
87+
],
88+
};
89+
},
90+
computed: {
6591
...mapState(useAppStore, {
6692
studentGradeCodes: "getGradeCodes",
6793
}),
6894
},
69-
methods: {
70-
...mapActions(useAppStore, ["getStudentGradeCodes"]),
71-
},
72-
};
73-
</script>
74-
75-
<style>
76-
.table th,
77-
.table td {
78-
border-top: none !important;
79-
}
80-
</style>
81-
95+
methods: {
96+
...mapActions(useAppStore, ["getStudentGradeCodes"]),
97+
},
98+
};
99+
</script>
100+
101+
<style>
102+
.table th,
103+
.table td {
104+
border-top: none !important;
105+
}
106+
</style>

0 commit comments

Comments
 (0)