add modal in similar case page

This commit is contained in:
Tykayn 2025-09-26 12:30:20 +02:00 committed by tykayn
parent a2afad0545
commit 8ef68379de
15 changed files with 371 additions and 185 deletions

View file

@ -20,13 +20,18 @@
}
.title {
color: var(--Black-text, #1B1D27);
color: #49454F;
text-align: left;
font-family: Barlow;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 24px; /* 150% */
.is-active & {
color: #1B1D27;
}
}
.info-item {
@ -36,6 +41,7 @@
}
.summary {
border-top: 1px solid grey;
padding-top: 10px;
}
@ -67,6 +73,8 @@
align-items: start;
padding-bottom: 6px;
cursor: pointer;
color: #49454F;
i {
margin-right: 8px;
@ -84,7 +92,8 @@
}
&.is-active {
border-bottom: 2px solid black;
border-bottom: 2px solid #0B0C47;
}
}

View file

@ -8,7 +8,11 @@
<i class="ri-arrow-down-s-line"></i>
</div>
<div class="actions">
<button [routerLink]="'/home'" class="button">
<!-- <button [routerLink]="'/home'" class="button">-->
<!-- New question-->
<!-- <i class="ri-chat-ai-line"></i>-->
<!-- </button>-->
<button (click)="displayModalNewQuestion()" class="button">
New question
<i class="ri-chat-ai-line"></i>
</button>
@ -136,4 +140,13 @@
<footer>
<app-bottom-navigation [hideNextStepButton]="true"></app-bottom-navigation>
</footer>
<sae-confirm [showWhen]="displayConfirmModal">
<span ngProjectAs="modal-title">
Search for new question
</span>
<span ngProjectAs="modal-main">
Cela réinitialisera les filtres de sélection
</span>
</sae-confirm>
</div>

View file

@ -100,18 +100,10 @@
border-bottom: solid 1px #333;
cursor: pointer;
&:hover {
color: white;
}
&.is-active {
color: #000;
border-bottom: solid 3px #000;
&:hover {
color: white;
}
border-bottom: solid 2px #000;
}

View file

@ -5,9 +5,9 @@ import {BottomNavigation} from '../../shared/navigation/bottom-navigation/bottom
import {StateInterface} from '../../redux/reducers';
import {Store} from '@ngrx/store';
import {NgClass} from '@angular/common';
import {RouterLink} from '@angular/router';
import {FiltersGroup} from 'sae-lib/filters/filters-group/filters-group';
import {FormsModule} from '@angular/forms';
import {Confirm} from 'sae-lib/modal/confirm/confirm';
@Component({
selector: 'app-similar-cases',
@ -16,9 +16,9 @@ import {FormsModule} from '@angular/forms';
CaseResult,
BottomNavigation,
NgClass,
RouterLink,
FiltersGroup,
FormsModule,
Confirm,
],
templateUrl: './similar-cases.html',
@ -34,6 +34,7 @@ export class SimilarCases {
disabledFilters: boolean = true;
filteredSimilarCases: any = [];
searchSimilarInput: string = '';
displayConfirmModal: boolean = true;
constructor(private store: Store<StateInterface>) {
this.store.select(state => state.app).subscribe(app => {
@ -71,4 +72,18 @@ export class SimilarCases {
});
});
}
displayModalNewQuestion() {
console.log('nouvelle question')
// display sae-confirm
this.displayConfirmModal = true;
}
onConfirmModal() {
}
onRejectModal() {
this.displayConfirmModal = false;
}
}

View file

@ -144,7 +144,7 @@ export class TranslateTexts {
type: ActionTypes.UPDATE_APP,
payload: {
fromText: this.fromText,
botMessage: "Generating a summary...analyzing clients question...",
botMessage: "Generating a summary...analyzing clients question...",
loadingResume: true
}
});
@ -153,8 +153,6 @@ export class TranslateTexts {
this.loadingResume = true;
// Clear any existing timeout to reset the debounce
if (this.fromTimeout) {
clearTimeout(this.fromTimeout);
@ -179,8 +177,8 @@ export class TranslateTexts {
type: ActionTypes.UPDATE_APP,
payload: {
displayBot: true,
toText: "Résumé de démo à titre d'exemple",
botMessage: "Heres AI analysis about clients question ! Please make sure if my analysis is correct to get the most relevent results."
toText: "Résumé de démo à titre d'exemple. Work stoppage case for CFM56-7B engine (ESN: 802379) from Japan Airlines. Issue: Erosion found on Area A of 5 Acoustical Panel Assemblies (2H-3H) during inspection. Task: Perform repair 006 per ESM 72-23-08-300-006 on leading edge of affected panels. Parts concerned: P/Ns 340-084-302-0, 340-084-201-0, and 340-082-501-0.",
botMessage: "Heres AI analysis about clients question ! Please make sure if my analysis is correct to get the most relevent results."
}
});