Skip to content

Commit

Permalink
Merge pull request #582 from bcgov/release/v1.22
Browse files Browse the repository at this point in the history
Release/v1.22
  • Loading branch information
suzalflueck authored Jul 10, 2024
2 parents ade6240 + 101e26b commit 4a0d3f7
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 3 deletions.
96 changes: 96 additions & 0 deletions frontend/src/components/Courses/EquivalentOrChallengeCodes.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<template>
<div>
<p>
Indicates if credit for the course was granted through the Equivalency (E)
or Challenge (C) process.
</p>
<DisplayTable
title="Exam Special Case Codes"
v-bind:items="sortedEquivalentOrChallengeCodes"
v-bind:fields="equivalentOrChallengeCodesFields"
id="equivalentOrChallengeCode"
showFilter="true"
>
<template #cell(effectiveDate)="row">
{{ $filters.formatSimpleDate(row.item.effectiveDate) }}
</template>
<template #cell(expiryDate)="row">
{{ $filters.formatSimpleDate(row.item.expiryDate) }}
</template>
</DisplayTable>
</div>
</template>

<script>
import DisplayTable from "@/components/DisplayTable.vue";
import CourseService from "@/services/CourseService";
// import shared functions & validations
import { applyDisplayOrder } from "@/utils/common.js";
export default {
name: "EquivalentOrChallengeCodes",
components: {
DisplayTable: DisplayTable,
},
created() {
// get codes
CourseService.getEquivalentOrChallengeCodes()
.then((response) => {
this.equivalentOrChallengeCodes = response.data;
})
// eslint-disable-next-line
.catch((error) => {
this.$bvToast.toast("ERROR " + error.response.statusText, {
title: "ERROR" + error.response.status,
variant: "danger",
noAutoHide: true,
});
});
},
data: function () {
return {
equivalentOrChallengeCodes: [],
equivalentOrChallengeCodesFields: [
{
key: "equivalentOrChallengeCode",
label: "Code",
sortable: true,
},
{
key: "label",
label: "Label",
sortable: true,
},
{
key: "description",
label: "Description",
sortable: true,
},
{
key: "effectiveDate",
label: "Effective Date",
sortable: true,
},
{
key: "expiryDate",
label: "Expiry Date",
sortable: true,
},
],
};
},
computed: {
sortedEquivalentOrChallengeCodes() {
return applyDisplayOrder(this.equivalentOrChallengeCodes);
},
},
};
</script>

<style>
.table th,
.table td {
border-top: none !important;
}
</style>
98 changes: 98 additions & 0 deletions frontend/src/components/Courses/ExamSpecialCaseCodes.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<template>
<div>
<p>
Identifies the special cases associated with writing the exam or allowing
an exemption from exam writing.
</p>
<DisplayTable
title="Exam Special Case Codes"
v-bind:items="sortedExamSpecialCaseCodes"
v-bind:fields="examSpecialCaseCodesFields"
id="examSpecialCaseCode"
showFilter="true"
>
<template #cell(effectiveDate)="row">
{{ $filters.formatSimpleDate(row.item.effectiveDate) }}
</template>
<template #cell(expiryDate)="row">
{{ $filters.formatSimpleDate(row.item.expiryDate) }}
</template>
</DisplayTable>
</div>
</template>

<script>
import DisplayTable from "@/components/DisplayTable.vue";
import CourseService from "@/services/CourseService";
// import shared functions & validations
import { applyDisplayOrder } from "@/utils/common.js";
export default {
name: "ExamSpecialCaseCodes",
components: {
DisplayTable: DisplayTable,
},
created() {
// get codes
CourseService.getExamSpecialCaseCodes()
.then((response) => {
this.examSpecialCaseCodes = response.data;
})
// eslint-disable-next-line
.catch((error) => {
this.$bvToast.toast("ERROR " + error.response.statusText, {
title: "ERROR" + error.response.status,
variant: "danger",
noAutoHide: true,
});
});
},
data: function () {
return {
examSpecialCaseCodes: [],
examSpecialCaseCodesFields: [
{
key: "examSpecialCaseCode",
label: "Code",
sortable: true,
},
{
key: "label",
label: "Label",
sortable: true,
},
{
key: "description",
label: "Description",
sortable: true,
},
{
key: "effectiveDate",
label: "Effective Date",
sortable: true,
class: "w-25",
},
{
key: "expiryDate",
label: "Expiry Date",
sortable: true,
class: "w-25",
},
],
};
},
computed: {
sortedExamSpecialCaseCodes() {
return applyDisplayOrder(this.examSpecialCaseCodes);
},
},
};
</script>

<style>
.table th,
.table td {
border-top: none !important;
}
</style>
95 changes: 95 additions & 0 deletions frontend/src/components/Courses/FineArtsAppliedSkillsCodes.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<template>
<div>
<p>
Fine Arts Applied Skills codes indicates that a course is being used for
the Fine Arts and/or Applied Skills graduation requirement.
</p>
<DisplayTable
title="Fine Arts Applied Skills Codes"
v-bind:items="sortedFaAsCodes"
v-bind:fields="fineArtsAppliedSkillsTypesFields"
id="fineArtsAppliedSkillsCode"
showFilter="true"
>
<template #cell(effectiveDate)="row">
{{ $filters.formatSimpleDate(row.item.effectiveDate) }}
</template>
<template #cell(expiryDate)="row">
{{ $filters.formatSimpleDate(row.item.expiryDate) }}
</template>
</DisplayTable>
</div>
</template>

