From 508766b7f9b095412a493ce9d62bdb6eb233156f Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Fri, 24 Aug 2018 21:45:30 +0200 Subject: [PATCH] FEAT #8218 add msg home component --- apps/maarch_entreprise/Views/home.component.html | 8 ++++++++ apps/maarch_entreprise/js/angular/app/app.component.ts | 8 +++++++- apps/maarch_entreprise/js/angular/app/home.component.ts | 6 ++++++ apps/maarch_entreprise/js/angular/lang/lang-en.ts | 1 + apps/maarch_entreprise/js/angular/lang/lang-fr.ts | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/apps/maarch_entreprise/Views/home.component.html b/apps/maarch_entreprise/Views/home.component.html index 24ed620281d..5b3ce7de82e 100755 --- a/apps/maarch_entreprise/Views/home.component.html +++ b/apps/maarch_entreprise/Views/home.component.html @@ -12,6 +12,14 @@ <mat-spinner style="margin:auto;"></mat-spinner> </div> <mat-card *ngIf="!loading" class="card-app-content"> + <mat-card style="display: flex"> + <div *ngIf="!mobileMode"style="text-align:center;flex: 1;background: url(static.php?filename=logo_only.svg);background-size: auto auto;height: 70px;background-size: 100%;background-repeat: no-repeat;background-position: center;"> + </div> + <div style="flex:10;padding-left: 10px;"> + <span [innerHTML]="lang.welcomeInGEC"></span> <b>{{currentDate}}</b>. + </div> + </mat-card> + <mat-tab-group> <mat-tab label="Mes derniers courriers"> <table mat-table [dataSource]="dataSource" matSort matSortActive="res_id" matSortDisableClear matSortDirection="asc" style="width:100%;table-layout: fixed;"> diff --git a/apps/maarch_entreprise/js/angular/app/app.component.ts b/apps/maarch_entreprise/js/angular/app/app.component.ts index 59b5ca9b07f..e394818c0f0 100755 --- a/apps/maarch_entreprise/js/angular/app/app.component.ts +++ b/apps/maarch_entreprise/js/angular/app/app.component.ts @@ -49,7 +49,13 @@ export class AppComponent { $j('#magicContactsTable').remove(); $j('#manageBasketsOrderTable').remove(); $j('#controlParamTechnicTable').remove(); - $j('#container').width("100%"); + $j('#container').css({ + "width": "100%", + "min-width": "auto" + }); + $j('#content').css({ + "min-width": "auto" + }); if ($j('#content h1')[0] && $j('#content h1')[0] != $j('my-app h1')[0]) { $j('#content h1')[0].remove(); } diff --git a/apps/maarch_entreprise/js/angular/app/home.component.ts b/apps/maarch_entreprise/js/angular/app/home.component.ts index 2269c811cae..2cc42999163 100755 --- a/apps/maarch_entreprise/js/angular/app/home.component.ts +++ b/apps/maarch_entreprise/js/angular/app/home.component.ts @@ -38,6 +38,8 @@ export class HomeComponent extends AutoCompletePlugin implements OnInit { dataSource: any; displayedColumns: string[] = ['res_id', 'subject', 'creation_date']; + currentDate : string = ""; + constructor(changeDetectorRef: ChangeDetectorRef, media: MediaMatcher, public http: HttpClient, public dialog: MatDialog, private sanitizer: DomSanitizer) { super(http, ['users']); this.mobileMode = angularGlobals.mobileMode; @@ -52,6 +54,10 @@ export class HomeComponent extends AutoCompletePlugin implements OnInit { window['MainHeaderComponent'].setSnav(this.snav); window['MainHeaderComponent'].setSnavRight(null); this.coreUrl = angularGlobals.coreUrl; + let event = new Date(); + let options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; + + this.currentDate = event.toLocaleDateString('fr-FR', options); this.loading = false; this.http.get(this.coreUrl + "rest/home") diff --git a/apps/maarch_entreprise/js/angular/lang/lang-en.ts b/apps/maarch_entreprise/js/angular/lang/lang-en.ts index ea6a27af5ed..b39214619bc 100755 --- a/apps/maarch_entreprise/js/angular/lang/lang-en.ts +++ b/apps/maarch_entreprise/js/angular/lang/lang-en.ts @@ -604,6 +604,7 @@ export const LANG_EN = { "officialWebsite" : "Official website", "maarchLicence" : "Maarch Courrier is circulated under the terms of", "groupeCompany" : ", Archiveco group company", + "welcomeInGEC" : "Welcome to your GEC app, today is", "myLastResources" : "My last mails", "shortcut" : "Shortcut", "searchMails" : "Search mails", diff --git a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts index d66c948f644..c9473701d0f 100755 --- a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts +++ b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts @@ -630,7 +630,7 @@ export const LANG_FR = { "officialWebsite" : "Site officiel", "maarchLicence" : "Maarch Courrier est diffusé sous les termes de la", "groupeCompany" : "société du groupe Archiveco", - "welcomeInGEC" : "Bienvenue dans votre Gestion Electronique de Courriers", + "welcomeInGEC" : "Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique de <b>C</b>ourriers, nous sommes le", "myLastResources" : "Mes derniers courriers", "shortcut" : "Raccourcis", "searchMails" : "Rechercher des courriers", -- GitLab