c80_shared 0.1.35 → 0.1.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/dicts/role.rb +64 -0
- data/lib/c80_shared/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81472214c2cccc70a5504588491d007aff4f6cf56536ee97a9affd9e009f357e
|
4
|
+
data.tar.gz: 3f51ca06904e6e998e609d8dc25d1bab8ad39a9fe0737f12bd8de8c8d46c8a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d515f2fa95e162d22455b5540c4082a212d9474b2c8ff245b225809c666f4631f43428dc8ebd2abccaf2e8c8537525d147fa04b9a6b98e112a72766d8fbf09
|
7
|
+
data.tar.gz: 02be202b2f295e6524b9a451272a4d4d8fce66f67a520b6a247973b9719877817c56a39d13303c36f100e3424390d0121fc90ff5a13b1a683fdcdfc58f5454f3
|
data/app/dicts/role.rb
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
module Dicts
|
2
|
+
class Role < ::Dict
|
3
|
+
ADMIN = new 4, 'admin'
|
4
|
+
CAPTAIN = new 8, 'captain'
|
5
|
+
BROKER = new 10, 'broker'
|
6
|
+
OWNER = new 11, 'owner'
|
7
|
+
DATA_CONTROLLER = new 13, 'data_controller'
|
8
|
+
CREW = new 19, 'crew'
|
9
|
+
BUILDER = new 20, 'builder'
|
10
|
+
AGENT = new 23, 'agent'
|
11
|
+
CENTRAL_AGENT = new 24, 'central_agent'
|
12
|
+
PORT = new 31, 'port'
|
13
|
+
LOCATION_DIRECTOR = new 32, 'location_director'
|
14
|
+
SUPER_ADMIN = new 33, 'super_admin'
|
15
|
+
PHOTOGRAPHER = new 40, 'photographer'
|
16
|
+
WATER_WELLNES = new 41, 'water_wellnes'
|
17
|
+
TOUR_OPERATOR = new 44, 'tour_operator'
|
18
|
+
CLIENT = new 45, 'client'
|
19
|
+
DEALER = new 52, 'dealer'
|
20
|
+
REFIT_AND_REPAIR = new 53, 'refit_and_repair'
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
class RoleCategory < ::Dict
|
25
|
+
attr_reader :roles
|
26
|
+
|
27
|
+
def initialize(id, index, roles)
|
28
|
+
@roles = roles
|
29
|
+
super(id, index)
|
30
|
+
end
|
31
|
+
|
32
|
+
RENT_AND_SALE = new 1, 'rent_and_sale', [
|
33
|
+
::Dicts::Role::CAPTAIN.id,
|
34
|
+
::Dicts::Role::BROKER.id,
|
35
|
+
::Dicts::Role::OWNER.id,
|
36
|
+
::Dicts::Role::CREW.id,
|
37
|
+
::Dicts::Role::BUILDER.id,
|
38
|
+
::Dicts::Role::AGENT.id,
|
39
|
+
::Dicts::Role::CENTRAL_AGENT.id,
|
40
|
+
::Dicts::Role::WATER_WELLNES.id,
|
41
|
+
::Dicts::Role::TOUR_OPERATOR.id,
|
42
|
+
::Dicts::Role::DEALER.id,
|
43
|
+
::Dicts::Role::PORT.id,
|
44
|
+
::Dicts::Role::REFIT_AND_REPAIR.id,
|
45
|
+
::Dicts::Role::PHOTOGRAPHER.id,
|
46
|
+
].freeze
|
47
|
+
|
48
|
+
GETBOAT_TEAM = new 2, 'get_boat_team', [
|
49
|
+
::Dicts::Role::DATA_CONTROLLER.id,
|
50
|
+
::Dicts::Role::LOCATION_DIRECTOR.id,
|
51
|
+
|
52
|
+
]
|
53
|
+
|
54
|
+
SERVICE = new 3, 'service', [
|
55
|
+
::Dicts::Role::ADMIN.id,
|
56
|
+
::Dicts::Role::SUPER_ADMIN.id
|
57
|
+
].freeze
|
58
|
+
|
59
|
+
USER = new 4, 'user', [
|
60
|
+
::Dicts::Role::CLIENT.id
|
61
|
+
].freeze
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
data/lib/c80_shared/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_shared
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- app/dicts/locale.rb
|
62
62
|
- app/dicts/motor.rb
|
63
63
|
- app/dicts/rent_skip_type.rb
|
64
|
+
- app/dicts/role.rb
|
64
65
|
- app/helpers/custom/currency_helper.rb
|
65
66
|
- app/helpers/custom/dimension_helper.rb
|
66
67
|
- app/helpers/custom/price_helper.rb
|