Add comment to make sure both out of stock modal get updated.

There is no easy way to share template between AngularJS and Rails. The
modal in `edit.html.haml` is a copy of app/assets/javascripts/templates/out_of_stock.html.haml,
so we need to update both if either of them is updated.
This commit is contained in:
Gaetan Craig-Riou
2025-02-04 15:16:43 +11:00
parent 0315fc9690
commit 8db2445203
2 changed files with 2 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
// please update the modal html in app/view/checkout/edit.html.haml if updating this template
%a.close-reveal-modal{"ng-click" => "$close()"}
%i.ofn-i_009-close

View File

@@ -20,9 +20,9 @@
= render partial: "shopping_shared/order_cycles"
%div{ "data-controller": "guest-checkout", "data-guest-checkout-distributor-value": @order.distributor.id }
= #TODO create new component ? reuse out_of_stock.html.haml template
- if @any_out_of_stock
= render ModalComponent.new(id: "out-of-stock-items", modal_class: "medium" ,instant: true, close_button: false) do
- # please update app/assets/javascripts/templates/out_of_stock.html.haml if updating the modal html
%a.close-reveal-modal{"data-action": "click->modal#close" }
%i.ofn-i_009-close
%h3