Download pool/shard009/JavaScript/0056342_editController.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 821 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard009/JavaScript/0056342_editController.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard009/JavaScript/0056342_editController.js
-
curl -L -o 0056342_editController.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard009/JavaScript/0056342_editController.js
821 Bytes
| ; | |
| (function () { | |
| var app = angular.module('AngularCRM'); | |
| app.controller('editController', editController); | |
| function editController($scope, $routeParams, $location, wingtipCrmService) { | |
| var id = $routeParams.id; | |
| wingtipCrmService.getCustomer(id).success(function (data) { | |
| $scope.customer = data; | |
| $scope.updateCustomer = function () { | |
| var firstName = $scope.customer.FirstName; | |
| var lastName = $scope.customer.LastName; | |
| var workPhone = $scope.customer.WorkPhone; | |
| var homePhone = $scope.customer.HomePhone; | |
| var email = $scope.customer.Email; | |
| wingtipCrmService.updateCustomer(id, firstName, lastName, workPhone, homePhone, email) | |
| .success(function (data) { | |
| $location.path("/"); | |
| }); | |
| } | |
| }); | |
| } | |
| })(); |