Sha256: d869d48e2ef23a331701700c1f73e7b9a13f2e8e8d9f4b96b172f935f1a4711a

Contents?: true

Size: 696 Bytes

Versions: 45

Compression:

Stored size: 696 Bytes

Contents

module Spree
  module Admin
    module StockTransfersHelper
      def handle_stock_transfer(stock_transfer)
        if can?(:show, stock_transfer)
          link_to stock_transfer.number, admin_stock_transfer_path(stock_transfer)
        else
          stock_transfer.number
        end
      end

      def stock_transfer_edit_or_ship_path(stock_transfer)
        if stock_transfer.finalized?
          tracking_info_admin_stock_transfer_path(stock_transfer)
        else
          edit_admin_stock_transfer_path(stock_transfer)
        end
      end

      def stock_transfer_status(stock_transfer)
        stock_transfer.closed? ? Spree.t(:closed) : Spree.t(:open)
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
solidus_backend-2.0.3 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.4.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.3 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.4 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.7 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-2.0.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.4.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-2.0.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-2.0.0 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.4.0 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-2.0.0.rc1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.4.0.rc1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-2.0.0.beta1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.4.0.beta1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.0 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.0.rc2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.0.rc1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.3.0.beta1 app/helpers/spree/admin/stock_transfers_helper.rb