diff --git a/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.html b/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.html index 965a5030484e900c6fd507e46381e751f1f03a0c..d5e4ba591c630b26f1b928ce7d5eeb2271fe21fb 100644 --- a/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.html +++ b/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.html @@ -29,7 +29,7 @@ </mat-chip> </mat-chip-list> <div class="noResult" *ngIf="controlAutocomplete.value.length === 0"> - {{lang.noSelectedFolder}} + {{lang.noSelectedAddress}} </div> </div> </form> \ No newline at end of file diff --git a/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.ts b/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.ts index a0dc2be59cebe3e9de354a28a48edcffbe9426e6..d54de4b0734b8cce45bafd3b11e6f55de97b3bec 100644 --- a/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.ts +++ b/src/frontend/app/contact/ban-autocomplete/address-ban-autocomplete.component.ts @@ -2,14 +2,10 @@ import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { LANG } from '../../translate.component'; import { NotificationService } from '../../notification.service'; -import { HeaderService } from '../../../service/header.service'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; -import { AppService } from '../../../service/app.service'; -import { SortPipe } from '../../../plugins/sorting.pipe'; import { FormControl } from '@angular/forms'; import { Observable, of } from 'rxjs'; import { debounceTime, filter, distinctUntilChanged, tap, switchMap, exhaustMap, catchError } from 'rxjs/operators'; -import { LatinisePipe } from 'ngx-pipes'; @Component({ selector: 'app-address-ban-input', @@ -17,8 +13,7 @@ import { LatinisePipe } from 'ngx-pipes'; styleUrls: [ 'address-ban-autocomplete.component.scss', '../../indexation/indexing-form/indexing-form.component.scss' - ], - providers: [NotificationService, AppService, SortPipe] + ] }) export class AddressBanAutocompleteComponent implements OnInit { @@ -52,9 +47,6 @@ export class AddressBanAutocompleteComponent implements OnInit { public http: HttpClient, private notify: NotificationService, public dialog: MatDialog, - private headerService: HeaderService, - public appService: AppService, - private latinisePipe: LatinisePipe ) { } @@ -118,8 +110,7 @@ export class AddressBanAutocompleteComponent implements OnInit { longitude: ev.option.value.lon, latitude: ev.option.value.lat } - console.log(ev.option.value); - + this.setFormValue(objAddress); this.myControl.setValue(''); @@ -134,7 +125,6 @@ export class AddressBanAutocompleteComponent implements OnInit { setFormValue(item: any) { this.valuesToDisplay[item['id']] = `${item.addressNumber} ${item.addressStreet}, ${item.addressTown} (${item.addressPostcode})`; this.controlAutocomplete.setValue([item]); - console.log(this.valuesToDisplay); } resetAutocomplete() { diff --git a/src/frontend/app/viewer/document-viewer.component.html b/src/frontend/app/viewer/document-viewer.component.html index b7f2d6a650996e0f19c0390235ce7cad4f27a33d..8ead8d9a001d78ebb3c0295d62bf326853bb46db 100644 --- a/src/frontend/app/viewer/document-viewer.component.html +++ b/src/frontend/app/viewer/document-viewer.component.html @@ -68,7 +68,7 @@ </button> </mat-menu> <ng-container *ngIf="mode === 'mainDocument' && !functions.empty(file.subinfos)"> - <button *ngIf="file.subinfos.mainDocVersions.length > 0" mat-button + <button *ngIf="file.subinfos.mainDocVersions.length > 1" mat-button [matBadge]="file.subinfos.mainDocVersions.length" [matMenuTriggerFor]="menuVersionsDoc"> {{lang.versions}} </button> diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts index 5ce92e104c8794677465f34183be67a3702eef1c..5203a0084131774ef81067b97d2515104fa37acf 100644 --- a/src/frontend/app/viewer/document-viewer.component.ts +++ b/src/frontend/app/viewer/document-viewer.component.ts @@ -7,7 +7,7 @@ import { AppService } from '../../service/app.service'; import { tap, catchError, filter, map, exhaustMap } from 'rxjs/operators'; import { of, Subject } from 'rxjs'; import { ConfirmComponent } from '../../plugins/modal/confirm.component'; -import { MatDialogRef, MatDialog, MatSidenav, fadeInItems } from '@angular/material'; +import { MatDialogRef, MatDialog, MatSidenav } from '@angular/material'; import { AlertComponent } from '../../plugins/modal/alert.component'; import { SortPipe } from '../../plugins/sorting.pipe'; import { PluginSelectSearchComponent } from '../../plugins/select-search/select-search.component'; @@ -44,7 +44,12 @@ export class DocumentViewerComponent implements OnInit { type: '', contentMode: 'base64', content: null, - src: null + src: null, + subinfos : { + mainDocVersions: [], + signedDocVersions: false, + commentedDocVersions: false, + } }; allowedExtensions: any[] = []; diff --git a/src/frontend/lang/lang-en.ts b/src/frontend/lang/lang-en.ts index 55e402b7cbdf834225bafba9f566a39fa83b29c8..4fca720fc352de59dcb8fbd0b03dcc8721c61794 100755 --- a/src/frontend/lang/lang-en.ts +++ b/src/frontend/lang/lang-en.ts @@ -1480,4 +1480,5 @@ export const LANG_EN = { "documentSignedMsg": "The document has been signed, you can't edit this document", "banAutocompleteInput": "Autocomplete BAN input", "noMailContact" : "No (external) contact linked to this mail", + "noSelectedAddress": "No selected address", }; diff --git a/src/frontend/lang/lang-fr.ts b/src/frontend/lang/lang-fr.ts index 749079c7b170f370501d6d412cb4a1d63a6342f8..09d8bc99850cff46756ab3b100b02b356dfd550f 100755 --- a/src/frontend/lang/lang-fr.ts +++ b/src/frontend/lang/lang-fr.ts @@ -1519,4 +1519,5 @@ export const LANG_FR = { "documentSignedMsg": "Le document a été signé, vous ne pouvez pas editer ce document", "banAutocompleteInput": "Champ autocomplete BAN", "noMailContact" : "Aucun contact (externe) attaché pour ce courrier", + "noSelectedAddress": "Aucune adresse associée", }; diff --git a/src/frontend/lang/lang-nl.ts b/src/frontend/lang/lang-nl.ts index 8ded968084fee6eb553bdbb59392f8c8223cd772..c9d9c0456aaaef11d12a73479942aea263053f8b 100755 --- a/src/frontend/lang/lang-nl.ts +++ b/src/frontend/lang/lang-nl.ts @@ -1505,4 +1505,5 @@ export const LANG_NL = { "documentSignedMsg": "The document has been signed, you can't edit this document", //_TO_TRANSLATE "banAutocompleteInput": "Autocomplete BAN input", //_TO_TRANSLATE "noMailContact" : "No (external) contact linked to this mail", //_TO_TRANSLATE + "noSelectedAddress": "No selected address", //_TO_TRANSLATE };