You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* applied filters into the search function using flags in the model, will have to refine more in the filters, but this is great for the demo
* wrote departments filter option
* added check to make sure to not recommend courses the client has taken before
* initial state good
* departments go to model
* trying to add filtering out courses with NULL fields as an implementable filter option, merging with main start as per teams request
* merging into brain?
* some ?. properties check, because skill issue
* more course?. things
* finished the noNull feature, essentially fixed typos
* null course checkbox
* null check linked
* Null field toggle works
* nice and beutiful
* removed the explicit null string checks, hopefully doesnt break, also wrote logic for Period filtering
* period filter
* a bit polishing, touching on the period presenter since i thought its broken, but it was the database dropping all course.period data >:(
* fixed some filters logic (level filter, period filter), added descriptions to most filters tooltips, fixed About us button, touched Tab title to current working title, fixed some other things
* visually persistent filters
* now fixed
* once again
---------
Co-authored-by: benedekboldizsar <bb.boldizsarbenedek@gmail.com>
Copy file name to clipboardExpand all lines: my-app/src/model.js
+31-3Lines changed: 31 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,27 @@ export const model = {
5
5
user: undefined,
6
6
//add searchChange: false, //this is for reworking the searchbar presenter, so that it triggers as a model,
7
7
//instead of passing searchcouses lambda function down into the searchbarview.
8
+
/* courses returned from SearchbarPresenter (search is applied on top of filteredCourses[]) to be shown in the ListView */
8
9
currentSearch: [],
10
+
/* current query text */
9
11
currentSearchText: "",
10
12
scrollPosition: 0,
13
+
/* list of all course objects downloaded from the Firebase realtime database and stored locally as JSON object in this array */
11
14
courses: [],
15
+
/* courses the user selected as their favourite */
12
16
favourites: [],
13
17
isReady: false,
14
-
filtersChange: false,
18
+
/* this is a boolean flag showing that filtering options in the UI have changed, triggering the FilterPresenter to recalculate the filteredCourses[] */
19
+
filtersChange: false,
20
+
/* this is a flag showing if the filteredCourses[] has changed (since FilterPresenter recalculated it), so now SearchBarPresenter needs to
21
+
recalculate currentSearch[] depending this updated list of courses */
15
22
filtersCalculated: false,
16
-
filteredCourses: [],
23
+
/* this is the array that FilterPresenter fills up with course objects, filtered from the model.courses[] */
24
+
filteredCourses: [],
25
+
/* JSON object containing all important parameters the FilterPresenter needs to calculate the filtered list of courses */
17
26
filterOptions: {
27
+
//apply-X-Filter boolean triggering flag wether corresponding filtering functions should run or not
28
+
//different arrays require different data, some uses string arrays, some boolean values, and so on
18
29
applyTranscriptFilter: true,
19
30
eligibility: "weak",//the possible values for the string are: "weak"/"moderate"/"strong"
20
31
applyLevelFilter: true,
@@ -31,7 +42,9 @@ export const model = {
31
42
"ITM/Learning in Engineering Sciences","ITM/Industrial Economics and Management","ITM/Energy Systems","ITM/Integrated Product Development and Design","ITM/SKD GRU",
32
43
"SCI/Mathematics","SCI/Applied Physics","SCI/Mechanics","SCI/Aeronautical and Vehicle Engineering",
33
44
"ABE/Sustainability and Environmental Engineering","ABE/Concrete Structures","ABE/Structural Design & Bridges","ABE/History of Science, Technology and Environment",],
0 commit comments