'use strict' angular.module('RECRUIT').controller('QuickApply', function ($scope, $mdDialog, RecService, $log, SwapLang) { $scope.test = ($x) => { console.log($x) } $scope.lang = getLang() $scope.isEditTitle = [] $scope.quickApply = {} $scope.HrSwlang = SwapLang $scope.init = function () { RecService.ManageConfig.query({cname: 'QUICKAPPLY'}).$promise.then(function (data) { $scope.quickApply = data.result }) } $scope.init() $scope.submit = function () { if ($scope.quickApply.object.active && $scope.cscform.$invalid) { return $scope.HrSwlang.getAlert(47) } $scope.HrSwlang.getConfirm(1).then(function () { RecService.ManageConfig.save($scope.quickApply).$promise.then(function () { $scope.HrSwlang.getAlert(18).then(function () { $scope.init() }) }, function () { $scope.HrSwlang.getAlert(17) }); }) }; })