-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qbd-direct integrations main page setting (#942)
* qbd-direct integrations main page setting
- Loading branch information
1 parent
6d5b242
commit d19e444
Showing
4 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<router-outlet></router-outlet> | ||
<div [ngClass]="{'tw-h-100-vh tw-bg-bg-tertiary-lighter tw-overflow-auto': brandingFeatureConfig.isBackgroundColorAllowed}"> | ||
<app-main-menu [modules]="modules" [activeItem]="modules[0]" [appName]="appName" [isDropdrownRequired]="false" [isSyncVisible]="true"></app-main-menu> | ||
<div> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> |
41 changes: 37 additions & 4 deletions
41
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
import { Component } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { CommonModule } from '@angular/common'; | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Router, RouterModule } from '@angular/router'; | ||
import { MenuItem } from 'primeng/api'; | ||
import { brandingContent, brandingFeatureConfig } from 'src/app/branding/branding-config'; | ||
import { AppName } from 'src/app/core/models/enum/enum.model'; | ||
import { SharedModule } from 'src/app/shared/shared.module'; | ||
|
||
@Component({ | ||
selector: 'app-qbd-direct-main', | ||
standalone: true, | ||
imports: [RouterModule], | ||
imports: [RouterModule, CommonModule, SharedModule], | ||
templateUrl: './qbd-direct-main.component.html', | ||
styleUrl: './qbd-direct-main.component.scss' | ||
}) | ||
export class QbdDirectMainComponent { | ||
export class QbdDirectMainComponent implements OnInit { | ||
|
||
appName: AppName = AppName.QBD_DIRECT; | ||
|
||
readonly brandingContent = brandingContent.common; | ||
|
||
modules: MenuItem[] = [ | ||
{label: 'Dashboard', routerLink: '/integrations/qbd_direct/main/dashboard'}, | ||
{label: this.brandingContent.exportLogTabName, routerLink: '/integrations/qbd_direct/main/export_log'}, | ||
{label: 'Mapping', routerLink: '/integrations/qbd_direct/main/mapping'}, | ||
{label: 'Configuration', routerLink: '/integrations/qbd_direct/main/configuration'} | ||
]; | ||
|
||
activeModule: MenuItem; | ||
|
||
readonly brandingFeatureConfig = brandingFeatureConfig; | ||
|
||
constructor( | ||
private router: Router | ||
) { } | ||
|
||
|
||
private setupPage() { | ||
this.activeModule = this.modules[0]; | ||
this.router.navigateByUrl(this.modules[0].routerLink); | ||
} | ||
|
||
ngOnInit(): void { | ||
this.setupPage(); | ||
} | ||
} |