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

Profile-Calendar and SOC-Search Implementation #29

Open
wants to merge 25 commits into
base: experimental
Choose a base branch
from

Conversation

p8gonzal
Copy link

@p8gonzal p8gonzal commented Jun 9, 2022

Summary

Relevant Files and Changes:

Profile + Calendar
main.dart
Checking if token is being passed in (will be true when Campus Mobile opens Webreg-Mobile).
If not, will redirect to authentication_sso.dart

authentication_sso.dart
Will redirect user to SSO login page. Once logged in, will capture token from URL and redirect to bottom.dart (Main page)

bottom.dart
Main page calls two objects of Calendar( calendarType: ). Type for classes + discussion: 'LECT_DISC’. Type for finals: ‘FINALS’.

calendar.dart
Initializes an instance of the profile provider from providers/profile.dart. Begins by creating a future builder of profileProvider.fetchProfile(). Once call is complete, creates section cards of type CalendarCard from calendar_card.dart from a Profile Model from models/profile.dart. Main method to create cards is buildCalendarCard(String sectionType, SectionData sectionObject).

providers/profile.dart
Change Notifier containing profile service from services/profile.dart and profile model models/profile.dart.

service/profile.dart
Employs Network Helper to call the user’s profile service. Will be replaced later with live APIs. Currently using mock lamda + api gateway: ‘https://i4ghbvwuo9.execute-api.us-west-2.amazonaws.com/qa/profile'

models/profile.dart
Top level of ‘enrolled classes’ but is composed of smaller data models in models/schedule_of_classes.dart. Particularly SectionData.

Schedule Of Classes + Search
search_view.dart
Initializes an instance of the schedule of classes provider from providers/schedule_of_classes.dart. Upon first run of this search, we get current term and previous terms in order to fill in term selector. Done with a future builder calling from classesProvider.scheduleOfClassesService.fetchTerms() from services/schedule_of_classes.dart. Once complete and query is entered, query will be parsed and generate a search input. Then a future builder will call classesProvider.fetchClasses(searchBuilder). Once complete, results list will be generated. Upon selecting an item in results list, redirected to an instance of SearchDetail(data: course) where course model is passed in (models/schedule_of_classes.dart). Search Detail implemented in search_detail.dart.

search_detail.dart
Unpacks CourseData model and displays different section options. UI heavy file.

providers/schedule_of_classes.dart
Change notifier holding references to the corresponding service and model.

models/schedule_of_classes.dart
Contains different models to parse data from live API: ScheduleOfClasses. Models include: CourseData: Top layer containing list of sections available for a course, Section Data: Second Layer holding information about professor, room, etc and MeetingData: Times for labs, discussions, lectures, etc.

services/schedule_of_classes.dart
Handles calls to academic term lambda: https://o17lydfach.execute-api.us-west-2.amazonaws.com/qa-peter/v1/term/current and schedule of classes api.

Changelog

[General] [Add] - Created new services and providers to implement some webreg functionality.

Test Plan

Notes:
Calendar will still scroll incorrectly as described in #26 . Fixed could not be applied due to change in widget structure.
Relevant files listed above. Other changed files are result of changed styling or previous developers.
Client_ID in authentication_sso.dart is missing to avoid exposing key.

@p8gonzal p8gonzal changed the title Profile Profile-Calendar and SOC-Search Implementation Jun 9, 2022
@p8gonzal p8gonzal requested a review from c3bryant June 9, 2022 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants