Commit 054ef1d0 by GD-A-150752

bug fix

parent cc49f5d6
...@@ -129,7 +129,7 @@ export const routes: Routes = [ ...@@ -129,7 +129,7 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
data: { data: {
privs: ['TL_AccessApplicantPortal'], privs: ['TL_AccessApplicantPortal'],
redirectPage: 'ApplicantPortal-ApplyJob.htm?cms.rm=SignIn&JobID=123425' redirectPage: 'ApplicantPortal-ApplyJob.htm?cms.rm=SignIn&JobID=:job'
}, },
children: [ children: [
{ {
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
name="StageName{{stage.ObjectID}}" name="StageName{{stage.ObjectID}}"
pInputText required/> pInputText required/>
</p-header> </p-header>
<div class="ui-g form-group" *ngIf="!panel.collapsed"> <div class="ui-g form-group">
<!-- Start steps section --> <!-- Start steps section -->
<ng-container *ngTemplateOutlet="stepsTemplate; context:{stage: stage}"></ng-container> <ng-container *ngTemplateOutlet="stepsTemplate; context:{stage: stage}"></ng-container>
<!-- End steps section --> <!-- End steps section -->
......
...@@ -708,6 +708,26 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn ...@@ -708,6 +708,26 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this.showLoader = false; this.showLoader = false;
this.utilsService.handleError(error); this.utilsService.handleError(error);
window.scrollTo(0, 0); 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 { ...@@ -20,6 +20,7 @@ export class AuthGuard implements CanActivate {
) { ) {
} }
canActivate( canActivate(
route: ActivatedRouteSnapshot, route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> { state: RouterStateSnapshot): Observable<boolean> {
...@@ -32,12 +33,15 @@ export class AuthGuard implements CanActivate { ...@@ -32,12 +33,15 @@ export class AuthGuard implements CanActivate {
(data) => { (data) => {
if (this.utilServices.isSuccessfulResponse(data)) { if (this.utilServices.isSuccessfulResponse(data)) {
let redirectPage = route.data["redirectPage"] || "editor/";
this.userService.setDetailsFromData(data); this.userService.setDetailsFromData(data);
if (data.UserName == "noprivauthtoken") { if (data.UserName == "noprivauthtoken") {
let redirectPage = route.data["redirectPage"] || "editor/"; const url = window.location.href;
const matches = url.match(/applicant\/(\d+)\/message-engine/);
window.location.href = (environment.baseUrl + redirectPage + "?url=" + encodeURIComponent(window.location.href)); if (matches[1]) {
redirectPage = redirectPage.replace(':job', matches[1]);
}
window.location.href = (environment.baseUrl + redirectPage + "?url=" + encodeURIComponent(url));
return false; return false;
} else { } else {
let privs = route.data["privs"] as Array<string>; let privs = route.data["privs"] as Array<string>;
...@@ -53,8 +57,8 @@ export class AuthGuard implements CanActivate { ...@@ -53,8 +57,8 @@ export class AuthGuard implements CanActivate {
} }
} }
) )
.catch( .catch(
(err) => of(false) (err) => of(false)
); );
} }
} }
...@@ -696,7 +696,7 @@ span.select2-selection.select2-selection--single:focus{ ...@@ -696,7 +696,7 @@ span.select2-selection.select2-selection--single:focus{
margin-top: -4px; margin-top: -4px;
} }
textarea.form-control.textarea-box{ textarea.form-control.textarea-box{
height: 250px; height: calc(100vh - 500px) !important;
resize: none; resize: none;
line-height: 24px; line-height: 24px;
padding: 15px 13px; 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