cats_core 1.1.23 → 1.1.24

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: 4af6924e969566f74cdb292747651afd308688bc78b8ae4a1f984c9899bc17c8
4
- data.tar.gz: 78efc6656b32a0455345b69e35d11d0a599707b61da25c68177e77c1184c3598
3
+ metadata.gz: 0e1e8fc9828a237ea12abdb6c0cf964aa9e0801ea7c5cb95c638071363c728b6
4
+ data.tar.gz: 2bc4c46c50608f1c12e99f4dbb50562bde3d255922bfb09fa905e15e24ed277e
5
5
  SHA512:
6
- metadata.gz: 48502a731da0f5ebf90a0497b86a8585a3af825b3905936e4701bb2ec991766028630be363c9ec6d79d585f3156753b77736e4fb53b14c9f78231b1242c69ba3
7
- data.tar.gz: 306057c32ef4f4a6636aaf6321a5b80f682465de990cad4c10977928b6dde075b02923bdb4d14195e3bb4774d08843772cb7978cee6b4f1427480ae84c001cd0
6
+ metadata.gz: d66571c610864eda20aea1815fef61697bf83d8cba9063de6623914cdbfdd66d9160bc36575d8e4e688076c813f5982ad6623b8cbc0302340cc42fa35f0eaccc
7
+ data.tar.gz: 2e2205cfc0c14723a269dc4e7d9f4e0d09c67234ab8375a403c05c35ec05c37ec2027acff491b82df87b85c93aa0c5993f4352ea2988d9efc28f5cd28a3a242b
@@ -62,6 +62,7 @@ module Cats
62
62
  def revoke_role
63
63
  role = Cats::Core::Role.find(params[:role_id])
64
64
  @user.roles.delete(role)
65
+ @user.remove_detail(role.name) if ['warehouse_manager', 'hub_manager'].include?(role.name)
65
66
  data = ActiveModelSerializers::SerializableResource.new(role)
66
67
  render json: { success: true, data: data }
67
68
  end
@@ -36,6 +36,11 @@ module Cats
36
36
  save!
37
37
  end
38
38
 
39
+ def remove_detail(key)
40
+ details.delete(key)
41
+ save!
42
+ end
43
+
39
44
  def validate_phone_number
40
45
  return unless phone_number.present?
41
46
 
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.23'.freeze
3
+ VERSION = '1.1.24'.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.23
4
+ version: 1.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.