Enable users to delete only non-empty tracking info/notes

This commit is contained in:
binarygit
2022-07-15 11:34:37 +05:45
parent 3d6842db80
commit 2f01351ad2
2 changed files with 5 additions and 2 deletions

View File

@@ -21,4 +21,6 @@
%td.actions
= link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')
= link_to '', '', class: 'delete-note icon_link icon-trash no-text with-tip', data: { action: 'delete' }, title: Spree.t('delete')
- if @order.note.present?
= link_to '', '', class: 'delete-note icon_link icon-trash no-text with-tip', data: { action: 'delete' }, title: Spree.t('delete')

View File

@@ -85,4 +85,5 @@
%td.actions
- if can?(:update, shipment) && shipment.can_modify?
= link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
= link_to '', '', :class => 'delete-tracking icon_link icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'delete' }
- if shipment.tracking.present?
= link_to '', '', :class => 'delete-tracking icon_link icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'delete' }