LanguageService and Dokumentation

main
manueltauber 2023-07-26 13:15:14 +02:00
parent a808b1146b
commit abf116efc7
11 changed files with 40 additions and 71 deletions

View File

@ -11,7 +11,7 @@ import { SortService } from '@syncfusion/ej2-angular-gantt';
import { FilterService } from '@syncfusion/ej2-angular-gantt';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatSelectModule} from '@angular/material/select';
import { NttGanttComponent } from '../ntt-gantt/ntt-gantt.component';
import { NttGanttComponent } from './ntt-gantt/ntt-gantt.component';
import {MatDatepickerModule} from '@angular/material/datepicker';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MatNativeDateModule } from '@angular/material/core';

View File

@ -1,10 +1,10 @@
<h3 class="filterHeading">{{filterLabels[0]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDialogShortDesc')}}</h3>
<mat-form-field appearance="fill" >
<mat-label>{{filterLabels[6]}}</mat-label>
<mat-label>{{this.languageService.lMap.get('filterDilogSearchText')}}</mat-label>
<input matInput type="text" [(ngModel)]="criteria" >
</mat-form-field>
<h3 class="filterHeading">{{filterLabels[1]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDilogSg')}}</h3>
<multiselect-autocomplete
[placeholder]="userSupportGroup"
[data]="supportGroups"
@ -12,33 +12,33 @@
(result)="onResult($event)">
</multiselect-autocomplete>
<h3 class="filterHeading">{{filterLabels[2]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDilogState')}}</h3>
<multiselect-autocomplete
[placeholder]="filterLabels[8]"
[placeholder]="languageService.lMap.get('filterDilogSearchState')"
[data]="states"
[key]="'state'"
(result)="onResult($event)">
</multiselect-autocomplete>
<h3 class="filterHeading">{{filterLabels[3]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDilogContract')}}</h3>
<multiselect-autocomplete
[placeholder]="filterLabels[9]"
[placeholder]="languageService.lMap.get('filterDilogSearchContract')"
[data]="contracts"
[key]="'contract'"
(result)="onResult($event)">
</multiselect-autocomplete>
<h3 class="filterHeading">{{filterLabels[4]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDilogPaketType')}}</h3>
<multiselect-autocomplete
[placeholder]="filterLabels[10]"
[placeholder]="languageService.lMap.get('filterDilogSearchPt')"
[data]="paketTypes"
[key]="'paketType'"
(result)="onResult($event)">
</multiselect-autocomplete>
<h3 class="filterHeading">{{filterLabels[5]}}</h3>
<h3 class="filterHeading">{{this.languageService.lMap.get('filterDilogDate')}}</h3>
<mat-form-field appearance="fill">
<mat-label>{{this.filterLabels[11]}}</mat-label>
<mat-label>{{this.languageService.lMap.get('filterDilogSearchFrom')}}</mat-label>
<input matInput [matDatepicker]="picker1" [(ngModel)]="filterStartDate">
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="picker1"></mat-datepicker-toggle>
@ -46,11 +46,11 @@
</mat-form-field>
-
<mat-form-field appearance="fill">
<mat-label>{{this.filterLabels[12]}}</mat-label>
<mat-label>{{this.languageService.lMap.get('filterDilogSearchTo')}}</mat-label>
<input matInput [matDatepicker]="picker2" [(ngModel)]="filterEndDate">
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matIconSuffix [for]="picker2"></mat-datepicker-toggle>
<mat-datepicker #picker2></mat-datepicker>
</mat-form-field>
<br><br>
<button mat-raised-button color = "primary" (click)="applyFilter()">Filter anwenden</button>
<button mat-raised-button color = "primary" (click)="applyFilter()">{{this.languageService.lMap.get('filterDilogButton')}}</button>

View File

@ -62,38 +62,6 @@ export class FilterDialogComponent implements OnInit {
constructor(public languageService: LanguageService, public dialogRef: MatDialogRef<FilterDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any, private dataService: DataService, private _snackBar: MatSnackBar) {
//dialogRef.beforeClosed().subscribe(() => dialogRef.close(this.dataToReturn));
this.filterLabels = [];
if(this.languageService.language == "DE"){
this.filterLabels.push("Kurzbeschreibung* (Eingabe eines Textteiles filtert alle passenden Pakete)");
this.filterLabels.push("Gewählte Supportgruppe in der Rolle Planender IH oder Kostenverantwortlicher (eine)");
this.filterLabels.push("Status (einer oder mehrere) des Pakets");
this.filterLabels.push("Vertrag / Provider-Cluster (einen oder mehrere)");
this.filterLabels.push("Paket-Typ (einen oder mehrere, exakte Eingabe)");
this.filterLabels.push("Geplantes Start-Datum: Von / Bis");
this.filterLabels.push("Text durchsuchen");
this.filterLabels.push("Supportgruppe suchen & auswählen");
this.filterLabels.push("Status suchen & auswählen");
this.filterLabels.push("Vertrag suchen & auswählen");
this.filterLabels.push("Paket-Typ suchen & auswählen");
this.filterLabels.push("Von");
this.filterLabels.push("Bis");
}else{
this.filterLabels.push("Short description* (entering a text part filters all matching packages)");
this.filterLabels.push("Selected support group in the role of planning IH or cost manager (one)");
this.filterLabels.push("State (one or more) of the package");
this.filterLabels.push("Contract / Provider cluster (one or more)");
this.filterLabels.push("Package type (one or more, exact input)");
this.filterLabels.push("Planned start date: From / To");
this.filterLabels.push("Text search");
this.filterLabels.push("Search & select support group");
this.filterLabels.push("Search & select status");
this.filterLabels.push("Search & select contract");
this.filterLabels.push("Search & select package type");
this.filterLabels.push("From");
this.filterLabels.push("Until");
}
}
ngOnInit(): void {

View File

@ -1,6 +1,6 @@
<p style="font-family:arial; margin-top: -3%;">{{this.labels[0]}}</p>
<p style="font-family:arial; margin-top: -3%;">{{this.languageService.lMap.get('implementerDialogHeading')}}</p>
<mat-form-field appearance="fill" >
<mat-label>{{this.labels[1]}}</mat-label>
<mat-label>{{this.languageService.lMap.get('implementerDialogLabel')}}</mat-label>
<mat-select [disabled]="diasbled" (selectionChange)="enableButton()" [(ngModel)]="selectedValue" name="state">
<mat-option *ngFor="let implementer of possibleImplementers" [value]="implementer.value">
{{implementer.viewValue}}
@ -11,7 +11,7 @@
<mat-dialog-actions align = "end">
<button [disabled]="diasbled" mat-raised-button color="warn" matDialogClose>{{this.labels[2]}}</button>
<button [disabled]="bdiasbled" mat-raised-button color="primary" (click)="updateImplementer()">{{this.labels[3]}}</button>
<button [disabled]="diasbled" mat-raised-button color="warn" matDialogClose>{{this.languageService.lMap.get('implementerDialogCancel')}}</button>
<button [disabled]="bdiasbled" mat-raised-button color="primary" (click)="updateImplementer()">{{this.languageService.lMap.get('implementerDialogApply')}}</button>
</mat-dialog-actions>

View File

@ -42,18 +42,6 @@ export class ImplementerDialogComponent implements OnInit {
this.diasbled = false;
this.selectedValue = -1;
this.possibleImplementers = [];
this.labels = [];
if(this.languageService.language == 'DE'){
this.labels.push("Implementer Eintragen");
this.labels.push("Implementer auswählen");
this.labels.push("Abbrechen");
this.labels.push("Bestätigen");
}else{
this.labels.push("Enter Implementer");
this.labels.push("Select Implementer");
this.labels.push("Cancel");
this.labels.push("Confirm");
}
}
/**

View File

@ -1,8 +1,8 @@
import { LanguageService } from './../app/language.service';
import { PlanTimeBarComponent } from './../app/plan-time-bar/plan-time-bar.component';
import { FilterDialogComponent } from './../app/filter-dialog/filter-dialog.component';
import { filteredData, editingData } from './../data';
import { ImplementerDialogComponent } from './../app/implementer-dialog/implementer-dialog.component';
import { LanguageService } from '../language.service';
import { PlanTimeBarComponent } from '../plan-time-bar/plan-time-bar.component';
import { FilterDialogComponent } from '../filter-dialog/filter-dialog.component';
import { filteredData, editingData } from '../../data';
import { ImplementerDialogComponent } from '../implementer-dialog/implementer-dialog.component';
import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { GanttComponent } from '@syncfusion/ej2-angular-gantt';
@ -318,6 +318,7 @@ export class NttGanttComponent implements OnInit {
public languageChange(args: any){
this.languageService.languageChange(args.value),
this.initLanguge();
this.plantimeComponent.changeLanguage();
}
/**

View File

@ -3,6 +3,7 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { GanttComponent } from '@syncfusion/ej2-angular-gantt';
import { MAT_DATE_FORMATS } from '@angular/material/core';
import * as moment from 'moment';
import { LanguageService } from '../language.service';
export const MY_DATE_FORMATS = {
parse: {
@ -45,16 +46,16 @@ export class PlanTimeBarComponent implements OnInit {
public renderTimeGantt: boolean = false;
public filterObj: any;
constructor(public dataService: DataService) {}
constructor(public languageService: LanguageService, public dataService: DataService) {}
ngOnInit(): void {
this.splitterSettings = this.inputData[0];
this.projectStartDate = this.inputData[1];
this.projectEndDate = this.inputData[2];
this.labelSettings = {taskLabel: '${taskData.planzeit}'};
this.resources = [{resourceId: 1, resourceName: 'Planzeit Summen pro Woche'}];
this.resources = [{resourceId: 1, resourceName: this.languageService.lMap.get('planTimesResource')}];
this.resourceFields = {id: 'resourceId', name: 'resourceName'};
this.columns = [{ field: 'TaskName', headerText: 'Planzeit pro Woche', width: 250 }];
this.columns = [{ field: 'TaskName', headerText: this.languageService.lMap.get('planTimesHeading'), width: 250 }];
this.fetchPlanTimes();
this.timelineSettings = {
bottomTier: {
@ -124,5 +125,16 @@ export class PlanTimeBarComponent implements OnInit {
} catch (error) {}
}
}
public changeLanguage(){
if(this.languageService.language == 'DE'){
this.resources = [{resourceId: 1, resourceName: 'Planzeit Summen pro Woche'}];
this.columns = [{ field: 'TaskName', headerText: 'Planzeiten pro Woche', width: 250 }];;
}else{
this.resources = [{resourceId: 1, resourceName: 'Plantime Sum per Week'}];
this.columns = [{ field: 'TaskName', headerText: 'Planzeit pro Woche', width: 250 }];
}
this.fetchPlanTimes();
}
}

View File

@ -3,7 +3,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import {registerLicense} from '@syncfusion/ej2-base'
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
registerLicense("Mgo+DSMBaFt+QHJqVk1nQ1BBaV1CX2BZeVl1TWlceE4BCV5EYF5SRHBdQl1mSn5XcEVkXH0=;Mgo+DSMBPh8sVXJ1S0R+X1pDaV5HQmFJfFBmQmlad1R1c0U3HVdTRHRcQlthSX5WdUVnX39Xc3Y=;ORg4AjUWIQA/Gnt2VFhiQlJPcUBDWHxLflF1VWRTfFZ6cVJWESFaRnZdQV1lS35Tc0ZjXXlfcXVX;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