You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a delete button to the purchase show page, hooked to the existing destroy action in the Purchase controller. Restricts deletion of a purchase to organization and super admin. (#1646)
Copy file name to clipboardExpand all lines: app/views/purchases/show.html.erb
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,7 @@
69
69
</div>
70
70
<divclass="card-footer">
71
71
<%=edit_button_toedit_purchase_path(@purchase),{text: "Make a correction",size: "md"}%>
72
+
<%=delete_button_topurchase_path(@purchase),{size: "md",confirm: "Are you sure you want to permanently remove this purchase?"}ifcurrent_user.organization_admin?%>
0 commit comments