add printer brand and api and type
This commit is contained in:
@@ -64,6 +64,17 @@ class PrintSettingsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def get_printer_options
|
||||
printer_name = params[:printer_name]
|
||||
printer_options = Printer::PrinterWorker.printer_options(printer_name)
|
||||
options = {
|
||||
:url => printer_options['device-uri'],
|
||||
:model => printer_options['printer-info'],
|
||||
}
|
||||
|
||||
render :json => options.to_json
|
||||
end
|
||||
|
||||
private
|
||||
# Use callbacks to share common setup or constraints between actions.
|
||||
def set_print_setting
|
||||
@@ -72,7 +83,7 @@ class PrintSettingsController < ApplicationController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def print_setting_params
|
||||
params.require(:print_setting).permit(:name, :unique_code, :template, :printer_name, :font, :api_settings, :page_width, :page_height, :print_copies,:precision,:delimiter,:heading_space)
|
||||
params.require(:print_setting).permit(:name, :unique_code, :template, :printer_name, :brand_name, :printer_type, :font, :api_settings, :page_width, :page_height, :print_copies,:precision,:delimiter,:heading_space)
|
||||
end
|
||||
|
||||
#Shop Name in Navbor
|
||||
|
||||
Reference in New Issue
Block a user