Conversation
8d99165 to
dc5026d
Compare
b153bcf to
79601e6
Compare
Current Code Coverage Percent of this PR:83.86 %Files having coverage below 100%
|
sudeeptarlekar
suggested changes
May 11, 2022
|
|
||
| context "when no filters or search are applied" do | ||
| it "returns list of all projects" do | ||
| user_id, client_id, billable, search = nil |
Contributor
There was a problem hiding this comment.
Please use let for these assignments, you can then tweak single value in context based on requirement.
e.g. you can only tweak search in next context. This way it will become much more cleaner.
Thoughts?
Please follow same comments for another method added
Contributor
Author
There was a problem hiding this comment.
yes, but in one of the examples, we have all the filters, which means we will have 11 lets, which rubocop doesn't allows, so keshav suggested this way.
a0d94f6 to
0e5e506
Compare
added 11 commits
May 22, 2022 21:07
0e5e506 to
b464c18
Compare
vipulnsward
pushed a commit
that referenced
this pull request
Feb 15, 2026
* project filter * project search * added current_company clients_list and users_list * minor fix * removed the repeated code * alignment * revert few file * minutes spent fixed * updated company specs and index_spec of projects * temp camelcase ruby variables * removed non imp files * revert timesheet.rb and schema * update git ignore * added line to gitignore * updated few test cases for company.rb * test for project filter project_list_query method * removed comments from project controller
This file contains hidden or 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
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.
Notion card
https://saeloun.notion.site/Filter-on-Projects-list-Page-7437280cf75d4a6ab33dd51221443fb9
Added Search for projects
Added Client filter for projects
Added User filter for projects
Optimised project index page query, previously we were making 11 DB request, reduced it to 2
API : http://127.0.0.1:3000/internal_api/v1/projects?search=Project_1_Client_1_saeloun_India&user_id[]=1&client_id[]=1&billable=false
{ "projects": [ { "id": 1, "name": "Project_1_Client_1_saeloun_India", "clientName": "client_1_saeloun_India", "isBillable": false, "minutesSpent": 10560.0 } ], "clients": [ { "id": 1, "name": "client_1_saeloun_India" }, { "id": 2, "name": "client_2_saeloun_India" }, { "id": 5, "name": "mMicrosoft" } ], "teamMembers": [ { "id": 1, "userName": "Vipul A M" }, { "id": 4, "userName": "Keshav Biswa" }, { "id": 5, "userName": "Rohit Joshi" }, { "id": 3, "userName": "Akhil G Krishnan" }, { "id": 2, "userName": "Supriya Agarwal" } ] }Type of change
Checklist: