up similar cases documents
This commit is contained in:
parent
bf399c488f
commit
63f98a48ed
17 changed files with 142 additions and 76 deletions
|
@ -1,5 +1,5 @@
|
|||
<button (click)="copy()" class="button copy">
|
||||
<i class="ri-file-copy-2-fill"></i>
|
||||
<i class="ri-file-copy-2-line"></i>
|
||||
<!-- <span class="label">-->
|
||||
<!-- Copy-->
|
||||
<!-- </span>-->
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
@use '../../src/styles/variables';
|
||||
|
||||
:host {
|
||||
cursor: pointer;
|
||||
|
||||
button {
|
||||
border-radius: 4px;
|
||||
border-width: 0;
|
||||
padding: 4px;
|
||||
color: #333;
|
||||
background: variables.$csc-copy-color
|
||||
}
|
||||
}
|
|
@ -10,28 +10,29 @@
|
|||
|
||||
<div class="document-container">
|
||||
<header>
|
||||
|
||||
<div class="title">
|
||||
|
||||
<strong>
|
||||
|
||||
{{ document.id }}
|
||||
<a href="{{ document.url }}">
|
||||
{{ document.id }}
|
||||
|
||||
{{ document.title }}
|
||||
<!-- {{ document.title }}-->
|
||||
</a>
|
||||
</strong>
|
||||
<app-copy [textToCopy]="document.id"></app-copy>
|
||||
</div>
|
||||
<div class="last-update">
|
||||
<span class="label">
|
||||
|
||||
Last update:
|
||||
</span>
|
||||
<div class="value">
|
||||
<!-- <div class="last-update">-->
|
||||
<!-- <span class="label">-->
|
||||
|
||||
{{ document.lastUpdate }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Last update:-->
|
||||
<!-- </span>-->
|
||||
<!-- <div class="value">-->
|
||||
|
||||
<!-- {{ document.lastUpdate }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</header>
|
||||
<div class="content">
|
||||
|
@ -58,5 +59,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="avatar"></div>
|
||||
<div class="avatar-container">
|
||||
|
||||
<div class="avatar"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
align-items: center;
|
||||
gap: 5px;
|
||||
|
||||
border-radius: 20px;
|
||||
background: #C2A9FD;
|
||||
border-radius: 8px;
|
||||
background: #E5DCFE;
|
||||
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,20 @@
|
|||
|
||||
.document-container {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.title {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
app-copy {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bot-talks-bubble {
|
||||
|
@ -52,15 +66,20 @@
|
|||
|
||||
color: #1B1D27;
|
||||
font-family: Barlow;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 16px; /* 114.286% */
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
background: white;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
background: white url('../../public/chatbot.png') center center no-repeat;
|
||||
background: transparent url('../../public/chatbot.png') center center no-repeat;
|
||||
background-size: contain;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
|
|
@ -56,16 +56,11 @@
|
|||
[store]="store"
|
||||
></sae-multi-selector>
|
||||
</div>
|
||||
<div (click)="highlighted = !highlighted" class="chips-listing">
|
||||
<!-- liste de chips-->
|
||||
|
||||
<!-- <pre>-->
|
||||
<!-- filters:-->
|
||||
<!-- {{ appState.filters }}-->
|
||||
<!-- </pre>-->
|
||||
<!-- hideChipsList : {{ hideChipsList }}-->
|
||||
<!-- selectedChoices : {{ appState.filters.engineType.selectedList.length }}-->
|
||||
@if (!hideChipsList) {
|
||||
@if (!hideChipsList) {
|
||||
<div (click)="highlighted = !highlighted" class="chips-listing">
|
||||
<!-- liste de chips-->
|
||||
|
||||
<div class="chips-column">
|
||||
@for (elem of appState.filters.engineType.selectedList; track elem.label) {
|
||||
<button class="button chips is-rounded is-small">
|
||||
|
@ -126,9 +121,9 @@
|
|||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<!-- <div class="chips-column">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="chips-column">-->
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
.chips-column {
|
||||
padding: 12px 12px;
|
||||
width: 220px;
|
||||
border: solid 1px #ccc;
|
||||
//border: solid 1px #ccc;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -94,6 +94,8 @@ $gradient-intense: #1e4a72;
|
|||
|
||||
$csc-light-yellow-color: #FFF3D8;
|
||||
$csc-magic-color: #a86FCD;
|
||||
$csc-copy-color: $ia-color-200;
|
||||
|
||||
$csc-bg-color: #F5F5F5;
|
||||
$csc-title-color: #000;
|
||||
$csc-text-color: #1B1D27;
|
||||
|
|
|
@ -43,13 +43,14 @@
|
|||
[disabled]="!appState.fromText.length"></sae-filters-group>
|
||||
</div>
|
||||
</div>
|
||||
<app-bottom-navigation></app-bottom-navigation>
|
||||
</main>
|
||||
<footer>
|
||||
|
||||
<!-- bottom nav -->
|
||||
<!-- bottom fixed bar -->
|
||||
<!-- search button-->
|
||||
<app-bottom-navigation></app-bottom-navigation>
|
||||
|
||||
</footer>
|
||||
<sae-feedback-button></sae-feedback-button>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@ import {StateInterface} from '../../redux/reducers';
|
|||
export class Main {
|
||||
|
||||
public appState: any = {};
|
||||
public displayBotWarning: boolean = true;
|
||||
public displayBotWarning: boolean = false;
|
||||
|
||||
constructor(private store: Store<StateInterface>) {
|
||||
this.store.select(state => state.app).subscribe(app => {
|
||||
|
@ -44,6 +44,7 @@ export class Main {
|
|||
|
||||
displayWarningToCheckFilters() {
|
||||
this.displayBotWarning = true;
|
||||
console.log('displayWarningToCheckFilters');
|
||||
// update app, displayBotT
|
||||
// this.store.dispatch()
|
||||
}
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
</div>
|
||||
}
|
||||
|
||||
<!-- <div class="row filters-row">-->
|
||||
<!-- <sae-filters-group [hideChipsList]="true"></sae-filters-group>-->
|
||||
<!-- </div>-->
|
||||
<div class="row filters-row">
|
||||
<sae-filters-group [hideChipsList]="true"></sae-filters-group>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
|
||||
|
@ -86,17 +86,20 @@
|
|||
</div>
|
||||
<div class="tabs-body">
|
||||
|
||||
<div class="tabs-search">
|
||||
<!-- <i class="ri-search-2-line search"></i>-->
|
||||
@if (displayedTab == 'similar-cases') {
|
||||
|
||||
<input class="search" placeholder="Use keywords for a precise research" type="text">
|
||||
<button (click)="filterResults()" class="search-submit">
|
||||
<i class="ri-send-plane-fill"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="tabs-results">
|
||||
{{ appState.similarCases.length }} cases found, 3 cases suggested
|
||||
</div>
|
||||
<div class="tabs-search">
|
||||
<!-- <i class="ri-search-2-line search"></i>-->
|
||||
|
||||
<input class="search" placeholder="Use keywords for a precise research" type="text">
|
||||
<button (click)="filterResults()" class="search-submit">
|
||||
<i class="ri-send-plane-fill"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="tabs-results">
|
||||
{{ appState.similarCases.length }} cases found, 3 cases suggested
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (displayedTab == 'similar-cases') {
|
||||
<div id="similar_cases_tab">
|
||||
|
|
|
@ -6,6 +6,7 @@ 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';
|
||||
|
||||
@Component({
|
||||
selector: 'app-similar-cases',
|
||||
|
@ -15,6 +16,7 @@ import {RouterLink} from '@angular/router';
|
|||
BottomNavigation,
|
||||
NgClass,
|
||||
RouterLink,
|
||||
FiltersGroup,
|
||||
|
||||
],
|
||||
templateUrl: './similar-cases.html',
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
<div class="bottom-navigation">
|
||||
<nav class="navigation">
|
||||
<a (click)="togglePrivacyPolicy()" class="nav-item" id="privacy_policy_popup">
|
||||
privacy policy
|
||||
</a>
|
||||
<a class="nav-item" href="mailto:support@csc.safrangroup.com">
|
||||
contact
|
||||
</a>
|
||||
<a class="nav-item" href="https://www.safran-group.com/mentions-legales">
|
||||
mentions légales
|
||||
</a>
|
||||
</nav>
|
||||
<div class="content-container">
|
||||
|
||||
<nav class="navigation">
|
||||
<a (click)="togglePrivacyPolicy()" class="nav-item" id="privacy_policy_popup">
|
||||
privacy policy
|
||||
</a>
|
||||
<a class="nav-item" href="mailto:support@csc.safrangroup.com">
|
||||
contact
|
||||
</a>
|
||||
<a class="nav-item" href="https://www.safran-group.com/mentions-legales">
|
||||
mentions légales
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="fixed-navigation">
|
||||
<a class="next-step" routerLink="/similar-cases">
|
||||
<span class="label">
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
.bottom-navigation {
|
||||
position: absolute;
|
||||
top: 1000px;
|
||||
padding: 0 60px 16px;
|
||||
position: relative;
|
||||
top: 280px;
|
||||
padding: 0 0 16px;
|
||||
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
<div class="translate-texts">
|
||||
<div class="translate-texts is-{{disabled? 'disabled' : 'enabled'}}">
|
||||
|
||||
|
||||
<div id="fromText">
|
||||
|
||||
@if (!fileIsUploaded) {
|
||||
<!-- @if (appState.fromText.length == 0) {-->
|
||||
<button (click)="clickFileUpload(fileUpload)" class=" click-file-upload is-outlined">
|
||||
<span class="label">
|
||||
Upload .csv file
|
||||
</span>
|
||||
<i class="ri-upload-cloud-2-line"></i>
|
||||
</button>
|
||||
<!-- hidden text input-->
|
||||
<!-- }-->
|
||||
<!-- hidden text input-->
|
||||
<input #fileUpload
|
||||
accept=".csv"
|
||||
(change)="onFileSelected($event)" class="is-outlined" id="fileUploadTranslator"
|
||||
|
|
|
@ -12,13 +12,18 @@
|
|||
|
||||
#fromText,
|
||||
#toText {
|
||||
padding: variables.$spacing-4 42px variables.$spacing-4 variables.$spacing-4;
|
||||
|
||||
box-shadow: 0 19px 29px 0 rgba(30, 31, 34, 0.05);
|
||||
background: white;
|
||||
height: 235px;
|
||||
width: 648px;
|
||||
overflow-y: auto;
|
||||
border-radius: 8px;
|
||||
|
||||
|
||||
textarea {
|
||||
padding: variables.$spacing-4 42px variables.$spacing-4 variables.$spacing-4;
|
||||
}
|
||||
}
|
||||
|
||||
.delete-button {
|
||||
|
@ -74,12 +79,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
.click-file-upload {
|
||||
position: relative;
|
||||
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
height: 34px;
|
||||
padding: 8px 20px;
|
||||
|
||||
padding: 20px 16px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
|
@ -87,9 +94,8 @@
|
|||
border-radius: variables.$radius-4;
|
||||
border: 1px solid var(--color-text-title, variables.$csc-nav-color);
|
||||
background: var(--color-background-card-on-base, #FFF);
|
||||
left: 0;
|
||||
top: 165px;
|
||||
position: relative;
|
||||
top: 100px;
|
||||
left: 16px;
|
||||
font-weight: 600;
|
||||
|
||||
i {
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Component, EventEmitter, Input, Output} from '@angular/core';
|
|||
import {FormsModule} from '@angular/forms';
|
||||
import {NgClass} from '@angular/common';
|
||||
import {Store} from '@ngrx/store';
|
||||
import {StateInterface} from './../../redux/reducers';
|
||||
import {ActionTypes, StateInterface} from './../../redux/reducers';
|
||||
|
||||
@Component({
|
||||
selector: 'sae-translate-texts',
|
||||
|
@ -11,7 +11,8 @@ import {StateInterface} from './../../redux/reducers';
|
|||
styleUrl: './translate-texts.scss'
|
||||
})
|
||||
export class TranslateTexts {
|
||||
public fromText: string = ''
|
||||
public disabled: boolean = false;
|
||||
public fromText: string = '';
|
||||
public toText: string = 'résumé ici'
|
||||
public loadingResume: boolean = false;
|
||||
public mode: string = 'demo';
|
||||
|
@ -49,7 +50,7 @@ export class TranslateTexts {
|
|||
// launch request
|
||||
// in demo mode, fill some filters
|
||||
if (this.mode !== 'production') {
|
||||
|
||||
console.log('mode non prod, on update avec du mock', this.mode)
|
||||
// Clear any existing timeout to reset the debounce
|
||||
if (this.fromTimeout) {
|
||||
clearTimeout(this.fromTimeout);
|
||||
|
@ -58,7 +59,7 @@ export class TranslateTexts {
|
|||
// Set a new timeout
|
||||
this.fromTimeout = setTimeout(() => {
|
||||
// in demo mode, load demo filters
|
||||
console.log('demo mode')
|
||||
console.log('demo mode, on émet updateFilters')
|
||||
|
||||
const newFilters = [
|
||||
['filter demo 1', 'filter demo 2'],
|
||||
|
@ -66,10 +67,13 @@ export class TranslateTexts {
|
|||
['filter demo 4', 'filter demo ABCD'],
|
||||
['filter demo 5'],
|
||||
]
|
||||
this.updateFilters.emit(newFilters);
|
||||
// this.updateFilters.emit(newFilters);
|
||||
this.updateFilters.emit();
|
||||
this.loadingResume = false;
|
||||
}, this.debounceDuration);
|
||||
}, this.debounceEnabled ? this.debounceDuration : 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
onFromTextChanged(e?: any): void {
|
||||
|
@ -92,7 +96,16 @@ export class TranslateTexts {
|
|||
console.log('demo mode')
|
||||
this.toText = "Résumé de démo à titre d'exemple"
|
||||
this.loadingResume = false;
|
||||
|
||||
|
||||
this.store.dispatch({
|
||||
type: ActionTypes.UPDATE_APP,
|
||||
state: {
|
||||
displayBot: true
|
||||
}
|
||||
})
|
||||
|
||||
// Emit updateFilters event to trigger onSelectedChoicesChange
|
||||
this.updateFilters.emit();
|
||||
},
|
||||
this.debounceDuration);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ body {
|
|||
}
|
||||
|
||||
i {
|
||||
font-size: 16px;
|
||||
font-size: 20px;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue