Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar redesign #843

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 45 additions & 24 deletions src/web/src/components/CourseList.vue
Original file line number Diff line number Diff line change
@@ -1,38 +1,55 @@
<template>
<div class="d-flex flex-column flex-grow-1">
<div class="course-search">
<b-form-group label="Search" label-for="search">
<!--label="Search"-->
<b-form-group label-for="search">
<b-form-input
id="search"
v-model="textSearch"
:debounce="debounceTime"
placeholder="Intro to College - COLG 1030"
placeholder="Search: Intro to College - COLG 1030"
list="list-id"
></b-form-input>
</b-form-group>

<b-row>
<!-- >2 b/c default ALL option always present -->
<b-col v-if="subsemesterOptions.length > 2">
<b-form-group label="Filter Sub-Semester" for="sub-semester">
<b-form-select
v-model="selectedSubsemester"
:options="subsemesterOptions"
></b-form-select>
</b-form-group>
</b-col>
<b-col>
<b-form-group label="Filter Department" for="department">
<b-form-select
v-model="selectedDepartment"
:options="departmentOptions"
></b-form-select>
</b-form-group>
</b-col>
</b-row>
<b-button
@click="toggleFilterPrompt();"
size="sm"
style="margin-right: 5px;"
>
Filters
</b-button>
<b-button
@click="resetFilters();"
size="sm"
variant="danger"
>
Reset
</b-button>
<b-modal id="courseFilters" title="Course Filters" size="sm">
<b-col>
<b-row v-if="subsemesterOptions.length > 2">
<b-form-group label="Filter Sub-Semester" for="sub-semester">
<b-form-select
v-model="selectedSubsemester"
:options="subsemesterOptions"
></b-form-select>
</b-form-group>
</b-row>
<b-row>
<b-form-group label="Filter Department" for="department">
<b-form-select
v-model="selectedDepartment"
:options="departmentOptions"
></b-form-select>
</b-form-group>
</b-row>
</b-col>
</b-modal>

</div>
<!-- Start of Dynamic Scrolling Rendering To Account For Varying Course Data. > -->
<hr />
<hr>
<div id="scroll-box" data-cy="course-list">
<div v-if="filterCourses.length == 0" class="no-courses">
Oops, no results!
Expand Down Expand Up @@ -124,8 +141,12 @@ export default {
});
},
methods: {
courseInfoModalToggle(course) {
this.$emit("showCourseInfo", course);
resetFilters() {
this.selectedDepartment=null;
this.selectedSubsemester=null;
},
toggleFilterPrompt() {
this.$root.$emit("bv::show::modal", "courseFilters");
},
/* wrapper for querying with search */
// todo: get courses should be changed
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ export default {
};
</script>

<style></style>
<style></style>
6 changes: 3 additions & 3 deletions src/web/src/pages/NewCourseScheduler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<b-card no-body class="h-100">
<b-tabs card class="h-100 d-flex flex-column flex-grow-1">
<b-tab
title="Course Search"
title="Search"
active
class="flex-grow-1 w-100"
data-cy="course-search-tab"
Expand Down Expand Up @@ -64,7 +64,7 @@
class="text-center"
data-cy="selected-courses-tab-header"
>
Selected Courses
Selected
<b-badge
variant="light"
data-cy="num-selected-courses"
Expand All @@ -74,7 +74,7 @@
</div>
</template>
<b-card-text
class="w-100 d-flex flex-grow-1 flex-column"
class="w-1500 d-flex flex-grow-1 flex-column"
>
<SelectedCourses
:courses="selectedCourses"
Expand Down
Loading