Skip to content

Commit

Permalink
WIP #2214 added icon to view vendor from product view (#2215)
Browse files Browse the repository at this point in the history
Co-authored-by: KZE-THONG <[email protected]>
  • Loading branch information
mengthong-ly and mengthong-ly authored Jan 3, 2025
1 parent 5691c8f commit e71fc8e
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- replace "[data-hook='admin_product_form_vendor']" -->

<% if current_spree_user.respond_to?(:has_spree_role?) && current_spree_user.has_spree_role?(:admin) %>
<div data-hook="admin_product_form_vendor">
<%= f.field_container :vendor, class: ['form-group'] do %>
<label class="d-flex">
<span class="mr-2"><%= Spree.t(:vendor) %></span>
<%= link_to_with_icon 'arrow-right-circle.svg', Spree.t(' '), spree.edit_admin_vendor_path(@product.vendor_id), class: "d-flex align-items-center" do %>
<i class="bi bi-arrow-right-circle me-1"></i>
<% end %>
</label>
<%= f.collection_select(:vendor_id,@vendors,:id,:name,{ include_blank: Spree.t('match_choices.none') },{ class: 'select2' }) %>
<%= f.error_message_on :vendor %>
<% end %>
</div>
<% end %>

0 comments on commit e71fc8e

Please sign in to comment.