Commit 46438806809952e6b3bbd0f1448e9feec7c62e1c

Authored by Birendra Kumar
1 parent a4479b38

fixed AIA hightlight termlist and admin bugs

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -11164,7 +11164,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -11164,7 +11164,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
11164 } 11164 }
11165 11165
11166 11166
11167 - $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 11167 + $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff"});
11168 var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber'); 11168 var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber');
11169 11169
11170 if (actualTermNumber >0) { 11170 if (actualTermNumber >0) {
@@ -12056,7 +12056,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -12056,7 +12056,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
12056 $("#typedTermName_" + windowviewid).attr("name", "0"); 12056 $("#typedTermName_" + windowviewid).attr("name", "0");
12057 12057
12058 12058
12059 - $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 12059 + $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff" });
12060 12060
12061 var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber'); 12061 var actualTermNumber=$scope.GetwindowStoreData(windowviewid,'actualTermNumber');
12062 12062
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -3647,7 +3647,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -3647,7 +3647,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
3647 }, 200); 3647 }, 200);
3648 } 3648 }
3649 3649
3650 - $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 3650 + $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff"});
3651 var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); 3651 var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData');
3652 3652
3653 if (activePinArray.length >0) { 3653 if (activePinArray.length >0) {
@@ -3750,7 +3750,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -3750,7 +3750,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
3750 3750
3751 $("#selectedTermName_" + windowviewid).attr("name", "0"); 3751 $("#selectedTermName_" + windowviewid).attr("name", "0");
3752 3752
3753 - $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 3753 + $('#termlistfilter_' + windowviewid).find("option").css({ "background-color": "#ffffff"});
3754 var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); 3754 var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray');
3755 var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); 3755 var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData');
3756 3756
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.html
@@ -242,7 +242,7 @@ @@ -242,7 +242,7 @@
242 {{item.StateName}} 242 {{item.StateName}}
243 </option> 243 </option>
244 </select> 244 </select>
245 - <div *ngIf="insertUpdateLicenseFrm.get('stateId').hasError('min')" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">State is required</div> 245 + <div *ngIf="insertUpdateLicenseFrm.get('stateId').hasError('min') && insertUpdateLicenseFrm.controls.stateId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">State is required</div>
246 </div> 246 </div>
247 </div> 247 </div>
248 </div> 248 </div>
@@ -270,6 +270,7 @@ @@ -270,6 +270,7 @@
270 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> 270 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
271 <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();"> 271 <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();">
272 <div *ngIf="insertUpdateLicenseFrm.controls.zip.hasError('required') && insertUpdateLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> 272 <div *ngIf="insertUpdateLicenseFrm.controls.zip.hasError('required') && insertUpdateLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div>
  273 + <div *ngIf="insertUpdateLicenseFrm.controls.zip.hasError('pattern')" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is invalid</div>
