c80_shared 0.1.84 → 0.1.85
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ed5f35d3ff5e11a40541cc2822ae35609f9b1f910959ad86c6e69af57f3b6b2
|
4
|
+
data.tar.gz: b46e0e82e3d67048dafddf52fbe5c79a4807b487b83c5b7f9052020793bd33c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 181ca579be539a73581cced8dc9db63fb0253017352df93dd6508e5990a8981844e1554a398f1f6bbf9a0d8f9d7147aacf6635d0e563a075fd345be202204df5
|
7
|
+
data.tar.gz: 6ec6e7728b432120edcac45ee5f6c189890e008c5d10204505d3c8ab89dc965d85afc8e898efe5923427ec3c9aae81a8b7ef3b77b0916e1e8701e5ee613db100
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#https://makandracards.com/makandra/52455-rails-including-html-in-your-i18n-locales
|
2
|
+
#
|
3
|
+
module Dicts
|
4
|
+
module Lease
|
5
|
+
class OfferCancelation < ::Dict
|
6
|
+
FLEXIBLE = new 1, :flexible
|
7
|
+
STANDARD = new 2, :standard
|
8
|
+
STRICT = new 3, :strict
|
9
|
+
SUPER_STRICT = new 4, :super_strict
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -15,6 +15,9 @@ module Lease
|
|
15
15
|
boat_id
|
16
16
|
boat
|
17
17
|
price
|
18
|
+
price_percent
|
19
|
+
cancellation_type
|
20
|
+
human_payment_prices
|
18
21
|
currency
|
19
22
|
state
|
20
23
|
from
|
@@ -72,6 +75,36 @@ module Lease
|
|
72
75
|
{ price: bid.price }
|
73
76
|
end
|
74
77
|
|
78
|
+
def price_percent(bid)
|
79
|
+
{ price_percent: bid.price_percent }
|
80
|
+
end
|
81
|
+
|
82
|
+
def cancellation_type(bid)
|
83
|
+
return if bid.cancellation_type.nil?
|
84
|
+
|
85
|
+
ct = ::Dicts::Lease::OfferCancelation.find bid.cancellation_type
|
86
|
+
|
87
|
+
{ cancellation_type: {
|
88
|
+
id: ct.id,
|
89
|
+
title: I18n.t('lease.offer_cancelation.%s.title' % ct.index),
|
90
|
+
short: I18n.t('lease.offer_cancelation.%s.short' % ct.index),
|
91
|
+
full_html: I18n.t('lease.offer_cancelation.%s.full_html' % ct.index)
|
92
|
+
}
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
def human_payment_prices(bid)
|
97
|
+
if bid.price.present? && bid.price_percent.present?
|
98
|
+
first_price = bid.price * bid.price_percent / 100
|
99
|
+
{
|
100
|
+
human_payment_prices: {
|
101
|
+
first_payment: num_to_cur(first_price, bid.currency, @opts[:locale]),
|
102
|
+
second_payment: num_to_cur((bid.price - first_price), bid.currency, @opts[:locale])
|
103
|
+
}
|
104
|
+
}
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
75
108
|
def currency(bid)
|
76
109
|
{ currency: bid.currency }
|
77
110
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
en:
|
2
|
+
lease:
|
3
|
+
offer_cancelation:
|
4
|
+
:flexible:
|
5
|
+
title: Flexible
|
6
|
+
short: free cancellation up to 24 hours of trip start date
|
7
|
+
full_html: '<ul><li>Cancellations within 24 hours of trip start date are non-refundable;</li>
|
8
|
+
<li>Refund 100% of the rental price if cancelled more than 24 hours prior to commencement of the rental;</li>
|
9
|
+
<li>No refund at all of the rental price if cancelled within 24 hours of commencement of the rental.</li>
|
10
|
+
</ul>'
|
11
|
+
:standard:
|
12
|
+
title: Standard
|
13
|
+
short: no refund during cancellation less than 1 week prior to charter
|
14
|
+
full_html: '<ul>
|
15
|
+
<li>Refund 100% of the rental price if cancelled more than 7 days prior to commencement of the rental;</li>
|
16
|
+
<li>50% refund for cancellations within 2-6 days of trip star date;</li>
|
17
|
+
<li>Cancellations within 2 days of trip start date are non-refundable</li>
|
18
|
+
</ul>'
|
19
|
+
|
20
|
+
:strict:
|
21
|
+
title: Strict
|
22
|
+
short: free cancellation up to 30 days of the trip start date
|
23
|
+
full_html: '<ul>
|
24
|
+
<li>50% refund for cancellations within 14-30 days of trip start date;</li>
|
25
|
+
<li>Cancellations within 14 days of trip start date are non-refundable;</li>
|
26
|
+
</ul>'
|
27
|
+
:super_strict:
|
28
|
+
title: Super Strict
|
29
|
+
short: ' '
|
30
|
+
full_html: '<ul>
|
31
|
+
<li>In case of cancellation between 3 to 2 months before embarkation, a cancellation fee of 30% will be kept;</li>
|
32
|
+
<li>In case of cancellation between 2 months to 40 days before embarkation, a cancellation fee of 50% will be kept;</li>
|
33
|
+
<li>In case of cancellation between 40 days and embarkation, total charter fee will be kept.</li>
|
34
|
+
</ul>'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
ru:
|
2
|
+
lease:
|
3
|
+
offer_cancelation:
|
4
|
+
:flexible:
|
5
|
+
title: Flexible
|
6
|
+
short: free cancellation up to 24 hours of trip start date
|
7
|
+
full_html: '<ul><li>Cancellations within 24 hours of trip start date are non-refundable;</li>
|
8
|
+
<li>Refund 100% of the rental price if cancelled more than 24 hours prior to commencement of the rental;</li>
|
9
|
+
<li>No refund at all of the rental price if cancelled within 24 hours of commencement of the rental.</li>
|
10
|
+
</ul>'
|
11
|
+
:standard:
|
12
|
+
title: Standard
|
13
|
+
short: no refund during cancellation less than 1 week prior to charter
|
14
|
+
full_html: '<ul>
|
15
|
+
<li>Refund 100% of the rental price if cancelled more than 7 days prior to commencement of the rental;</li>
|
16
|
+
<li>50% refund for cancellations within 2-6 days of trip star date;</li>
|
17
|
+
<li>Cancellations within 2 days of trip start date are non-refundable</li>
|
18
|
+
</ul>'
|
19
|
+
|
20
|
+
:strict:
|
21
|
+
title: Strict
|
22
|
+
short: free cancellation up to 30 days of the trip start date
|
23
|
+
full_html: '<ul>
|
24
|
+
<li>50% refund for cancellations within 14-30 days of trip start date;</li>
|
25
|
+
<li>Cancellations within 14 days of trip start date are non-refundable;</li>
|
26
|
+
</ul>'
|
27
|
+
:super_strict:
|
28
|
+
title: Super Strict
|
29
|
+
short: ' '
|
30
|
+
full_html: '<ul>
|
31
|
+
<li>In case of cancellation between 3 to 2 months before embarkation, a cancellation fee of 30% will be kept;</li>
|
32
|
+
<li>In case of cancellation between 2 months to 40 days before embarkation, a cancellation fee of 50% will be kept;</li>
|
33
|
+
<li>In case of cancellation between 40 days and embarkation, total charter fee will be kept.</li>
|
34
|
+
</ul>'
|
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.85
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- app/dicts/exterior_color.rb
|
65
65
|
- app/dicts/fuel_type.rb
|
66
66
|
- app/dicts/hull_material.rb
|
67
|
+
- app/dicts/lease/offer_cancelation.rb
|
67
68
|
- app/dicts/length.rb
|
68
69
|
- app/dicts/locale.rb
|
69
70
|
- app/dicts/motor.rb
|
@@ -139,6 +140,8 @@ files:
|
|
139
140
|
- config/locales/dicts/length/ru.yml
|
140
141
|
- config/locales/dicts/motor/en.yml
|
141
142
|
- config/locales/dicts/motor/ru.yml
|
143
|
+
- config/locales/dicts/offer_cancelation/en.yml
|
144
|
+
- config/locales/dicts/offer_cancelation/ru.yml
|
142
145
|
- config/locales/dicts/rental_type/en.yml
|
143
146
|
- config/locales/dicts/rental_type/ru.yml
|
144
147
|
- config/locales/lease/bid.en.yml
|