@for (elem of appState.filters.engineType.selectedList; track elem.label) {
-
@for (elem of appState.filters.findings.selectedList; track elem.label) {
-
+
{{ elem.label }}
x
@@ -100,7 +106,7 @@
@for (elem of appState.filters.ata.selectedList; track elem.label) {
-
+
{{ elem.label }}
x
@@ -110,7 +116,7 @@
@for (elem of appState.filters.partNumber.selectedList; track elem.label) {
-
+
{{ elem.label }}
x
@@ -120,7 +126,7 @@
@for (elem of appState.filters.technicalManual.selectedList; track elem.label) {
-
+
{{ elem.label }}
x
@@ -130,7 +136,7 @@
@for (elem of appState.filters.onOffWing.selectedList; track elem.label) {
-
+
{{ elem.label }}
x
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 04b95f0..8c67de4 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
@@ -49,6 +49,8 @@
&.is-disabled {
input {
background: grey;
+ border-color: grey;
+ color: white;
}
}
@@ -121,4 +123,5 @@
margin-left: 5px;
}
+
}
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 0d54745..9b1b6c7 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
@@ -1,4 +1,4 @@
-import {Component, HostListener, Input, ElementRef} from '@angular/core';
+import {Component, ElementRef, HostListener, Input} from '@angular/core';
import {MultiSelector} from '../../inputs/multi-selector/multi-selector';
import {CommonModule} from '@angular/common';
@@ -17,7 +17,7 @@ export class FiltersGroup {
@Input() store: any = {};
@Input() appState: any = {};
@Input() actionTypes: any;
- @Input() disabled!: boolean;
+ @Input() disabled: boolean = false;
@Input() hideChipsList: boolean = false;
// Gère quel sélecteur a son dropdown ouvert
@@ -57,8 +57,10 @@ export class FiltersGroup {
}
onClickedOnInput(event: any) {
- const label = event?.label;
- this.activeLabel = label || null;
+ if (!this.disabled) {
+ const label = event?.label;
+ this.activeLabel = label || null;
+ }
}
@HostListener('document:click', ['$event'])
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 023bbce..bce0aa1 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,6 +12,7 @@
+
-
{{ selectedChoices?.length || 0 }}
@@ -29,7 +30,7 @@
@@ -39,36 +40,36 @@
@if (selectedChoices?.length && availableChoices?.length) {
- @for(sc of getFilteredSelectedChoices(); track sc.value){
-
-

-
+ class="dropdown-item"
+ >
+
+
-
+
}
-
+
- @for(ac of getFilteredAvailableChoices(); track ac.value){
+ @for (ac of getFilteredAvailableChoices(); track ac.value) {
-

+
{{ ac.label }}
diff --git a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.scss b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.scss
index f519afc..8247c50 100644
--- a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.scss
+++ b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.scss
@@ -2,6 +2,16 @@
:host {
+ &.is-disabled {
+ input {
+ border: grey;
+ }
+
+ .selected-items-counter {
+ color: grey;
+ }
+ }
+
.input-box {
width: 218px;
color: #1b1d27;
@@ -109,19 +119,18 @@
border: 1px solid #8D91A4;
box-shadow: 0 0 13px 0 rgba(37, 91, 142, 0.10);
-color: var(--color-text-base, #1B1D27);
-
-text-overflow: ellipsis;
+ color: var(--color-text-base, #1B1D27);
-/* Text/text-base */
-font-family: var(--Fonts-Font-text, Barlow);
-font-size: var(--Font-Base, 14px);
-font-style: normal;
-font-weight: 400;
-line-height: 100%; /* 14px */
+ text-overflow: ellipsis;
+
+ /* Text/text-base */
+ font-family: var(--Fonts-Font-text, Barlow);
+ font-size: var(--Font-Base, 14px);
+ font-style: normal;
+ font-weight: 400;
+ line-height: 100%; /* 14px */
-
.dropdown-list {
max-height: 200px;
overflow-y: auto;
@@ -139,7 +148,7 @@ line-height: 100%; /* 14px */
}
}
- .separator{
+ .separator {
display: flex;
width: 186px;
height: 34px;
@@ -153,7 +162,7 @@ line-height: 100%; /* 14px */
margin-top: 6px;
margin-bottom: 16px;
- .label{
+ .label {
overflow: hidden;
color: var(--color-text-secondary, #525668);
leading-trim: both;
@@ -167,11 +176,12 @@ line-height: 100%; /* 14px */
}
}
- .available-items{
- img{
+ .available-items {
+ img {
margin-right: 6px;
}
- .dropdown-item{
+
+ .dropdown-item {
padding: 6px;
margin-bottom: 6px;
display: flex;
diff --git a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
index e649130..9347ad0 100644
--- a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
+++ b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
@@ -77,13 +77,16 @@ export class MultiSelector implements OnInit {
}
onInputClickedOrFocused(event?: any) {
- // Informe le parent que cet input a été cliqué/focus pour fermer les autres dropdowns
- this.clickedOnInput.emit({ label: this.label });
- if (this.disabled) {
+ console.log('onInputClickedOrFocused', this.disabled, event)
+ if (!this.disabled) {
+
+ // Informe le parent que cet input a été cliqué/focus pour fermer les autres dropdowns
+ this.clickedOnInput.emit({label: this.label});
+ this.displayDropdown = true;
+ } else {
console.info('disabled input');
return;
}
- this.displayDropdown = true;
}
onClickInput() {
@@ -93,7 +96,7 @@ export class MultiSelector implements OnInit {
return;
}
// Informe le parent pour fermer les autres puis ouvre celui-ci
- this.clickedOnInput.emit({ label: this.label });
+ this.clickedOnInput.emit({label: this.label});
this.displayDropdown = true;
console.log('Opened dropdown:', this.displayDropdown);
}
diff --git a/sae-csc/src/app/app.routes.ts b/sae-csc/src/app/app.routes.ts
index 701b417..698e2a6 100644
--- a/sae-csc/src/app/app.routes.ts
+++ b/sae-csc/src/app/app.routes.ts
@@ -5,10 +5,11 @@ import {SimilarCases} from './pages/similar-cases/similar-cases';
import {Login} from './pages/login/login';
import {TestingApi} from './pages/testing-api/testing-api';
-export const routes: Routes = [{
- path: '',
- component: Login
-},
+export const routes: Routes = [
+ {
+ path: '',
+ component: Login
+ },
{
path: 'login',
component: Login
diff --git a/sae-csc/src/app/pages/similar-cases/similar-cases.html b/sae-csc/src/app/pages/similar-cases/similar-cases.html
index 71614a7..9aaa20b 100644
--- a/sae-csc/src/app/pages/similar-cases/similar-cases.html
+++ b/sae-csc/src/app/pages/similar-cases/similar-cases.html
@@ -47,95 +47,102 @@
}
-
-
-
-
-
-
+
+
-
-
+
+
+
-
-
-
- Similar cases
+
+
+
-
+
- @if (displayedTab == 'similar-cases') {
+ @if (displayedTab == 'similar-cases') {
-
-
-
-
-
-
-
- {{ appState.similarCases.length }} cases found, 3 cases suggested
-
- }
+
+
+
+
+
+
+
+ {{ appState.similarCases.length }} cases found, 3 cases suggested
+
+ }
- @if (displayedTab == 'similar-cases') {
-
+ @if (displayedTab == 'similar-cases') {
+
-
+
-
- @for (case of filteredSimilarCases; track case.id) {
+
+ @for (case of filteredSimilarCases; track case.id) {
-
- }
+
+ }
+
+
+
+
+
+ } @else {
+
+
+
+
+
-
-
-
- } @else {
-
-
-
-
-
-
-
- }
+ }
+
-
+
+