This commit is contained in:
Peter Maquiran
2023-05-29 11:51:08 +01:00
parent b2da8463b4
commit ee14fbe8e7
11 changed files with 51 additions and 142 deletions
@@ -278,58 +278,7 @@ export class GabineteDigitalPage implements OnInit {
this.LoadCounts();
}
addProcessToDB(data) {}
getAllProcessFromDB() {}
dataTranform(data) {
}
sortArrayISODate(myArray: any): any[] {
// return myArray.sort(function (a, b) {
// return (a.CreateDate < b.CreateDate) ? -1 : ((a.CreateDate > b.CreateDate) ? 1 : 0);
// });
return myArray.sort((a,b) => Date.parse(b.CreateDate || b.taskStartDate) - Date.parse(a.CreateDate || a.taskStartDate))
}
setFormatDate(start: any, end: any, allday: boolean) {
let customDate;
const totalSeconds = Math.floor((end - (start)) / 1000);;
const totalMinutes = Math.floor(totalSeconds / 60);
const totalHours = Math.floor(totalMinutes / 60);
const totalDays = Math.floor(totalHours / 24);
if (totalDays == 0) {
if (allday) {
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " (todo dia)";
return customDate;
}
else {
customDate = this.getCustomDate(start) + ", " + this.getCustomHours(start) + " | " + this.getCustomHours(end);
return customDate;
}
}
else {
customDate = this.getCustomDate(start) + "," + this.getCustomHours(start) +
" (termina:" + this.getCustomDate(end) + "," + this.getCustomHours(end) + ")";
return customDate;
}
}
getCustomDate(thedate: Date) {
return thedate.getDate() + "/" +
(thedate.getMonth() + 1) + "/" +
thedate.getFullYear();
}
getCustomHours(thedate: Date) {
return thedate.getHours() + ":" +
thedate.getMinutes();
}
goto(url) {
this.router.navigate([url])
}
@@ -380,10 +329,6 @@ export class GabineteDigitalPage implements OnInit {
}
onSegmentVistaChange() {
}
checkUser() {
this.selectedElement = 'allProcessesTag';
this.showAllProcesses = true;
@@ -499,8 +444,10 @@ export class GabineteDigitalPage implements OnInit {
}
async LoadCounts() {
// this.skeletonLoader = true
await this.TaskService.LoadTask()
// this.skeletonLoader = false
}
doRefresh(event) {