Upgrade Stripe con addebito immediato; downgrade programmato a fine periodo. UX billing più sobria con box info; icone piani. API inviti e OAuth YouTube per staff trasmissione; deep link join; scelta partita programmata o nuova. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
581 B
Ruby
20 lines
581 B
Ruby
module ApplicationHelper
|
|
PLAN_ICONS = {
|
|
"free" => "fa-solid fa-seedling",
|
|
"premium_light" => "fa-solid fa-rocket",
|
|
"premium_full" => "fa-solid fa-crown"
|
|
}.freeze
|
|
|
|
def plan_icon_class(plan)
|
|
PLAN_ICONS[plan.slug] || "fa-solid fa-circle"
|
|
end
|
|
|
|
# Data/ora nel fuso dell'app (Europe/Rome) e nella lingua del sito.
|
|
def l_local(date_or_time, format: :long)
|
|
return nil if date_or_time.blank?
|
|
|
|
value = date_or_time.respond_to?(:in_time_zone) ? date_or_time.in_time_zone : date_or_time
|
|
I18n.with_locale(:it) { I18n.l(value, format: format) }
|
|
end
|
|
end
|