Do not show deleted articles and suppliers for new deleiveries

This commit is contained in:
Patrick Gansterer 2021-02-08 01:05:21 +01:00
parent d0e73ea1ff
commit 6e4b9696a2
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@
$('#new_stock_article').removeAttr('disabled').select2({
tags: true,
placeholder: '#{t '.create_stock_article'}',
data: #{raw articles_for_select2(@supplier.articles).to_json},
data: #{raw articles_for_select2(@supplier.articles.undeleted).to_json},
createTag: function(data) {
return {
id: 'new',

View file

@ -50,7 +50,7 @@
= t '.new_delivery'
%span.caret
%ul.dropdown-menu
- Supplier.order(:name).each do |supplier|
- Supplier.undeleted.order(:name).each do |supplier|
%li= link_to supplier.name, new_supplier_delivery_path(supplier), tabindex: -1
%table.table.table-hover#articles