Commit 054ef1d0 by GD-A-150752

bug fix

parent cc49f5d6
......@@ -129,7 +129,7 @@ export const routes: Routes = [
canActivate: [AuthGuard],
data: {
privs: ['TL_AccessApplicantPortal'],
redirectPage: 'ApplicantPortal-ApplyJob.htm?cms.rm=SignIn&JobID=123425'
redirectPage: 'ApplicantPortal-ApplyJob.htm?cms.rm=SignIn&JobID=:job'
},
children: [
{
......
......@@ -199,7 +199,7 @@
name="StageName{{stage.ObjectID}}"
pInputText required/>
</p-header>
<div class="ui-g form-group" *ngIf="!panel.collapsed">
<div class="ui-g form-group">
<!-- Start steps section -->
<ng-container *ngTemplateOutlet="stepsTemplate; context:{stage: stage}"></ng-container>
<!-- End steps section -->
......
......@@ -708,6 +708,26 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this.showLoader = false;
this.utilsService.handleError(error);
window.scrollTo(0, 0);
if ($('.errorBlock.ng-invalid').length) {
const errorBlocks = $('.errorBlock.ng-invalid');
errorBlocks.each((index, elem) => {
const messagePanel = $($(elem)
.closest('p-panel>.ui-widget-content')[0]);
if ($(messagePanel[0].children[1])[0].classList
.contains('ui-panel-content-wrapper-overflown')) {
$(messagePanel[0].children[0])
.click();
}
const panel = $($($(elem)
.closest('p-panel')[0])
.closest('p-panel>.ui-widget-content')[0]);
if ($(panel[0].children[1])[0].classList
.contains('ui-panel-content-wrapper-overflown')) {
$(panel[0].children[0])
.click();
}
});
}
}
)
);
......
......@@ -20,6 +20,7 @@ export class AuthGuard implements CanActivate {
) {
}
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> {
......@@ -32,12 +33,15 @@ export class AuthGuard implements CanActivate {
(data) => {
if (this.utilServices.isSuccessfulResponse(data)) {
let redirectPage = route.data["redirectPage"] || "editor/";
this.userService.setDetailsFromData(data);
if (data.UserName == "noprivauthtoken") {
let redirectPage = route.data["redirectPage"] || "editor/";
window.location.href = (environment.baseUrl + redirectPage + "?url=" + encodeURIComponent(window.location.href));
const url = window.location.href;
const matches = url.match(/applicant\/(\d+)\/message-engine/);
if (matches[1]) {
redirectPage = redirectPage.replace(':job', matches[1]);
}
window.location.href = (environment.baseUrl + redirectPage + "?url=" + encodeURIComponent(url));
return false;
} else {
let privs = route.data["privs"] as Array<string>;
......@@ -53,8 +57,8 @@ export class AuthGuard implements CanActivate {
}
}
)
.catch(
(err) => of(false)
);
.catch(
(err) => of(false)
);
}
}
......@@ -696,7 +696,7 @@ span.select2-selection.select2-selection--single:focus{
margin-top: -4px;
}
textarea.form-control.textarea-box{
height: 250px;
height: calc(100vh - 500px) !important;
resize: none;
line-height: 24px;
padding: 15px 13px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment