1 <%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %>
2 <div ng-controller="subscriberDetailsController">
4 <h1 class="heading1" style="margin-top:20px;">Selected Subscriber's Service Instance Details:</h1>
5 <div style="margin-top:30px">
6 <table att-table table-data="tableData">
8 <thead att-table-row type="header">
10 <th att-table-header key="viewSubDetails">View/Edit</th>
11 <th att-table-header key="global-customer-id">Global Customer ID</th>
12 <th att-table-header key="subscriber-name">Subscriber Name</th>
13 <th att-table-header key="service-type">Service Type</th>
14 <th att-table-header key="service-instance-id">Service Instance ID</th>
17 <tbody att-table-row type="body" row-repeat="disData in displayData">
20 <div ng-controller="viewEditSubController">
21 <a href="#" ng-click="postsubscriberID(disData.subscriberName)" alt="View/Edit">
26 <td att-table-body >{{disData.globalCustomerId}}</td>
27 <td att-table-body >{{disData.subscriberName}}</td>
28 <td att-table-body >{{disData.serviceType}}</td>
29 <td att-table-body >{{disData.serviceInstanceId}}</td>
37 <div ng-controller="searchExistingSIController" align="left" >
38 <button type="submit" ng-click="cancelSubDetails();" att-button
39 btn-type="primary" size="small">Cancel</button>
46 <!-- Temporary solution for footer overlapping the men after talking to EComp SDK developer on 06/25/2016 -->
65 app.controller("subscriberDetailsController", function ($scope,$http,modalService, $modal) {
66 $scope.tableData=${model.customerInfo};
67 $scope.displayData= [];
68 $scope.subscriberData=[];
69 $scope.serviceInstanceData= new Array();
70 $scope.globalcustomerid = $scope.tableData['global-customer-id'];
71 $scope.subscriberName = $scope.tableData['subscriber-name'];
72 $scope.subscriberData = $scope.tableData['service-subscriptions'];
74 $scope.setDisplaynoSTSI = function(){
75 $scope.displayData.push({
76 globalCustomerId : $scope.globalcustomerid,
77 subscriberName : $scope.subscriberName,
78 serviceType : "No Service Subscription Found",
79 serviceInstanceId : "No Service Instance Found"
83 $scope.setDisplaynoSI = function(servcType){
84 $scope.displayData.push({
85 globalCustomerId : $scope.globalcustomerid,
86 subscriberName : $scope.subscriberName,
87 serviceType : servcType,
88 serviceInstanceId : "No Service Instance Found"
92 if ($scope.subscriberData != null)
94 if ($scope.numberofSubscribers = $scope.subscriberData['service-subscription'] != null)
96 $scope.numberofSubscribers = $scope.subscriberData['service-subscription'].length;
97 if ($scope.numberofSubscribers > 0)
100 for(i=0; i < $scope.numberofSubscribers; i++) {
101 $scope.serviceInstanceData[i] = new Array();
102 var servicesubscription = $scope.subscriberData['service-subscription'][i];
103 $scope.serviceInstanceData[i] = servicesubscription['service-instances'];
104 if ($scope.serviceInstanceData[i] != null)
106 if ($scope.serviceInstanceData[i]['service-instance'] != null)
108 var numberofserviceInstance = $scope.serviceInstanceData[i]['service-instance'].length;
109 if (numberofserviceInstance > 0)
111 for(j=0; j < numberofserviceInstance; j++)
113 $scope.displayData.push({
114 globalCustomerId : $scope.globalcustomerid,
115 subscriberName : $scope.subscriberName,
116 serviceType : servicesubscription['service-type'],
117 serviceInstanceId : $scope.serviceInstanceData[i]['service-instance'][j]['service-instance-id']
123 $scope.setDisplaynoSI(servicesubscription['service-type']);
128 $scope.setDisplaynoSI(servicesubscription['service-type']);
133 $scope.setDisplaynoSI(servicesubscription['service-type']);
139 $scope.setDisplaynoSTSI();
144 $scope.setDisplaynoSTSI();
149 $scope.setDisplaynoSTSI();
155 app.controller('viewEditSubController',['$scope','$http',function ($scope,$http) {
157 $scope.postsubscriberID = function(subID){
159 url: "vieweditsub/subedit?"+"subscriberID="+encodeURIComponent(subID),
161 success:function (response){
162 window.location.href = 'instantiate.htm';
164 error:function( jqXHR, status,error ){
165 $("#errorInfo").show();
173 app.controller('searchExistingSIController',['$scope','$http',function ($scope,$http) {
175 $scope.cancelSubDetails = function(selectedSubscriber){
177 window.location.href = 'searchexistingsi.htm';