18F / e-manifest

The EPA e-Manifest project
Other
11 stars 11 forks source link

Changes to show.html.erb (search data) #180

Closed scottdchristian closed 8 years ago

scottdchristian commented 8 years ago

show.html.erb is not displaying properly. This is an attempt to fix some of the more glaring issues. There are more, I want to fix these first. As with last time, at this time I do not know how to use Travis.

Details of changes:

Page: show.html.erb at https://github.com/18F/e-manifest/blob/master/app/views/manifests/show.html.erb Needed changes per https://trello.com/c/IeNIypEw Looking at for comparison: JSON: https://github.com/18F/e-manifest/blob/a97e43f9366e10298fcd72304bb491248f0c1ddc/public/schemas/post-manifest.json MODEL: https://github.com/18F/e-manifest/blob/24e82c0de8115afa727b05d983c73eed6b976b1b/app/models/manifest.rb

Here are the changes made. Line 28 from

<%= t['company_name'] %>
to

<%= t['name'] %>

JSON has this as name and MODEL does not over ride it, like generator and designated facility are overridden.

Lines 34-44 from

Designated Facility

Company Name
<%= @manifest.tracking_number %>
Mailing Address
<%= @manifest.tracking_number %>
Phone
U.S. EPA ID Number

To and reasons in line

Designated Facility

Company Name
<%= @manifest.designated_facility_name %>
“Company name has an alias in MODEL and is used in the original code lower on the page, so used it”
Mailing Address
<%= @manifest.designated_facility.address["address_1"] %>
“JSON has this as designated_facility.address and MODEL does not over ride it, unlike generator address. Same for the next three lines” <%= @manifest.designated_facility.address["address_2"] %>
<%= @manifest.designated_facility.address["city"] %>, <%= @manifest.@manifest.designated_facility.address["state"] %> <%= @manifest.@manifest.designated_facility.address["zip_code"] %>
Phone
@manifest.designated_facility.phone_number
“JSON has this as designated_facility.phone_number and MODEL does not over ride it.” Lines 46-48 (originally) From

Waste

<% @manifest.manifest_items.each_with_index do |m, i| %>

MM <%= i + 1 %>

To

Waste

<% @manifest.manifest_items.each_with_index do |m, i| %>

Manifest Line Item <%= i + 1 %>

Reason Manifest Line Item made more sense to me than MM Lines 100,101 (originally) From
Disposal Facility
<%= @manifest.disposal_facility %>
to
Designated Facility
<%= @manifest.designated_facility_name %>
Reason, disposal facility does not exist in JSON, it’s in the MODEL, but does not reference anything. Used the proper name from MODEL.
brandocalrissian commented 8 years ago

I think the PR needs to be recreated. The commit in the PR doesn't match the docs above in the PR. The commit (https://github.com/scottdchristian/e-manifest/commit/8610dc27b1743683d3224cbbf471d4fc1b49d208) seems to accidentally duplicate a handful of lines and I'm pretty sure that's not what you mean. Maybe changes weren't push from local up to the origin/github?

scottdchristian commented 8 years ago

Oddity from Git Desktop, older code from 168 was posted and not the code I intended to submit. Closing and opening a new one