Skip to content

Commit

Permalink
Release Fixes (Duplicate semesters, broken course menu) (#448)
Browse files Browse the repository at this point in the history
* Reset sem props for add sem modal

* Stop errors if credit range is undefined
  • Loading branch information
willespencer authored Apr 4, 2021
1 parent cde918d commit 9a389e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Course/Course.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
@delete-course="deleteCourse"
@color-course="colorCourse"
@edit-course-credit="editCourseCredit"
:getCreditRange="getCreditRange"
:getCreditRange="getCreditRange || []"
v-click-outside="closeMenuIfOpen"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modals/CourseMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
class="courseMenu-section"
@mouseover="setDisplayEditCourseCredits(true)"
@mouseleave="setDisplayEditCourseCredits(false)"
v-if="getCreditRange[0] != getCreditRange[1]"
v-if="getCreditRange && getCreditRange[0] != getCreditRange[1]"
>
<img
v-if="isLeft"
Expand Down
5 changes: 5 additions & 0 deletions src/components/Modals/NewSemester.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export default Vue.extend({
default: null,
},
isEdit: { type: Boolean, default: false },
isSemesterAdd: { type: Boolean, default: false },
year: { type: Number, default: 0 },
type: { type: String as PropType<FirestoreSemesterType>, default: '' },
isCourseModelSelectingSemester: { type: Boolean, default: false },
Expand Down Expand Up @@ -287,6 +288,10 @@ export default Vue.extend({
} else {
this.yearText = 0;
}
if (this.isSemesterAdd) {
this.$emit('updateSemProps', this.seasonPlaceholder, Number(this.yearPlaceholder));
}
},
resetDropdowns() {
// reset season dropdown
Expand Down
1 change: 1 addition & 0 deletions src/components/Modals/NewSemesterModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<new-semester
:currentSemesters="semesters"
:isEdit="false"
:isSemesterAdd="true"
:isCourseModelSelectingSemester="false"
@duplicateSemester="disableButton"
@updateSemProps="updateSemProps"
Expand Down

0 comments on commit 9a389e7

Please sign in to comment.