Skip to content

Commit

Permalink
Replace row for query selector
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusdeap committed Oct 11, 2023
1 parent a7bfb2c commit 38f4b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/estimates/create.js.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(){
<% if @estimate.persisted? %>
<%= render partial: 'update_row', locals: {estimate: @estimate} %>
const addEstimate = row.querySelector('.add-estimate')
const addEstimate = document.getElementById("story_<%= @estimate.story_id %>").querySelector('.add-estimate')
addEstimate.insertAdjacentHTML('afterend', "<%= j(link_to 'Edit Estimate', edit_project_story_estimate_path(@project.id, @estimate.story, @estimate.id), class: "button edit-estimate", remote: true) %>")
addEstimate.remove()
closeModal()
Expand Down

0 comments on commit 38f4b44

Please sign in to comment.