Skip to content

Commit

Permalink
Merge branch 'release/v1.27.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cditcher committed Mar 5, 2025
2 parents 6ee68e3 + 28751ff commit ad8b221
Show file tree
Hide file tree
Showing 19 changed files with 526 additions and 347 deletions.
116 changes: 41 additions & 75 deletions frontend/src/components/Admin/InstituteAlerts.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<template>
<div>
<v-card title="Filter Options"
><v-card-text>
<!--TODO: Review this when we implement batch filtering in GRAD2-2553 -->
<v-radio-group
class="mt-6"
v-model="filterOptions.acknowledgeFlag"
inline
@input="getInstituteAlerts"
>
<v-radio label="Unacknowledged" value="N" />
<v-radio label="Acknowledged" value="Y" />
<v-radio label="All" value="All" /> </v-radio-group></v-card-text
></v-card>
<v-data-table-server
v-model:items-per-page="itemsPerPage"
:items-per-page-options="itemsPerPageOptions"
Expand All @@ -17,29 +30,8 @@
<template v-slot:item.subject="{ item }">
<a :href="getPassthroughURL(item)" target="_blank">{{
getPassthroughURLText(item)
}}</a
>&nbsp;
<i>{{ getInstituteEventLabel(item.event.eventType) }}</i>
</template>

<template v-slot:item.acknowledgeFlag="{ item }">
<v-btn
v-if="item.acknowledgeFlag == 'Y'"
class="text-none pointer-events-none"
icon="mdi-check-bold"
color="success"
density="comfortable"
></v-btn>
<v-btn
v-else
class="text-none pointer-events-none"
icon="mdi-minus-thick"
color="primary"
density="comfortable"
disabled
></v-btn>
}}</a>
</template>

