-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add fee or salary information to course offer pages #6879
Add fee or salary information to course offer pages #6879
Conversation
01641a7
to
7fbf5de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good to me. I think some of the free text fields need to rendered with markdown.
Are you planning on plucking the migration out into a separate PR so that it can be shipped first, to avoid errors?
Thanks @frankieroberto, that's good feedback. I've made those changes. Yes we'll merge the migrations PR first in #6915 . Will leave it in this PR too for now so that we can review more easily. |
6a4b6fb
to
421c231
Compare
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
20ad8c1
to
84a902e
Compare
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
Code Coverage
Line vs. Branch coverageBranch coverage concerns itself with whether a particular branch of a condition had been executed. def do_something_with_even_numbers(number) return if number.odd? ... If all the code in the method was covered you would never know if the guard clause was ever triggered with line coverage as just evaluating the condition marks it as covered. |
- Add conditionals for rendering each row (in the correct position within the array) - Add fee_row_value method to allow for further conditionals, i.e only display the international section if populated in the db.
- `fee_details` can be nil, therefore we need to account for this. - Refactor HTML
Add extra test cases
5aa46d0
to
1db8d50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed we think we should keep the markdown processing where it is so the idea of moving it to the course sync only makes sense if we run into performance issues.
Context
In order to remind candidates what the fee or salary is for a course at the point they accept an offer (entering into a "contract"), we should repeat the information from Find within the offer page on Apply.
Changes proposed in this pull request
Add the following columns to the TTAPI course sync:
fee_details
,fee_international
,fee_domestic
andsalary_details
Render Fees row which contains
fee_international
withfee_details
(if fee_details is provided) alongside the amount and thefee_domestic
on a new line if the international fee is notnil
, otherwise only render thefee_domestic
withfee details
(if provided) on the same line.Render the Salary row if the course is
salary
orapprenticeship
. This is just thesalary_details
column.Guidance to review
fee_domestic
and afee_international
so theif
statement without theelse
should be ok, any thoughts or concerns?Screenshots
Link to Trello card
https://trello.com/c/4vI0TOO1/4364-add-fee-or-salary-information-to-course-offer-pages-on-apply
Things to check