%form{ name: 'variant_overrides_form', ng: { show: "views.inventory.visible" } }
  %save-bar{ dirty: "customers_form.$dirty", persist: "false" }
    %input.red{ type: "button", value: t(:save_changes), ng: { click: "update()", disabled: "!variant_overrides_form.$dirty" } }
  %table.index.bulk#variant-overrides
    %col.producer{ width: "20%", ng: { show: 'columns.producer.visible' } }
    %col.product{ width: "20%", ng: { show: 'columns.product.visible' } }
    %col.sku{ width: "20%", ng: { show: 'columns.sku.visible' } }
    %col.price{ width: "10%", ng: { show: 'columns.price.visible' } }
    %col.on_hand{ width: "10%", ng: { show: 'columns.on_hand.visible' } }
    %col.on_demand{ width: "10%", ng: { show: 'columns.on_demand.visible' } }
    %col.reset{ width: "1%", ng: { show: 'columns.reset.visible' } }
    %col.reset{ width: "15%", ng: { show: 'columns.reset.visible' } }
    %col.inheritance{ width: "5%", ng: { show: 'columns.inheritance.visible' } }
    %col.tags{ width: "30%", ng: { show: 'columns.tags.visible' } }
    %col.visibility{ width: "10%", ng: { show: 'columns.visibility.visible' } }
    %col.visibility{ width: "10%", ng: { show: 'columns.import_date.visible' } }
    %thead
      %tr{ ng: { controller: "ColumnsCtrl" } }
        %th.producer{ ng: { show: 'columns.producer.visible' } }=t('admin.producer')
        %th.product{ ng: { show: 'columns.product.visible' } }=t('admin.product')
        %th.sku{ ng: { show: 'columns.sku.visible' } }=t('admin.sku')
        %th.price{ ng: { show: 'columns.price.visible' } }=t('admin.price')
        %th.on_hand{ ng: { show: 'columns.on_hand.visible' } }=t('admin.on_hand')
        %th.on_demand{ ng: { show: 'columns.on_demand.visible' } }=t('admin.on_demand?')
        %th.reset{ colspan: 2, ng: { show: 'columns.reset.visible' } }=t('admin.variant_overrides.index.enable_reset?')
        %th.inheritance{ ng: { show: 'columns.inheritance.visible' } }=t('admin.variant_overrides.index.inherit?')
        %th.tags{ ng: { show: 'columns.tags.visible' } }=t('admin.tags')
        %th.visibility{ ng: { show: 'columns.visibility.visible' } }=t('admin.variant_overrides.index.hide')
        %th.import_date{ ng: { show: 'columns.import_date.visible' } }=t('admin.variant_overrides.index.import_date')
    %tbody{ ng: {repeat: 'product in filteredProducts = (products | hubPermissions:hubPermissions:hub_id | inventoryProducts:hub_id:views | attrFilter:{producer_id:producerFilter} | importDate:hub_id:importDateFilter | filter:query) | limitTo:productLimit' } }
      = render 'admin/variant_overrides/products_product'
      = render 'admin/variant_overrides/products_variants'
