diff --git a/my-workspace/projects/sae-lib/buttons/feedback-button/feedback-button.ts b/my-workspace/projects/sae-lib/buttons/feedback-button/feedback-button.ts index 3914445..4b02f5a 100644 --- a/my-workspace/projects/sae-lib/buttons/feedback-button/feedback-button.ts +++ b/my-workspace/projects/sae-lib/buttons/feedback-button/feedback-button.ts @@ -17,11 +17,6 @@ export class FeedbackButton { submitSuccess: boolean = false; submitError: boolean = false; - // constructor( - // private store: Store, - // private apiService: ApiService - // ) { - // } toggleModal() { this.isModalOpen = !this.isModalOpen; diff --git a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.html b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.html index ad4f0b2..4a9df9c 100644 --- a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.html +++ b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.html @@ -1,17 +1,17 @@ -
+
@@ -21,38 +21,30 @@
+ +
+      filters:
+      {{ appState.filters }}
+    
+ + - - - + + + + + +
-
+ - -
+ + + + + + +
diff --git a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.scss b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.scss index 7275617..ab081a9 100644 --- a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.scss +++ b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.scss @@ -2,15 +2,15 @@ :host { + .translate-texts { + width: 1312px; + } + .selectors { display: flex; flex-direction: row; - gap: 10px; + gap: 5px; - sae-multi-selector { - margin-left: 20px; - - } } .dropdown { @@ -20,7 +20,6 @@ right: 0; top: 0; cursor: pointer; - } &:hover { @@ -46,8 +45,11 @@ .chips-listing { display: flex; border-radius: 8px; + position: absolute; + top: 577px; } + .filter-group { @@ -65,9 +67,11 @@ margin-top: 16px; border-radius: 4px; background: variables.$csc-filters-box-color; - width: 100%; - height: 400px; + + width: 1332px; + height: 208px; padding: 12px; + overflow-y: auto; .chips-column { padding-right: 10px; diff --git a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts index 51ad3ad..b89defe 100644 --- a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts +++ b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts @@ -17,7 +17,11 @@ export class FiltersGroup { @Input() appState: any = {}; @Input() store: any; @Input() actionTypes: any; + @Input() disabled!: boolean; + constructor() { + console.log('constructor filters group', this.appState, this.store, this.actionTypes); + } onSelectedChoicesChange(e: any) { console.log('onSelectedChoicesChange', e); diff --git a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.html b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.html index 1dfd693..0f4d2f7 100644 --- a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.html +++ b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.html @@ -12,14 +12,15 @@ {{ label }}
+ - {{ selectedChoices?.length }} + {{ selectedChoices?.length || 0 }} - +

Question analysis

- @if (appState.botMessage) { + @if (appState?.botMessage) { @@ -39,7 +39,8 @@
- +
diff --git a/sae-csc/src/app/pages/main/main.scss b/sae-csc/src/app/pages/main/main.scss index f75019e..eb66f10 100644 --- a/sae-csc/src/app/pages/main/main.scss +++ b/sae-csc/src/app/pages/main/main.scss @@ -1,7 +1,9 @@ :host { - width: 1312px; - display: block; + //width: 1312px; + //display: block; + + margin: 0 auto; #question_analysis { sae-bot-talks { @@ -44,4 +46,8 @@ } } + #main_page { + padding-bottom: 400px; + } + } diff --git a/sae-csc/src/app/pages/main/main.ts b/sae-csc/src/app/pages/main/main.ts index efe42b4..f2e3189 100644 --- a/sae-csc/src/app/pages/main/main.ts +++ b/sae-csc/src/app/pages/main/main.ts @@ -1,5 +1,5 @@ import {Component} from '@angular/core'; -import {TranslateTexts} from 'sae-lib/inbox/translate-texts/translate-texts'; +import {TranslateTexts} from '../../shared/translate-texts/translate-texts'; import {FiltersGroup} from 'sae-lib/filters/filters-group/filters-group'; import {BottomNavigation} from '../../shared/navigation/bottom-navigation/bottom-navigation'; import {FeedbackButton} from 'sae-lib/buttons/feedback-button/feedback-button'; diff --git a/sae-csc/src/app/redux/csc.types.ts b/sae-csc/src/app/redux/csc.types.ts index 93ae6d1..e2c626e 100644 --- a/sae-csc/src/app/redux/csc.types.ts +++ b/sae-csc/src/app/redux/csc.types.ts @@ -1,9 +1,19 @@ -export type CscCase = { - -}; -export type TechManual = { - -}; -export type filterListing = { - -}; +export type CscCase = {}; +export type TechManual = {}; +export type filterListing = {}; +export type filterGroupType = { + engineType: filterDoubleListType, + findings: filterDoubleListType, + ata: filterDoubleListType, + partNumber: filterDoubleListType, + technicalManual: filterDoubleListType, + onOffWing: filterDoubleListType, +} +export type filterDoubleListType = { + availableList: filterListType[], + selectedList: filterListType[], +} +export type filterListType = { + label: string, + value: string, +} diff --git a/sae-csc/src/app/redux/initialState.ts b/sae-csc/src/app/redux/initialState.ts index c7de8e3..da73166 100644 --- a/sae-csc/src/app/redux/initialState.ts +++ b/sae-csc/src/app/redux/initialState.ts @@ -1,30 +1,17 @@ // Define initial state import {StateInterface} from './reducers'; -export type filterGroupType = { - engineType: filterDoubleListType, - findings: filterDoubleListType, - ata: filterDoubleListType, - partNumber: filterDoubleListType, - technicalManual: filterDoubleListType, - onOffWing: filterDoubleListType, -} -export type filterDoubleListType = { - availableList: filterListType[], - selectedList: filterListType[], -} -export type filterListType = { - label: string, - value: string, -} + export const initialState: StateInterface = { app: { backendAPIRoot: "", demoMode: true, + loading: false, + // fromText: "le texte", fromText: "", fromFile: "", toText: "", - botMessage: "Generating a summary...analyzing client’s question...", + botMessage: "", filters: { engineType: { availableList: [{ @@ -37,30 +24,67 @@ export const initialState: StateInterface = { }] }, findings: { - availableList: {}, - selectedList: {} + availableList: [], + selectedList: [] }, ata: { - availableList: {}, - selectedList: {} + availableList: [], + selectedList: [] }, partNumber: { - availableList: {}, - selectedList: {} + availableList: [], + selectedList: [] }, technicalManual: { - availableList: {}, - selectedList: {} + availableList: [], + selectedList: [] }, onOffWing: { - availableList: {}, - selectedList: {} + availableList: [], + selectedList: [] } }, similarCases: [ { id: 1, - } + info: "Work stoppage case for CFM56-7B engine (ESN: 894773) at MTU Zhuhai. LPC Stage 3 blade platform dislocation detected during shop visit BSI. Maximum dislocation: 1.22mm axial, 0.63mm radial. Customer requests evaluation, acceptance criteria, or DICA for further action. No corresponding limits in AMM 72-00-00 BSI inspection chapter. ", + date: "2023-01-01", + chrono_id: "CSC/CFM/2023-10/00446-A", + responsable_team: "FO-CFM", + ge_instruction: "-", + original_question: "blah abl a a jjdbblja bajdblad blab ladlb kaabl", + answer_sent: "dfosdoo osg ogf ogf kgof gfkdmdm gfkdfmkl km opsg gfsok sfol lorem", + engine_part: "ABD cd CD DC DC ZFR ETT HETHG", + findings: "some findings were found here", + DICA: "one dica stuff", + DICA_file: "dica_file.pdf", + }, { + id: 1, + info: "Bhlah lahl hl lhalhadlh No corresponding limits in AMM 72-00-00 BSI inspection chapter. ", + date: "2024-07-08", + chrono_id: "CSC/CFM/1234-10/00446-A", + responsable_team: "FO-CFM", + ge_instruction: "-", + original_question: "blah abl a a jjdbblja bajdblad blab ladlb kaabl", + answer_sent: "dfosdoo osg ogf ogf kgof gfkdmdm gfkdfmkl km opsg gfsok sfol lorem", + engine_part: "ABD cd CD DC DC ZFR ETT HETHG", + findings: "some findings were found here", + DICA: "one dica stuff", + DICA_file: "dica_file_2.pdf", + }, { + id: 1, + info: "Work stoppage case for CFM56-7B engine (ESN: 894773) at MTU Zhuhai. LPC Stage 3 blade platform dislocation detected during shop visit BSI. Maximum dislocation: 1.22mm axial, 0.63mm radial. Customer requests evaluation, acceptance criteria, or DICA for further action. No corresponding limits in AMM 72-00-00 BSI inspection chapter. ", + date: "2023-01-01", + chrono_id: "CSC/CFM/2023-10/00446-A", + responsable_team: "FO-CFM", + ge_instruction: "-", + original_question: "blah abl a a jjdbblja bajdblad blab ladlb kaabl", + answer_sent: "dfosdoo osg ogf ogf kgof gfkdmdm gfkdfmkl km opsg gfsok sfol lorem", + engine_part: "ABD cd CD DC DC ZFR ETT HETHG", + findings: "some findings were found here", + DICA: "one dica stuff", + DICA_file: "dica_file.pdf", + }, ], searchInput: "", enableAiSuggestion: false, @@ -78,7 +102,9 @@ export const initialState: StateInterface = { langsList: ["fr_FR", "en_US"], themesList: ["light", "dark"], user: { - isAuthenticated: false, - id: "", + isAuthenticated: true, + id: "123412345", + token: "abcd-123412345", + login: "Borhème", }, }; diff --git a/sae-csc/src/app/redux/reducers/index.ts b/sae-csc/src/app/redux/reducers/index.ts index b12bdcd..397c6d6 100644 --- a/sae-csc/src/app/redux/reducers/index.ts +++ b/sae-csc/src/app/redux/reducers/index.ts @@ -95,9 +95,12 @@ export interface StateInterface { user: { isAuthenticated: boolean; id: string; + login: string; + token: string; }; app: { demoMode: boolean; + loading: boolean; backendAPIRoot: string; fromFile: string, fromText: string, diff --git a/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.html b/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.html index 4a4ed4f..9c20dff 100644 --- a/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.html +++ b/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.html @@ -38,11 +38,14 @@ - - - - borhène - + @if (appState.user) { + + + + + {{ appState.user.login }} + + } diff --git a/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.ts b/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.ts index 0ef6d93..a63bd09 100644 --- a/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.ts +++ b/sae-csc/src/app/shared/navigation/top-navigation/top-navigation.ts @@ -1,6 +1,5 @@ -import {Component} from '@angular/core'; +import {Component, Input} from '@angular/core'; import {RouterLink, RouterLinkActive} from '@angular/router'; -// import {AlertBox} from '../../../../../../my-workspace/projects/sae-lib/alert-box/alert-box'; @Component({ @@ -15,4 +14,7 @@ import {RouterLink, RouterLinkActive} from '@angular/router'; }) export class TopNavigation { + @Input() public user: any = {}; + @Input() public appState: any = {}; + } diff --git a/my-workspace/projects/sae-lib/inbox/translate-texts/translate-texts.html b/sae-csc/src/app/shared/translate-texts/translate-texts.html similarity index 95% rename from my-workspace/projects/sae-lib/inbox/translate-texts/translate-texts.html rename to sae-csc/src/app/shared/translate-texts/translate-texts.html index a3466a0..224d834 100644 --- a/my-workspace/projects/sae-lib/inbox/translate-texts/translate-texts.html +++ b/sae-csc/src/app/shared/translate-texts/translate-texts.html @@ -45,7 +45,8 @@