mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Add confirm when delete customer
This commit is contained in:
@@ -4,7 +4,6 @@ angular.module("admin.customers").controller "customersCtrl", ($scope, $q, $filt
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
$scope.submitAll = pendingChanges.submitAll
|
||||
$scope.add = Customers.add
|
||||
$scope.deleteCustomer = Customers.remove
|
||||
$scope.customerLimit = 20
|
||||
$scope.columns = Columns.columns
|
||||
|
||||
@@ -21,6 +20,10 @@ angular.module("admin.customers").controller "customersCtrl", ($scope, $q, $filt
|
||||
|
||||
$scope.shop_id = shops[0].id if shops.length == 1
|
||||
|
||||
$scope.deleteCustomer = (customer) ->
|
||||
if confirm(t('admin.customers.index.confirm_delete'))
|
||||
Customers.remove(customer)
|
||||
|
||||
$scope.checkForDuplicateCodes = ->
|
||||
delete this.customer.code unless this.customer.code
|
||||
this.duplicate = $scope.isDuplicateCode(this.customer.code)
|
||||
|
||||
@@ -129,6 +129,7 @@ en:
|
||||
select_state: 'Select State'
|
||||
edit: 'Edit'
|
||||
update_address: 'Update Address'
|
||||
confirm_delete: 'Sure to delete?'
|
||||
|
||||
products:
|
||||
bulk_edit:
|
||||
|
||||
Reference in New Issue
Block a user