<template v-slot:item.updateUser="{ item }">
{{ item.acknowledgeFlag == "Y" ? item.updateUser : "" }}
</template>
Expand Down Expand Up @@ -108,55 +100,13 @@ export default {
{ key: "createDate", title: "Create Date", sortable: false },
{ key: "event.eventType", title: "Alert Event Type", sortable: false },
{ key: "subject", title: "Subject", sortable: false },
{ key: "acknowledgeFlag", title: "Acknowledge", sortable: false },
{ key: "updateUser", title: "IDIR", sortable: false },
{ key: "updateDate", title: "Acknowledge Date", sortable: false },
{ key: "actions", title: "Actions", sortable: false },
],
// these should align with events defined in TRAX API:
// https://github.com/bcgov/EDUC-GRAD-TRAX-API/blob/main/api/src/main/java/ca/bc/gov/educ/api/trax/constant/EventType.java
instituteEvents: [
{ key: "UPDATE_SCHOOL", description: "Update School" },
{ key: "CREATE_SCHOOL", description: "New School" },
{ key: "UPDATE_DISTRICT", description: "Update District" },
{ key: "CREATE_DISTRICT", description: "Create District" },
{ key: "UPDATE_AUTHORITY", description: "Update Authority" },
{ key: "CREATE_AUTHORITY", description: "Create Authority" },
{ key: "GET_AUTHORITY", description: "Get Authority" },
{ key: "GET_PAGINATED_SCHOOLS", description: "Get Paginated Schools" },
{
key: "GET_PAGINATED_AUTHORITIES",
description: "Get Paginated Authorities",
},
{ key: "MOVE_SCHOOL", description: "Move School" },
{ key: "CREATE_SCHOOL_CONTACT", description: "Create School Contact" },
{ key: "UPDATE_SCHOOL_CONTACT", description: "Update School Contact" },
{ key: "DELETE_SCHOOL_CONTACT", description: "Delete School Contact" },
{
key: "CREATE_DISTRICT_CONTACT",
description: "Create District Contact",
},
{
key: "UPDATE_DISTRICT_CONTACT",
description: "Update District Contact",
},
{
key: "DELETE_DISTRICT_CONTACT",
description: "Delete District Contact",
},
{
key: "CREATE_AUTHORITY_CONTACT",
description: "Create Authority Contact",
},
{
key: "UPDATE_AUTHORITY_CONTACT",
description: "Update Authority Contact",
},
{
key: "DELETE_AUTHORITY_CONTACT",
description: "Delete Authority Contact",
},
{ key: "actions", title: "Acknowledge", sortable: false },
],
filterOptions: {
acknowledgeFlag: "N",
},
};
},
created() {
Expand All @@ -178,10 +128,6 @@ export default {
isSchoolActivity(activity) {
return activity.event.eventType.includes("SCHOOL");
},
getInstituteEventLabel(key) {
return this.instituteEvents.find((event) => key === event.key)
?.description;
},
getPassthroughURL(activity) {
if (this.isDistrictActivity(activity)) {
return `${
Expand All @@ -208,11 +154,31 @@ export default {
this.currentPage = page;
this.getInstituteAlerts();
},
// TODO: Review this when we implement batch filtering in GRAD2-2553
getInstituteAlerts: function () {
this.loadingTable = true;
let params = `pageNumber=${this.currentPage - 1}&pageSize=${
this.itemsPerPage
}`;
let params = {
pageNumber: this.currentPage - 1,
pageSize: this.itemsPerPage,
sort: {
createDate: "DEC",
},
searchParams: [],
};
if (this.filterOptions.acknowledgeFlag !== "All") {
params.searchParams.push({
condition: null,
searchCriteriaList: [
{
key: "acknowledgeFlag",
operation: "eq",
value: this.filterOptions.acknowledgeFlag,
valueType: "STRING",
condition: null,
},
],
});
}
// update to pass in page, itemsPerPage, and sortBy
TRAXService.getInstituteEventHistory(params)
.then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ export default {
this.dialog = false;
this.clearBatchDetails();
this.step = 0;
this.selectedConfirmations = [];
this.reportType = null;
},
cancel() {
this.group = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export default {
this.dialog = false;
this.clearBatchDetails();
this.step = 0;
this.selectedConfirmations = [];
},
cancel() {
this.group = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<v-card>
<div class="d-flex justify-space-between align-center">
<v-card-title
>-End Credentials and Transcript DistrYearibution Run</v-card-title
>Year-End Credentials and Transcript Distribution Run</v-card-title
>
<v-btn
@click="closeDialogAndResetForm()"
Expand Down Expand Up @@ -194,9 +194,11 @@ export default {
ScheduleInput: ScheduleInput,
},
data: () => ({
snackbarStore: useSnackbarStore(),
step: 0,
batchLoading: false,
dialog: false,
snackbarStore: useSnackbarStore(),
}),
computed: {
...mapState(useAccessStore, ["hasPermissions"]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
v-model="district"
v-if="!selectAllDistricts"
:items="getDistrictList"
label="Category"
label="District"
variant="outlined"
:item-title="districtTitle"
item-value="districtNumber"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
hide-default-header
hide-default-footer
><template #no-data>
At least one school category must be selected
At least one district must be selected
</template></v-data-table
>
</div>
Expand Down
29 changes: 27 additions & 2 deletions frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
<template v-slot:label="label">
{{ label.label }}
</template>
<template v-slot:append-inner
><OpenStatusBadge
v-if="schoolId"
:compact="false"
:openedDateString="getSchoolById(schoolId)?.openedDate"
:closedDateString="getSchoolById(schoolId)?.closedDate"
/></template>
<template v-slot:item="{ props, item }">
<v-list-item v-bind="props" :key="item.value">
<template v-slot:append>
<OpenStatusBadge
:openedDateString="item.raw.openedDate"
:closedDateString="item.raw.closedDate"
/>
</template>
</v-list-item>
</template>
</v-autocomplete>
<v-alert v-if="validationMessage" type="error">{{
validationMessage
Expand Down Expand Up @@ -83,14 +100,18 @@ import SchoolService from "@/services/SchoolService.js";
import StudentService from "@/services/StudentService.js";
import GraduationReportService from "@/services/GraduationReportService.js";
import DateRangeInput from "./DateRangeInput.vue";
import OpenStatusBadge from "@/components/Common/OpenStatusBadge.vue";
import { useVuelidate } from "@vuelidate/core";
import { useBatchRequestFormStore } from "../../../../store/modules/batchRequestFormStore";
import { useAppStore } from "../../../../store/modules/app";
import { mapActions, mapState } from "pinia";
import { required, minLength, helpers } from "@vuelidate/validators";
export default {
components: { DateRangeInput: DateRangeInput },
components: {
DateRangeInput: DateRangeInput,
OpenStatusBadge: OpenStatusBadge,
},
setup() {
const batchRequestFormStore = useBatchRequestFormStore();
const gradDateFrom = ref(batchRequestFormStore.gradDateFrom);
Expand Down Expand Up @@ -217,7 +238,11 @@ export default {
},
computed: {
...mapState(useAppStore, ["getSchoolsList", "getSchoolById", "displaySchoolCategoryCode"]),
...mapState(useAppStore, [
"getSchoolsList",
"getSchoolById",
"displaySchoolCategoryCode",
]),
isEmpty() {
return this.students.length > 0;
},
Expand Down
27 changes: 19 additions & 8 deletions frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ export default {
lastName: student.data[0].legalLastName,
dob: student.data[0].dob,
status: studentGRADStatus.data.studentStatusName,
schoolOfRecord: this.getSchoolById(studentGRADStatus.data.schoolOfRecordId)?.displayName,
schoolAtGrad: this.getSchoolById(studentGRADStatus.data.schoolAtGradId)?.displayName,
schoolOfRecord: this.getSchoolById(
studentGRADStatus.data.schoolOfRecordId
)?.displayName,
schoolAtGrad: this.getSchoolById(
studentGRADStatus.data.schoolAtGradId
)?.displayName,
program: studentGRADStatus.data.program,
};
if (studentGRADStatus.data.studentStatusName == "Merged") {
Expand All @@ -193,6 +197,7 @@ export default {
this.penLoading = false;
return;
}
// validation fot students on the CERT_REGEN batch job
if (this.runType == "CERT_REGEN") {
//when User is entereing PENs for the REGEN process, error if the student has a null PROGRAM COMPLETION DATE
if (!studentGRADStatus.data.programCompletionDate) {
Expand All @@ -201,6 +206,12 @@ export default {
this.penLoading = false;
return;
}
if (student.data[0]?.certificateEligibility == "N") {
this.validationMessage =
"This students' school at graduation is not eligible for certificates";
this.penLoading = false;
return;
}
}
//check if what credentialType was selected
Expand Down Expand Up @@ -250,13 +261,13 @@ export default {
computed: {
...mapState(useBatchRequestFormStore, [
"getBatchRequest",
"getBatchRunTime",
"getCredential",
]),
"getBatchRequest",
"getBatchRunTime",
"getCredential",
]),
...mapState(useAppStore, {
getSchoolById: "getSchoolById"
}),
getSchoolById: "getSchoolById",
}),
isEmpty() {
return this.students.length > 0;
},
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/components/Batch/Forms/NongradDistrunForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@
></v-select>
</v-row>
<v-row v-if="getGroup == 'School Category'">
<DistrictInput
disableSelectStudents
:disableSelectDistrict="
!getBatchRequest.schoolCategoryCodes.includes('01')
"
></DistrictInput>
<DistrictInput disableSelectStudents></DistrictInput>
</v-row>
</v-stepper-window-item>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export default {
this.dialog = false;
this.clearBatchDetails();
this.step = 0;
this.reportType = null;
},
cancel() {
this.group = null;
Expand Down
Loading

0 comments on commit ad8b221

Please sign in to comment.