text: !function(){"use strict";function AddCustomerController(dataAccessService,alertMessage,messages){function saveCustomer(form){dataAccessService.feed("/api/post/add/customer",vm.customer).then(function(response){vm.alertService.addAlert("success",messages.successMsgs.ITEM_ADDED),resetCustomer(form)},function(error){vm.alertService.addAlert("danger",messages.errorMsgs.ITEM_ADDED+" Because "+error.errorMessage)})}function resetCustomer(form){vm.customer={},form.$setValidity(),form.$setPristine(),form.$setUntouched()}var vm=this;vm.resetCustomer=resetCustomer,vm.saveCustomer=saveCustomer,vm.alertService=alertMessage}angular.module("myShopApp").controller("AddCustomerController",AddCustomerController),AddCustomerController.$inject=["dataAccessService","alertMessage","messages"]}(),function(){"use strict";function DashboardCustomerController(dataAccessService){var vm=this;!function(){dataAccessService.fetch("/api/get/count/customer/").then(function(count){vm.customerCount=count})}()}angular.module("myShopApp").controller("DashboardCustomerController",DashboardCustomerController),DashboardCustomerController.inject=["dataAccessService"]}(),function(){"use strict";function EditCustomerController($state,dataAccessService,customerItem,alertMessage,messages){function updateCustomer(){dataAccessService.update("/api/put/update/customer",vm.customer).then(function(response){vm.alertService.addAlert("success",messages.successMsgs.ITEM_UPDATED),$state.go("main.customers.list")},function(error){vm.alertService.addAlert("danger",messages.errorMsgs.ITEM_UPDATED)})}function cancelUpdate(){$state.go("main.customers.list")}var vm=this;vm.customer=customerItem,vm.cancelUpdate=cancelUpdate,vm.updateCustomer=updateCustomer,vm.alertService=alertMessage}angular.module("myShopApp").controller("EditCustomerController",EditCustomerController),EditCustomerController.$inject=["$state","dataAccessService","customerItem","alertMessage","messages"]}(),function(){"use strict";function ListCustomerController(customers,$location){function editCustomer(customerId){$location.path("/main/customers/edit/"+customerId)}var vm=this;vm.editCustomer=editCustomer,function(){vm.page=1,vm.customers=customers}()}angular.module("myShopApp").controller("ListCustomerController",ListCustomerController),ListCustomerController.$inject=["customers","$location"]}();