Sha256: a43ce1e4054d183d9394f1ae3f9c8788e0c71bbc3f3c83d8d24d9c16ba543ac2

Contents?: true

Size: 811 Bytes

Versions: 34

Compression:

Stored size: 811 Bytes

Contents

module Workarea
  module Admin
    module Discounts
      class BuySomeGetSomeViewModel < DiscountViewModel
        include Products
        include Categories

        def condition_options
          [
            [
              t('workarea.admin.pricing_discounts.options.for_everyone'),
              nil
            ],
            [
              t('workarea.admin.pricing_discounts.options.when_order_total'),
              'order_total'
            ],
            [
              t('workarea.admin.pricing_discounts.options.when_user_is_tagged'),
              'user_tag'
            ]
          ]
        end

        def selected_condition_option
          if order_total?
            'order_total'
          elsif user_tag?
            'user_tag'
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-admin-3.4.45 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.44 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.43 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.42 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.41 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.40 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.39 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.38 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.37 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.36 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.35 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.34 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.33 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.32 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.31 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.30 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.29 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.28 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.27 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb
workarea-admin-3.4.26 app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb