Delete isLoggedIn from portals and class-contents
This commit is contained in:
parent
2d0893ff45
commit
02bf9abee4
|
@ -192,14 +192,6 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public togglePageHelpContents(status: boolean, ids: string[]) {
|
public togglePageHelpContents(status: boolean, ids: string[]) {
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this.router.navigate(['/user-info'], {
|
|
||||||
queryParams: {
|
|
||||||
'errorCode': LoginErrorCodes.NOT_VALID,
|
|
||||||
'redirectUrl': this.router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
|
@ -217,7 +209,6 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
|
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public filterPageHelpContent(divHelpContent: DivHelpContent, filters: PageHelpContentFilterOptions): boolean {
|
public filterPageHelpContent(divHelpContent: DivHelpContent, filters: PageHelpContentFilterOptions): boolean {
|
||||||
|
|
|
@ -81,11 +81,6 @@ export class PortalsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPortals() {
|
getPortals() {
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
|
||||||
queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
portals => {
|
portals => {
|
||||||
|
@ -99,7 +94,6 @@ export class PortalsComponent implements OnInit {
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving portals', error)));
|
error => this.handleError('System error retrieving portals', error)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public toggleCheckBoxes(event) {
|
public toggleCheckBoxes(event) {
|
||||||
this.checkboxes.forEach(_ => _.checked = event.target.checked);
|
this.checkboxes.forEach(_ => _.checked = event.target.checked);
|
||||||
|
@ -187,31 +181,14 @@ export class PortalsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
private portalModalOpen(title: string, yesBtn: string) {
|
private portalModalOpen(title: string, yesBtn: string) {
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
|
||||||
queryParams: {
|
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
|
||||||
"redirectUrl": this._router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.editModal.okButtonLeft = false;
|
this.editModal.okButtonLeft = false;
|
||||||
this.editModal.alertTitle = title;
|
this.editModal.alertTitle = title;
|
||||||
this.editModal.okButtonText = yesBtn;
|
this.editModal.okButtonText = yesBtn;
|
||||||
this.editModal.open();
|
this.editModal.open();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public portalSaveConfirmed(data: any) {
|
public portalSaveConfirmed(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
|
||||||
queryParams: {
|
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
|
||||||
"redirectUrl": this._router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (this.portalForm.value._id) {
|
if (this.portalForm.value._id) {
|
||||||
this.portalForm.get('type').enable();
|
this.portalForm.get('type').enable();
|
||||||
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.value,
|
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.value,
|
||||||
|
@ -241,7 +218,6 @@ export class PortalsComponent implements OnInit {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public portalSavedSuccessfully(portal: Portal) {
|
public portalSavedSuccessfully(portal: Portal) {
|
||||||
this.portals.push(portal);
|
this.portals.push(portal);
|
||||||
|
|
Loading…
Reference in New Issue