diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 7b95123..1ecfe8c 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -447,7 +447,19 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
//6. reset the isCommingSoonModel to false in local storage so that upcomming module pop up would not show again to the user after firts time
localStorage.setItem('isCommingSoonModel', false);
- $location.path('/');
+ // for reseller type user first need to update profile
+ if (result.UserTypeId == 7 && (result.FirstName == "" || result.EmailId == "" || result.LastName == "")) {
+
+ $('#updateprofile').html(LoginMessageConstants.USER_UPDATE_PROFILE);
+
+ $("#profileUpdateModal").modal('show');
+
+ $(".modal-backdrop").css("opacity", ".5");
+
+ }
+ else {
+ $location.path('/');
+ }
}
else {
if ($('#dvTerms').length > 0) {
@@ -5741,7 +5753,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A
}
$rootScope.reDirectURLToAdmin = function () {
- window.location.href = "Admin";
+ $("#profileUpdateModal").modal('hide');
+ $timeout(function () {
+ window.location.href = "Admin";
+ }, 300)
+
};
$rootScope.SendAdminAccessRequestMail = function (userInfo) {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
index 37c8fc5..bc0b730 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -367,6 +367,7 @@ AIA.constant("LoginConstants", {
});
AIA.constant("LoginMessageConstants", {
+ "USER_UPDATE_PROFILE":"Please update your profile first",
"USER_OR_PASSWORD_INCORRECT": "UserId or Password is incorrect.",
"RESET_PASSWORD": "Please check you email and reset your password.",
"USERID_SENT_IN_EMAIL": "We have sent you userId in email.",
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.aspx b/400-SOURCECODE/AIAHTML5.Web/index.aspx
index 3cc2065..40d8f65 100644
--- a/400-SOURCECODE/AIAHTML5.Web/index.aspx
+++ b/400-SOURCECODE/AIAHTML5.Web/index.aspx
@@ -1056,6 +1056,31 @@
+
+
+
+
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts
index cccb72d..f76f909 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts
@@ -109,15 +109,23 @@ export class UnblockUser implements OnInit {
GetBlockUserList(this)
{
- if (this.commonService.UserTypeName == 'District Admin') {
- this.licId = this.commonService.AccLicId;
- }
- else if (this.commonService.UserTypeName == 'Client Admin') {
- this.licId = this.commonService.AccLicId;
+ if (this.commonService.UserTypeName == "Client Admin" || this.commonService.UserTypeName == "District Admin")
+ {
+ if(this.commonService.AccountNumber !=undefined && this.commonService.AccountNumber !="")
+ {
+ this.licId = this.commonService.AccLicId;
+ }
+ else
+ {
+ this.licId =0
+ }
+
}
- else {
+ else
+ {
this.licId =0
}
+
var UserFilterControl = this.UnBlockedUserFrm.value;
this.userservice.GetBlockUserList(
{
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
index aa236c2..2d229f2 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
@@ -21,25 +21,26 @@
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
index 7d6e6c9..0d86130 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
@@ -44,17 +44,14 @@ export class UpdateUserProfile implements OnInit {
ngOnInit(): void {
this.user = new User();
this.alerts = '';
- //this.userservice.GetUserById(this.UserId);
this.userFrm = this.fb.group({
id: [''],
- firstName: ['', Validators.required],
- lastName: ['', Validators.required],
- emailId: ['', [Validators.required, Validators.email]]
- // LastName: [''],
- // Gender: ['', Validators.required],
- // Email: ['']
+ firstName: ['', [Validators.required,this.noWhitespaceValidator]],
+ lastName: ['', [Validators.required,this.noWhitespaceValidator]],
+ emailId: ['', [Validators.required,this.noWhitespaceValidator]]
});
+
this._loadingService.ShowLoading("global-loading");
this.GetUserById();
@@ -62,21 +59,30 @@ export class UpdateUserProfile implements OnInit {
redirect() {
this.router.navigate(['/']);
}
- //ngAfterviewint() {
- // this.LoadUsers();
- //}
-
-
- //getCustomerById(UserId) {
- // return this.userservice.GetUserById(UserId)
- // .map((response: Response) => response.json())
- // .catch(this._errorHandler)
- //}
- //formErrors = {
- // 'firstName': '',
- // 'lastName': '',
- // 'email': ''
- //};
+ public noWhitespaceValidator(control: FormControl) {
+ // new validation for intial whaite space
+ //****Birendra *****/
+ var isValid=false;
+ if(control.value!=null)
+ {
+ var controlLen=control.value.length;
+ if(controlLen!=0)
+ {
+ const isWhitespace = (control.value || '').trim().length === 0;
+ isValid = !isWhitespace;
+ if(!isValid)
+ {
+ control.setValue('');
+
+ }
+ }
+ }
+ // can use also on page of input control
+ //
+ return isValid ? null: { 'whitespace': true };
+
+}
+
GetUserById() {
this.userservice.GetUserById()
@@ -84,24 +90,35 @@ export class UpdateUserProfile implements OnInit {
this._loadingService.HideLoading("global-loading");
}
UpdateUserProfile() {
- // debugger;
- this.user = this.userFrm.value;
- //if(this.user.)
- //console.log(this.user);
- var obj = this.user
- if (this.userFrm.valid) {
- return this.userservice.UpdateUserProfileById(obj)
+ this.alerts = '';
+ if (this.userFrm.value.firstName == null ||((this.userFrm.value.firstName).trim() == ''))
+ {
+ this.alerts += '
First name is required.';
+ }
+ if (this.userFrm.value.lastName == null ||((this.userFrm.value.lastName).trim() == ''))
+ {
+ this.alerts += '
Last name is required.';
+ }
+ if (this.userFrm.value.emailId == null ||((this.userFrm.value.emailId).trim() == '')) {
+ this.alerts += '
Email Id is required.';
+ }
+ else if((!this.userFrm.controls.emailId.valid))
+ {
+ this.alerts += '
Enter Valid Email Id.';
+ }
+
+
+ if (this.userFrm.valid && this.alerts == '') {
+ var obj = this.userFrm.value;
+
+ return this.userservice.UpdateUserProfileById(obj)
.subscribe(
n => (this.AfterInsertData(n)),
error => this.error =
error);
}
}
AfterInsertData(data) {
- debugger;
- if (data.Status == "False") {
- // this._confirmService.activate(data.ResponseMessage, "alertMsg");
- //setTimeout(() => this.amCode.nativeElement.focus(), 0);
- // this.closeflag = false;
+ if (data.Status == "False") {
return false;
} else {
this.status = true;
@@ -112,34 +129,9 @@ export class UpdateUserProfile implements OnInit {
localStorage.setItem("loggedInUserDetails", JSON.stringify(loggedInUser));
this.global.DisplayName = loggedInUser.FirstName + " " + loggedInUser.LastName;
this._confirmService.activate("User Profile Updated Successfully.", "alertMsg");
- // window.location.href = this.global.LiveURL;
-
-
- //this.profileModal.open();
- // this.submitted = false;
- // this.GetAllAcctMgr();
- // this.DisableAllControls();
- // this.AccountManagerID.enable();
- // let accountManagerID: string = data.Id == null ? "" : data.Id.toString();
- // console.log(accountManagerID);
-
- // this.GetAcctMgr(Number(accountManagerID));
- //this.GetAccountManagerListOptions(false);
- // this.defautValue = data.id;
- // this.BtnReset = true;
- // this.BtnSave = true;
- // this.BtnEdit = false;
- // this.BtnNew = false;
- // this.BtnDelete = false;
- // this.Abbrevtion = this.Abbrev.value;
- // setTimeout(() => this.AMform.controls["AccountManagerID"].setValue(accountManagerID.toString()), 1000);
- // setTimeout(() => this.AMform.markAsPristine(), 2000);
+
}
- //if (this.closeflag) {
- // this.close.emit(null);
- //}
- //else {
- //}
+
}
bindUsers(data) {
@@ -152,23 +144,8 @@ export class UpdateUserProfile implements OnInit {
this.userFrm.controls['firstName'].setValue(this.user.FirstName)
this.userFrm.controls['lastName'].setValue(this.user.LastName)
this.userFrm.controls['emailId'].setValue(this.user.EmailId)
- // this.GetClientListOptions(false);
- // this.GetCrossRefClientListOptions(false);
}
- //extractData(res: Response) {
- // //debugger;
- // let body = res.json();
- // return body;
- //}
- //handleError(error: any) {
-
- // // In a real world app, we might use a remote logging infrastructure
- // // We'd also dig deeper into the error to get a better message
- // let errMsg = (error.message) ? error.message :
- // error.status ? `${error.status} - ${error.statusText}` : 'Server error';
- // console.error(errMsg); // log to console instead
- // return Observable.throw(errMsg);
- //}
+
validationMessages = {
'firstName': {
'required': 'First name is required.'
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
index cefab55..9606625 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
@@ -114,9 +114,14 @@ export class UsersList implements OnInit, AfterViewChecked {
});
- if (this.global.UserTypeName == "Client Admin" || this.global.UserTypeName == "District Admin") {
- this.Users.controls['AccountNumber'].setValue(this.global.AccountNumber)
- this.DisableAccountNumberControl = true;
+ if (this.global.UserTypeName == "Client Admin" || this.global.UserTypeName == "District Admin" )
+ {
+ if(this.global.AccountNumber !=undefined && this.global.AccountNumber !="")
+ {
+ this.Users.controls['AccountNumber'].setValue(this.global.AccountNumber)
+ this.DisableAccountNumberControl = true;
+ }
+
}
this._loadingService.ShowLoading("global-loading");
this.GetUserType();
diff --git a/400-SOURCECODE/Admin/src/assets/data/Menu.json b/400-SOURCECODE/Admin/src/assets/data/Menu.json
index 20d1e0c..26197de 100644
--- a/400-SOURCECODE/Admin/src/assets/data/Menu.json
+++ b/400-SOURCECODE/Admin/src/assets/data/Menu.json
@@ -1275,19 +1275,19 @@
{
"HeaderMenuId": "101",
"HeaderMenuName": "Licenses",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "203",
"SubMenuName": "Search License",
"SubMenuUrl": "searchlicense",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "204",
"SubMenuName": "Add New License",
"SubMenuUrl": "addlicense",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
}
]
@@ -1295,19 +1295,19 @@
{
"HeaderMenuId": "102",
"HeaderMenuName": "Product Features",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "205",
"SubMenuName": "Manage Discount Code",
"SubMenuUrl": "managediscountcode",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "206",
"SubMenuName": "Subscription Price",
"SubMenuUrl": "subscriptionprice",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
}
]
@@ -1315,31 +1315,31 @@
{
"HeaderMenuId": "103",
"HeaderMenuName": "Users",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "207",
"SubMenuName": "List User",
"SubMenuUrl": "users",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "208",
"SubMenuName": "Add User",
"SubMenuUrl": "adduser",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "209",
"SubMenuName": "Unblock User",
"SubMenuUrl": "unblockuser",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "210",
"SubMenuName": "User Group",
"SubMenuUrl": "usergroup",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
}
]
@@ -1347,49 +1347,49 @@
{
"HeaderMenuId": "104",
"HeaderMenuName": "Reports",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "211",
"SubMenuName": "Usage Report",
"SubMenuUrl": "usagereport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "212",
"SubMenuName": "Customer Summary Report",
"SubMenuUrl": "customersummaryreport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "213",
"SubMenuName": "Expiring Subscription Report",
"SubMenuUrl": "expiringsubscriptionreport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "214",
"SubMenuName": "New Subscription Report",
"SubMenuUrl": "subscriptionreport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "215",
"SubMenuName": "Subscription Cancellation Report",
"SubMenuUrl": "subscriptioncancellationreport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "216",
"SubMenuName": "Net AD Subscription Report",
"SubMenuUrl": "netadsubscriptionreport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "217",
"SubMenuName": "Site License Usage Report",
"SubMenuUrl": "sitelicenseusagereport",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "218",
@@ -1409,13 +1409,13 @@
{
"HeaderMenuId": "105",
"HeaderMenuName": "Site Account",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "220",
"SubMenuName": "Add Building Level Account",
"SubMenuUrl": "sitelicenseaccount",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
}
]
@@ -1423,19 +1423,19 @@
{
"HeaderMenuId": "106",
"HeaderMenuName": "Settings",
- "HeaderMenuStatus": "True",
+ "HeaderMenuStatus": "False",
"SubMenu": [
{
"SubMenuId": "221",
"SubMenuName": "View-Update Profile",
"SubMenuUrl": "editlicensebasicsettings",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "222",
"SubMenuName": "Manage Modesty Settings",
"SubMenuUrl": "licensemodestysettings",
- "SubMenuStatus": "True"
+ "SubMenuStatus": "False"
},
{
"SubMenuId": "223",