PageSourceSearch

https://fxboss.firstcitizens.com/app/components/legalEntity/account_settings.js?v=31082026-1758

js firstcitizens.com collected 2026-09-24 21:51:55 UTC 2,148 bytes, 70 lines download raw bytes

1var app = angular.module('bossApp');
2app.controller('accountSettingsCtrl', ['$scope', '$http', '$state','$stateParams','$timeout','$location','AccountSummaryService', function($scope, $http, $state,$stateParams,$timeout,$location,AccountSummaryService) {
3    $scope.loading = true;
4	
5	AccountSummaryService.getAllAccounts().then(function(response) {
6	  let _accountList = (response.responseObj)?response.responseObj:[];
7		
8	  $timeout(function(){
9			$scope.accountList = _accountList;
10			$timeout(function(){
11				$scope.initChangeAccount();
12			},200);
13		});
14	  $scope.loading = false;
15	  
16	});
17	
18	$scope.changeAccount=function(id){
19		$(".list-group-item").removeClass("btn-primary");
20		$("#"+id).addClass("btn-primary");
21		
22		let _index = $scope.accountList.indexOf(id);
23		
24		var accounts = $.grep($scope.accountList, function(element, index) {
25					return element.id == id;
26					console.log(data.items);
27				});
28		$scope.account=accounts[0];
29		console.log("$scope.account.status:: ", $scope.account.status); 
30		$scope.hideExtAccount=$scope.account.status=="Suspended"?true:false;
31		AccountSummaryService.getAccountSettings($scope.account.id).then(function(response){
32			if(response.success){
33				if(response.responseObj!=null){
34				$scope.accountSettings=response.responseObj;
35				console.log("Account setting :: ",$scope.accountSettings);
36				}else{
37					$scope.accountSettings={id:0,
38					accountId:$scope.account.id,
39					accNickName:$scope.account.accountName};
40				}
41				$('html,body').animate({
42					scrollTop: $("#" + id).position().top
43				}, 'slow')
44			}
45		});
46	};
47	
48	$scope.initChangeAccount=function(){
49		if($stateParams.accountId){
50		  $scope.changeAccount($stateParams.accountId);
51	  }
52	};
53	
54	$scope.changeAccountStatus=function(){
55		if($scope.hideExtAccount){
56			$scope.account.status="Suspended";
57		}else{
58			$scope.account.status="Active";
59		}
60	}
61	
62	$scope.saveAccountChanges=function(){
63		$scope.account.accountSettings=angular.copy($scope.accountSettings);
64		AccountSummaryService.saveOrUpdateAccount($scope.account).then(function(response){
65			if(response.success){
66				$state.go("home.accounts.allAccounts");
67			}
68		});
69	}
70}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.