-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CreditMutuelArkea-feature/faq/dercbot-621-merge-managem…
…ent-and-training-in-a-single-main-menu-entry'
- Loading branch information
Showing
12 changed files
with
116 additions
and
52 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
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
2 changes: 1 addition & 1 deletion
2
bot/admin/web/src/app/faq/faq-management/faq-management.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<nb-route-tabset [tabs]="tabLinks"></nb-route-tabset> |
Empty file.
23 changes: 23 additions & 0 deletions
23
bot/admin/web/src/app/faq/faq-tabs/faq-tabs.component.spec.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FaqTabsComponent } from './faq-tabs.component'; | ||
|
||
describe('FaqTabsComponent', () => { | ||
let component: FaqTabsComponent; | ||
let fixture: ComponentFixture<FaqTabsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ FaqTabsComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(FaqTabsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
import { StateService } from '../../core-nlp/state.service'; | ||
import { UserRole } from '../../model/auth'; | ||
import { TabLink } from '../../shared/utils'; | ||
|
||
const managementTab = new TabLink('management', 'Faq management', 'book-open-outline'); | ||
const trainingTab = new TabLink('training', 'Faq training', 'checkmark-square-outline'); | ||
|
||
@Component({ | ||
selector: 'tock-faq-tabs', | ||
templateUrl: './faq-tabs.component.html', | ||
styleUrls: ['./faq-tabs.component.scss'] | ||
}) | ||
export class FaqTabsComponent implements OnInit { | ||
UserRole = UserRole; | ||
tabLinks = []; | ||
|
||
constructor(private router: Router, public state: StateService) {} | ||
|
||
ngOnInit() { | ||
if (this.state.hasRole(UserRole.faqBotUser)) this.tabLinks.push(managementTab); | ||
if (this.state.hasRole(UserRole.faqNlpUser)) this.tabLinks.push(trainingTab); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
bot/admin/web/src/app/faq/faq-training/faq-training.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,4 +1,4 @@ | ||
<header class="mb-2"> | ||
<header class="mt-3 mb-2"> | ||
<h1>FAQ Training</h1> | ||
</header> | ||
|
||
|
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