PlanzeitSummen/Done
parent
262eab4e68
commit
f622e91c5a
|
|
@ -255,7 +255,6 @@ export class DataService {
|
||||||
//console.log(response);
|
//console.log(response);
|
||||||
this.totalSize = response.totalSize;
|
this.totalSize = response.totalSize;
|
||||||
response.changes.forEach(resp=>{
|
response.changes.forEach(resp=>{
|
||||||
|
|
||||||
//console.log(resp.resourceId+" "+resp.approvalStatus)
|
//console.log(resp.resourceId+" "+resp.approvalStatus)
|
||||||
|
|
||||||
let tasks : any[] = [];
|
let tasks : any[] = [];
|
||||||
|
|
@ -322,7 +321,7 @@ export class DataService {
|
||||||
changeImplementerLogin: resp.changeImplementerLogin,
|
changeImplementerLogin: resp.changeImplementerLogin,
|
||||||
packageName: resp.packageName,
|
packageName: resp.packageName,
|
||||||
coordinatorSg: resp.coordinatorSg,
|
coordinatorSg: resp.coordinatorSg,
|
||||||
planTime: 1,
|
plantime: resp.planTime,
|
||||||
calenderWeek: this.getWeekNumber(new Date(resp.d2))
|
calenderWeek: this.getWeekNumber(new Date(resp.d2))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
[labelSettings]="labelSettings"
|
[labelSettings]="labelSettings"
|
||||||
|
|
||||||
viewType="ResourceView"
|
viewType="ResourceView"
|
||||||
[allowSelection]='true'
|
[columns]="columns"
|
||||||
|
[allowSelection]='false'
|
||||||
[allowResizing] = 'true'
|
[allowResizing] = 'true'
|
||||||
[highlightWeekends] = 'true'
|
[highlightWeekends] = 'false'
|
||||||
[treeColumnIndex]="1"
|
[treeColumnIndex]="1"
|
||||||
[showOverAllocation] = 'true'
|
[showOverAllocation] = 'true'
|
||||||
[enableMultiTaskbar]= 'true'
|
[enableMultiTaskbar]= 'true'
|
||||||
|
|
@ -26,5 +27,20 @@
|
||||||
[enableVirtualization]="false"
|
[enableVirtualization]="false"
|
||||||
[allowSorting]= "false"
|
[allowSorting]= "false"
|
||||||
[allowFiltering]="false"
|
[allowFiltering]="false"
|
||||||
gridLines="Both"></ejs-gantt>
|
|
||||||
|
(queryTaskbarInfo)="queryTaskbarInfo($event)"
|
||||||
|
gridLines="Both">
|
||||||
|
|
||||||
|
<ng-template #tooltipSettingsTaskbar let-data>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<ng-container>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:3px"> Planzeit: {{data.taskData.planzeit}}</td>
|
||||||
|
</tr>
|
||||||
|
</ng-container>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</ejs-gantt>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,10 @@ export class PlanTimeBarComponent implements OnInit {
|
||||||
}
|
}
|
||||||
this.resources = [{resourceId: 1, resourceName: 'Planzeit Summen pro Woche'}];
|
this.resources = [{resourceId: 1, resourceName: 'Planzeit Summen pro Woche'}];
|
||||||
|
|
||||||
console.log(this.parentResources);
|
|
||||||
let calendarWeeks = this.getCalendarWeeks(this.projectStartDate , this.projectEndDate);
|
let calendarWeeks = this.getCalendarWeeks(this.projectStartDate , this.projectEndDate);
|
||||||
|
|
||||||
// Ausgabe der Kalenderwochen
|
// Ausgabe der Kalenderwochen
|
||||||
calendarWeeks.forEach((week, index) => {
|
calendarWeeks.forEach((week, index) => {
|
||||||
|
|
||||||
let weekNr = this.getWeekNumber(new Date(calendarWeeks[index].start.toISOString()));
|
let weekNr = this.getWeekNumber(new Date(calendarWeeks[index].start.toISOString()));
|
||||||
let planzeit = this.getPlantimeFromResources(this.parentResources, weekNr);
|
let planzeit = this.getPlantimeFromResources(this.parentResources, weekNr);
|
||||||
//console.log(`Kalenderwoche ${index + 1}: ${week.start} - ${week.end}`);
|
//console.log(`Kalenderwoche ${index + 1}: ${week.start} - ${week.end}`);
|
||||||
|
|
@ -71,8 +69,6 @@ export class PlanTimeBarComponent implements OnInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.timelineSettings = {
|
this.timelineSettings = {
|
||||||
bottomTier: {
|
bottomTier: {
|
||||||
format: 'WW',
|
format: 'WW',
|
||||||
|
|
@ -98,13 +94,18 @@ export class PlanTimeBarComponent implements OnInit {
|
||||||
id: 'resourceId',
|
id: 'resourceId',
|
||||||
name: 'resourceName',
|
name: 'resourceName',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.columns = [
|
||||||
|
{ field: 'TaskName', headerText: 'Planzeit pro Woche', width: 250 },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlantimeFromResources(resources: any[], week: string){
|
getPlantimeFromResources(resources: any[], week: string){
|
||||||
let planzeit = 0;
|
let planzeit = 0;
|
||||||
for (const res of resources) {
|
for (const res of resources) {
|
||||||
console.log(res);
|
|
||||||
if(res.calenderWeek == week){
|
if(res.calenderWeek == week){
|
||||||
|
// console.log(res.plantime);
|
||||||
|
// console.log(res.plantime);
|
||||||
planzeit+= res.plantime;
|
planzeit+= res.plantime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -141,10 +142,14 @@ getCalendarWeeks(startDate: Date, endDate: Date): { start: Date, end: Date }[] {
|
||||||
|
|
||||||
currentDate = currentDate.add(7, 'days');
|
currentDate = currentDate.add(7, 'days');
|
||||||
}
|
}
|
||||||
|
|
||||||
return weeks;
|
return weeks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public queryTaskbarInfo(args: any) {
|
||||||
|
// console.log(args);
|
||||||
|
args.taskbarBgColor = "white";
|
||||||
|
args.taskbarBorderColor = "white";
|
||||||
|
args.taskLabelColor = "black";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,11 +138,13 @@
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ejs-gantt>
|
</ejs-gantt>
|
||||||
<app-plan-time-bar
|
|
||||||
|
<app-plan-time-bar *ngIf="renderGantt"
|
||||||
[inputData]="inputForTimeline"
|
[inputData]="inputForTimeline"
|
||||||
[splitterSettings]="splitterSettings"
|
[splitterSettings]="splitterSettings"
|
||||||
[parentResources]="resources"
|
[parentResources]="allResources"
|
||||||
></app-plan-time-bar>
|
></app-plan-time-bar>
|
||||||
|
|
||||||
<div *ngIf="this.showNoResultsError && this.language =='DE'"><h2>Die Suche lieferte keine Ergebnisse</h2></div>
|
<div *ngIf="this.showNoResultsError && this.language =='DE'"><h2>Die Suche lieferte keine Ergebnisse</h2></div>
|
||||||
<div *ngIf="this.showNoResultsError && this.language =='EN'"><h2>The search did not return any results</h2></div>
|
<div *ngIf="this.showNoResultsError && this.language =='EN'"><h2>The search did not return any results</h2></div>
|
||||||
<!-- [filterSettings]="filterSettings" -->
|
<!-- [filterSettings]="filterSettings" -->
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ export class NttGanttComponent implements OnInit {
|
||||||
public horizontalPosition: MatSnackBarHorizontalPosition = 'end';
|
public horizontalPosition: MatSnackBarHorizontalPosition = 'end';
|
||||||
public verticalPosition: MatSnackBarVerticalPosition = 'bottom';
|
public verticalPosition: MatSnackBarVerticalPosition = 'bottom';
|
||||||
public inputForTimeline = [];
|
public inputForTimeline = [];
|
||||||
|
public renderplanTime: boolean = false;
|
||||||
|
|
||||||
public deMap : Map<string, string> = new Map<string, string>()
|
public deMap : Map<string, string> = new Map<string, string>()
|
||||||
public enMap : Map<string, string> = new Map<string, string>()
|
public enMap : Map<string, string> = new Map<string, string>()
|
||||||
|
|
@ -461,7 +462,7 @@ public logg(args){
|
||||||
return resource.resourceId == args.data.taskData.resources[0].resourceId;
|
return resource.resourceId == args.data.taskData.resources[0].resourceId;
|
||||||
});
|
});
|
||||||
this.dataService.updateDatePerChange(found);
|
this.dataService.updateDatePerChange(found);
|
||||||
|
this.refreshData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -596,6 +597,7 @@ public logg(args){
|
||||||
* @param startDate new startDate from date-range-picker
|
* @param startDate new startDate from date-range-picker
|
||||||
*/
|
*/
|
||||||
public startDateChanged(startDate: any){
|
public startDateChanged(startDate: any){
|
||||||
|
this.renderplanTime = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -606,8 +608,10 @@ public logg(args){
|
||||||
if(this.range.status == 'VALID' && this.range.controls.start.value && this.range.controls.end.value){ //event for Requesting new Records based on the Dates
|
if(this.range.status == 'VALID' && this.range.controls.start.value && this.range.controls.end.value){ //event for Requesting new Records based on the Dates
|
||||||
this.projectStartDate = new Date(this.range.controls.start.value);
|
this.projectStartDate = new Date(this.range.controls.start.value);
|
||||||
this.projectEndDate = new Date(this.range.controls.end.value);
|
this.projectEndDate = new Date(this.range.controls.end.value);
|
||||||
|
this.renderplanTime = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public rowSelecting(args: any){
|
// public rowSelecting(args: any){
|
||||||
// console.log(args)
|
// console.log(args)
|
||||||
// if(args.data.length){
|
// if(args.data.length){
|
||||||
|
|
@ -1016,10 +1020,12 @@ public logg(args){
|
||||||
this.spin = true;
|
this.spin = true;
|
||||||
this.renderGantt = true;
|
this.renderGantt = true;
|
||||||
this.showNoResultsError = false;
|
this.showNoResultsError = false;
|
||||||
|
this.renderplanTime = true;
|
||||||
}else{
|
}else{
|
||||||
this.renderGantt = false;
|
this.renderGantt = false;
|
||||||
this.spin = false;
|
this.spin = false;
|
||||||
this.showNoResultsError = true;
|
this.showNoResultsError = true;
|
||||||
|
this.renderplanTime = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -1175,7 +1181,7 @@ private oldFilters:{};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public actionBegin(args: any) {
|
public actionBegin(args: any) {
|
||||||
console.log(args); //custom Action
|
//console.log(args); //custom Action
|
||||||
if(args.dialogModel){
|
if(args.dialogModel){
|
||||||
args.cancel = true;
|
args.cancel = true;
|
||||||
if(args.rowData.taskData.resources[0].state == 0){
|
if(args.rowData.taskData.resources[0].state == 0){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue