Commit 80e0ee6e by Harsh Shah

Initial commit for Admin Portal - Header/Footer/Sidebar/iframe

parent c02d0fdd
...@@ -19,12 +19,7 @@ ...@@ -19,12 +19,7 @@
"testTsconfig": "tsconfig.spec.json", "testTsconfig": "tsconfig.spec.json",
"prefix": "app", "prefix": "app",
"styles": [ "styles": [
"styles.scss", "styles.scss"
"../node_modules/primeng/resources/primeng.min.css",
"../node_modules/font-awesome/css/font-awesome.min.css",
"../node_modules/fullcalendar/dist/fullcalendar.min.css",
"../node_modules/quill/dist/quill.snow.css",
"../node_modules/primeicons/primeicons.css"
], ],
"scripts": [ "scripts": [
"../node_modules/jquery/dist/jquery.js", "../node_modules/jquery/dist/jquery.js",
...@@ -34,7 +29,8 @@ ...@@ -34,7 +29,8 @@
"../node_modules/fullcalendar/dist/fullcalendar.js", "../node_modules/fullcalendar/dist/fullcalendar.js",
"../node_modules/quill/dist/quill.js", "../node_modules/quill/dist/quill.js",
"../src/app/oneit/components/feedback/scripts/feedback.js", "../src/app/oneit/components/feedback/scripts/feedback.js",
"../src/app/oneit/components/feedback/scripts/html2canvas.js" "../src/app/oneit/components/feedback/scripts/html2canvas.js",
"../node_modules/select2/dist/js/select2.full.js"
], ],
"environmentSource": "environments/environment.ts", "environmentSource": "environments/environment.ts",
"environments": { "environments": {
......
...@@ -296,6 +296,11 @@ ...@@ -296,6 +296,11 @@
"@types/jasmine": "*" "@types/jasmine": "*"
} }
}, },
"@types/jquery": {
"version": "2.0.54",
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
"integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
},
"@types/node": { "@types/node": {
"version": "6.0.118", "version": "6.0.118",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.118.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.118.tgz",
...@@ -308,6 +313,14 @@ ...@@ -308,6 +313,14 @@
"integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=", "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",
"dev": true "dev": true
}, },
"@types/select2": {
"version": "4.0.42",
"resolved": "https://registry.npmjs.org/@types/select2/-/select2-4.0.42.tgz",
"integrity": "sha512-RsbJa95gWRKSLqAvduMPpfmxh/9rM94DB7fdvsXD1eLh2KlJMyEKQaEbntUpkSiz4FYoeQohADWMSswN3Qesvw==",
"requires": {
"@types/jquery": "*"
}
},
"@types/selenium-webdriver": { "@types/selenium-webdriver": {
"version": "2.53.43", "version": "2.53.43",
"resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz",
...@@ -1223,9 +1236,9 @@ ...@@ -1223,9 +1236,9 @@
} }
}, },
"bootstrap": { "bootstrap": {
"version": "4.3.1", "version": "3.3.7",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz",
"integrity": "sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==" "integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E="
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
...@@ -7379,11 +7392,28 @@ ...@@ -7379,11 +7392,28 @@
"moment": "2.18.1" "moment": "2.18.1"
} }
}, },
"ng2-select2": {
"version": "1.0.0-beta.16",
"resolved": "https://registry.npmjs.org/ng2-select2/-/ng2-select2-1.0.0-beta.16.tgz",
"integrity": "sha512-0a+/paD491mqlGXlB1SQ4XqmANTUtl6nOVzFUl/nUS1dwGWZoBY5FVYvUEBaJpIWO3hBFtSazq7lAe8rslEUjA==",
"requires": {
"@types/jquery": "^2.0.39",
"@types/select2": "4.0.42"
}
},
"ngx-bootstrap": { "ngx-bootstrap": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-2.0.5.tgz", "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-2.0.5.tgz",
"integrity": "sha512-IduTVb78RDVlrz2+bn6GXK/REfM/RsRnz/AENwmrgTOg1AtvahJ9qANxXRNn33Kv9GJmkOYy/MhD3DyzeMb16w==" "integrity": "sha512-IduTVb78RDVlrz2+bn6GXK/REfM/RsRnz/AENwmrgTOg1AtvahJ9qANxXRNn33Kv9GJmkOYy/MhD3DyzeMb16w=="
}, },
"ngx-device-detector": {
"version": "1.3.16",
"resolved": "https://registry.npmjs.org/ngx-device-detector/-/ngx-device-detector-1.3.16.tgz",
"integrity": "sha512-bEGR4CMxbOSat+dFJYewA1f+cZNGEMct9W5n3o/mzhIxQLQquBMcungFlQqYaB0vwlYnj/6vM0PlzCnwn/SRiw==",
"requires": {
"tslib": "^1.9.0"
}
},
"no-case": { "no-case": {
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
...@@ -10054,6 +10084,11 @@ ...@@ -10054,6 +10084,11 @@
"integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=",
"dev": true "dev": true
}, },
"select2": {
"version": "4.0.12",
"resolved": "https://registry.npmjs.org/select2/-/select2-4.0.12.tgz",
"integrity": "sha512-mbXC05AvjCboZcRlgJqN4mlI2qmqshpRC76sKNAdxS1lPLOh2m/NTyfL6xsvGoY6eIhjaya4dbumN99MudVQ2w=="
},
"selenium-webdriver": { "selenium-webdriver": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"@angular/platform-browser-dynamic": "^5.2.0", "@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0", "@angular/router": "^5.2.0",
"angular-tslint-rules": "^1.20.1", "angular-tslint-rules": "^1.20.1",
"bootstrap": "^4.1.0", "bootstrap": "3.3.7",
"chart.js": "2.7.1", "chart.js": "2.7.1",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"file-saver": "^1.3.8", "file-saver": "^1.3.8",
...@@ -37,12 +37,15 @@ ...@@ -37,12 +37,15 @@
"moment": "2.18.1", "moment": "2.18.1",
"nanoscroller": "^0.8.7", "nanoscroller": "^0.8.7",
"ng2-bootstrap": "^1.6.3", "ng2-bootstrap": "^1.6.3",
"ngx-bootstrap": "^2.0.4", "ng2-select2": "^1.0.0-beta.16",
"ngx-bootstrap": "2.0.5",
"ngx-device-detector": "^1.3.16",
"primeicons": "^1.0.0-beta.10", "primeicons": "^1.0.0-beta.10",
"primeng": "6.1.5", "primeng": "6.1.5",
"quill": "^1.3.5", "quill": "^1.3.5",
"rxjs": "^5.5.6", "rxjs": "^5.5.6",
"save": "^2.3.2", "save": "^2.3.2",
"select2": "^4.0.12",
"web-animations-js": "2.3.1", "web-animations-js": "2.3.1",
"zone.js": "^0.8.19" "zone.js": "^0.8.19"
}, },
......
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { FormBuilder } from '@angular/forms'; import { FormBuilder } from '@angular/forms';
import { Select2Module } from 'ng2-select2';
import { ConfirmationService, EditorModule, InputSwitchModule, OverlayPanelModule, PanelModule } from 'primeng/primeng'; import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { ModalModule } from 'ngx-bootstrap/modal';
import { DeviceDetectorModule } from 'ngx-device-detector';
import { ConfirmationService } from 'primeng/primeng';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app.routing'; import { AppRoutingModule } from './app.routing';
import { AppService } from './app.service'; import { AppService } from './app.service';
import { AdminIframePageComponent } from './components/admin-portal/admin-iframe-page/admin-iframe-page.component';
import { AdminPortalLayoutComponent } from './components/admin-portal/admin-portal-layout/admin-portal-layout.component';
import { AdminPortalLayoutService } from './components/admin-portal/admin-portal-layout/admin-portal-layout.service';
import { EditMessageTemplateComponent } from './components/edit-message-template/edit-message-template.component'; import { EditMessageTemplateComponent } from './components/edit-message-template/edit-message-template.component';
import { EditMessageTemplateService } from './components/edit-message-template/edit-message-template.service'; import { EditMessageTemplateService } from './components/edit-message-template/edit-message-template.service';
import { EditWorkflowTemplateComponent } from './components/edit-workflow-template/edit-workflow-template.component'; import { EditWorkflowTemplateComponent } from './components/edit-workflow-template/edit-workflow-template.component';
import { EditWorkflowTemplateService } from './components/edit-workflow-template/edit-workflow-template.service'; import { EditWorkflowTemplateService } from './components/edit-workflow-template/edit-workflow-template.service';
import { ListMessageTemplateComponent } from './components/list-message-template/list-message-template.component'; import { ListMessageTemplateComponent } from './components/list-message-template/list-message-template.component';
import { ListWorkFlowsComponent } from './components/list-work-flows/list-work-flows.component'; import { ListWorkFlowsComponent } from './components/list-work-flows/list-work-flows.component';
import { FullLayoutComponent } from './oneit/components/full-layout/full-layout.component'; import { FullLayoutComponent } from './oneit/components/full-layout/full-layout.component';
import { OneITModule } from './oneit/oneit.module'; import { OneITModule } from './oneit/oneit.module';
@NgModule({ @NgModule({
imports: [ imports: [
AppRoutingModule, AppRoutingModule,
OneITModule, OneITModule,
EditorModule, DeviceDetectorModule.forRoot(),
OverlayPanelModule, Select2Module,
PanelModule, ModalModule.forRoot(),
InputSwitchModule BsDropdownModule.forRoot()
], ],
declarations: [ declarations: [
AppComponent, AppComponent,
FullLayoutComponent, FullLayoutComponent,
AdminPortalLayoutComponent,
AdminIframePageComponent,
EditMessageTemplateComponent, EditMessageTemplateComponent,
EditWorkflowTemplateComponent,
ListMessageTemplateComponent, ListMessageTemplateComponent,
ListWorkFlowsComponent ListWorkFlowsComponent,
EditWorkflowTemplateComponent
], ],
providers: [ providers: [
FormBuilder, FormBuilder,
ConfirmationService, ConfirmationService,
AdminPortalLayoutService,
AppService, AppService,
EditMessageTemplateService, EditMessageTemplateService,
EditWorkflowTemplateService EditWorkflowTemplateService
...@@ -44,7 +52,6 @@ import { OneITModule } from './oneit/oneit.module'; ...@@ -44,7 +52,6 @@ import { OneITModule } from './oneit/oneit.module';
}) })
export class AppModule { export class AppModule {
// tslint:disable-next-line:no-empty
constructor() { constructor() {
} }
} }
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { AdminIframePageComponent } from './components/admin-portal/admin-iframe-page/admin-iframe-page.component';
import { AdminPortalLayoutComponent } from './components/admin-portal/admin-portal-layout/admin-portal-layout.component';
import { EditMessageTemplateComponent } from './components/edit-message-template/edit-message-template.component'; import { EditMessageTemplateComponent } from './components/edit-message-template/edit-message-template.component';
import { EditWorkflowTemplateComponent } from "./components/edit-workflow-template/edit-workflow-template.component"; import { EditWorkflowTemplateComponent } from './components/edit-workflow-template/edit-workflow-template.component';
import { ListMessageTemplateComponent } from './components/list-message-template/list-message-template.component'; import { ListMessageTemplateComponent } from './components/list-message-template/list-message-template.component';
import { ListWorkFlowsComponent } from './components/list-work-flows/list-work-flows.component'; import { ListWorkFlowsComponent } from './components/list-work-flows/list-work-flows.component';
import { AccessDeniedComponent } from './oneit/components/access-denied/access-denied.component'; import { AccessDeniedComponent } from './oneit/components/access-denied/access-denied.component';
import { FullLayoutComponent } from './oneit/components/full-layout/full-layout.component'; import { FullLayoutComponent } from './oneit/components/full-layout/full-layout.component';
import { HomeComponent } from './oneit/components/home/home.component'; import { HomeComponent } from './oneit/components/home/home.component';
import { IframePageComponent } from './oneit/components/iframe-page/iframe-page.component'; import { IframePageComponent } from './oneit/components/iframe-page/iframe-page.component';
import { AuthGuard } from './oneit/guards/auth.guard'; import { AuthGuard } from './oneit/guards/auth.guard';
export const routes: Routes = [ export const routes: Routes = [
{ {
path: '', path: '',
...@@ -42,6 +43,22 @@ export const routes: Routes = [ ...@@ -42,6 +43,22 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
component: IframePageComponent, component: IframePageComponent,
runGuardsAndResolvers: 'always' runGuardsAndResolvers: 'always'
}
]
},
{
path: 'admin',
component: AdminPortalLayoutComponent,
canActivate: [AuthGuard],
data: {
"privs" : ["TL_AccessAdminPortal"],
"redirectPage" : "extensions/adminportal/sign_in.jsp"
},
children: [
{
path: 'iframe-page/:url',
component: AdminIframePageComponent,
runGuardsAndResolvers: 'always'
}, },
{ {
path: 'edit-message-template', path: 'edit-message-template',
...@@ -54,12 +71,12 @@ export const routes: Routes = [ ...@@ -54,12 +71,12 @@ export const routes: Routes = [
canActivate: [AuthGuard] canActivate: [AuthGuard]
}, },
{ {
path: 'list-message-template', path: 'list-message-templates',
component: ListMessageTemplateComponent, component: ListMessageTemplateComponent,
canActivate: [AuthGuard] canActivate: [AuthGuard]
}, },
{ {
path: 'list-work-flows', path: 'list-workflow-templates',
component: ListWorkFlowsComponent, component: ListWorkFlowsComponent,
canActivate: [AuthGuard] canActivate: [AuthGuard]
}, },
...@@ -75,12 +92,10 @@ export const routes: Routes = [ ...@@ -75,12 +92,10 @@ export const routes: Routes = [
} }
] ]
} }
// Don't forget to add below line in app.module.ts
// entryComponents: [CustomHeaderComponent],
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes, {useHash: true, onSameUrlNavigation: 'reload'})], imports: [RouterModule.forRoot(routes, { useHash: true, onSameUrlNavigation: 'reload' })],
exports: [RouterModule] exports: [RouterModule]
}) })
export class AppRoutingModule { export class AppRoutingModule {
......
p-progressSpinner {
bottom: calc(100vh/2) !important;
right: calc(100vw/2) !important;
position: fixed !important;
}
<iframe #iframeElem
appIframeResizer
appIframeTracker
(iframeClick)="onIframeClick()"
width="100%"
[src]="pageURL | safe: 'url'"
scrolling="no"
frameborder="0"
style="width: 83.75%;"
(load)="onLoad(iframeElem)">
</iframe>
<p-progressSpinner animationDuration="1s" *ngIf="showLoader"></p-progressSpinner>
\ No newline at end of file
import { Location } from '@angular/common';
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Params, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { IframeMsgHandlingService } from '../../../oneit/services/iframe-msg-handling.service';
import { MenuService } from '../../../oneit/services/menu.service';
import { MsgsService } from '../../../oneit/services/msgs.service';
import { UtilsService } from '../../../oneit/services/utils.service';
@Component({
selector: 'app-admin-iframe-page',
templateUrl: './admin-iframe-page.component.html',
styleUrls: ['./admin-iframe-page.component.css']
})
export class AdminIframePageComponent implements OnInit {
pageURL: string;
pageLoaded: boolean;
subscriptions: Array<Subscription> = [];
showLoader: boolean = true;
constructor(
private changeDetector: ChangeDetectorRef,
private route: ActivatedRoute,
private router: Router,
private location: Location,
private utilsService: UtilsService,
public menuService: MenuService,
public msgsService: MsgsService,
public iframeMsgHandlingService: IframeMsgHandlingService
) { }
ngOnInit() {
this.subscriptions.push(this.route.params.subscribe(
(params: Params) => {
console.log(params);
if (params.url) {
this.updateLoader(true);
this.pageURL = decodeURIComponent(params.url);
this.changeDetector.detectChanges();
this.msgsService.clearErrorMessages();
this.pageLoaded = true;
}
}
));
this.subscriptions.push(this.router.events.subscribe(
(e: any) => {
// If it is a NavigationEnd event re-initalise the component
if (e instanceof NavigationEnd) {
if (!this.pageLoaded) { //Don't load if params already called
this.updateLoader(true);
this.pageURL = ''; //Dummy value - else iframe doesnt load when you try to load same url
this.changeDetector.detectChanges();
setTimeout(() => {
this.pageURL = decodeURIComponent(e.url.substring(19)); //Length 13 is based on route path: '/admin/iframe-page/'
this.changeDetector.detectChanges();
this.msgsService.clearErrorMessages();
}, 100);
}
this.pageLoaded = false;
}
}
));
this.subscriptions.push(this.iframeMsgHandlingService.msgReceived.subscribe(
(message : any) => {
if(message && message["name"]){
if(message["name"] === "loadingCompleted") {
this.updateLoader(false);
}
else if(message["name"] === "loadingStarted") {
this.updateLoader(true);
}
}
}
));
}
ngOnDestroy() {
this.utilsService.unsubscribeSubscriptions(this.subscriptions);
}
onIframeClick() {
}
onLoad(iframe) {
var iframeURL = iframe.contentWindow.location.href;
if (iframeURL) {
//this.location.go(this.router.createUrlTree(['../' + encodeURIComponent(iframeURL)], { relativeTo: this.route }).toString()); //So that refresh page works properly
}
}
updateLoader(newValue: boolean){
this.showLoader = newValue;
if(!this.showLoader){
this.menuService.reloadMenuData(this.subscriptions); //Reload menu only once loading is completed
}
this.changeDetector.detectChanges();
}
}
import { Message } from '@angular/compiler/src/i18n/i18n_ast';
import { Component, OnInit, ViewChild } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { BsModalService } from 'ngx-bootstrap/modal';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subscription } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { MsgsService } from '../../../oneit/services/msgs.service';
import { UserService } from '../../../oneit/services/user.service';
import { UtilsService } from '../../../oneit/services/utils.service';
import { AdminPortalLayoutService } from './admin-portal-layout.service';
@Component({
selector: 'app-admin-portal-layout',
templateUrl: './admin-portal-layout.component.html',
styleUrls: ['./admin-portal-layout.component.css']
})
export class AdminPortalLayoutComponent implements OnInit {
@ViewChild('reachedCapModal') reachedCapModal;
@ViewChild('trialNotAllowedModal') trialNotAllowedModal;
showLoader: boolean;
subscriptions: Array<Subscription> = [];
errorMsgs: Message[] = [];
successMsgs: Message[] = [];
showAllErrorsCalled: boolean = false;
dialogOpen: boolean = false;
clientName: string;
userName: string;
homeURL: string;
companyName: string;
companyUser: any;
selectedTeam: any;
selectedTeamID: string;
redirectURL: string;
createJobDisabled : boolean;
isStandardUser: boolean;
hiringTeams: any[];
userMenu: any;
sidebarMenu: any;
select2Options = {
minimumResultsForSearch: Infinity
}
constructor(
private deviceService: DeviceDetectorService,
private msgsService: MsgsService,
private userService: UserService,
private adminPortalLayoutService: AdminPortalLayoutService,
private utilsService: UtilsService,
private titleService: Title,
private router: Router,
private modalService: BsModalService
) { }
ngOnInit() {
if(this.deviceService.isMobile()) {
window.location.href = (environment.baseUrl + "extensions/adminportal/responsive_alert.jsp");
}
this.subscriptions.push(
this.msgsService.successMsgsUpdated.subscribe(
data => {
this.successMsgs = data;
}
)
);
this.subscriptions.push(
this.msgsService.errorMsgsUpdated.subscribe(
data => {
this.errorMsgs = data;
}
)
);
this.subscriptions.push(
this.msgsService.showAllErrors.subscribe((data) => {
this.showAllErrorsCalled = data;
})
);
this.titleService.setTitle('Matchd');
this.subscribeToUserData();
this.loadData();
}
onRouteUpdate() {
this.loadData();
}
loadData() {
this.userService.reloadUserDetails();
this.msgsService.clearErrorMessages();
this.adminPortalLayoutService.reloadAdminUserDetails();
this.loadMenu();
this.userName = this.userService.getUsername();
}
subscribeToUserData() {
this.subscriptions.push(this.adminPortalLayoutService.userDataUpdated.subscribe(
data => {
this.clientName = data.ClientName || this.userService.getFullName();
this.homeURL = data.HomeURL;
this.companyName = data.CompanyName;
this.companyUser = data.CompanyUser;
this.selectedTeam = data.SelectedTeam;
this.selectedTeamID = data.SelectedTeam ? data.SelectedTeam.ObjectID : null;
this.hiringTeams = data.HiringTeams;
this.createJobDisabled = data.CreateJobDisabled;
if(this.hiringTeams) {
//this.utilsService.addNULLOptionForAssocSelect(this.hiringTeams, 'HiringTeamName');
for(let hiringTeam of this.hiringTeams) {
hiringTeam.id = hiringTeam.ObjectID; //Added for select2
hiringTeam.text = hiringTeam.HiringTeamName;
}
}
if(this.companyName) {
this.titleService.setTitle('Matchd - ' + this.companyName);
} else {
this.titleService.setTitle('Matchd');
}
},
error => {
this.utilsService.handleError(error);
}
));
}
loadMenu() {
this.adminPortalLayoutService.getAdminMenu().subscribe(
data => {
this.userMenu = data.userMenu;
this.sidebarMenu= data.sidebarMenu;
},
error => {
this.utilsService.handleError(error);
}
)
}
selectedTeamChanged(event : any): void {
this.selectedTeamID = event.value;
this.showLoader = true;
this.subscriptions.push(
this.adminPortalLayoutService.selectHiringTeam(this.selectedTeamID).subscribe (
data => {
this.router.navigate(['admin/iframe-page', this.homeURL]);
this.loadData();
this.showLoader = false;
},
error => {
this.showLoader = false;
this.utilsService.handleError(error);
}
)
);
}
createJobClicked(): void {
this.showLoader = true;
this.subscriptions.push(
this.adminPortalLayoutService.createJob(this.selectedTeamID, this.companyUser).subscribe (
data => {
if(data.AllowCreateJob) {
if(data.AllowCreateJob === 'REACHED_CAP') {
this.modalService.show(this.reachedCapModal);
}
else if(data.AllowCreateJob === 'TRIAL') {
this.modalService.show(this.trialNotAllowedModal);
} else {
this.router.navigate(['admin/iframe-page', data.redirectURL]);
}
this.isStandardUser = data.StandardUser;
this.redirectURL = data.redirectURL;
this.showLoader = false;
}
},
error => {
this.showLoader = false;
this.utilsService.handleError(error);
}
)
);
}
}
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { ApiService } from '../../../oneit/services/api.service';
import { UtilsService } from '../../../oneit/services/utils.service';
@Injectable()
export class AdminPortalLayoutService {
userDataUpdated = new Subject<any>();
userData: any;
constructor(
private apiService: ApiService,
private utilsService: UtilsService
) {
}
reloadAdminUserDetails() {
let params = {
environment: environment.envName
}
this.apiService.post(`svc/AdminUserDetails`, params).subscribe (
(data) => {
if (this.utilsService.isSuccessfulResponse(data)) {
this.userData = data;
this.userDataUpdated.next(data);
}
});
}
getAdminMenu(): Observable<any> {
let params = {
environment: environment.envName
}
return this.apiService.post(`svc/AdminMenu`, params).map(
(data) => {
if (this.utilsService.isSuccessfulResponse(data)) {
return data;
}
});
}
selectHiringTeam(selectedTeam) : Observable<any> {
return this.utilsService.processObjects("SelectHiringTeam", { HiringTeam : selectedTeam });
}
createJob(selectedTeam, companyUser) : Observable<any> {
return this.utilsService.processObjects("CreateJobVisibility", { SelectedTeam : selectedTeam, CompanyUser : companyUser });
}
getHiringTeamID() {
return this.userData ? this.userData.selectedTeam : null;
}
}
...@@ -256,7 +256,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni ...@@ -256,7 +256,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
.subscribe( .subscribe(
() => { () => {
this.utilsService.handleSuccess(); this.utilsService.handleSuccess();
this.router.navigate(['/list-message-template']); this.router.navigate(['/list-message-templates']);
}, },
error => { error => {
this.showLoader = false; this.showLoader = false;
......
...@@ -35,8 +35,9 @@ export class AuthGuard implements CanActivate { ...@@ -35,8 +35,9 @@ export class AuthGuard implements CanActivate {
this.userService.setDetailsFromData(data); this.userService.setDetailsFromData(data);
if (data.UserName == "noprivauthtoken") { if (data.UserName == "noprivauthtoken") {
//localStorage.removeItem('userid'); let redirectPage = route.data["redirectPage"] || "editor/";
window.location.href = (environment.baseUrl + "editor/" + "?url=" + encodeURIComponent(window.location.href));
window.location.href = (environment.baseUrl + redirectPage + "?url=" + encodeURIComponent(window.location.href));
return false; return false;
} else { } else {
let privs = route.data["privs"] as Array<string>; let privs = route.data["privs"] as Array<string>;
......
...@@ -6,7 +6,7 @@ import { DialogModule } from 'primeng/dialog'; ...@@ -6,7 +6,7 @@ import { DialogModule } from 'primeng/dialog';
import { DropdownModule } from 'primeng/dropdown'; import { DropdownModule } from 'primeng/dropdown';
import { FieldsetModule } from 'primeng/fieldset'; import { FieldsetModule } from 'primeng/fieldset';
import { InputTextareaModule } from 'primeng/inputtextarea'; import { InputTextareaModule } from 'primeng/inputtextarea';
import { ButtonModule, CalendarModule, GrowlModule, InputTextModule, MegaMenuModule, MenubarModule, MessagesModule, ProgressSpinnerModule, ScrollPanelModule, SplitButtonModule, TabViewModule, TieredMenuModule, ToolbarModule } from 'primeng/primeng'; import { ButtonModule, CalendarModule, EditorModule, GrowlModule, InputTextModule, MegaMenuModule, MenubarModule, MessagesModule, OverlayPanelModule, ProgressSpinnerModule, ScrollPanelModule, SplitButtonModule, TabViewModule, TieredMenuModule, ToolbarModule, InputSwitchModule, PanelModule } from 'primeng/primeng';
import { SelectButtonModule } from 'primeng/selectbutton'; import { SelectButtonModule } from 'primeng/selectbutton';
import { TableModule } from 'primeng/table'; import { TableModule } from 'primeng/table';
...@@ -33,5 +33,9 @@ export const PrimeNGModules = [ ...@@ -33,5 +33,9 @@ export const PrimeNGModules = [
ProgressSpinnerModule, ProgressSpinnerModule,
CalendarModule, CalendarModule,
GrowlModule, GrowlModule,
MessagesModule MessagesModule,
EditorModule,
OverlayPanelModule,
PanelModule,
InputSwitchModule
]; ];
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/** Importing fonts */
@font-face {
font-family: 'Usual-Bold';
src: url('assets/fonts/Usual-Bold.woff2') format('woff2');
}
@font-face {
font-family: 'Usual-Light';
src: url('assets/fonts/Usual-Light.woff2') format('woff2');
}
@font-face {
font-family: 'Usual-Medium';
src: url('assets/fonts/Usual-Medium.woff2') format('woff2');
}
@font-face {
font-family: 'Usual-Regular';
src: url('assets/fonts/Usual-Regular.woff2') format('woff2');
}
* {
font-family: "Usual-Regular";
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-family: "Usual-Medium";
font-weight: 500;
}
input {
font-family: "Usual-Light" !important;
}
}
form {
background-color: #e9ecef;
.form-control {
height: 50px;
border-radius: 2px;
box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.08);
border: solid 1px #dbdbdf;
display: block;
width: 100%;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
&:focus {
background-color: #ffffff;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.08);
border: solid 1px rgba(3, 160, 231, 0.5);
outline: 0;
}
}
button, input, textarea {
font-family: "Usual-Light";
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd" stroke="#4E5258" stroke-linejoin="round" stroke-width=".696">
<path d="M12.377 5.504c0-3.294-3.084-5.176-5.884-5.176C3.013.328.324 3.08.324 6.588c0 1.994.65 3.863 2.598 5.027v3.771h6.493V13.11c1.298.007 1.96-.088 2.415-.547.583-.588.527-3.07.527-3.07s.553.022.972.004a.488.488 0 0 0 .374-.2c.084-.12.057-.266.068-.412.075-1.052-1.394-2.857-1.394-3.381z"/>
<path stroke-linecap="round" d="M8.73 4.948L6.07 7.801 4.172 5.94"/>
<path d="M10.202 6.22c0 2.17-1.743 3.928-3.895 3.928-2.15 0-3.896-1.758-3.896-3.928s1.745-3.929 3.896-3.929c2.152 0 3.895 1.76 3.895 3.929z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="13" viewBox="0 0 8 13">
<path fill="#BBBFC5" fill-rule="evenodd" d="M7.018 12.368a.914.914 0 0 0 0-1.294L2.444 6.5l4.574-4.574A.914.914 0 1 0 5.724.632L.547 5.81a.903.903 0 0 0-.26.691.903.903 0 0 0 .26.69l5.177 5.178a.914.914 0 0 0 1.294 0"/>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="8px" height="14px" viewBox="0 0 8 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: sketchtool 52.2 (67145) - http://www.bohemiancoding.com/sketch -->
<title>D6BDAD12-2BC4-48CC-B37C-806410FBB444</title>
<desc>Created with sketchtool.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Applicant-Detail---HT004" transform="translate(-316.000000, -113.000000)" fill="#03A0E7">
<g id="Content-Region" transform="translate(260.000000, 65.000000)">
<g id="Job-Aps-HDR---Slim">
<g id="Banner" transform="translate(41.000000, 34.000000)">
<g id="Back" transform="translate(0.000000, 1.000000)">
<path d="M25.6867319,16.3132681 C25.2795882,15.9050805 24.6187628,15.9050805 24.2105751,16.3132681 L18.9928726,21.5309707 L13.7751701,16.3132681 C13.3669824,15.9050805 12.706157,15.9050805 12.2990133,16.3132681 C11.8908257,16.7214557 11.8908257,17.3822812 12.2990133,17.7894249 L18.2046842,23.6950958 C18.4207836,23.9122391 18.708916,24.0051513 18.9928726,23.9915799 C19.2768292,24.0051513 19.5649616,23.9122391 19.781061,23.6950958 L25.6867319,17.7894249 C26.0949195,17.3822812 26.0949195,16.7214557 25.6867319,16.3132681" id="Arrow" transform="translate(18.992873, 20.000000) rotate(-270.000000) translate(-18.992873, -20.000000) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="13" viewBox="0 0 8 13">
<path fill="#BBBFC5" fill-rule="evenodd" d="M.826.632a.914.914 0 0 0 0 1.294L5.4 6.5.826 11.074a.914.914 0 1 0 1.294 1.294L7.297 7.19a.903.903 0 0 0 .26-.691.903.903 0 0 0-.26-.69L2.12.631a.914.914 0 0 0-1.294 0"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="7" viewBox="0 0 13 7">
<path fill="#FFF" fill-rule="evenodd" d="M12.004.268a.914.914 0 0 0-1.294 0L6.136 4.842 1.562.268A.914.914 0 1 0 .268 1.562L5.445 6.74c.19.19.442.272.69.26a.903.903 0 0 0 .692-.26l5.177-5.177a.914.914 0 0 0 0-1.294"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="7" viewBox="0 0 13 7">
<path fill="#BBBFC5" fill-rule="evenodd" d="M12.004.268a.914.914 0 0 0-1.294 0L6.136 4.842 1.562.268A.914.914 0 1 0 .268 1.562L5.445 6.74c.19.19.442.272.69.26a.903.903 0 0 0 .692-.26l5.177-5.177a.914.914 0 0 0 0-1.294"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="37" height="30" viewBox="0 0 37 30">
<path fill="none" fill-rule="evenodd" stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M33 4L11.25 26 4 18.143"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="18" viewBox="0 0 16 18">
<g fill="#7D7F82" fill-rule="evenodd">
<path d="M12.811 17.053H3.096A2.637 2.637 0 0 1 .47 14.41V6.063h14.878a.23.23 0 0 0 .089-.018v8.365a2.637 2.637 0 0 1-2.626 2.643m0-15.539a.236.236 0 0 0-.235.237c0 .131.105.237.235.237a2.637 2.637 0 0 1 2.626 2.643v.976a.23.23 0 0 0-.089-.018H.47v-.958a2.637 2.637 0 0 1 2.626-2.643c.13 0 .235-.106.235-.237a.236.236 0 0 0-.235-.237C1.389 1.514 0 2.912 0 4.631v9.779c0 1.718 1.389 3.116 3.096 3.116h9.715c1.707 0 3.096-1.398 3.096-3.116V4.63c0-1.718-1.389-3.116-3.096-3.116"/>
<path d="M6.133 1.988H9.74c.13 0 .235-.106.235-.237a.236.236 0 0 0-.235-.236H6.133a.236.236 0 0 0-.235.236c0 .131.105.237.235.237M12.374 9.953h-8.84a.236.236 0 0 0-.236.237c0 .131.105.237.236.237h8.84c.13 0 .235-.106.235-.237a.236.236 0 0 0-.235-.237M9.89 12.67H6.126a.236.236 0 0 0-.236.237c0 .13.106.237.236.237H9.89c.13 0 .235-.107.235-.237a.236.236 0 0 0-.235-.237M4.596 3.83c.13 0 .235-.107.235-.237V.237a.236.236 0 1 0-.47 0v3.356c0 .13.105.236.235.236M11.312 3.83c.13 0 .235-.107.235-.237V.237a.236.236 0 1 0-.47 0v3.356c0 .13.105.236.235.236"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" viewBox="0 0 22 20">
<g fill="#C3C7CC" fill-rule="evenodd">
<path d="M9.2 9.08V4.786c0-1.488 1.21-2.699 2.699-2.699h.75a2.702 2.702 0 0 1 2.699 2.7v4.291a2.701 2.701 0 0 1-2.698 2.698h-.751c-1.488 0-2.7-1.21-2.7-2.698m4.73 4.426a.628.628 0 0 0-.274 1.224c3.126.701 6.05 1.821 6.255 2.381v.844H4.636l-.002-.827c.208-.577 3.133-1.697 6.259-2.398a.628.628 0 0 0 .49-.612V12.98c.17.021.34.052.516.052h.75a3.958 3.958 0 0 0 3.954-3.954V4.787A3.958 3.958 0 0 0 12.65.833h-.751a3.959 3.959 0 0 0-3.954 3.954V9.08c0 1.541.894 2.864 2.183 3.516v1.022c-2.75.648-6.8 1.88-6.745 3.493v1.472c0 .346.28.627.628.627h16.527c.347 0 .628-.28.628-.627V17.13c.056-1.733-4.51-3.016-7.237-3.626"/>
<path d="M6.053 13.986a.538.538 0 0 0 .42-.525v-.87c.125.015.249.038.378.038h.6a.538.538 0 0 0 0-1.076h-.6A2.126 2.126 0 0 1 4.727 9.43V5.995c0-1.172.952-2.124 2.124-2.124h.6a.538.538 0 0 0 0-1.076h-.6a3.203 3.203 0 0 0-3.2 3.2v3.434c0 1.24.715 2.303 1.747 2.835v.768c-2.58.608-5.44 1.569-5.398 2.824v2.76a.538.538 0 1 0 1.076 0l-.006-2.734c.191-.458 2.52-1.345 4.983-1.896"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="20" viewBox="0 0 23 20">
<g fill="#C3C7CC" fill-rule="evenodd">
<path d="M9.283 12.153h3.647v-1.484H9.283v1.484zm9.322-2.527H3.606a.521.521 0 1 0 0 1.043H8.24v2.005c0 .289.233.522.522.522h4.69a.52.52 0 0 0 .521-.522V10.67h4.633a.522.522 0 1 0 0-1.043z"/>
<path d="M20.87 17.952c0 .36-.293.652-.653.652H1.957a.652.652 0 0 1-.653-.652V5.669c0-.36.293-.652.653-.652h18.26c.36 0 .653.292.653.652v12.283zM8.984 3.407c0-1.16.944-2.103 2.103-2.103 1.16 0 2.103.943 2.103 2.103v.306H8.984v-.306zm11.233.306h-5.723v-.306A3.411 3.411 0 0 0 11.087 0 3.41 3.41 0 0 0 7.68 3.407v.306H1.957C.877 3.713 0 4.59 0 5.669v12.283c0 1.079.877 1.956 1.957 1.956h18.26a1.959 1.959 0 0 0 1.957-1.956V5.669c0-1.079-.878-1.956-1.957-1.956z"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd" stroke="#4E5258" stroke-linecap="round" stroke-linejoin="round" stroke-width=".696">
<path d="M.348 15.348h15v-15h-15z"/>
<path d="M2.305 4.913l1.304 1.304 3.26-3.26M2.305 10.783l1.304 1.305 3.26-3.261M8.174 5.566h5.218M8.174 11.435h5.218"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<g fill="#4E5258" fill-rule="nonzero">
<path d="M7 0a7 7 0 1 0 7 7 7.009 7.009 0 0 0-7-7zm6.314 7A6.314 6.314 0 1 1 7 .686 6.321 6.321 0 0 1 13.314 7z"/>
<path d="M10.556 8.911a.343.343 0 0 0-.477.092c-.113.168-1.16 1.634-3.079 1.634-1.919 0-2.966-1.466-3.079-1.637a.344.344 0 1 0-.571.384c.137.203 1.379 1.939 3.65 1.939s3.513-1.736 3.647-1.934a.343.343 0 0 0-.091-.476V8.91z"/>
<circle cx="5.217" cy="5.079" r="1"/>
<circle cx="8.783" cy="5.079" r="1"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="7" viewBox="0 0 13 7">
<path fill="#FFF" fill-opacity=".7" fill-rule="evenodd" d="M12.004.268a.914.914 0 0 0-1.294 0L6.136 4.842 1.562.268A.914.914 0 1 0 .268 1.562L5.445 6.74c.19.19.442.272.69.26a.903.903 0 0 0 .692-.26l5.177-5.177a.914.914 0 0 0 0-1.294"/>
</svg>
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