273 </div> 274 </div>
274 </div> 275 </div>
275 </div> 276 </div>
400-SOURCECODE/Admin/src/app/components/LicenseEntity/addlicense.component.ts
@@ -79,7 +79,7 @@ export class AddLicense implements OnInit { @@ -79,7 +79,7 @@ export class AddLicense implements OnInit {
79 city: ['', [Validators.required,this.noWhitespaceValidator]], 79 city: ['', [Validators.required,this.noWhitespaceValidator]],
80 stateId: [0, [Validators.min(1)]], 80 stateId: [0, [Validators.min(1)]],
81 countryId: [0, Validators.min(1)], 81 countryId: [0, Validators.min(1)],
82 - zip: ['', [Validators.required]], 82 + zip: ['', [Validators.required,Validators.pattern('^[0-9]*$')]],
83 emailId: ['', [Validators.required]], 83 emailId: ['', [Validators.required]],
84 //phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]], 84 //phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]],
85 phone: ['', [Validators.required]], 85 phone: ['', [Validators.required]],
@@ -272,8 +272,8 @@ UpdatePhoneValidation() @@ -272,8 +272,8 @@ UpdatePhoneValidation()
272 else 272 else
273 { 273 {
274 this.IsUniteState=false; 274 this.IsUniteState=false;
275 - // this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^[0-9]*$')]);  
276 - this.PhoneNumber.setValidators([Validators.required]); 275 + this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^[0-9-()+]*$')]);
  276 + // this.PhoneNumber.setValidators([Validators.required]);
277 this.PhoneNumber.updateValueAndValidity(); 277 this.PhoneNumber.updateValueAndValidity();
278 this.OtherFormatPhoneNumber(phoneno); 278 this.OtherFormatPhoneNumber(phoneno);
279 } 279 }
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.html
@@ -110,6 +110,7 @@ @@ -110,6 +110,7 @@
110 <div class="col-sm-7"> 110 <div class="col-sm-7">
111 <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();"> 111 <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();">
112 <div *ngIf="updateLicenseBasicSettingsFrm.controls.zip.hasError('required') && updateLicenseBasicSettingsFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> 112 <div *ngIf="updateLicenseBasicSettingsFrm.controls.zip.hasError('required') && updateLicenseBasicSettingsFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div>
  113 + <div *ngIf="updateLicenseBasicSettingsFrm.controls.zip.hasError('pattern')" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is invalid</div>
113 </div> 114 </div>
114 </div> 115 </div>
115 116
@@ -122,7 +123,7 @@ @@ -122,7 +123,7 @@
122 {{item.StateName}} 123 {{item.StateName}}
123 </option> 124 </option>
124 </select> 125 </select>
125 - <div *ngIf="updateLicenseBasicSettingsFrm.get('stateId').hasError('min')" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">State is required</div> 126 + <div *ngIf="updateLicenseBasicSettingsFrm.get('stateId').hasError('min') && updateLicenseBasicSettingsFrm.controls.stateId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">State is required</div>
126 </div> 127 </div>
127 </div> 128 </div>
128 129
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts
@@ -56,7 +56,7 @@ export class EditLicenseBasicSettings implements OnInit { @@ -56,7 +56,7 @@ export class EditLicenseBasicSettings implements OnInit {
56 city: ['', [Validators.required,this.noWhitespaceValidator]], 56 city: ['', [Validators.required,this.noWhitespaceValidator]],
57 stateId: [0, [Validators.min(1)]], 57 stateId: [0, [Validators.min(1)]],
58 countryId: [0], 58 countryId: [0],
59 - zip: ['', [Validators.required]], 59 + zip: ['', [Validators.required,Validators.pattern('^[0-9]*$')]],
60 emailId: ['', [Validators.required]], 60 emailId: ['', [Validators.required]],
61 //phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]], 61 //phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]],
62 phone: ['', [Validators.required]] 62 phone: ['', [Validators.required]]
@@ -193,8 +193,8 @@ UpdatePhoneValidation() @@ -193,8 +193,8 @@ UpdatePhoneValidation()
193 else 193 else
194 { 194 {
195 this.IsUniteState=false; 195 this.IsUniteState=false;
196 - // this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^[0-9]*$')]);  
197 - this.PhoneNumber.setValidators([Validators.required]); 196 + this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^[0-9-()+]*$')]);
  197 + //this.PhoneNumber.setValidators([Validators.required]);
198 this.PhoneNumber.updateValueAndValidity(); 198 this.PhoneNumber.updateValueAndValidity();
199 this.OtherFormatPhoneNumber(phoneno); 199 this.OtherFormatPhoneNumber(phoneno);
200 } 200 }
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.html
@@ -310,7 +310,7 @@ @@ -310,7 +310,7 @@
310 <label for="Country" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Country <span class="red">*</span> :</label> 310 <label for="Country" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Country <span class="red">*</span> :</label>
311 </div> 311 </div>
312 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> 312 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
313 - <select class="form-control input-sm " id="State" formControlName="countryId" (change)="OnCountryChange($event.target)"> 313 + <select class="form-control input-sm " id="Country" formControlName="countryId" (change)="OnCountryChange($event.target)">
314 <option value="0">Select</option> 314 <option value="0">Select</option>
315 <option *ngFor="let item of lstCountry" value="{{item.Id}}"> 315 <option *ngFor="let item of lstCountry" value="{{item.Id}}">
316 {{item.CountryName}} 316 {{item.CountryName}}
@@ -324,8 +324,9 @@ @@ -324,8 +324,9 @@
324 <div class="form-group marginTop5"> 324 <div class="form-group marginTop5">
325 <label for="Zip" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Zip <span class="red">*</span> : </label> 325 <label for="Zip" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Zip <span class="red">*</span> : </label>
326 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> 326 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
327 - <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> 327 + <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20" (keydown.space)="$event.preventDefault();">
328 <div *ngIf="insertUpdateSiteLicenseFrm.controls.zip.hasError('required') && insertUpdateSiteLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> 328 <div *ngIf="insertUpdateSiteLicenseFrm.controls.zip.hasError('required') && insertUpdateSiteLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div>
  329 + <div *ngIf="insertUpdateSiteLicenseFrm.controls.zip.hasError('pattern')" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is invalid</div>
329 </div> 330 </div>
330 </div> 331 </div>
331 </div> 332 </div>
@@ -335,9 +336,8 @@ @@ -335,9 +336,8 @@
335 <label for="Phone" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Phone <span class="red">*</span> :</label> 336 <label for="Phone" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Phone <span class="red">*</span> :</label>
336 </div> 337 </div>
337 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> 338 <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
338 - <input type="phone" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)">  
339 - <!--<div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('required') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div>-->  
340 - <span class="help-block">(xxx-xxx-xxxx)</span> 339 + <input type="phone" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30" (keyup)="onKeyUp($event)" (keydown.space)="$event.preventDefault();">
  340 + <span *ngIf="IsUniteState" class="help-block">(xxx-xxx-xxxx)</span>
341 <div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('required') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> 341 <div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('required') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div>
342 <div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('pattern') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is invalid</div> 342 <div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('pattern') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is invalid</div>
343 </div> 343 </div>
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.ts
@@ -56,6 +56,7 @@ export class SiteLicenseAccount implements OnInit { @@ -56,6 +56,7 @@ export class SiteLicenseAccount implements OnInit {
56 pageNo:1, 56 pageNo:1,
57 pageLength:10 57 pageLength:10
58 }; 58 };
  59 + IsUniteState:Boolean=false;
59 @HostListener('window:resize', ['$event']) 60 @HostListener('window:resize', ['$event'])
60 getScreenSize(event?) { 61 getScreenSize(event?) {
61 62
@@ -102,9 +103,10 @@ export class SiteLicenseAccount implements OnInit { @@ -102,9 +103,10 @@ export class SiteLicenseAccount implements OnInit {
102 city: ['', [Validators.required,this.noWhitespaceValidator]], 103 city: ['', [Validators.required,this.noWhitespaceValidator]],
103 countryId: [0, Validators.min(1)], 104 countryId: [0, Validators.min(1)],
104 stateId: [0, Validators.min(1)], 105 stateId: [0, Validators.min(1)],
105 - zip: ['', [Validators.required,this.noWhitespaceValidator]],  
106 - phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]],  
107 - //phone: ['', Validators.required], 106 + zip: ['', [Validators.required,Validators.pattern('^[0-9]*$')]],
  107 + //zip: ['', [Validators.required,this.noWhitespaceValidator]],
  108 + //phone: ['', [Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$'),this.noWhitespaceValidator]],
  109 + phone: ['', Validators.required],
108 clientAdminId: [0, Validators.min(1)], 110 clientAdminId: [0, Validators.min(1)],
109 clientAdminEmail: [{value: '', disabled: true}, this.noWhitespaceValidator], 111 clientAdminEmail: [{value: '', disabled: true}, this.noWhitespaceValidator],
110 isActive: [0], 112 isActive: [0],
@@ -217,48 +219,54 @@ export class SiteLicenseAccount implements OnInit { @@ -217,48 +219,54 @@ export class SiteLicenseAccount implements OnInit {
217 219
218 } 220 }
219 onKeyUp(event: any) { 221 onKeyUp(event: any) {
220 - var mobno = event.target.value;  
221 - var newnum=mobno;  
222 - if(mobno!="" && event.key!="Backspace") 222 + var mobno = event.target.value;
  223 + var countryName =$("#Country option:selected").text().trim();
  224 + if(mobno!="" && event.key!="Backspace")
  225 + {
  226 + if(countryName=="United States")
  227 + {
  228 + this.USFormatPhoneNumber(mobno);
  229 + }
  230 + else
  231 + {
  232 + this.OtherFormatPhoneNumber(mobno);
  233 + }
  234 + }
  235 + };
  236 + OtherFormatPhoneNumber(mobno:any)
  237 + {
  238 + //var regex = /\d+/g;
  239 + //var matches = mobno.match(regex); //extract digit only
  240 + //var currentNum= matches==null?"" :matches.join('');
  241 + this.insertUpdateSiteLicenseFrm.controls['phone'].setValue(mobno);
  242 + }
  243 +
  244 + USFormatPhoneNumber(mobno:any)
  245 + {
  246 + var newformat="";
  247 + if(mobno!="" && mobno!=null)
  248 + {
  249 + var regex = /\d+/g;
  250 + var matches = mobno.match(regex); //extract digit only
  251 + var currentNum= matches==null?"" :matches.join('');
  252 +
  253 + for(var ind=0;ind<currentNum.length;ind++)
  254 + {
  255 + if(newformat.length==3)
223 { 256 {
224 - var tempArr = mobno.split('-');  
225 -  
226 - if(tempArr.length==1)  
227 - {  
228 - var countdigit=tempArr[0].length;  
229 - newnum=tempArr[0];  
230 - if(countdigit==3)  
231 - {  
232 - newnum=tempArr[0]+"-";  
233 - }  
234 - else if(countdigit>3)  
235 - {  
236 - newnum=tempArr[0].substr(0,3)+"-"+tempArr[0].substr(3,1);  
237 - }  
238 -  
239 - }  
240 - else if(tempArr.length==2)  
241 - {  
242 - newnum=tempArr[0]+"-"+tempArr[1];  
243 - var countdigit=tempArr[1].length;  
244 - if(countdigit==3)  
245 - {  
246 - newnum=tempArr[0]+"-"+tempArr[1]+"-";  
247 - }  
248 - else if(countdigit>3)  
249 - {  
250 - newnum= tempArr[0]+"-"+tempArr[1].substr(0,3)+"-"+tempArr[1].substr(3,1);  
251 - }  
252 - }  
253 - else  
254 - {  
255 - newnum=tempArr[0]+"-"+tempArr[1]+"-"+tempArr[2];  
256 - }  
257 - 257 + newformat=newformat+"-";
  258 + }
  259 + else if(newformat.length==7)
  260 + {
  261 + newformat=newformat+"-";
  262 + }
  263 + newformat=newformat+currentNum[ind];
258 } 264 }
259 - this.insertUpdateSiteLicenseFrm.controls['phone'].setValue(newnum);  
260 - };  
261 - 265 +
  266 + }
  267 + this.insertUpdateSiteLicenseFrm.controls['phone'].setValue(newformat);
  268 + }
  269 +
262 openModal(template: TemplateRef<any>) { 270 openModal(template: TemplateRef<any>) {
263 this.modalRef = this.modalService.show(template); 271 this.modalRef = this.modalService.show(template);
264 } 272 }
@@ -376,6 +384,7 @@ export class SiteLicenseAccount implements OnInit { @@ -376,6 +384,7 @@ export class SiteLicenseAccount implements OnInit {
376 this.insertUpdateSiteLicenseFrm.controls['clientAdminId'].setValue(this.licenseSite.SiteUserId); 384 this.insertUpdateSiteLicenseFrm.controls['clientAdminId'].setValue(this.licenseSite.SiteUserId);
377 this.insertUpdateSiteLicenseFrm.controls['clientAdminEmail'].setValue(this.licenseSite.SiteUserEmailId); 385 this.insertUpdateSiteLicenseFrm.controls['clientAdminEmail'].setValue(this.licenseSite.SiteUserEmailId);
378 this.GetSiteAccountEditions(); 386 this.GetSiteAccountEditions();
  387 + this.UpdatePhoneValidation();
379 }, error => this.error = <any>error); 388 }, error => this.error = <any>error);
380 } 389 }
381 390
@@ -597,10 +606,39 @@ export class SiteLicenseAccount implements OnInit { @@ -597,10 +606,39 @@ export class SiteLicenseAccount implements OnInit {
597 } 606 }
598 else { 607 else {
599 this.license.StateId = 0; 608 this.license.StateId = 0;
600 - this.insertUpdateSiteLicenseFrm.controls['stateId'].setValue(this.license.StateId);  
601 - } 609 + this.insertUpdateSiteLicenseFrm.controls['stateId'].setValue(this.license.StateId);
  610 + }
  611 + this.UpdatePhoneValidation();
  612 +
  613 + }
  614 + //get Property
  615 + get PhoneNumber() {
  616 + return this.insertUpdateSiteLicenseFrm.get('phone');
  617 + }
  618 + UpdatePhoneValidation()
  619 + {
  620 + var phoneno=this.PhoneNumber.value==null?"":this.PhoneNumber.value;
  621 +
  622 + var countryName =$("#Country option:selected").text().trim();
  623 + if(countryName=="United States")
  624 + {
  625 + // validate first phone number
  626 + this.IsUniteState=true;
  627 + this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^([0-9]{3})-([0-9]{3})-([0-9]{4})$')]);
  628 + this.PhoneNumber.updateValueAndValidity();
  629 + this.USFormatPhoneNumber(phoneno);
  630 + }
  631 + else
  632 + {
  633 + this.IsUniteState=false;
  634 + this.PhoneNumber.setValidators([Validators.required, Validators.pattern('^[0-9-()+]*$')]);
  635 + // this.PhoneNumber.setValidators([Validators.required]);
  636 + this.PhoneNumber.updateValueAndValidity();
  637 + this.OtherFormatPhoneNumber(phoneno);
  638 + }
602 639
603 } 640 }
  641 +
604 OnStateChange(element: any) { 642 OnStateChange(element: any) {
605 this.license.StateId = parseInt(element.value); 643 this.license.StateId = parseInt(element.value);
606 if (this.lstState.find(C => C.Id == this.license.StateId).StateName != "Other") { 644 if (this.lstState.find(C => C.Id == this.license.StateId).StateName != "Other") {
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 <td>{{item.NetAdSubscription}}</td> 123 <td>{{item.NetAdSubscription}}</td>
124 </tr> 124 </tr>
125 </tbody> 125 </tbody>
126 - <tfoot *ngFor="let total of TotalNetAdSubscription" style="font-weight: bold;background-color: #e3dbf3;"> 126 + <tfoot *ngFor="let total of TotalNetAdSubscription" style="font-weight: bold;background-color: #e3dbf3;position:relative;">
127 <tr> 127 <tr>
128 <td>{{total.LicenseType}}</td> 128 <td>{{total.LicenseType}}</td>
129 <td>{{total.AccountType}}</td> 129 <td>{{total.AccountType}}</td>
@@ -136,6 +136,22 @@ @@ -136,6 +136,22 @@
136 </tr> 136 </tr>
137 </tfoot> 137 </tfoot>
138 </table> 138 </table>
  139 +
  140 + <!-- <table class="table-hover ui-widget-header sorttable" style="width:100%">
  141 + <thead *ngFor="let total of TotalNetAdSubscription" style="font-weight: bold;background-color: #e3dbf3;">
  142 + <tr>
  143 + <th style="width:180px" >{{total.LicenseType}}</th>
  144 + <th style="width:230px">{{total.AccountType}}</th>
  145 + <th style="width:300px">{{total.InstitutionName}}</th>
  146 + <th style="width:200px">{{total.LicenseCreationDate}}</th>
  147 + <th style="width:300px">{{total.ActiveSubscription}}</th>
  148 + <th style="width:200px">{{total.RenewSubscription}}</th>
  149 + <th style="width:250px">{{total.InActiveSubscription}}</th>
  150 + <th style="width:130px">{{total.NetAdSubscription}}</th>
  151 + </tr>
  152 + </thead>
  153 + </table> -->
  154 +
139 <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetNetAdSummaryReport($event)"></admin-pager> 155 <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetNetAdSummaryReport($event)"></admin-pager>
140 <div class="row"> 156 <div class="row">
141 <div class="col-sm-12 marginTop20 text-center"> 157 <div class="col-sm-12 marginTop20 text-center">
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
@@ -81,7 +81,7 @@ export class NetAdSubscriptionReport implements OnInit { @@ -81,7 +81,7 @@ export class NetAdSubscriptionReport implements OnInit {
81 { 81 {
82 this.scrHeight = window.innerHeight-405; 82 this.scrHeight = window.innerHeight-405;
83 } 83 }
84 - if(this.scrHeight<=360) this.scrHeight=360; 84 + if(this.scrHeight<=360) this.scrHeight=370;
85 85
86 $(".ft_container").css("height",this.scrHeight); 86 $(".ft_container").css("height",this.scrHeight);
87 } 87 }
@@ -194,6 +194,8 @@ export class NetAdSubscriptionReport implements OnInit { @@ -194,6 +194,8 @@ export class NetAdSubscriptionReport implements OnInit {
194 } 194 }
195 195
196 GetNetAdSummaryReportList() { 196 GetNetAdSummaryReportList() {
  197 +
  198 +
197 this._loadingService.ShowLoading("global-loading"); 199 this._loadingService.ShowLoading("global-loading");
198 $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); 200 $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc');
199 201
@@ -266,6 +268,7 @@ export class NetAdSubscriptionReport implements OnInit { @@ -266,6 +268,7 @@ export class NetAdSubscriptionReport implements OnInit {
266 this._loadingService.HideLoading("global-loading"); 268 this._loadingService.HideLoading("global-loading");
267 this.buttonStatus = false; 269 this.buttonStatus = false;
268 } 270 }
  271 +
269 } 272 }
270 273
271 ExportEvent() { 274 ExportEvent() {
400-SOURCECODE/Admin/src/app/components/UserEntity/changeuserid.component.ts
@@ -62,7 +62,7 @@ export class ChangeUserID implements OnInit { @@ -62,7 +62,7 @@ export class ChangeUserID implements OnInit {
62 .subscribe(x => { console.log(x); this.bindUsers(x) }, error => this.error = <any>error); 62 .subscribe(x => { console.log(x); this.bindUsers(x) }, error => this.error = <any>error);
63 } 63 }
64 UpdateUserId() { 64 UpdateUserId() {
65 - debugger; 65 +
66 this.alerts = ''; 66 this.alerts = '';
67 67
68 //if (this.ChangeUserIdFrm.value.newloginid == '') { 68 //if (this.ChangeUserIdFrm.value.newloginid == '') {
400-SOURCECODE/Admin/src/app/shared/Confirm/confirm.component.ts
1 import { Component, OnInit, Input, Output, EventEmitter, ElementRef, ViewChild } from "@angular/core"; 1 import { Component, OnInit, Input, Output, EventEmitter, ElementRef, ViewChild } from "@angular/core";
2 import {ConfirmService} from "./confirm.service"; 2 import {ConfirmService} from "./confirm.service";
3 import { ModalComponent } from "ng2-bs3-modal/ng2-bs3-modal"; 3 import { ModalComponent } from "ng2-bs3-modal/ng2-bs3-modal";
  4 +import { Router } from '@angular/router';
4 const KEY_ESC = 27; 5 const KEY_ESC = 27;
5 6
6 @Component({ 7 @Component({
@@ -41,7 +42,7 @@ export class ConfirmComponent implements OnInit { @@ -41,7 +42,7 @@ export class ConfirmComponent implements OnInit {
41 private _okAlert: any; 42 private _okAlert: any;
42 private _closeAlert: any; 43 private _closeAlert: any;
43 44
44 - constructor(confirmService:ConfirmService) { 45 + constructor(confirmService:ConfirmService,private router: Router) {
45 confirmService.activate = this.activate.bind(this); 46 confirmService.activate = this.activate.bind(this);
46 } 47 }
47 48
@@ -178,6 +179,9 @@ export class ConfirmComponent implements OnInit { @@ -178,6 +179,9 @@ export class ConfirmComponent implements OnInit {
178 179
179 if (this.type.toString() == "alertMsg") { 180 if (this.type.toString() == "alertMsg") {
180 this.alertMessageModal.close(); 181 this.alertMessageModal.close();
  182 + var url= this.router.url;
  183 + if(url=='/changeuserpassword' || url== '/changeuserid')
  184 + this.router.navigate(['/']);
181 return; 185 return;
182 } 186 }
183 if (this.type.toString() == "alertMsg2") { 187 if (this.type.toString() == "alertMsg2") {