Fixed the Vendor Module to reflect the address update and edited the styling to keep it consistent with current modules.
This commit is contained in:
parent
12352ef69d
commit
a5a732b9cd
|
@ -40,8 +40,21 @@ class VendorsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def vendor_params
|
def vendor_params
|
||||||
params.require(:vendor).permit(:name, :address, :phone, :email, :dba, :tin, :contact)
|
params.require(:vendor).permit(
|
||||||
end
|
:name,
|
||||||
|
:address_line_1,
|
||||||
|
:address_line_2,
|
||||||
|
:city,
|
||||||
|
:state,
|
||||||
|
:zip,
|
||||||
|
:phone,
|
||||||
|
:email,
|
||||||
|
:dba,
|
||||||
|
:tin,
|
||||||
|
:contact
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<strong>SSN:</strong>
|
<strong>SSN:</strong>
|
||||||
<%= mask_ssn(@participant.ssn) %>
|
<%= @participant.ssn %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<%= render 'form', vendor: @vendor %>
|
<%= render 'form', vendor: @vendor %>
|
||||||
|
|
||||||
<div class="mt-3 d-flex justify-content-between">
|
<div class="mt-3 d-flex justify-content-between">
|
||||||
<%= link_to 'Cancel', vendor_path(@vendor), class: "btn btn-warning" %>
|
|
||||||
<%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %>
|
<%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %>
|
||||||
<%= link_to 'Delete', @vendor, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
|
<%= link_to 'Delete', @vendor, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<strong>Address:</strong>
|
<strong>Address:</strong>
|
||||||
<%= [vendor.address_line_1, vendor.address_line_2, vendor.city, vendor.state, vendor.zip].compact.join(', ') %>
|
<%= [@vendor.address_line_1, @vendor.address_line_2, @vendor.city, @vendor.state, @vendor.zip].reject(&:blank?).join(', ') %>
|
||||||
</p>
|
</p>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<strong>Phone:</strong>
|
<strong>Phone:</strong>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 d-flex justify-content-between">
|
<div class="mt-3 d-flex justify-content-between">
|
||||||
<%= link_to 'Edit', edit_vendor_path(@vendor), class: "btn btn-primary" %>
|
<%= link_to 'Edit', edit_vendor_path(@vendor), class: "btn btn-dark" %>
|
||||||
<%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %>
|
<%= link_to 'Back to List', vendors_path, class: "btn btn-secondary" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue