Planzeit Summen/inProgress

main
manueltauber 2023-06-07 15:46:14 +02:00
parent 41719e15c5
commit 52c55419fe
4 changed files with 40 additions and 9 deletions

View File

@ -249,12 +249,15 @@ export class DataService {
const promise = new Promise(resolve=>{
let first : boolean = true;
let res : any[] = [];
console.log(dataJson);
//console.log(dataJson);
this.http.post('http://localhost:8080/api/getChanges', dataJson)
.subscribe((response:any)=>{
console.log(response);
//console.log(response);
this.totalSize = response.totalSize;
response.changes.forEach(resp=>{
//console.log(resp.resourceId+" "+resp.approvalStatus)
let tasks : any[] = [];
if(resp.d1!=null){
tasks.push(
@ -331,10 +334,10 @@ export class DataService {
}
validateImplementerEdit(state):boolean{
if(state == 1){
if(state == 1 || state == 3 || state == 6){
return true
}else{
return false
return true
}
}
@ -354,7 +357,7 @@ export class DataService {
}
validateApproval(approval):boolean{
if(approval!==""){
if(approval!=""){
return true;
}else{
return false;

View File

@ -121,11 +121,13 @@ export class ImplementerDialogComponent implements OnInit {
msg = 'Implementer Update failed';
action ='close';
}
this._snackBar.open(msg, action, {
this._snackBar.open(msg+" : "+res.error.message, action, {
horizontalPosition: this.horizontalPosition,
verticalPosition: this.verticalPosition,
panelClass: ['mat-primary']
});
}).onAction().subscribe(() => {
console.log('The snackbar action was triggered!');
});
this.dialogRef.close();
//this.dialogRef.close();
//counter++;
@ -141,7 +143,7 @@ export class ImplementerDialogComponent implements OnInit {
msg = 'Implementer Eintragung erfolgreich';
action ='Schließen';
}else{
msg = 'Implementer Update sucessful';
msg = 'Implementer Update successful';
action ='close';
}
this._snackBar.open(msg, action, {

View File

@ -94,6 +94,7 @@
(taskbarEditing)="taskbarEditing($event)"
(taskbarEdited)="taskbarEdited($event)"
(toolbarClick)="toolbarBtnClicked($event)"
(rowSelecting) = "rowSelecting($event)"
(rowSelected) = "rowSelected($event)"
(rowDeselected) = "rowDeselected($event)"
(created)="created($event)"

View File

@ -527,6 +527,8 @@ public logg(args){
this.data.push(task);
}
}
console.log(this.resources[this.resources.length-1]);
this.resources.push({resourceId: 'Timeline', resourceName: 'Planzeit Summen pro Woche'})
}
/**
@ -598,12 +600,36 @@ public logg(args){
this.projectEndDate = new Date(this.range.controls.end.value);
}
}
public rowSelecting(args: any){
console.log(args)
if(args.data.length){
// if((args.data.length == this.resources.length+1)){
// console.log("all")
// }else{
// if(args.data[args.data.length-1].TaskID == 'Timeline'){
// args.cancel = true;
// }
// }
if(args.data[args.data.length-1].TaskID == 'Timeline'){
let data = args.data;
data.pop();
args.data = data;
}
}else{
if(args.data.TaskID == 'Timeline'){
args.cancel = true;
}
}
}
/**
* The function rowSelected catches the corresponding syncfsuions event and checks if all selected resources (changes) have the same status, then it displays the corresponding buttons
* @param args event arguments from the syncfusion gantt chart
*/
public rowSelected(args: any) {
this.approvalPending = false;
this.selectedrowindex = this.ganttDefault.selectionModule.getSelectedRowIndexes(); // get the selected row indexes.
this.selectedrecords = this.ganttDefault.selectionModule.getSelectedRecords(); // get the selected records.
@ -700,7 +726,6 @@ public logg(args){
this.selRecs = [];
this.selectedrecords = [];
this.selectedrowindex = [];
}
/**