Upgrade Sitzplan - Jetzt mit Bewertungsfeature
This commit is contained in:
@@ -31,6 +31,7 @@ public partial class GroupDocumentationTabViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty] private StudentOption _selectedStudentFilter = AllStudentsOption;
|
||||
[ObservableProperty] private bool _onlyThisGroup;
|
||||
[ObservableProperty] private int _draftCount;
|
||||
|
||||
public Func<Guid, List<StudentOption>, Documentation?, Task<Documentation?>>? OnEditDocumentation { get; set; }
|
||||
public Func<DocumentationItem, Task<bool>>? OnConfirmDeleteDocumentation { get; set; }
|
||||
@@ -80,7 +81,10 @@ public partial class GroupDocumentationTabViewModel : ObservableObject
|
||||
var all = relevantStudentIds
|
||||
.SelectMany(id => _docs.GetByStudent(id))
|
||||
.Where(d => !OnlyThisGroup || d.GroupId == _groupId)
|
||||
.OrderByDescending(d => d.Date);
|
||||
.OrderByDescending(d => d.IsDraft)
|
||||
.ThenByDescending(d => d.Date)
|
||||
.ToList();
|
||||
DraftCount = all.Count(d => d.IsDraft && (d.GroupId is null || d.GroupId == _groupId));
|
||||
|
||||
foreach (var d in all)
|
||||
{
|
||||
@@ -91,6 +95,8 @@ public partial class GroupDocumentationTabViewModel : ObservableObject
|
||||
}
|
||||
}
|
||||
|
||||
public void Refresh() => Load();
|
||||
|
||||
[RelayCommand]
|
||||
private async Task AddDocumentation()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user