fixed sorting in datasetexplorer, also show date

make annotationstatus more clear
This commit is contained in:
Alex Bezdieniezhnykh
2025-05-20 11:02:24 +03:00
parent 66bfe474c2
commit a5fcb0988b
6 changed files with 30 additions and 24 deletions
+8 -2
View File
@@ -46,8 +46,14 @@
<TextBlock
Grid.Row="2"
HorizontalAlignment="Right"
Foreground="Gray"
Text="{Binding CreatedEmail}" />
Foreground="Gray">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}: {1}">
<Binding Mode="OneWay" Path="CreatedDate"></Binding>
<Binding Mode="OneWay" Path="CreatedEmail"></Binding>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
</Border>
</DataTemplate>
+11 -7
View File
@@ -288,14 +288,18 @@ public partial class DatasetExplorer
{
SelectedAnnotations.Clear();
SelectedAnnotationDict.Clear();
var annotations = _annotationsDict[ExplorerEditor.CurrentAnnClass.YoloId];
foreach (var ann in annotations
.OrderBy(x => x.Value.AnnotationStatus)
.ThenByDescending(x => x.Value.CreatedDate))
var annThumbnails = _annotationsDict[ExplorerEditor.CurrentAnnClass.YoloId]
.Select(x => new AnnotationThumbnail(x.Value, _azaionApi.CurrentUser.Role.IsValidator()))
.OrderBy(x => !x.IsSeed)
.ThenByDescending(x =>x.Annotation.CreatedDate);
//var dict = annThumbnails.Take(20).ToDictionary(x => x.Annotation.Name, x => x.IsSeed);
foreach (var thumb in annThumbnails)
{
var annThumb = new AnnotationThumbnail(ann.Value, _azaionApi.CurrentUser.Role.IsValidator());
SelectedAnnotations.Add(annThumb);
SelectedAnnotationDict.Add(annThumb.Annotation.Name, annThumb);
SelectedAnnotations.Add(thumb);
SelectedAnnotationDict.Add(thumb.Annotation.Name, thumb);
}
await Task.CompletedTask;
}