-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Fix logic surrounding case contacts with no reimbursements #5708
Merged
compwron
merged 6 commits into
rubyforgood:main
from
yosefbennywidyo:fix-logic-surroundin-case-contacts-with-no-reimbursements
May 12, 2024
Merged
Fix logic surrounding case contacts with no reimbursements #5708
compwron
merged 6 commits into
rubyforgood:main
from
yosefbennywidyo:fix-logic-surroundin-case-contacts-with-no-reimbursements
May 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Conditionally set case contact status to current step when: - Case contact is not active. - :case_contact parameter is present in the request. - Simplified logic by removing unnecessary conditional block.
- Replaced `params.require(:case_contact)` with `params.fetch(:case_contact, {})` to gracefully handle cases where the :case_contact parameter is missing in the request. - This prevents potential errors caused by calling `permit` on a non-existent hash.
- remove temporary fix to ensure something is always submitted
- fix fill_in Effective date field with correct date format: `dd/mm/yyyy`
yosefbennywidyo
requested review from
compwron,
FireLemons and
littleforest
as code owners
May 11, 2024 07:28
github-actions
bot
added
ruby
Pull requests that update Ruby code
Tests! 🎉💖👏
erb
labels
May 11, 2024
- Introduced `set_case_contact` filter for DRYness. - Applied `set_case_contact` filter before `show` and `update` actions. - Removed duplicate fetching of `@case_contact` in those actions.
yosefbennywidyo
force-pushed
the
fix-logic-surroundin-case-contacts-with-no-reimbursements
branch
from
May 11, 2024 20:43
ca31f6a
to
57c08d7
Compare
compwron
approved these changes
May 12, 2024
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.
:) !
yosefbennywidyo
deleted the
fix-logic-surroundin-case-contacts-with-no-reimbursements
branch
May 12, 2024 01:54
iamronakgupta
added a commit
to iamronakgupta/casa
that referenced
this pull request
May 31, 2024
…ecause current PR removed expense step when both the expenses are disabled
elasticspoon
added a commit
that referenced
this pull request
Jun 9, 2024
* form_step method added in case_contact * form steps are dynamically changed according to case_contact * fixed standardrb lint * Submit click removed as it is not available when expenses are disabled * revert back parasm code of #5708 as it no longer crashes because current PR removed expense step when both the expenses are disabled * save and continue button on notes page will changes to submit button if last step is notes * notes page will have submit button instead of save and continue button when driving reimbursement and other expenses are disabled * replaced CaseContact:FORM_STEPS with form_steps method * casa_org_any_expenses_enabled? method added to check if casa_org has any expenses enabled * form submit button component added * replaced conditional logic with component for submit button * form submit_button_component added * method added for text conditional logic * button_tag moved from notes to button componentd * test cases fixed * fixed standardrb lint * fix: extra line added to fix erb-lint * Update submit_button_component.html.erb * fix: erb_lint submit button --------- Co-authored-by: elasticspoon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #5666
What changed, and why?
Fix logic surrounding case contacts with no reimbursements
How is this tested? (please write tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
URL: http://localhost:3000/mileage_rates/
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)