Class: ReviewCpt::Cell::LandingPage
- Inherits:
-
FirstStep
- Object
- FirstStep
- ReviewCpt::Cell::LandingPage
- Defined in:
- app/concepts/review_cpt/cell/landing_page.rb
Overview
typed: ignore frozen_string_literal: true
Instance Method Summary collapse
Instance Method Details
#customer? ⇒ Boolean
25 26 27 |
# File 'app/concepts/review_cpt/cell/landing_page.rb', line 25 def customer? !member? end |
#earned_review_points ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/concepts/review_cpt/cell/landing_page.rb', line 13 def earned_review_points # minimum review with photos is 3 photos is_review_with_photos = [:reservation].review.review_photos_count >= 3 country_code = [:reservation].restaurant.country.alpha3 LoyaltyLevel.review_points( [:reservation].user, is_review_with_photos: is_review_with_photos, country_code: country_code, ) end |
#member? ⇒ Boolean
5 6 7 |
# File 'app/concepts/review_cpt/cell/landing_page.rb', line 5 def member? ([:customer] || ['customer']) == 'member' end |
#only_thai_member? ⇒ Boolean
9 10 11 |
# File 'app/concepts/review_cpt/cell/landing_page.rb', line 9 def only_thai_member? [:reservation].restaurant.eligible_for_rewards? end |