-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expend assigned user selection filter for all the site (#34)
* first version of input blood tests * necessary permission fixes in lab_tests_controller * release manual input blood tests * manual input blood tests results * tests part * Fix errors and pass tests for RuboCop * updated bundle and passed rubocop tests * bundle updated, passed rubocop tests * found and fixed bug with a colors in tests. Passed rubocop and rspec. * fixed by recommendations by Anton * pass tests * fixes for rubocop tests pass * Fixed a few errors, but I have trouble with tests passing for negative value. * new lab test input fixed * manual input with test * factory users added * rubocop rules added * merged with a develop branch and fixed rubocop offenses * some fixes * answers for comments and small fixes * merged with develop branch, changed user selection same as Anton in lab tests table filtration * all tests is passed * moved set_biomarkers to before_action * small fixes related with comments * renamed method from determine_user to set_user and all test is passed * DS_Store deleted from git * fixed policy_scope in reference ranges * removed addtional reinit lab_test in lab_tests_controller * removed @Biomarker from index of reference ranges * edited message to correct grammatically view * edit refenrence ranges controller, index method, back var biamarker and changed policy_scope from all to reference_ranges * Add params comment for assigned_users_list_for_select * Add rubocop-capybara * Remove turbo from lab_test show view * Remove unused code * Add rubocop-capybara to GH actions workflow to fix pipeline * fixed error with empty list of assigned users and creation new lab test with a user rights * fixed testing - when the user has no assigned users, changed to recieving array with a current user * Add TODO * Expend assigned user selection filter for all the site --------- Co-authored-by: Volodymyr Shynkarov <[email protected]>
- Loading branch information
1 parent
618132b
commit b85daee
Showing
16 changed files
with
232 additions
and
68 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,13 @@ | ||
<section> | ||
<%= turbo_frame_tag "lab_tests", class: "shadow overflow-hidden rounded border-b border-gray-200" do %> | ||
|
||
<header class="tw-my-2 tw-flex tw-flex-center tw-justify-between tw-items-center"> | ||
<h1 class="tw-text-lg">Lab Tests</h1> | ||
|
||
<% if assigned_users? %> | ||
<div class="flex justify-end mb-1"> | ||
<%= form_with url: lab_tests_path, method: :get, data: { controller: "search-form", search_form_target: "form", turbo_frame: "lab_tests" } do |form| %> | ||
<%= form.select :user_id, | ||
options_for_select( | ||
assigned_users_list_for_select(current_user, current_user), | ||
@chosen_user_id | ||
), | ||
{ include_blank: false }, | ||
class: "border-blue-500 rounded", | ||
data: { | ||
action: "change->search-form#search" | ||
} | ||
%> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<%= button_to new_lab_test_path, | ||
data: { turbo_frame: "_top" }, # This will load in the full page | ||
method: :get, | ||
class: "btn btn-primary" do %> | ||
New Lab Test | ||
<% end %> | ||
</header> | ||
|
||
<%= render "index_table", recordables: @recordables, biomarkers: @biomarkers %> | ||
|
||
<% end %> | ||
|
||
<header class="tw-my-2 tw-flex tw-flex-center tw-justify-between tw-items-center"> | ||
<h1 class="tw-text-lg">Lab Tests</h1> | ||
<%= link_to "New Lab Test", | ||
new_lab_test_path, | ||
method: :get, | ||
class: "btn btn-primary", | ||
data: { turbo_frame: "_top" } | ||
%> | ||
</header> | ||
|
||
<%= render "index_table", recordables: @recordables, biomarkers: @biomarkers %> | ||
</section> |
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
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
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
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
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
Oops, something went wrong.