cats_core 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1edf27e2257545cf71d59da4348838a7d413911a3977e505e9ea38788bbf6bc0
4
- data.tar.gz: 7b11450abaf98eed4cde168465e0f778be42026895d52883760bbe5cb0b571ae
3
+ metadata.gz: dc868538b2dd7c7fc157b0fd2c78c79a38b868c60a12e0e1ce6662a7dac01e3a
4
+ data.tar.gz: d20518593e2a0bc565a47d2b426794c16790bf45f1650feb2c3a7550fb610637
5
5
  SHA512:
6
- metadata.gz: 26de9f25dc8533a8ad33089cedacf51feff5b7ecfba6c08bfa55d811e7672cd4892955bccdd853a7281ec677a31478c9e3f8ecc2e421c79cbdeb34559b15c7d2
7
- data.tar.gz: 26c4b80b13de8a60a02545382205877c8a252beebf2943ca990860a5bd32652d1152b865a90940dc0a55eebfca1c3bde974bfb6dfa07addaf174c59a5e74674a
6
+ metadata.gz: 5447be874ddfaa36956f09550a313ce4078440e0b0be91ceb0cc5d8f035236c71f823ce6f4adf88efba0e4db44a047595e9a56fa84032fe3f3b7c14f9b602126
7
+ data.tar.gz: 44ab9de9141a4957e53f7739a761e1127940b0dfa813ea8503a579a4036b71a6e522a86b029facf406354d0d826e007d1260023ea4daa99e5531a15407288567
@@ -4,7 +4,7 @@ module Cats
4
4
  include Common
5
5
 
6
6
  before_action :set_service, only: %i[create_receipt_authorization approve start search confirm]
7
- before_action :set_dispatch, only: %i[approve start confirm]
7
+ before_action :set_dispatch, only: %i[approve start confirm commodity]
8
8
 
9
9
  def index
10
10
  dispatches = Cats::Core::Dispatch.where(allocation_item_id: params[:id])
@@ -56,6 +56,11 @@ module Cats
56
56
  render json: { success: true, data: serialize(data) }
57
57
  end
58
58
 
59
+ def commodity
60
+ data = @dispatch.allocation_item.allocation.commodity
61
+ render json: { success: true, data: serialize(data) }
62
+ end
63
+
59
64
  private
60
65
 
61
66
  def set_service
data/config/routes.rb CHANGED
@@ -60,6 +60,7 @@ Cats::Core::Engine.routes.draw do
60
60
  resources :dispatches, except: %i[index destroy] do
61
61
  member do
62
62
  get 'receipts', controller: :receipts, action: :index
63
+ get 'commodity'
63
64
  post 'approve'
64
65
  post 'start'
65
66
  post 'confirm'
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.5'.freeze
3
+ VERSION = '1.1.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.