Skip to content

Commit

Permalink
support edit note
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Jan 5, 2025
1 parent 4b97454 commit 1d3b9a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 6 additions & 0 deletions app/views/trade/in/orders/_base/_index_tr.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
<i class="fa-solid fa-trash text-danger"></i>
<% end %>
</div>
<div data-show-target="item" class="visibility-hidden">
<%= button_to({ action: 'edit', id: model.id }, data: { show_target: 'item' }, class: 'button is-small is-rounded is-light') do %>
<i class="fa-solid fa-pencil text-link"></i>
<span class="ml-1">添加备注</span>
<% end %>
</div>
</td>
</tr>
7 changes: 2 additions & 5 deletions app/views/trade/in/orders/_edit_modal_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<%= form_with theme: 'modal', model: @order, url: { action: 'update' } do |f| %>
<header class="modal-card-head">
<p class="modal-card-title"><%= t('.title') %></p>
<button type="button" data-action="modal#close" class="delete"></button>
</header>
<%= render 'modal_header' %>
<section class="modal-card-body">
<%= f.collection_select :provide_id, current_organ.provides, :id, :name %>
<%= f.text_area :note %>
</section>
<%= f.submit %>
<% end %>

0 comments on commit 1d3b9a4

Please sign in to comment.