<script>
import DisplayTable from "@/components/DisplayTable.vue";
import CourseService from "@/services/CourseService";
// import shared functions & validations
import { applyDisplayOrder } from "@/utils/common.js";
export default {
name: "FineArtsAppliedSkillsCodes",
components: {
DisplayTable: DisplayTable,
},
created() {
CourseService.getFineArtsAppliedSkillsTypes()
.then((response) => {
this.fineArtsAppliedSkillsTypes = response.data;
})
// eslint-disable-next-line
.catch((error) => {
this.$bvToast.toast("ERROR " + error.response.statusText, {
title: "ERROR" + error.response.status,
variant: "danger",
noAutoHide: true,
});
});
},
data: function () {
return {
fineArtsAppliedSkillsTypes: [],
fineArtsAppliedSkillsTypesFields: [
{
key: "fineArtsAppliedSkillsCode",
label: "Code",
sortable: true,
},
{
key: "label",
label: "Label",
sortable: true,
},
{
key: "description",
label: "Description",
sortable: true,
},
{
key: "effectiveDate",
label: "Effective Date",
sortable: true,
},
{
key: "expiryDate",
label: "Expiry Date",
sortable: true,
},
],
};
},
computed: {
sortedFaAsCodes() {
return applyDisplayOrder(this.fineArtsAppliedSkillsTypes);
},
},
};
</script>

<style>
.table th,
.table td {
border-top: none !important;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@
</DisplayTable>
</b-card>
</template>

<template #cell(optionalProgramCompletionDate)="row">
{{
$filters.formatYYYYMMDate(row.item.optionalProgramCompletionDate)
}}
</template>
</DisplayTable>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import UngradReasons from "../components/Codes/UngradReasons.vue";
import HistoryActivityCodes from "../components/Codes/HistoryActivityCodes.vue";
import DocumentStatusCode from "../components/Codes/DocumentStatusCode.vue";
import BatchTypes from "../components/Codes/BatchTypes.vue";

// Programs
import AdminGraduationPrograms from "../views/Programs.vue";
import AlgorithmRules from "../components/Programs/AlgorithmRules.vue";
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/services/CourseService.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,13 @@ export default {
"/api/v1/course/studentexam/pen/" + pen + "?sortForUI=true"
);
},
getFineArtsAppliedSkillsTypes() {
return ApiService.apiAxios.get("/api/v1/course/fineArtsAppliedSkillsCodes");
},
getExamSpecialCaseCodes() {
return ApiService.apiAxios.get("/api/v1/course/examSpecialCaseCodes");
},
getEquivalentOrChallengeCodes() {
return ApiService.apiAxios.get("/api/v1/course/equivalentOrChallengeCodes");
},
};
23 changes: 20 additions & 3 deletions frontend/src/views/Courses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@
></DisplayTable>
</b-card-text>
</b-tab>
<b-tab title="Course restrictions">
<b-tab title="Course Restrictions">
<!-- TODO: Refactor this into it's own component for Vuetify -->
<b-card-text>
<DisplayTable
title="Course restrictions"
title="Course Restrictions"
v-bind:items="courseRestrictions"
v-bind:fields="courseRestrictionFields"
id="courseRestrictionId"
Expand All @@ -185,7 +186,7 @@
</DisplayTable>
</b-card-text>
</b-tab>
<b-tab title="Course requirements">
<b-tab title="Course Requirements">
<b-card-text>
<form v-on:submit.prevent>
<div class="advanced-search-form">
Expand Down Expand Up @@ -304,6 +305,15 @@
</DisplayTable>
</b-card-text>
</b-tab>
<b-tab title="Fine Arts Applied Skills">
<FineArtsAppliedSkillsCodes />
</b-tab>
<b-tab title="Exam Special Cases">
<ExamSpecialCaseCodes />
</b-tab>
<b-tab title="Equivalency or Challenge">
<EquivalentOrChallengeCodes />
</b-tab>
</b-tabs>
</b-card>
</div>
Expand All @@ -314,10 +324,17 @@
import { showNotification } from "../utils/common.js";
import CourseService from "@/services/CourseService.js";
import DisplayTable from "@/components/DisplayTable.vue";
import FineArtsAppliedSkillsCodes from "@/components/Courses/FineArtsAppliedSkillsCodes.vue";
import ExamSpecialCaseCodes from "@/components/Courses/ExamSpecialCaseCodes.vue";
import EquivalentOrChallengeCodes from "@/components/Courses/EquivalentOrChallengeCodes.vue";
export default {
name: "courses",
components: {
DisplayTable: DisplayTable,
FineArtsAppliedSkillsCodes: FineArtsAppliedSkillsCodes,
ExamSpecialCaseCodes: ExamSpecialCaseCodes,
EquivalentOrChallengeCodes: EquivalentOrChallengeCodes,
},
data() {
return {
Expand Down

0 comments on commit 4a0d3f7

Please sign in to comment.