-
Notifications
You must be signed in to change notification settings - Fork 66
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
Arf.78633/arp mock data #16218
Arf.78633/arp mock data #16218
Conversation
9ad0abe
to
d63e1dc
Compare
d63e1dc
to
1ab5c9f
Compare
772df06
to
c99da5d
Compare
Generated by 🚫 Danger |
5f63692
to
4f46ecc
Compare
Added a LH API cutover note, too. See PR: https://github.com/department-of-veterans-affairs/vets-api/pull/16125/files
4f46ecc
to
fef5373
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.
This looks great! Small question and some praise, loaded this up locally and looks good there too! Great work👌
# Currently reads from a static JSON file as a data source. | ||
# @return [Hash] A hash containing the filtered records and metadata. | ||
def call | ||
file_path = Rails.root.join('modules', 'accredited_representative_portal', 'spec', 'fixtures', |
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.
Praise - Nice!
# is available. For more information on the transition plan, refer to: | ||
# https://app.zenhub.com/workspaces/accredited-representative-facing-team-65453a97a9cc36069a2ad1d6/issues/gh/department-of-veterans-affairs/va.gov-team/80195 | ||
def update_poa_request(proc_id, action) | ||
# TODO: Update the below to use the RepresentativeUser's profile data |
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.
Praise - Love these comments, makes figuring out future work much easier!
# id = params[:id] | ||
# NOTE: the below is a placeholder for the acceptance logic | ||
render json: { message: 'Accepted' }, status: :ok | ||
id = params[:proc_id] |
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.
Should we add this to permitted_params?
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.
Refresher on strong params: https://guides.rubyonrails.org/action_controller_overview.html#strong-parameters
I think the framework protects the developer to notice a bunch of cases that there are multiple parameters that haven't explicitly been permitted, but explicitly using a single key is not such a case which makes sense.
Here's one of the cases where it automatically helps you. Getting a slice returns a new Parameter object that is still permitted: false:
irb(main):001* params = ActionController::Parameters.new({
irb(main):002* person: {
irb(main):003* name: "Francesco",
irb(main):004* age: 22,
irb(main):005* role: "admin"
irb(main):006* }
irb(main):007> })
=> #<ActionController::Parameters {"person"=>{"name"=>"Francesco", "age"=>22, "role"=>"admin"}} permitted: false>
irb(main):008> params[:person]
=> #<ActionController::Parameters {"name"=>"Francesco", "age"=>22, "role"=>"admin"} permitted: false>
irb(main):009> params[:person].slice(:name)
=> #<ActionController::Parameters {"name"=>"Francesco"} permitted: false>
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.
LGTM
See frontend PR: department-of-veterans-affairs/vets-website#29034
Summary
Description
While we do not yet have a
GET /veteran-service-organizations/power-of-attorney-requests
LH Claims API endpoint, we should consider building some mock data that we can use to support further development and staging demos.Prerequisites/Dependencies
GET /veteran-service-organizations/power-of-attorney-requests
. See this issue for more details.Related issue(s)
https://app.zenhub.com/workspaces/accredited-representative-facing-team-65453a97a9cc36069a2ad1d6/issues/gh/department-of-veterans-affairs/va.gov-team/78633
Loosely based on @nihil2501's Dash PR and ongoing LH work
Testing done
What areas of the site does it impact?
The ARP Engine
Acceptance criteria
power_of_attorney_requests
ARP Engine PowerOfAttorneyRequestsController#index returns mock POA requests.