[trunk]: Admin (Connect): Remove unnecessary logs
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@54788 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8f99949213
commit
d9e24bacc1
|
@ -40,7 +40,6 @@ export class DashboardComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class CommunitiesComponent implements OnInit {
|
||||||
this.route.data
|
this.route.data
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
|
||||||
this.properties = data.envSpecific;
|
this.properties = data.envSpecific;
|
||||||
this.getCommunities();
|
this.getCommunities();
|
||||||
});
|
});
|
||||||
|
@ -73,7 +73,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
getCommunities() {
|
getCommunities() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -102,7 +101,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyCheck(flag : boolean) {
|
public applyCheck(flag : boolean) {
|
||||||
console.info("applyCheck "+flag);
|
|
||||||
this.checkboxes.forEach(_ => _.checked = flag);
|
this.checkboxes.forEach(_ => _.checked = flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +131,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
private confirmModalOpen() {
|
private confirmModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeleteCommunities.cancelButton = true;
|
this.alertModalDeleteCommunities.cancelButton = true;
|
||||||
|
@ -147,7 +144,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteCommunities(data: any) {
|
public confirmedDeleteCommunities(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -179,7 +175,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
private communitiesModalOpen(modal: any, title: string, yesBtn: string) {
|
private communitiesModalOpen(modal: any, title: string, yesBtn: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
modal.cancelButton = true;
|
modal.cancelButton = true;
|
||||||
|
@ -192,7 +187,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public communitySaveConfirmed(data: any) {
|
public communitySaveConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -212,7 +206,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public communityUpdateConfirmed(data: any) {
|
public communityUpdateConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -231,7 +224,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public communitySavedSuccessfully(community: Community) {
|
public communitySavedSuccessfully(community: Community) {
|
||||||
this.checkboxes.push(<CheckCommunity>{community : community, checked : false});
|
this.checkboxes.push(<CheckCommunity>{community : community, checked : false});
|
||||||
console.info("checkboxes length: "+this.checkboxes.length);
|
|
||||||
this.applyCheck(false);
|
this.applyCheck(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +268,6 @@ export class CommunitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,6 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this.emailToInform = {body: "", subject: "", recipients: []};
|
this.emailToInform = {body: "", subject: "", recipients: []};
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
|
@ -90,8 +89,6 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this.community = community;
|
this.community = community;
|
||||||
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
|
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
|
||||||
this.firstVersionOfManagers = community.managers.slice();
|
this.firstVersionOfManagers = community.managers.slice();
|
||||||
console.log("First version of managers " + this.firstVersionOfManagers);
|
|
||||||
console.log(community);
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving community profile', error)
|
error => this.handleError('System error retrieving community profile', error)
|
||||||
|
@ -103,7 +100,6 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
@ -127,7 +123,6 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public resetForm(communityId: string) {
|
public resetForm(communityId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (communityId != null && communityId != '') {
|
if (communityId != null && communityId != '') {
|
||||||
|
@ -151,16 +146,12 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public updateCommunity() {
|
public updateCommunity() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
var community = this.parseUpdatedCommunity();
|
var community = this.parseUpdatedCommunity();
|
||||||
|
|
||||||
// TODO delete after testing
|
|
||||||
console.log(community);
|
|
||||||
|
|
||||||
if (!Validator.hasValidEmails(community['managers']) || !this.hasFilled(community["name"])) {
|
if (!Validator.hasValidEmails(community['managers']) || !this.hasFilled(community["name"])) {
|
||||||
this._router.navigate(['/community-edit-form'], {queryParams: { "communityId": this.communityId}});
|
this._router.navigate(['/community-edit-form'], {queryParams: { "communityId": this.communityId}});
|
||||||
} else {
|
} else {
|
||||||
|
@ -168,22 +159,18 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this._communityService.updateCommunity(this.properties.communityAPI+this.communityId, community).subscribe(
|
this._communityService.updateCommunity(this.properties.communityAPI+this.communityId, community).subscribe(
|
||||||
|
|
||||||
community => {
|
community => {
|
||||||
// TODO delete after testing
|
|
||||||
console.log("New managers in component: " + newManagers);
|
|
||||||
if (newManagers !== null) {
|
if (newManagers !== null) {
|
||||||
this.sendMailToNewManagers(newManagers);
|
this.sendMailToNewManagers(newManagers);
|
||||||
console.log("Old managers in component: " + this.firstVersionOfManagers);
|
|
||||||
this.informOldManagersForTheNewOnes(this.firstVersionOfManagers);
|
this.informOldManagersForTheNewOnes(this.firstVersionOfManagers);
|
||||||
for (let i = 0; i < newManagers.length; i++) {
|
for (let i = 0; i < newManagers.length; i++) {
|
||||||
console.log(newManagers[i]);
|
|
||||||
this._subscribeService.subscribeToCommunity(this.communityId, newManagers[i], this.properties.adminToolsAPIURL).subscribe(
|
this._subscribeService.subscribeToCommunity(this.communityId, newManagers[i], this.properties.adminToolsAPIURL).subscribe(
|
||||||
res => {
|
res => {
|
||||||
console.log(res);
|
//console.log(res);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
|
this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
|
||||||
res => {
|
res => {
|
||||||
console.log(res);
|
//console.log(res);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +217,6 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
newManagers.push(this.community['managers'][i]);
|
newManagers.push(this.community['managers'][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("New managers are: " + newManagers);
|
|
||||||
return newManagers;
|
return newManagers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +224,7 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/",
|
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/",
|
||||||
Composer.composeEmailForNewManager(this.communityId, this.community.title, managers)).subscribe(
|
Composer.composeEmailForNewManager(this.communityId, this.community.title, managers)).subscribe(
|
||||||
res => {
|
res => {
|
||||||
console.log("The email has been sent successfully!")
|
//console.log("The email has been sent successfully!")
|
||||||
},
|
},
|
||||||
error => console.log(error)
|
error => console.log(error)
|
||||||
);
|
);
|
||||||
|
@ -250,7 +236,7 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this.firstVersionOfManagers,
|
this.firstVersionOfManagers,
|
||||||
this.community.managers)).subscribe(
|
this.community.managers)).subscribe(
|
||||||
res => {
|
res => {
|
||||||
console.log("The email has been sent successfully!")
|
//console.log("The email has been sent successfully!")
|
||||||
},
|
},
|
||||||
error => console.log(error)
|
error => console.log(error)
|
||||||
);
|
);
|
||||||
|
@ -279,12 +265,8 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
|
|
||||||
private hasFilled(data: any): boolean {
|
private hasFilled(data: any): boolean {
|
||||||
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
|
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
|
||||||
// TODO remove console message after final testing
|
|
||||||
console.log("NAME IS NOT EMPTY");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// TODO remove console message after final testing
|
|
||||||
console.log("NAME IS EMPTY");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,14 +288,10 @@ export class CommunityEditFormComponent implements OnInit{
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
this.successfulSaveMessage = '';
|
this.successfulSaveMessage = '';
|
||||||
this.successfulResetMessage = '';
|
this.successfulResetMessage = '';
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM TRUE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetChange() {
|
private resetChange() {
|
||||||
this.hasChanged = false;
|
this.hasChanged = false;
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM FALSE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public get form() {
|
public get form() {
|
||||||
|
|
|
@ -83,44 +83,34 @@ export class AddContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
public addContentProvider(contenProvider: SearchResult) {
|
public addContentProvider(contenProvider: SearchResult) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("Add: "+ contenProvider.id);
|
|
||||||
this.subAdd = this._manageCommunityContentProvidersService.addContentProvider(this.properties, this.community, contenProvider).subscribe(
|
this.subAdd = this._manageCommunityContentProvidersService.addContentProvider(this.properties, this.community, contenProvider).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data ADD");
|
|
||||||
console.info(data);
|
|
||||||
this.undo[contenProvider.id] = data.id;
|
this.undo[contenProvider.id] = data.id;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error ADD");
|
|
||||||
console.log(err.status);
|
console.log(err.status);
|
||||||
},
|
}/*,
|
||||||
() => {
|
() => {
|
||||||
console.info("completed ADD");
|
console.info("completed ADD");
|
||||||
}
|
}*/
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeContentProvider(contentProviderId: string, communityContentProviderId: string) {
|
public removeContentProvider(contentProviderId: string, communityContentProviderId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ contentProviderId);
|
|
||||||
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, contentProviderId).subscribe(
|
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, contentProviderId).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data REMOVE");
|
//console.info(data);
|
||||||
console.info(data);
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error REMOVE");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.info("completed REMOVE");
|
|
||||||
this.undo[communityContentProviderId] = "";
|
this.undo[communityContentProviderId] = "";
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -142,10 +132,8 @@ export class AddContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
private _getOpenaireContentProviders(parameters:string, page: number, size: number){
|
private _getOpenaireContentProviders(parameters:string, page: number, size: number){
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("_getOpenaireContentProviders");
|
|
||||||
if(page > this.pagingLimit) {
|
if(page > this.pagingLimit) {
|
||||||
size=0;
|
size=0;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +148,6 @@ export class AddContentProvidersComponent implements OnInit {
|
||||||
this.subResults = this._searchContentProvidersService.searchDataproviders(parameters, null, page, size, [], this.properties).subscribe(
|
this.subResults = this._searchContentProvidersService.searchDataproviders(parameters, null, page, size, [], this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.undo = {};
|
this.undo = {};
|
||||||
console.info("total openaire content providers = "+data[0]);
|
|
||||||
this.openaireSearchUtils.totalResults = data[0];
|
this.openaireSearchUtils.totalResults = data[0];
|
||||||
this.openaireContentProviders = data[1];
|
this.openaireContentProviders = data[1];
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@ export class ManageContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
public updateCommunityContentProviders() {
|
public updateCommunityContentProviders() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
@ -69,12 +68,10 @@ export class ManageContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
this.removeContentProvidersComponent._getCommunityContentProviders();
|
this.removeContentProvidersComponent._getCommunityContentProviders();
|
||||||
this.addContentProvidersComponent.undo = {};
|
this.addContentProvidersComponent.undo = {};
|
||||||
console.info("In remove");
|
|
||||||
} else {
|
} else {
|
||||||
this.updateCommunityContentProvidersOnToggle = false;
|
this.updateCommunityContentProvidersOnToggle = false;
|
||||||
this.pageTitle = "Search content providers";
|
this.pageTitle = "Search content providers";
|
||||||
//this.toggleLinkMessage = "Manage content providers";
|
//this.toggleLinkMessage = "Manage content providers";
|
||||||
console.info("In add");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +81,6 @@ export class ManageContentProvidersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info("ngAfterViewInit");
|
//console.info("ngAfterViewInit");
|
||||||
}
|
}
|
||||||
|
|
||||||
filterData(row: any, query: string) {
|
filterData(row: any, query: string) {
|
||||||
|
@ -165,7 +165,7 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
triggerInitialLoad(){
|
triggerInitialLoad(){
|
||||||
this.triggered = true;
|
this.triggered = true;
|
||||||
console.info("triggerInitialLoad");
|
//console.info("triggerInitialLoad");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
var table = (<any>$('#dpTable')).DataTable();
|
var table = (<any>$('#dpTable')).DataTable();
|
||||||
table.page( 0 ).draw( false );
|
table.page( 0 ).draw( false );
|
||||||
|
@ -180,7 +180,6 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
table.page( page - 1 ).draw( false );
|
table.page( page - 1 ).draw( false );
|
||||||
|
|
||||||
var info = table.page.info();
|
var info = table.page.info();
|
||||||
console.info("records: "+info.recordsDisplay);
|
|
||||||
this.communitySearchUtils.totalResults = info.recordsDisplay;
|
this.communitySearchUtils.totalResults = info.recordsDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,21 +193,16 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteContentProvider(data : any) {
|
public confirmedDeleteContentProvider(data : any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ this.selectedCommunityContentProvider.id);
|
|
||||||
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, this.selectedCommunityContentProvider.id).subscribe(
|
this.subRemove = this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community, this.selectedCommunityContentProvider.id).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data REMOVE");
|
//console.info(data);
|
||||||
console.info(data);
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error REMOVE");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.info("completed REMOVE");
|
|
||||||
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
|
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
|
||||||
this.communityContentProviders.splice(index, 1);
|
this.communityContentProviders.splice(index, 1);
|
||||||
|
|
||||||
|
@ -223,7 +217,6 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
public removeContentProvider(communityContentProvider: any) {
|
public removeContentProvider(communityContentProvider: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.selectedCommunityContentProvider = communityContentProvider;
|
this.selectedCommunityContentProvider = communityContentProvider;
|
||||||
|
@ -255,10 +248,8 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
public _getCommunityContentProviders(){
|
public _getCommunityContentProviders(){
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("_getCommunityContentProviders");
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
||||||
this.disableForms = true;
|
this.disableForms = true;
|
||||||
this.communityContentProviders = [];
|
this.communityContentProviders = [];
|
||||||
|
@ -268,8 +259,7 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
|
|
||||||
this.subResults = this._searchCommunityContentProvidersService.searchDataproviders(this.properties, this.community).subscribe(
|
this.subResults = this._searchCommunityContentProvidersService.searchDataproviders(this.properties, this.community).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info(data);
|
//console.info("search Content Providers [total communityContentProviders:"+data.length+"]");
|
||||||
console.info("search Content Providers [total communityContentProviders:"+data.length+"]");
|
|
||||||
this.communityContentProviders = data;
|
this.communityContentProviders = data;
|
||||||
|
|
||||||
this.communitySearchUtils.totalResults = data.length;
|
this.communitySearchUtils.totalResults = data.length;
|
||||||
|
|
|
@ -94,44 +94,34 @@ export class AddProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public addProject(project: SearchResult) {
|
public addProject(project: SearchResult) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("Add: "+ project.id);
|
|
||||||
this.subAdd = this._manageCommunityProjectsService.addProject(this.properties, this.community, project).subscribe(
|
this.subAdd = this._manageCommunityProjectsService.addProject(this.properties, this.community, project).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data ADD");
|
|
||||||
console.info(data);
|
|
||||||
this.undo[project.id] = data.id;
|
this.undo[project.id] = data.id;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error ADD");
|
|
||||||
console.log(err.status);
|
console.log(err.status);
|
||||||
},
|
}/*,
|
||||||
() => {
|
() => {
|
||||||
console.info("completed ADD");
|
console.info("completed ADD");
|
||||||
}
|
}*/
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeProject(projectId: string, communityProjectId: string) {
|
public removeProject(projectId: string, communityProjectId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ projectId);
|
|
||||||
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, projectId).subscribe(
|
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, projectId).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data REMOVE");
|
//console.info(data);
|
||||||
console.info(data);
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error REMOVE");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.info("completed REMOVE");
|
|
||||||
this.undo[communityProjectId] = "";
|
this.undo[communityProjectId] = "";
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -148,20 +138,15 @@ export class AddProjectsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.undo[project.id]) {
|
if(this.undo[project.id]) {
|
||||||
console.info("true: "+ this.undo[project.id])
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
console.info("false: "+ this.undo[project.id])
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFunders () {
|
getFunders () {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("Getting Funders....");
|
|
||||||
this.subFunders = this._searchProjectsService.getFunders(this.properties).subscribe(
|
this.subFunders = this._searchProjectsService.getFunders(this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.funders = data[1];
|
this.funders = data[1];
|
||||||
|
@ -173,10 +158,8 @@ export class AddProjectsComponent implements OnInit {
|
||||||
|
|
||||||
private _getOpenaireProjects(parameters:string, page: number, size: number){
|
private _getOpenaireProjects(parameters:string, page: number, size: number){
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("_getOpenaireProjects");
|
|
||||||
if(page > this.pagingLimit) {
|
if(page > this.pagingLimit) {
|
||||||
size=0;
|
size=0;
|
||||||
}
|
}
|
||||||
|
@ -191,7 +174,7 @@ export class AddProjectsComponent implements OnInit {
|
||||||
this.subResults = this._searchProjectsService.searchProjects(parameters, null, page, size, [], this.properties).subscribe(
|
this.subResults = this._searchProjectsService.searchProjects(parameters, null, page, size, [], this.properties).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.undo = {};
|
this.undo = {};
|
||||||
console.info("total openaire projects = "+data[0]);
|
//console.info("total openaire projects = "+data[0]);
|
||||||
this.openaireSearchUtils.totalResults = data[0];
|
this.openaireSearchUtils.totalResults = data[0];
|
||||||
this.openaireProjects = data[1];
|
this.openaireProjects = data[1];
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,6 @@ export class ManageProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public updateCommunityProjects() {
|
public updateCommunityProjects() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
@ -84,7 +83,6 @@ export class ManageProjectsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info("ngAfterViewInit");
|
//console.info("ngAfterViewInit");
|
||||||
}
|
}
|
||||||
|
|
||||||
filterData(row: any, query: string, selectedFunder: string) {
|
filterData(row: any, query: string, selectedFunder: string) {
|
||||||
|
@ -177,7 +177,7 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
triggerInitialLoad(){
|
triggerInitialLoad(){
|
||||||
this.triggered = true;
|
this.triggered = true;
|
||||||
console.info("triggerInitialLoad");
|
//console.info("triggerInitialLoad");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
var table = (<any>$('#dpTable')).DataTable();
|
var table = (<any>$('#dpTable')).DataTable();
|
||||||
table.page( 0 ).draw( false );
|
table.page( 0 ).draw( false );
|
||||||
|
@ -205,7 +205,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
table.page( page - 1 ).draw( false );
|
table.page( page - 1 ).draw( false );
|
||||||
|
|
||||||
var info = table.page.info();
|
var info = table.page.info();
|
||||||
console.info("records: "+info.recordsDisplay);
|
|
||||||
this.communitySearchUtils.totalResults = info.recordsDisplay;
|
this.communitySearchUtils.totalResults = info.recordsDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,21 +218,16 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteProject(data : any) {
|
public confirmedDeleteProject(data : any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ this.selectedCommunityProject.id);
|
|
||||||
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, this.selectedCommunityProject.id).subscribe(
|
this.subRemove = this._manageCommunityProjectsService.removeProject(this.properties, this.community, this.selectedCommunityProject.id).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data REMOVE");
|
//console.info(data);
|
||||||
console.info(data);
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error REMOVE");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.info("completed REMOVE");
|
|
||||||
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
|
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
|
||||||
this.communityProjects.splice(index, 1);
|
this.communityProjects.splice(index, 1);
|
||||||
|
|
||||||
|
@ -248,7 +242,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public removeProject(communityProject: any) {
|
public removeProject(communityProject: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.selectedCommunityProject = communityProject;
|
this.selectedCommunityProject = communityProject;
|
||||||
|
@ -280,7 +273,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public _getCommunityProjects(){
|
public _getCommunityProjects(){
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -293,8 +285,7 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
|
|
||||||
this.subResults = this._searchCommunityProjectsService.searchProjects(this.properties, this.community).subscribe(
|
this.subResults = this._searchCommunityProjectsService.searchProjects(this.properties, this.community).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info(data);
|
//console.info("search Projects [total communityProjects:"+data.length+"]");
|
||||||
console.info("search Projects [total communityProjects:"+data.length+"]");
|
|
||||||
this.communityProjects = data;
|
this.communityProjects = data;
|
||||||
|
|
||||||
this.communitySearchUtils.totalResults = data.length;
|
this.communitySearchUtils.totalResults = data.length;
|
||||||
|
@ -353,7 +344,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
this.funders.add(funder);
|
this.funders.add(funder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.info(this.funders);
|
|
||||||
return this.funders;
|
return this.funders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ export class DivIdFormComponent implements OnInit{
|
||||||
|
|
||||||
getPages(includedPages: Set<String>) {
|
getPages(includedPages: Set<String>) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -73,7 +72,6 @@ export class DivIdFormComponent implements OnInit{
|
||||||
|
|
||||||
public toggle() {
|
public toggle() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
|
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
|
||||||
|
@ -163,7 +161,6 @@ export class DivIdFormComponent implements OnInit{
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
let index: number = -1;
|
let index: number = -1;
|
||||||
|
|
|
@ -73,7 +73,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
getDivIds() {
|
getDivIds() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -105,7 +104,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyCheck(flag : boolean) {
|
public applyCheck(flag : boolean) {
|
||||||
console.info("applyCheck "+flag);
|
|
||||||
this.checkboxes.forEach(_ => _.checked = flag);
|
this.checkboxes.forEach(_ => _.checked = flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +134,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
private confirmModalOpen() {
|
private confirmModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeleteDivIds.cancelButton = true;
|
this.alertModalDeleteDivIds.cancelButton = true;
|
||||||
|
@ -150,7 +147,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteDivIds(data: any) {
|
public confirmedDeleteDivIds(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -192,7 +188,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
private divIdsModalOpen(modal: any, title: string, yesBtn: string) {
|
private divIdsModalOpen(modal: any, title: string, yesBtn: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
modal.cancelButton = true;
|
modal.cancelButton = true;
|
||||||
|
@ -205,7 +200,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
public divIdSaveConfirmed(data: any) {
|
public divIdSaveConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -225,7 +219,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
public divIdUpdateConfirmed(data: any) {
|
public divIdUpdateConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -244,7 +237,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
public divIdSavedSuccessfully(divId: DivId) {
|
public divIdSavedSuccessfully(divId: DivId) {
|
||||||
this.checkboxes.push(<CheckDivId>{divId : divId, checked : false});
|
this.checkboxes.push(<CheckDivId>{divId : divId, checked : false});
|
||||||
console.info("checkboxes length: "+this.checkboxes.length);
|
|
||||||
this.applyCheck(false);
|
this.applyCheck(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +281,6 @@ export class DivIdsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ export class DivContentFormComponent implements OnInit{
|
||||||
this.route.queryParams.subscribe(params => {
|
this.route.queryParams.subscribe(params => {
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
|
@ -79,7 +78,6 @@ export class DivContentFormComponent implements OnInit{
|
||||||
|
|
||||||
public pageSelected(event) {
|
public pageSelected(event) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.getDivs(event.target.value);
|
this.getDivs(event.target.value);
|
||||||
|
@ -92,7 +90,6 @@ export class DivContentFormComponent implements OnInit{
|
||||||
|
|
||||||
public getCommunity(communityPid: string) {
|
public getCommunity(communityPid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -114,7 +111,6 @@ export class DivContentFormComponent implements OnInit{
|
||||||
|
|
||||||
public getDivs(pageId: string) {
|
public getDivs(pageId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
|
@ -81,7 +81,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -99,7 +98,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPages(community_pid: string) {
|
getPages(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -130,7 +128,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getDivHelpContents(community_pid: string) {
|
getDivHelpContents(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._helpService.getCommunityDivHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.getCommunityDivHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
@ -190,7 +187,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
private confirmModalOpen() {
|
private confirmModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeleteDivHelpContents.cancelButton = true;
|
this.alertModalDeleteDivHelpContents.cancelButton = true;
|
||||||
|
@ -204,7 +200,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteDivHelpContents(data: any) {
|
public confirmedDeleteDivHelpContents(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -241,7 +236,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public toggleDivHelpContents(status : boolean, ids : string[]) {
|
public toggleDivHelpContents(status : boolean, ids : string[]) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -346,7 +340,6 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.properties = data.envSpecific;
|
this.properties = data.envSpecific;
|
||||||
this.sub = this.route.queryParams.subscribe(params => {
|
this.sub = this.route.queryParams.subscribe(params => {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
|
||||||
//let id = params['id'];
|
//let id = params['id'];
|
||||||
let divContentId = params['classContentId'];
|
let divContentId = params['classContentId'];
|
||||||
this.communityPid = params['communityId'];
|
this.communityPid = params['communityId'];
|
||||||
|
@ -72,7 +72,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
private getDivHelpContent(divContentId: string) {
|
private getDivHelpContent(divContentId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -90,7 +89,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
getDivId(divId: string) {
|
getDivId(divId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -120,7 +118,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
private saveCustom() {
|
private saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(this.formComponent.myForm.valid) {
|
if(this.formComponent.myForm.valid) {
|
||||||
|
@ -128,7 +125,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
||||||
console.info(divHelpContent);
|
|
||||||
|
|
||||||
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -159,7 +155,6 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class NewDivHelpContentComponent {
|
||||||
this.properties = data.envSpecific;
|
this.properties = data.envSpecific;
|
||||||
this.route.queryParams.subscribe(params => {
|
this.route.queryParams.subscribe(params => {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
|
||||||
this.communityPid = params['communityId'];
|
this.communityPid = params['communityId'];
|
||||||
this.pageId = params['pageId'];
|
this.pageId = params['pageId'];
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,6 @@ export class NewDivHelpContentComponent {
|
||||||
|
|
||||||
private saveCustom() {
|
private saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(this.formComponent.myForm.valid) {
|
if(this.formComponent.myForm.valid) {
|
||||||
|
@ -58,7 +57,6 @@ export class NewDivHelpContentComponent {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
||||||
console.info(divHelpContent);
|
|
||||||
|
|
||||||
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -92,7 +90,6 @@ export class NewDivHelpContentComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
constructor(private element: ElementRef, private route: ActivatedRoute, private _router: Router, private _helpContentService: HelpContentService) {}
|
constructor(private element: ElementRef, private route: ActivatedRoute, private _router: Router, private _helpContentService: HelpContentService) {}
|
||||||
getEntities(community_pid: string) {
|
getEntities(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -107,7 +106,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyCheck(flag : boolean) {
|
public applyCheck(flag : boolean) {
|
||||||
console.info("applyCheck "+flag);
|
|
||||||
this.checkboxes.forEach(_ => _.checked = flag);
|
this.checkboxes.forEach(_ => _.checked = flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +136,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
private confirmDeleteEntitiesModalOpen() {
|
private confirmDeleteEntitiesModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeleteEntities.cancelButton = true;
|
this.alertModalDeleteEntities.cancelButton = true;
|
||||||
|
@ -152,7 +149,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteEntities(data: any) {
|
public confirmedDeleteEntities(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -184,7 +180,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
private entitiesModalOpen(modal: any, title: string, yesBtn: string) {
|
private entitiesModalOpen(modal: any, title: string, yesBtn: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
modal.cancelButton = true;
|
modal.cancelButton = true;
|
||||||
|
@ -197,7 +192,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public entitySaveConfirmed(data: any) {
|
public entitySaveConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -217,7 +211,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public entityUpdateConfirmed(data: any) {
|
public entityUpdateConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -292,7 +285,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
private confirmRelatedPagesModalOpen() {
|
private confirmRelatedPagesModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalRelatedPages.cancelButton = true;
|
this.alertModalRelatedPages.cancelButton = true;
|
||||||
|
@ -306,7 +298,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public continueToggling(event: any) {
|
public continueToggling(event: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -327,7 +318,6 @@ export class EntitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,6 @@ export class QuestionsComponent implements OnInit {
|
||||||
topics.push(topic._id)
|
topics.push(topic._id)
|
||||||
}
|
}
|
||||||
question.topics = topics;
|
question.topics = topics;
|
||||||
console.log(question);
|
|
||||||
this.formGroup.patchValue(question);
|
this.formGroup.patchValue(question);
|
||||||
this.updateModal.showModal();
|
this.updateModal.showModal();
|
||||||
}
|
}
|
||||||
|
@ -163,7 +162,6 @@ export class QuestionsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public saveQuestion(data : any):void {
|
public saveQuestion(data : any):void {
|
||||||
console.log(data);
|
|
||||||
this._faqService.saveQuestion(data).subscribe(
|
this._faqService.saveQuestion(data).subscribe(
|
||||||
question => this.questionSavedSuccessfully(question),
|
question => this.questionSavedSuccessfully(question),
|
||||||
error => this.handleError(<any>error)
|
error => this.handleError(<any>error)
|
||||||
|
@ -240,4 +238,4 @@ export class QuestionsComponent implements OnInit {
|
||||||
this.errorMessage = 'System error saving topic (Server responded: ' + error + ')';
|
this.errorMessage = 'System error saving topic (Server responded: ' + error + ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
private getPageHelpContent(pageContentId: string) {
|
private getPageHelpContent(pageContentId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -94,14 +93,12 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
private updateForm(pageHelpContent : PageHelpContent) {
|
private updateForm(pageHelpContent : PageHelpContent) {
|
||||||
this.pageHelpContent = pageHelpContent;
|
this.pageHelpContent = pageHelpContent;
|
||||||
console.info(pageHelpContent);
|
|
||||||
this.formComponent.myForm.patchValue((pageHelpContent));
|
this.formComponent.myForm.patchValue((pageHelpContent));
|
||||||
// console.log("patching",pageHelpContent);
|
// console.log("patching",pageHelpContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private saveCustom() {
|
private saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(this.formComponent.myForm.valid) {
|
if(this.formComponent.myForm.valid) {
|
||||||
|
@ -109,7 +106,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
||||||
console.info(pageHelpContent.community);
|
|
||||||
this._helpContentService.updatePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.updatePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
|
@ -139,7 +135,6 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ export class NewPageHelpContentComponent {
|
||||||
|
|
||||||
private saveCustom() {
|
private saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
//this.errorMessage = null;
|
//this.errorMessage = null;
|
||||||
|
@ -97,7 +96,6 @@ export class NewPageHelpContentComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ export class PageContentFormComponent implements OnInit{
|
||||||
this.properties = data.envSpecific;
|
this.properties = data.envSpecific;
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
|
|
|
@ -94,7 +94,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -112,7 +111,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPages(community_pid: string) {
|
getPages(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -143,7 +141,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPageHelpContents(community_pid: string) {
|
getPageHelpContents(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._helpService.getCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.getCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
@ -204,7 +201,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
private confirmModalOpen() {
|
private confirmModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeletePageHelpContents.cancelButton = true;
|
this.alertModalDeletePageHelpContents.cancelButton = true;
|
||||||
|
@ -218,7 +214,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePageHelpContents(data: any) {
|
public confirmedDeletePageHelpContents(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -255,7 +250,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public togglePageHelpContents(status : boolean, ids : string[]) {
|
public togglePageHelpContents(status : boolean, ids : string[]) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -265,7 +259,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
() => {
|
() => {
|
||||||
for(let id of ids) {
|
for(let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
||||||
console.info(i);
|
|
||||||
this.checkboxes[i].pageHelpContent.isActive=status;
|
this.checkboxes[i].pageHelpContent.isActive=status;
|
||||||
}
|
}
|
||||||
this.countPageHelpContents();
|
this.countPageHelpContents();
|
||||||
|
@ -357,7 +350,6 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,6 @@ export class EditHtmlPageContentComponent implements OnInit {
|
||||||
|
|
||||||
private getPage(communityId: string, pageId: string) {
|
private getPage(communityId: string, pageId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
@ -96,7 +95,6 @@ export class EditHtmlPageContentComponent implements OnInit {
|
||||||
|
|
||||||
private getHtmlPageContent(communityId: string, pageRoute: string) {
|
private getHtmlPageContent(communityId: string, pageRoute: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -121,7 +119,6 @@ export class EditHtmlPageContentComponent implements OnInit {
|
||||||
|
|
||||||
private saveCustom() {
|
private saveCustom() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this.router.url);
|
|
||||||
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
this.router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this.router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.formComponent.myForm.value.content = this.formComponent.myeditor.instance.getData();
|
this.formComponent.myForm.value.content = this.formComponent.myeditor.instance.getData();
|
||||||
|
@ -131,7 +128,6 @@ export class EditHtmlPageContentComponent implements OnInit {
|
||||||
//this.mode = "";
|
//this.mode = "";
|
||||||
|
|
||||||
let htmlPageContent : HtmlPageContent = this.formComponent.myForm.value;
|
let htmlPageContent : HtmlPageContent = this.formComponent.myForm.value;
|
||||||
console.info(htmlPageContent.community);
|
|
||||||
this._htmlContentService.updateHtmlPageContent(htmlPageContent, this.properties.adminToolsAPIURL).subscribe(
|
this._htmlContentService.updateHtmlPageContent(htmlPageContent, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
//this.mode = "preview";
|
//this.mode = "preview";
|
||||||
|
@ -165,7 +161,6 @@ export class EditHtmlPageContentComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,14 +92,12 @@ export class ModalFormComponent {
|
||||||
data => this.emmitObject.emit(data),
|
data => this.emmitObject.emit(data),
|
||||||
error => this.emmitError.emit(error)
|
error => this.emmitError.emit(error)
|
||||||
);
|
);
|
||||||
console.info(<Community> obj);
|
|
||||||
|
|
||||||
} else if(this.saveText == 'Save') {
|
} else if(this.saveText == 'Save') {
|
||||||
this._helpService.saveCommunity(<Community> obj, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.saveCommunity(<Community> obj, this.properties.adminToolsAPIURL).subscribe(
|
||||||
data => this.emmitObject.emit(data),
|
data => this.emmitObject.emit(data),
|
||||||
error => this.emmitError.emit(error)
|
error => this.emmitError.emit(error)
|
||||||
);
|
);
|
||||||
console.info(<Community> obj);
|
|
||||||
}
|
}
|
||||||
} else if (this.type == 'page') {
|
} else if (this.type == 'page') {
|
||||||
if(this.saveText == 'Update') {
|
if(this.saveText == 'Update') {
|
||||||
|
|
|
@ -43,7 +43,6 @@ export class PageFormComponent implements OnInit{
|
||||||
|
|
||||||
public toggle() {
|
public toggle() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
|
this.myForm.value.isCollapsed = !this.myForm.value.isCollapsed;
|
||||||
|
@ -76,7 +75,6 @@ export class PageFormComponent implements OnInit{
|
||||||
|
|
||||||
public getEntities(includedEntities: Set<String>) {
|
public getEntities(includedEntities: Set<String>) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -142,7 +140,6 @@ export class PageFormComponent implements OnInit{
|
||||||
|
|
||||||
public toggleEntity(status : boolean, id : string, entity: Entity) {
|
public toggleEntity(status : boolean, id : string, entity: Entity) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
let index: number = -1;
|
let index: number = -1;
|
||||||
|
|
|
@ -93,7 +93,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
getPages(community_pid: string) {
|
getPages(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -122,7 +121,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
getPagesWithDivIds(community_pid: string) {
|
getPagesWithDivIds(community_pid: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getPagesWithDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPagesWithDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
@ -165,7 +163,6 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyCheck(flag : boolean) {
|
public applyCheck(flag : boolean) {
|
||||||
console.info("applyCheck "+flag);
|
|
||||||
this.checkboxes.forEach(_ => _.checked = flag);
|
this.checkboxes.forEach(_ => _.checked = flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +193,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
private confirmModalOpen() {
|
private confirmModalOpen() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.alertModalDeletePages.cancelButton = true;
|
this.alertModalDeletePages.cancelButton = true;
|
||||||
|
@ -210,7 +206,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePages(data: any) {
|
public confirmedDeletePages(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -231,7 +226,7 @@ export class PagesComponent implements OnInit {
|
||||||
this.formGroup.patchValue(page);
|
this.formGroup.patchValue(page);
|
||||||
this.formComponent.setEntities(page.entities as Entity[]);
|
this.formComponent.setEntities(page.entities as Entity[]);
|
||||||
|
|
||||||
console.info(this.formGroup.value);
|
//console.info(this.formGroup.value);
|
||||||
//this.updateModal.showModal();
|
//this.updateModal.showModal();
|
||||||
this.modalErrorMessage = "";
|
this.modalErrorMessage = "";
|
||||||
this.pagesModalOpen(this.alertModalUpdatePage, "Update", "Update Page");
|
this.pagesModalOpen(this.alertModalUpdatePage, "Update", "Update Page");
|
||||||
|
@ -245,7 +240,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
private pagesModalOpen(modal: any, title: string, yesBtn: string) {
|
private pagesModalOpen(modal: any, title: string, yesBtn: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
modal.cancelButton = true;
|
modal.cancelButton = true;
|
||||||
|
@ -258,7 +252,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public pageSaveConfirmed(data: any) {
|
public pageSaveConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -278,7 +271,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public pageUpdateConfirmed(data: any) {
|
public pageUpdateConfirmed(data: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if(!this.formGroup.valid) {
|
if(!this.formGroup.valid) {
|
||||||
|
@ -297,14 +289,10 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public pageSavedSuccessfully(page: Page) {
|
public pageSavedSuccessfully(page: Page) {
|
||||||
this.checkboxes.push(<CheckPage>{page : page, checked : false});
|
this.checkboxes.push(<CheckPage>{page : page, checked : false});
|
||||||
console.info("checkboxes length: "+this.checkboxes.length);
|
|
||||||
this.applyCheck(false);
|
this.applyCheck(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public pageUpdatedSuccessfully(page : Page) {
|
public pageUpdatedSuccessfully(page : Page) {
|
||||||
console.info(page._id);
|
|
||||||
console.info(this.checkboxes.find(checkItem => (checkItem.page._id == page._id)));
|
|
||||||
console.info(page.entities);
|
|
||||||
this.checkboxes.find(checkItem => checkItem.page._id==page._id).page = page;
|
this.checkboxes.find(checkItem => checkItem.page._id==page._id).page = page;
|
||||||
this.applyCheck(false);
|
this.applyCheck(false);
|
||||||
}
|
}
|
||||||
|
@ -359,7 +347,6 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public togglePages(status : boolean, ids : string[]) {
|
public togglePages(status : boolean, ids : string[]) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -384,7 +371,6 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
getStatistics() {
|
getStatistics() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
// this.loadingMessage = 'Retrieving statistics';
|
// this.loadingMessage = 'Retrieving statistics';
|
||||||
|
@ -98,7 +97,6 @@ export class StatsComponent implements OnInit {
|
||||||
this.handleError('Failed to retrieve statistics for the chosen community!', error);
|
this.handleError('Failed to retrieve statistics for the chosen community!', error);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.log(`I have statistics!`);
|
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
this.getDisplayOptions();
|
this.getDisplayOptions();
|
||||||
}
|
}
|
||||||
|
@ -108,7 +106,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
getDisplayOptions() {
|
getDisplayOptions() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.contentService.getCommunityAdminStatisticsChoices(this.properties.adminToolsAPIURL, this.communityId)
|
this.contentService.getCommunityAdminStatisticsChoices(this.properties.adminToolsAPIURL, this.communityId)
|
||||||
|
@ -129,10 +126,9 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
getCommunityInfo() {
|
getCommunityInfo() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
|
//console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
|
||||||
this.configService.getCommunityInformation(this.properties.adminToolsAPIURL, this.communityId).subscribe(
|
this.configService.getCommunityInformation(this.properties.adminToolsAPIURL, this.communityId).subscribe(
|
||||||
res => {
|
res => {
|
||||||
this.communityInfo = res;
|
this.communityInfo = res;
|
||||||
|
@ -149,21 +145,15 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
onChangeEntity (entity: string) {
|
onChangeEntity (entity: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
this.deactivatedEntity = false;
|
this.deactivatedEntity = false;
|
||||||
this.displayedEntity = entity;
|
this.displayedEntity = entity;
|
||||||
console.log(`displayed entity is ${entity}`);
|
|
||||||
console.log(`statisticsSum[${entity}].total is ${this.statisticsSum[entity].total}`);
|
|
||||||
|
|
||||||
console.log(`found ${entity} in allowedEntities`);
|
|
||||||
this.displayedTimeline = `${entity}Timeline`;
|
this.displayedTimeline = `${entity}Timeline`;
|
||||||
console.log(`displayed Timeline is: ${this.displayedTimeline}`);
|
|
||||||
this.displayedGraph = `${entity}Graph`;
|
this.displayedGraph = `${entity}Graph`;
|
||||||
console.log(`displayed Graph is: ${this.displayedGraph}`);
|
|
||||||
this.changeDisplayedProjectChart(`${entity}Projectcolumn`);
|
this.changeDisplayedProjectChart(`${entity}Projectcolumn`);
|
||||||
if (this.statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor &&
|
if (this.statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor &&
|
||||||
this.statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor &&
|
this.statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor &&
|
||||||
|
@ -187,7 +177,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
changeDisplayedProjectChart(chartName: string) {
|
changeDisplayedProjectChart(chartName: string) {
|
||||||
this.displayedProjectChart = chartName;
|
this.displayedProjectChart = chartName;
|
||||||
console.log(`displayed ProjectChart is: ${this.displayedProjectChart}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createChartUrlMap() {
|
createChartUrlMap() {
|
||||||
|
@ -218,7 +207,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
toggleShowAllInMonitor(entity: string) {
|
toggleShowAllInMonitor(entity: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -234,9 +222,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectColumn',
|
'projectColumn',
|
||||||
this.showAllInMonitor,
|
this.showAllInMonitor,
|
||||||
true).subscribe(
|
true).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
|
|
||||||
|
@ -252,9 +240,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectPie',
|
'projectPie',
|
||||||
this.showAllInMonitor,
|
this.showAllInMonitor,
|
||||||
true).subscribe(
|
true).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
|
|
||||||
|
@ -270,9 +258,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectTable',
|
'projectTable',
|
||||||
this.showAllInMonitor,
|
this.showAllInMonitor,
|
||||||
true).subscribe(
|
true).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
|
|
||||||
|
@ -339,7 +327,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
toggleShowAllInDashboard(entity: string) {
|
toggleShowAllInDashboard(entity: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -354,9 +341,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectColumn',
|
'projectColumn',
|
||||||
!this.showAllInDashboard,
|
!this.showAllInDashboard,
|
||||||
false).subscribe(
|
false).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
this.handleUpdateError('The changed could not be saved', error);
|
this.handleUpdateError('The changed could not be saved', error);
|
||||||
|
@ -371,9 +358,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectPie',
|
'projectPie',
|
||||||
!this.showAllInDashboard,
|
!this.showAllInDashboard,
|
||||||
false).subscribe(
|
false).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
this.handleUpdateError('The changes could not be saved', error);
|
this.handleUpdateError('The changes could not be saved', error);
|
||||||
|
@ -388,9 +375,9 @@ export class StatsComponent implements OnInit {
|
||||||
'projectTable',
|
'projectTable',
|
||||||
!this.showAllInDashboard,
|
!this.showAllInDashboard,
|
||||||
false).subscribe(
|
false).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
//console.log(error);
|
||||||
//this.loadingMessage = '';
|
//this.loadingMessage = '';
|
||||||
//this.errorMessage = 'The changes could not be saved';
|
//this.errorMessage = 'The changes could not be saved';
|
||||||
this.handleUpdateError('The changes could not be saved', error);
|
this.handleUpdateError('The changes could not be saved', error);
|
||||||
|
@ -415,7 +402,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
toggleShowInMonitor(entity: string, chartsOrNumbers: string, title: string) {
|
toggleShowInMonitor(entity: string, chartsOrNumbers: string, title: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -429,7 +415,7 @@ export class StatsComponent implements OnInit {
|
||||||
title,
|
title,
|
||||||
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor,
|
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor,
|
||||||
true).subscribe(
|
true).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
|
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
|
||||||
() => {
|
() => {
|
||||||
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor;
|
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInMonitor;
|
||||||
|
@ -441,7 +427,6 @@ export class StatsComponent implements OnInit {
|
||||||
|
|
||||||
toggleShowInDashboard(entity: string, chartsOrNumbers: string, title: string) {
|
toggleShowInDashboard(entity: string, chartsOrNumbers: string, title: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -455,7 +440,7 @@ export class StatsComponent implements OnInit {
|
||||||
title,
|
title,
|
||||||
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard,
|
!this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard,
|
||||||
false).subscribe(
|
false).subscribe(
|
||||||
response => console.log(JSON.stringify(response)),
|
response => {},//console.log(JSON.stringify(response)),
|
||||||
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
|
error => this.handleUpdateError('The changes could not be saved', error),//console.log(error),
|
||||||
() => {
|
() => {
|
||||||
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard;
|
this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard = !this.statisticsDisplay.entities[entity][chartsOrNumbers].map[title].showInDashboard;
|
||||||
|
@ -485,7 +470,6 @@ export class StatsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
this.communityId = communityId['communityId'];
|
this.communityId = communityId['communityId'];
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
|
@ -97,7 +96,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public addSubject() {
|
public addSubject() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.community.subjects.push("");
|
this.community.subjects.push("");
|
||||||
|
@ -106,7 +104,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public removeSubject(i: any) {
|
public removeSubject(i: any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.community.subjects.splice(i, 1);
|
this.community.subjects.splice(i, 1);
|
||||||
|
@ -115,7 +112,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
|
|
||||||
public resetForm(communityId: string) {
|
public resetForm(communityId: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (communityId != null && communityId != '') {
|
if (communityId != null && communityId != '') {
|
||||||
|
@ -170,7 +166,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
}
|
}
|
||||||
public updateSubjects() {
|
public updateSubjects() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
|
@ -184,7 +179,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
let obs = concat(this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToAdd),
|
let obs = concat(this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToAdd),
|
||||||
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete));
|
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete));
|
||||||
obs.subscribe(res => {
|
obs.subscribe(res => {
|
||||||
console.log(res);
|
|
||||||
if (res["method"] == "delete") {
|
if (res["method"] == "delete") {
|
||||||
this.afterUpdateActions(res);
|
this.afterUpdateActions(res);
|
||||||
}
|
}
|
||||||
|
@ -193,7 +187,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
);
|
);
|
||||||
}else if (subjectsToAddAr.length > 0){
|
}else if (subjectsToAddAr.length > 0){
|
||||||
this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId +"/subjects", subjectsToAdd).subscribe(res => {
|
this._subjectsService.addSubjects(this.properties.communityAPI + this.communityId +"/subjects", subjectsToAdd).subscribe(res => {
|
||||||
console.log(res);
|
|
||||||
this.afterUpdateActions(res);
|
this.afterUpdateActions(res);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -201,7 +194,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
);
|
);
|
||||||
}else if (subjectsToDeleteAr.length > 0) {
|
}else if (subjectsToDeleteAr.length > 0) {
|
||||||
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete).subscribe(res => {
|
this._subjectsService.removeSubjects(this.properties.communityAPI + this.communityId + "/subjects", subjectsToDelete).subscribe(res => {
|
||||||
console.log(res);
|
|
||||||
this.afterUpdateActions(res);
|
this.afterUpdateActions(res);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -240,11 +232,9 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
let j = 0;
|
let j = 0;
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
if (this.isEmpty(data[i])) {
|
if (this.isEmpty(data[i])) {
|
||||||
// console.log(data[i]);
|
|
||||||
} else if (this.isNonEmpty(data[i])) {
|
} else if (this.isNonEmpty(data[i])) {
|
||||||
arrayNonEmpty[j] = data[i];
|
arrayNonEmpty[j] = data[i];
|
||||||
j++;
|
j++;
|
||||||
// console.log(data[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arrayNonEmpty;
|
return arrayNonEmpty;
|
||||||
|
@ -252,12 +242,8 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
|
|
||||||
private hasFilled(data: any): boolean {
|
private hasFilled(data: any): boolean {
|
||||||
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
|
if (this.isNonEmpty(data) && !this.isEmpty(data)) {
|
||||||
// TODO remove console message after final testing
|
|
||||||
console.log("NAME IS NOT EMPTY");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// TODO remove console message after final testing
|
|
||||||
console.log("NAME IS EMPTY");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,12 +267,12 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
if (!this.emailValidator(data['managers'][i])){
|
if (!this.emailValidator(data['managers'][i])){
|
||||||
// TODO remove console message after final testing
|
// TODO remove console message after final testing
|
||||||
console.log("INVALID EMAIL");
|
//console.log("INVALID EMAIL");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO remove console message after final testing
|
// TODO remove console message after final testing
|
||||||
console.log("ALL EMAILS ARE VALID");
|
//console.log("ALL EMAILS ARE VALID");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,14 +287,10 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
this.successfulSaveMessage = '';
|
this.successfulSaveMessage = '';
|
||||||
this.successfulResetMessage = '';
|
this.successfulResetMessage = '';
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM TRUE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetChange() {
|
private resetChange() {
|
||||||
this.hasChanged = false;
|
this.hasChanged = false;
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM FALSE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public get form() {
|
public get form() {
|
||||||
|
@ -354,7 +336,6 @@ export class SubjectsEditFormComponent implements OnInit{
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,8 @@ export class SubjectsService {
|
||||||
|
|
||||||
let body = JSON.stringify(subjects);
|
let body = JSON.stringify(subjects);
|
||||||
|
|
||||||
console.log(body);
|
|
||||||
|
|
||||||
return this.http.post(url, body, options)
|
return this.http.post(url, body, options)
|
||||||
.do(request => console.log("Insert Response:"+request.status))
|
//.do(request => console.log("Insert Response:"+request.status))
|
||||||
.map(res => res.json())
|
.map(res => res.json())
|
||||||
.map(res => {
|
.map(res => {
|
||||||
res["method"]="post";
|
res["method"]="post";
|
||||||
|
@ -32,11 +30,8 @@ export class SubjectsService {
|
||||||
let body = JSON.stringify(subjects);
|
let body = JSON.stringify(subjects);
|
||||||
let options = new RequestOptions({headers: headers,body:body});
|
let options = new RequestOptions({headers: headers,body:body});
|
||||||
|
|
||||||
|
|
||||||
console.log(body);
|
|
||||||
|
|
||||||
return this.http.delete(url, options)
|
return this.http.delete(url, options)
|
||||||
.do(request => console.log("Delete Response:"+request.status))
|
//.do(request => console.log("Delete Response:"+request.status))
|
||||||
.map(res => res.json())
|
.map(res => res.json())
|
||||||
.map(res => {
|
.map(res => {
|
||||||
res["method"]="delete";
|
res["method"]="delete";
|
||||||
|
|
|
@ -133,12 +133,11 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info("ngAfterViewInit");
|
//console.info("ngAfterViewInit");
|
||||||
}
|
}
|
||||||
|
|
||||||
filterData(row: any, query: string) {
|
filterData(row: any, query: string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
let returnValue: boolean = false;
|
let returnValue: boolean = false;
|
||||||
|
@ -173,7 +172,7 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
triggerInitialLoad(){
|
triggerInitialLoad(){
|
||||||
this.triggered = true;
|
this.triggered = true;
|
||||||
console.info("triggerInitialLoad");
|
//console.info("triggerInitialLoad");
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var table = (<any>$('#dpTable')).DataTable();
|
var table = (<any>$('#dpTable')).DataTable();
|
||||||
table.page( 0 ).draw( false );
|
table.page( 0 ).draw( false );
|
||||||
|
@ -183,7 +182,6 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
|
|
||||||
public goTo(page:number = 1) {
|
public goTo(page:number = 1) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.subscribersSearchUtils.page=page;
|
this.subscribersSearchUtils.page=page;
|
||||||
|
@ -192,7 +190,6 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
table.page( page - 1 ).draw( false );
|
table.page( page - 1 ).draw( false );
|
||||||
|
|
||||||
var info = table.page.info();
|
var info = table.page.info();
|
||||||
console.info("records: "+info.recordsDisplay);
|
|
||||||
this.subscribersSearchUtils.totalResults = info.recordsDisplay;
|
this.subscribersSearchUtils.totalResults = info.recordsDisplay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,7 +204,6 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
|
|
||||||
public removeSubscriber(email:string) {
|
public removeSubscriber(email:string) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.selectedSubscriberEmail = email;
|
this.selectedSubscriberEmail = email;
|
||||||
|
@ -228,25 +224,16 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteSubscriber() {
|
public confirmedDeleteSubscriber() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ this.selectedSubscriberEmail);
|
|
||||||
this.subRemove = this._subscribeService.unSubscribeToCommunity(this.communityId, this.selectedSubscriberEmail, this.properties.adminToolsAPIURL).subscribe(
|
this.subRemove = this._subscribeService.unSubscribeToCommunity(this.communityId, this.selectedSubscriberEmail, this.properties.adminToolsAPIURL).subscribe(
|
||||||
result => {
|
result => {
|
||||||
console.log(result);
|
|
||||||
console.info("email REMOVE");
|
|
||||||
console.log(this.selectedSubscriberEmail);
|
|
||||||
this.communitySubscribers = result;
|
this.communitySubscribers = result;
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error REMOVE");
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
console.info("completed REMOVE");
|
|
||||||
console.log(this.selectedSubscriberEmail);
|
|
||||||
console.log(this.communitySubscribers["subscribers"]);
|
|
||||||
this.subscribersSearchUtils.totalResults--;
|
this.subscribersSearchUtils.totalResults--;
|
||||||
this.subscribersSearchUtils.page=1;
|
this.subscribersSearchUtils.page=1;
|
||||||
|
|
||||||
|
@ -258,7 +245,6 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
|
|
||||||
public _getCommunitySubscribers(){
|
public _getCommunitySubscribers(){
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.subscribersSearchUtils.status = this.errorCodes.LOADING;
|
this.subscribersSearchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -271,8 +257,7 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
this.subResults = this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
|
this.subResults = this._subscribeService.getCommunitySubscribers(this.communityId, this.properties.adminToolsAPIURL).subscribe(
|
||||||
|
|
||||||
res => {
|
res => {
|
||||||
console.info(res);
|
//console.info("search Subscribers [total communitySubscribers:"+res.subscribers.length+"]");
|
||||||
console.info("search Subscribers [total communitySubscribers:"+res.subscribers.length+"]");
|
|
||||||
this.communitySubscribers = res;
|
this.communitySubscribers = res;
|
||||||
|
|
||||||
this.subscribersSearchUtils.totalResults = res.subscribers.length;
|
this.subscribersSearchUtils.totalResults = res.subscribers.length;
|
||||||
|
@ -319,7 +304,6 @@ export class ManageSubscribersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,15 +73,11 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
|
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
|
||||||
|
|
||||||
//TODO remove after final testing
|
//TODO remove after final testing
|
||||||
console.log("Before: ", userNotifications);
|
|
||||||
console.log("After: ", this.initialUserNotifications);
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error.status);
|
|
||||||
if (error.status == '404') {
|
if (error.status == '404') {
|
||||||
this.initialUserNotifications = this.initiateUserNotifications();
|
this.initialUserNotifications = this.initiateUserNotifications();
|
||||||
console.log(this.initialUserNotifications);
|
|
||||||
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
|
this.userNotifications = JSON.parse(JSON.stringify( this.initialUserNotifications ));
|
||||||
} else {
|
} else {
|
||||||
this.handleError('System error retrieving user notifications', error)
|
this.handleError('System error retrieving user notifications', error)
|
||||||
|
@ -108,7 +104,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
|
|
||||||
public updateUserNotifications() {
|
public updateUserNotifications() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
|
@ -117,7 +112,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
this.successfulSaveMessage = "";
|
this.successfulSaveMessage = "";
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
var userNotifications = this.parseUpdatedUserNotifications();
|
var userNotifications = this.parseUpdatedUserNotifications();
|
||||||
console.log(userNotifications);
|
|
||||||
|
|
||||||
this._manageUserNotificationsService.updateUserNotifications(this.properties.adminToolsAPIURL + "community/" + this.communityId + "/notifications", userNotifications).subscribe(
|
this._manageUserNotificationsService.updateUserNotifications(this.properties.adminToolsAPIURL + "community/" + this.communityId + "/notifications", userNotifications).subscribe(
|
||||||
userNotifications => {
|
userNotifications => {
|
||||||
|
@ -168,7 +162,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
|
|
||||||
*/
|
*/
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.mailPrefs.restoreNotification(0);
|
this.mailPrefs.restoreNotification(0);
|
||||||
|
@ -187,7 +180,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
|
|
||||||
public changeValueForNewManagers(notifyForManagers : any) {
|
public changeValueForNewManagers(notifyForManagers : any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.userNotifications.notifyForNewManagers = !notifyForManagers;
|
this.userNotifications.notifyForNewManagers = !notifyForManagers;
|
||||||
|
@ -197,7 +189,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
|
|
||||||
public changeValueForNewSubscribers(notifyForSubscribers : any) {
|
public changeValueForNewSubscribers(notifyForSubscribers : any) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.userNotifications.notifyForNewSubscribers = !notifyForSubscribers;
|
this.userNotifications.notifyForNewSubscribers = !notifyForSubscribers;
|
||||||
|
@ -209,19 +200,14 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
this.successfulSaveMessage = '';
|
this.successfulSaveMessage = '';
|
||||||
this.successfulResetMessage = '';
|
this.successfulResetMessage = '';
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM TRUE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetChange() {
|
private resetChange() {
|
||||||
this.hasChanged = false;
|
this.hasChanged = false;
|
||||||
// TODO remove after testing
|
|
||||||
console.log('I have changed: I AM FALSE');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public mailPrefsChanged(): boolean {
|
public mailPrefsChanged(): boolean {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
return this.mailPrefs.prefsChanged["0"];//(0);
|
return this.mailPrefs.prefsChanged["0"];//(0);
|
||||||
|
@ -253,7 +239,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,8 @@ export class ManageUserNotificationsService {
|
||||||
//let options = new RequestOptions({headers: headers});
|
//let options = new RequestOptions({headers: headers});
|
||||||
let body = JSON.stringify(userNotificationsRights);
|
let body = JSON.stringify(userNotificationsRights);
|
||||||
|
|
||||||
console.log(body);
|
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody());
|
||||||
|
//.do(request => console.log("Insert Response:"+request.status));
|
||||||
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.do(request => console.log("Insert Response:"+request.status));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parseUserNotifications(data:any, email:string): UserNotificationsRights {
|
parseUserNotifications(data:any, email:string): UserNotificationsRights {
|
||||||
|
|
|
@ -47,7 +47,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.zenodoCommunitySearchUtils.keyword = "";
|
this.zenodoCommunitySearchUtils.keyword = "";
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
|
this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
|
||||||
|
@ -78,7 +77,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public goTo(page:number = 1) {
|
public goTo(page:number = 1) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.zenodoCommunitySearchUtils.page=page;
|
this.zenodoCommunitySearchUtils.page=page;
|
||||||
|
@ -118,32 +116,27 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public addCommunity(community) {
|
public addCommunity(community) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this._manageZenodoCommunitiesService.addZCommunity(this.properties, this.communityId, community.id ).subscribe(
|
this._manageZenodoCommunitiesService.addZCommunity(this.properties, this.communityId, community.id ).subscribe(
|
||||||
data => {
|
data => {
|
||||||
console.info("data ADD");
|
|
||||||
console.info(data);
|
|
||||||
// this.undo[project.id] = data.id;
|
// this.undo[project.id] = data.id;
|
||||||
community["openaireId"]=data.id;
|
community["openaireId"]=data.id;
|
||||||
this.selectedCommunities.push(community);
|
this.selectedCommunities.push(community);
|
||||||
this.newlySelectedCommunities.push(community)
|
this.newlySelectedCommunities.push(community)
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error ADD");
|
|
||||||
console.log(err.status);
|
console.log(err.status);
|
||||||
},
|
}/*,
|
||||||
() => {
|
() => {
|
||||||
console.info("completed ADD");
|
console.info("completed ADD");
|
||||||
}
|
}*/
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeCommunity( comm) {
|
public removeCommunity( comm) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
var openaireId = this.getOpenaireId(comm);
|
var openaireId = this.getOpenaireId(comm);
|
||||||
|
@ -151,7 +144,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
data => {
|
data => {
|
||||||
var pos = -1;
|
var pos = -1;
|
||||||
for(var i=0; i< this.selectedCommunities.length;i++) {
|
for(var i=0; i< this.selectedCommunities.length;i++) {
|
||||||
console.info(this.selectedCommunities[i].id+ " "+ this.selectedCommunities[i].openaireId+" "+ comm.id);
|
|
||||||
if( this.selectedCommunities[i].id == comm.id) {
|
if( this.selectedCommunities[i].id == comm.id) {
|
||||||
pos= i;
|
pos= i;
|
||||||
break;
|
break;
|
||||||
|
@ -172,12 +164,11 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error remove");
|
|
||||||
console.log(err.status);
|
console.log(err.status);
|
||||||
},
|
}/*,
|
||||||
() => {
|
() => {
|
||||||
console.info("completed remove");
|
console.info("completed remove");
|
||||||
}
|
}*/
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info("ngAfterViewInit");
|
//console.info("ngAfterViewInit");
|
||||||
this.searchUtils.totalResults = this.selectedCommunities.length;
|
this.searchUtils.totalResults = this.selectedCommunities.length;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
|
||||||
*/
|
*/
|
||||||
triggerInitialLoad(){
|
triggerInitialLoad(){
|
||||||
this.triggered = true;
|
this.triggered = true;
|
||||||
console.info("triggerInitialLoad");
|
//console.info("triggerInitialLoad");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
var table = (<any>$('#dpTable')).DataTable();
|
var table = (<any>$('#dpTable')).DataTable();
|
||||||
table.page( 0 ).draw( false );
|
table.page( 0 ).draw( false );
|
||||||
|
@ -165,17 +165,14 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
|
||||||
table.page( page - 1 ).draw( false );
|
table.page( page - 1 ).draw( false );
|
||||||
|
|
||||||
var info = table.page.info();
|
var info = table.page.info();
|
||||||
console.info("records: "+info.recordsDisplay);
|
|
||||||
this.searchUtils.totalResults = info.recordsDisplay;
|
this.searchUtils.totalResults = info.recordsDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public confirmedDeleteCommunity(data : any) {
|
public confirmedDeleteCommunity(data : any) {
|
||||||
|
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
console.info("REMOVE: "+ this.communityId + " "+this.selectedToDelete.openaireId);
|
|
||||||
this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,this.selectedToDelete.openaireId ).subscribe(
|
this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,this.selectedToDelete.openaireId ).subscribe(
|
||||||
data => {
|
data => {
|
||||||
var pos = -1;
|
var pos = -1;
|
||||||
|
@ -196,19 +193,17 @@ export class ManageZenodoCommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
console.info("error remove");
|
|
||||||
console.log(err.status);
|
console.log(err.status);
|
||||||
},
|
}/*,
|
||||||
() => {
|
() => {
|
||||||
console.info("completed remove");
|
console.info("completed remove");
|
||||||
}
|
}*/
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeCommunity( comm) {
|
public removeCommunity( comm) {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.selectedToDelete = comm;
|
this.selectedToDelete = comm;
|
||||||
|
|
|
@ -83,7 +83,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
|
||||||
if(params['communityId']) {
|
if(params['communityId']) {
|
||||||
this.communityId = params['communityId'];
|
this.communityId = params['communityId'];
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
if (this.communityId != null && this.communityId != '') {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
|
@ -151,7 +150,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
|
||||||
|
|
||||||
public toggleAction() {
|
public toggleAction() {
|
||||||
if(!Session.isLoggedIn()){
|
if(!Session.isLoggedIn()){
|
||||||
console.info(this._router.url);
|
|
||||||
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
|
||||||
} else {
|
} else {
|
||||||
this.scroll();
|
this.scroll();
|
||||||
|
@ -195,7 +193,6 @@ export class ZenodoCommunitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public scroll() {
|
public scroll() {
|
||||||
console.info("scroll into view");
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,17 +338,15 @@ export class HelpContentService {
|
||||||
|
|
||||||
getCommunityStatistics(apiUrl: string, communityId: string): Observable<StatisticsSummary> {
|
getCommunityStatistics(apiUrl: string, communityId: string): Observable<StatisticsSummary> {
|
||||||
const url = `${apiUrl}communities/${communityId}`;
|
const url = `${apiUrl}communities/${communityId}`;
|
||||||
console.log(`getting statistics summary from: ${url}`);
|
//console.log(`getting statistics summary from: ${url}`);
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(res => <any>res.json())
|
.map(res => <any>res.json())
|
||||||
.do(res => { console.log(res); })
|
.map(res => res.statistics);
|
||||||
.map(res => res.statistics)
|
|
||||||
.do(res => { console.log(res); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunityAdminStatisticsChoices(apiUrl: string, communityId: string): Observable<StatisticsDisplay> {
|
getCommunityAdminStatisticsChoices(apiUrl: string, communityId: string): Observable<StatisticsDisplay> {
|
||||||
const url = `${apiUrl}statistics/${communityId}`;
|
const url = `${apiUrl}statistics/${communityId}`;
|
||||||
console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
.map(stats => <StatisticsDisplay>stats.json())
|
.map(stats => <StatisticsDisplay>stats.json())
|
||||||
.catch(this.handleError);
|
.catch(this.handleError);
|
||||||
|
@ -362,7 +360,7 @@ export class HelpContentService {
|
||||||
status: boolean,
|
status: boolean,
|
||||||
monitor: boolean): Observable<any> {
|
monitor: boolean): Observable<any> {
|
||||||
const url = `${apiUrl}statistics/${communityId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
const url = `${apiUrl}statistics/${communityId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
||||||
console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
|
|
||||||
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
||||||
.map(stats => <any>stats.json())
|
.map(stats => <any>stats.json())
|
||||||
|
|
|
@ -16,8 +16,6 @@ export class ManageCommunityContentProvidersService {
|
||||||
let options = new RequestOptions({headers: headers, body: id});
|
let options = new RequestOptions({headers: headers, body: id});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/contentproviders";
|
let url = properties.communityAPI+communityId+"/contentproviders";
|
||||||
console.info(url);
|
|
||||||
|
|
||||||
return this.http.delete(url, options)
|
return this.http.delete(url, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,11 +24,8 @@ export class ManageCommunityContentProvidersService {
|
||||||
let options = new RequestOptions({headers: headers});
|
let options = new RequestOptions({headers: headers});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/contentproviders";
|
let url = properties.communityAPI+communityId+"/contentproviders";
|
||||||
console.info(url);
|
|
||||||
|
|
||||||
let communityContentProvider = this.convertSearchContentProviderToCommunityContentProvider(contentProvider, communityId);
|
let communityContentProvider = this.convertSearchContentProviderToCommunityContentProvider(contentProvider, communityId);
|
||||||
console.info(contentProvider);
|
|
||||||
console.info(communityContentProvider);
|
|
||||||
|
|
||||||
return this.http.post(url, JSON.stringify(communityContentProvider), options)
|
return this.http.post(url, JSON.stringify(communityContentProvider), options)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
|
|
|
@ -16,8 +16,6 @@ export class ManageCommunityProjectsService {
|
||||||
let options = new RequestOptions({headers: headers, body: id});
|
let options = new RequestOptions({headers: headers, body: id});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/projects";
|
let url = properties.communityAPI+communityId+"/projects";
|
||||||
console.info(url);
|
|
||||||
|
|
||||||
return this.http.delete(url, options)
|
return this.http.delete(url, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,11 +24,8 @@ export class ManageCommunityProjectsService {
|
||||||
let options = new RequestOptions({headers: headers});
|
let options = new RequestOptions({headers: headers});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/projects";
|
let url = properties.communityAPI+communityId+"/projects";
|
||||||
console.info(url);
|
|
||||||
|
|
||||||
let communityProject = this.convertSearchProjectToCommunityProject(project, communityId);
|
let communityProject = this.convertSearchProjectToCommunityProject(project, communityId);
|
||||||
console.info(project);
|
|
||||||
console.info(communityProject);
|
|
||||||
let testProject: any = {
|
let testProject: any = {
|
||||||
"acronym": "test",
|
"acronym": "test",
|
||||||
"communityId": "egi",
|
"communityId": "egi",
|
||||||
|
|
|
@ -16,7 +16,6 @@ export class ManageZenodoCommunitiesService {
|
||||||
let options = new RequestOptions({headers: headers, body: id});
|
let options = new RequestOptions({headers: headers, body: id});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/zenodocommunities";
|
let url = properties.communityAPI+communityId+"/zenodocommunities";
|
||||||
console.info(url);
|
|
||||||
|
|
||||||
return this.http.delete(url, options)
|
return this.http.delete(url, options)
|
||||||
}
|
}
|
||||||
|
@ -26,13 +25,11 @@ export class ManageZenodoCommunitiesService {
|
||||||
let options = new RequestOptions({headers: headers});
|
let options = new RequestOptions({headers: headers});
|
||||||
|
|
||||||
let url = properties.communityAPI+communityId+"/zenodocommunities";
|
let url = properties.communityAPI+communityId+"/zenodocommunities";
|
||||||
console.info(url);
|
|
||||||
var zCommunity: any = {
|
var zCommunity: any = {
|
||||||
"communityId": communityId,
|
"communityId": communityId,
|
||||||
|
|
||||||
"zenodoid": zenodoid
|
"zenodoid": zenodoid
|
||||||
};
|
};
|
||||||
console.info(zCommunity);
|
|
||||||
return this.http.post(url, JSON.stringify(zCommunity), options)
|
return this.http.post(url, JSON.stringify(zCommunity), options)
|
||||||
.map(res => <any> res.json())
|
.map(res => <any> res.json())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue