Skip to content

Commit

Permalink
Merge pull request #2089 from bcgov/feature/EAC-8
Browse files Browse the repository at this point in the history
EAC-8 (Minor changes)
  • Loading branch information
arcshiftsolutions authored Oct 28, 2024
2 parents cb9cfeb + 46fc3b2 commit 0b6dad6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions frontend/src/components/assessments/AssessmentSessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
:scrollable="true"
:persistent="true"
max-width="40%"
min-height="35%"
min-height="28%"
>
<EditSession
v-if="editSessionSheet"
Expand Down Expand Up @@ -99,8 +99,9 @@ export default {
pageNumber: 1,
allsessions: [],
headers: [
{ title: 'Month', key: 'courseMonth' },
{ title: 'Year', key: 'courseYear' },
{ title: 'School Year', key: 'schoolYear' },
{ title: 'Course Month', key: 'courseMonth' },
{ title: 'Course Year', key: 'courseYear' },
{ title: 'Open Date', key: 'activeFromDate' },
{ title: 'Close Date', key: 'activeUntilDate' },
],
Expand Down Expand Up @@ -128,7 +129,7 @@ export default {
return orderedSessions;
},
historicalSessions() {
return this.allsessions
const allsessions = this.allsessions
.filter((session, index) => index >= this.topN)
.map((session) => {
return {
Expand All @@ -138,6 +139,8 @@ export default {
courseMonth: this.formatMonth(session.courseMonth),
};
});
allsessions.sort((a, b) => new Date(b.activeUntilDate) - new Date(a.activeUntilDate));
return allsessions;
},
sessionHeaderSlotName() {
return `column.${this.sessionid}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
v-model="editSession.activeUntilDate"
label="Close Date"
model-type="yyyy-MM-dd'T'00:00:00"
:rules="[rules.endDateRule(editSession.activeFromDate, editSession.activeUntilDate)]"
:rules="[rules.endDateRule(editSession.activeFromDate, editSession.activeUntilDate), rules.required()]"
:allow-teleport="true"
@update:model-value="validateForm"
@clear-date="clearCloseDate"
Expand Down

0 comments on commit 0b6dad6

Please sign in to comment.