Commit a76efb87 by sawit

module myhr-plus, myface, zeeme

parent 490595c0
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { DashboardComponent } from './dashboard.component';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
standalone: true,
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MyfaceComponent } from './myface.component';
import { RouterModule, Routes } from '@angular/router';
export const myface: Routes = [
{
path: "myface", children:[
{
path: 'dashboard',
loadComponent: () =>
import('./dashboard/dashboard.component').then((m) => m.DashboardComponent),
},
]
}
]
@NgModule({
imports: [
CommonModule
CommonModule,
RouterModule.forChild(myface),
],
declarations: [MyfaceComponent]
})
export class MyfaceModule { }
export class MyfaceModule {
static routes = myface;
}
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { DashboardComponent } from './dashboard.component';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
standalone: true,
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MyhrPlusComponent } from './myhr-plus.component';
import { RouterModule, Routes } from '@angular/router';
export const myhrplus: Routes = [
{
path: "myhr-plus", children:[
{
path: 'dashboard',
loadComponent: () =>
import('./dashboard/dashboard.component').then((m) => m.DashboardComponent),
},
]
}
]
@NgModule({
imports: [
CommonModule
CommonModule,
RouterModule.forChild(myhrplus),
],
declarations: [MyhrPlusComponent]
})
export class MyhrPlusModule { }
export class MyhrPlusModule {
static routes = myhrplus;
}
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { DashboardComponent } from './dashboard.component';
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DashboardComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
standalone: true,
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ZeemeComponent } from './zeeme.component';
import { RouterModule, Routes } from '@angular/router';
export const zeeme: Routes = [
{
path: "zeeme", children:[
{
path: 'dashboard',
loadComponent: () =>
import('./dashboard/dashboard.component').then((m) => m.DashboardComponent),
},
]
}
]
@NgModule({
imports: [
CommonModule
CommonModule,
RouterModule.forChild(zeeme),
],
declarations: [ZeemeComponent]
})
export class ZeemeModule { }
export class ZeemeModule {
static routes = zeeme;
}
......@@ -303,7 +303,7 @@
id="header-shortcut-scroll">
<div class="grid grid-cols-3 gap-2">
<div class="">
<a routerLink="/admin"
<a routerLink="/myhr-plus/dashboard"
class="p-4 items-center related-app block text-center rounded-sm hover:bg-gray-50 dark:hover:bg-black/20">
<img src="./assets/images/logoallHR/myhr-plus.jpg" alt="miscrosoft"
class="leading-[1.75] text-2xl !h-[1.75rem] align-middle flex justify-center mx-auto">
......@@ -323,7 +323,7 @@
</div>
<div class="">
<a routerLink="/admin"
<a routerLink="/zeeme/dashboard"
class="p-4 items-center related-app block text-center rounded-sm hover:bg-gray-50 dark:hover:bg-black/20">
<img src="./assets/images/logoallHR/zeemePlus.png" alt="miscrosoft"
class="leading-[1.75] text-2xl !h-[1.75rem] align-middle flex justify-center mx-auto">
......@@ -333,7 +333,7 @@
</div>
<div class="">
<a routerLink="/admin"
<a routerLink="/myface/dashboard"
class="p-4 items-center related-app block text-center rounded-sm hover:bg-gray-50 dark:hover:bg-black/20">
<img src="./assets/images/logoallHR/logo_myface.png" alt="miscrosoft"
class="leading-[1.75] text-2xl !h-[1.75rem] align-middle flex justify-center mx-auto">
......
......@@ -8,6 +8,9 @@
<img *ngIf="isMylearnRoute" src="./assets/images/logoallHR/mylearn-logo.png" alt="logo" width="100%">
<img *ngIf="isMyJobRoute" src="./assets/images/brand-logos/logo.png" alt="logo" width="100%">
<img *ngIf="isMyhrLiteRoute" src="./assets/images/logoallHR/myHR-Lite-logo-new.png" alt="logo" width="100%">
<img *ngIf="isMyFaceRoute" src="./assets/images/logoallHR/logo_myface.png" alt="logo" width="100%">
<img *ngIf="isZeemeRoute" src="./assets/images/logoallHR/zeemePlus.png" alt="logo" width="100%">
<img *ngIf="isMyhrPlusRoute" src="./assets/images/logoallHR/myhr-plus.jpg" alt="logo" width="100%">
</a>
......
......@@ -73,6 +73,9 @@ export class SidebarComponent {
isMylearnRoute: boolean = false;
isMyJobRoute: boolean = false;
isMyhrLiteRoute: boolean = false;
isMyFaceRoute: boolean = false;
isZeemeRoute: boolean = false;
isMyhrPlusRoute: boolean = false;
previousUrl: string = '';
currentUrl: string = '';
......@@ -115,6 +118,9 @@ export class SidebarComponent {
this.isMylearnRoute = this.currentUrl.includes('/mylearn');
this.isMyJobRoute = this.currentUrl.includes('/myjob');
this.isMyhrLiteRoute = this.currentUrl.includes('/myhr-lite');
this.isMyFaceRoute = this.currentUrl.includes('/myface');
this.isZeemeRoute = this.currentUrl.includes('/zeeme');
this.isMyhrPlusRoute = this.currentUrl.includes('/myhr-plus');
this.menuitemsSubscribe$ = this.navServices.items.subscribe((items) => {
this.changeMenu()
});
......@@ -147,6 +153,9 @@ export class SidebarComponent {
this.isMylearnRoute = this.currentUrl.includes('/mylearn');
this.isMyJobRoute = this.currentUrl.includes('/myjob');
this.isMyhrLiteRoute = this.currentUrl.includes('/myhr-lite');
this.isMyFaceRoute = this.currentUrl.includes('/myface');
this.isZeemeRoute = this.currentUrl.includes('/zeeme');
this.isMyhrPlusRoute = this.currentUrl.includes('/myhr-plus');
this.checkUrlChanges()
// Log to console for verification
console.log('Initial URL:', this.currentUrl);
......@@ -155,6 +164,9 @@ export class SidebarComponent {
console.log('Is Myportal Route:', this.isMyportalRoute);
console.log('mylearn routes',this.isMylearnRoute);
console.log('myhrlite routes',this.isMyhrLiteRoute);
console.log('myface routes',this.isMyFaceRoute);
console.log('zeeme routes',this.isZeemeRoute);
console.log('myhrplus routes',this.isMyhrPlusRoute);
}
......@@ -189,6 +201,9 @@ export class SidebarComponent {
this.isMylearnRoute = this.currentUrl.includes('/mylearn');
this.isMyJobRoute = this.currentUrl.includes('/myjob');
this.isMyhrLiteRoute = this.currentUrl.includes('/myhr-lite');
this.isMyFaceRoute = this.currentUrl.includes('/myface');
this.isZeemeRoute = this.currentUrl.includes('/zeeme');
this.isMyhrPlusRoute = this.currentUrl.includes('/myhr-plus');
// Log to console for verification
console.log('Current URL:', this.currentUrl);
......@@ -221,6 +236,12 @@ export class SidebarComponent {
this.menuItems = this.navServices.getMyJobMenu();
} else if (this.isMyhrLiteRoute){
this.menuItems = this.navServices.getMyhrLiteMenu();
} else if (this.isMyFaceRoute){
this.menuItems = this.navServices.getMyFaceMenu();
} else if (this.isZeemeRoute){
this.menuItems = this.navServices.getZeemeMenu();
} else if (this.isMyhrPlusRoute){
this.menuItems = this.navServices.getMyhrPlusMenu();
}else{
this.menuItems = this.navServices.getCommonMenu()
}
......
......@@ -32,6 +32,9 @@ import { MyskillXModule } from '../../DPU/myskill-x/myskill-x.module';
import { MylearnModule } from '../../DPU/mylearn/mylearn.module';
import { MyjobModule } from '../../DPU/myjob/myjob.module';
import { MyhrLiteModule } from '../../DPU/myhr-lite/myhr-lite.module';
import { MyfaceModule } from '../../DPU/myface/myface.module';
import { ZeemeModule } from '../../DPU/zeeme/zeeme.module';
import { MyhrPlusModule } from '../../DPU/myhr-plus/myhr-plus.module';
export const content: Routes = [
......@@ -70,6 +73,9 @@ export const content: Routes = [
...MylearnModule.routes,
...MyjobModule.routes,
...MyhrLiteModule.routes,
...MyfaceModule.routes,
...ZeemeModule.routes,
...MyhrPlusModule.routes,
]
}
......
......@@ -353,5 +353,44 @@ export class NavService implements OnDestroy {
];
}
getMyFaceMenu() {
return [
// myHR-Lite
{ headTitle: 'Myface' },
{
icon: 'receipt',
path: '/myface/dashboard',
title: 'dashboard',
type: 'link',
},
];
}
getZeemeMenu() {
return [
// myHR-Lite
{ headTitle: 'Zeemeplus' },
{
icon: 'receipt',
path: '/zeeme/dashboard',
title: 'dashboard',
type: 'link',
},
];
}
getMyhrPlusMenu() {
return [
// myHR-Lite
{ headTitle: 'Myhr-plus' },
{
icon: 'receipt',
path: '/myhr-plus/dashboard',
title: 'dashboard',
type: 'link',
},
];
}
items = new BehaviorSubject<Menu[]>(this.MENUITEMS);
}
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