Merge pull request #3011 from HugsDaniel/3000-api-endpoint-enterprise-fee

Add an API endpoint for EnterpriseFeesController#destroy
This commit is contained in:
Pau Pérez Fabregat
2018-11-27 17:28:43 +01:00
committed by GitHub
7 changed files with 69 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
angular.module('admin.enterpriseFees').directive 'spreeDeleteResource', ->
(scope, element, attrs) ->
if scope.enterprise_fee.id
url = '/admin/enterprise_fees/' + scope.enterprise_fee.id
url = '/api/enterprise_fees/' + scope.enterprise_fee.id
html = '<a href="' + url + '" class="delete-resource icon_link icon-trash no-text" data-action="remove" data-confirm="' + t('are_you_sure') + '" url="' + url + '"></a>'
#var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
element.append html