From f8c91b46cdc35235524b493a45c480ce7f1fe40d Mon Sep 17 00:00:00 2001 From: viehlieb Date: Fri, 17 Feb 2023 15:31:36 +0100 Subject: [PATCH] wip plugin --- .../show/replace_send_to_supplier_button.html.haml.deface | 5 ++--- plugins/bnn_upload/lib/foodsoft_bnn_upload.rb | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface b/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface index 7343529c..49a38576 100644 --- a/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface +++ b/plugins/bnn_upload/app/overrides/orders/show/replace_send_to_supplier_button.html.haml.deface @@ -1,6 +1,5 @@ -/ replace 'erb:contains("send_result_to_supplier")' +/ replace '#send_button' - if FoodsoftBnnUpload.enabled? - - raise = link_to t('.send_to_supplier'), send_result_to_supplier_modal_order_path(@order), remote: true, - class: "btn#{' btn-primary' unless @order.last_sent_mail}", + class: "btn#{' btn-primary', data: {confirm: @order.last_sent_mail && t('.confirm_send_to_supplier', when: format_time(@order.last_sent_mail)) } \ No newline at end of file diff --git a/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb b/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb index 983cb3f1..66d7d279 100644 --- a/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb +++ b/plugins/bnn_upload/lib/foodsoft_bnn_upload.rb @@ -1,3 +1,4 @@ +require "deface" require 'foodsoft_bnn_upload/engine' module FoodsoftBnnUpload