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-1.0.6 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.3 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.5 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.0 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.0.rc2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.4 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.0.rc1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.2.0.beta1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.3 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.0 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.0.pre2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.0.pre1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.1.0.beta1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.2 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.1 app/helpers/spree/admin/stock_transfers_helper.rb
solidus_backend-1.0.0 app/helpers/spree/admin/stock_transfers_helper.rb