mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1410: #3503 IPad Sortierung im TK falsh
#3503 IPad Sortierung im TK falsh
This commit is contained in:
committed by
Andreas Schickinger
parent
1e4e6da44e
commit
a021ac0da3
@@ -353,6 +353,6 @@ export class DomainTaskCalendarService {
|
||||
getDateGroupKey(d: string) {
|
||||
// Get Date as string key to ignore time for grouping
|
||||
const date = new Date(d);
|
||||
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
||||
return date.toISOString().split('T')[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export class TaskSearchComponent implements OnInit, AfterViewInit {
|
||||
displayItems$ = this.searchResults$.pipe(
|
||||
map((r) => {
|
||||
const grouped = groupBy(r, this.byDate);
|
||||
grouped.sort((a, b) => new Date(a.group).getTime() - new Date(b.group).getTime());
|
||||
grouped.sort((a, b) => this.dateAdapter.parseDate(a.group).getTime() - this.dateAdapter.parseDate(b.group).getTime());
|
||||
return grouped;
|
||||
}),
|
||||
// Sortierung der aufgaben nach Rot => Gelb => Grau => Grün
|
||||
|
||||
@@ -85,7 +85,7 @@ export class DateAdapter {
|
||||
}
|
||||
|
||||
parseDate(date: string) {
|
||||
return new Date(date);
|
||||
return moment(date).toDate();
|
||||
}
|
||||
|
||||
today(): Date {
|
||||
|
||||
Reference in New Issue
Block a user