Sha256: c9356e0fd2432269cb747a055e063eb2173c58f76023e5d9b56255290c41580c

Contents?: true

Size: 815 Bytes

Versions: 34

Compression:

Stored size: 815 Bytes

Contents

module Workarea
  module Admin
    module Discounts
      class QuantityFixedPriceViewModel < 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.25 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.24 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.23 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.22 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.21 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.20 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.19 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.18 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.17 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.16 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.15 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.14 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.13 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb
workarea-admin-3.4.12 app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb