thecore_print_commons 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 829ba6967db5702fbb81b06cf5ecc8675789f3db08a5daf40077cf0c68379e04
4
- data.tar.gz: 7f1fe99c3304ed59b4ada9213f9ea1ebcf533520c42680311c62e8302b27559a
3
+ metadata.gz: 9d1b92c4037ed26563a1e1d0e5f25f227031ff4c0a8e53dc10f17eedb99b10f5
4
+ data.tar.gz: deacf2f9bbcd581b3b333aac24ed4e70dd257f86f5dad91adad804be6a9e245b
5
5
  SHA512:
6
- metadata.gz: 8f939959025e29f4f2aaf69fc7efcc9c5bca00298a8699f4606957934148b1eeff3714d99e1434f27748f59e60df5ebaf084f2f08c67621f24917e866cb036c5
7
- data.tar.gz: b0b4640b62e77e8f249f56de12700829da1dd5f9119c768ba49930d277c01fbe0cedc4b7ea2710436cd9f3071f796332535678589cb1780e3bc5b0827f6b0117
6
+ metadata.gz: b0b8a1316816c8f56fc18b7e16044c97ae191c98f5f269c5839bf273e7ac6e031caf04e18b212184269f7511ff907759903d4b28f595b0bc10d86fe812e84497
7
+ data.tar.gz: 07e92ae60c6d391b40220e21e349bf14635b45e1fb2344c8008ac0c1dae72a5ddc4abd8407c5f2107ab3bf0d15b2c45389d5d24db2eea3382686f66c4e1ca4c5
@@ -27,7 +27,7 @@ module Api::Printer
27
27
  # { test: [ :first, :second, :third ], id: id, params: params}
28
28
  # end
29
29
 
30
- def self.custom_action_print_single_barcode id, params
30
+ def self.custom_action_print_single_barcode params
31
31
  # Example Usage:
32
32
  # item = ::Item.joins(:projects).where(projects: {id: params[:order_id].to_i}).first
33
33
  # printer = ::Printer.where(supplier_id: current_user.supplier_id, default: true).first
@@ -36,7 +36,7 @@ module Api::Printer
36
36
  # # Preso l'ordine mi recupero l'item e ne stampo la quantità richiesta
37
37
  # ::PrintWorker.perform_async(printer.ip, text)
38
38
 
39
- printer = Printer.find(id)
39
+ printer = Printer.find(params[:id])
40
40
  text = printer.print_template.template.gsub(printer.print_template.translation_matrix.lines.first, params[:barcode])
41
41
  ::PrintWorker.perform_async(printer.ip, printer.port, text)
42
42
  { info: "Print job sent in background to #{printer.ip} on port #{printer.port}" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni