Skip to content

Commit

Permalink
openfoodfoundation#11068, add product_actions_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
chahmedejaz committed Dec 20, 2023
1 parent bf0943e commit 2f0965a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/admin/products_v3/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
- delete_product_modal = ConfirmModalComponent.new(id: "delete_product",
confirm_button_text: t('.delete_product_modal.confirmation_text'),
cancel_button_text: t('.delete_product_modal.cancellation_text'),
confirm_button_color: :red)
confirm_button_color: :red,
controller: "product-actions",
confirm_actions: "click->product-actions#delete",
confirm_reflexes: nil)
= render delete_product_modal do
.margin-bottom-30
= t('.delete_product_modal.prompt_html')
Expand Down
9 changes: 9 additions & 0 deletions app/webpacker/controllers/product_actions_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import ApplicationController from "./application_controller";

export default class extends ApplicationController {
static values = {currentId: Number, currentVariantId: Number};

delete() {

}
}

0 comments on commit 2f0965a

Please sign in to comment.