c80_shared 0.1.71 → 0.1.72
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: ca59ad4b66c8f4441cbec7cd25df5ff69918db89ac7039b37e3b3961f4cfc990
|
4
|
+
data.tar.gz: f16c5ffdb1909856589dfcf688546b0079a53fc2bfe37eeacc56f3568e92faa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49af6a2b4873f1b0b29a7e65db051687207e7273bf923dab6a4e1cb8e351b718b494fcd4bdaea507867d00f136359408f8ec9869e92e7eabaf0cb4ad5b5f7d3f
|
7
|
+
data.tar.gz: e61d4c46321f3de8749d1f1013548bacbc400123795b8d7da3d408cea5ce5bc5f983f9395a53bf295d6e8f9840886812ad52207122246358844120b11b346609
|
@@ -63,6 +63,7 @@ class BoatSerializer < AbstractSerializer
|
|
63
63
|
refit_year
|
64
64
|
rent_prices
|
65
65
|
rental_type
|
66
|
+
reviews
|
66
67
|
safety
|
67
68
|
sale_price
|
68
69
|
short_description
|
@@ -535,6 +536,11 @@ class BoatSerializer < AbstractSerializer
|
|
535
536
|
{ boat_thumbups: boat.boat_thumbups.max_by(&:created_at)&.value }
|
536
537
|
end
|
537
538
|
|
539
|
+
# TODO:: impelement it
|
540
|
+
def reviews(boat)
|
541
|
+
{ reviews: [] }
|
542
|
+
end
|
543
|
+
|
538
544
|
def serialize_opts
|
539
545
|
locale = ::Dicts::Locale.find_by_index @opts[:locale].to_s
|
540
546
|
uol = ::Dicts::Length.find_by_index @opts[:uol]
|
@@ -11,6 +11,9 @@ module Lease
|
|
11
11
|
_reset_ivars
|
12
12
|
end
|
13
13
|
|
14
|
+
# вернёт false, если:
|
15
|
+
# * нет подходящих под заявку юзеров
|
16
|
+
# * нет подходящих под заявку лодок
|
14
17
|
def perform(inquiry, personal_boat_id = nil)
|
15
18
|
_reset_ivars
|
16
19
|
@inquiry = inquiry
|
@@ -19,7 +22,7 @@ module Lease
|
|
19
22
|
locs2 = locs1.select { |loc| loc.radius >= loc.distance } # потом выбираем только те лодки, которые охватывают эту точку заявки
|
20
23
|
|
21
24
|
boats_ids = locs2.map(&:boat_id).uniq
|
22
|
-
boats = Boat.where(id: boats_ids).where(boat_type_id: inquiry.boat_type_ids).where(for_rent: 1).where
|
25
|
+
boats = Boat.where(id: boats_ids).where(boat_type_id: inquiry.boat_type_ids).where(for_rent: 1).where(state: ::Boat::STATE_APPROVED)
|
23
26
|
boats_ids = boats.map(&:id)
|
24
27
|
|
25
28
|
_log 'inquiry_id = ', inquiry.id
|
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.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|