mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Improve EnterpriseFee loading
Request is only send if there isn't another currently running, and also ensure that filtered enterprise fees are loaded only when not other request is running.
This commit is contained in:
@@ -14,10 +14,14 @@ angular.module('admin.orderCycles').factory('EnterpriseFee', ($resource) ->
|
||||
EnterpriseFee: EnterpriseFee
|
||||
enterprise_fees: {}
|
||||
loaded: false
|
||||
loading: false
|
||||
|
||||
index: (params={}) ->
|
||||
return if @loading == true
|
||||
@loading = true
|
||||
EnterpriseFee.index params, (data) =>
|
||||
@enterprise_fees = data
|
||||
@loading = false
|
||||
@loaded = true
|
||||
|
||||
forEnterprise: (enterprise_id) ->
|
||||
|
||||
Reference in New Issue
Block a user