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
+4 -11
View File
@@ -88,7 +88,7 @@ public class AnnotationService : IAnnotationService, INotificationHandler<Annota
if (email != _api.CurrentUser.Email) //Don't process messages by yourself
{
if (annotationStatus.In(AnnotationStatus.Created, AnnotationStatus.ValidatedEdited))
if (annotationStatus.In(AnnotationStatus.Created, AnnotationStatus.Edited))
{
var msg = MessagePackSerializer.Deserialize<AnnotationMessage>(message.Data.Contents);
await SaveAnnotationInner(
@@ -161,25 +161,18 @@ public class AnnotationService : IAnnotationService, INotificationHandler<Annota
if (ann != null) //Annotation is already exists
{
status = AnnotationStatus.Edited;
var annotationUpdatable = db.Annotations
.Where(x => x.Name == fName)
.Set(x => x.Source, source)
.Set(x => x.CreatedRole, userRole);
.Set(x => x.Source, source);
if (userRole.IsValidator() && source == SourceEnum.Manual)
{
status = AnnotationStatus.ValidatedEdited;
annotationUpdatable = annotationUpdatable
.Set(x => x.ValidateDate, createdDate)
.Set(x => x.ValidateEmail, createdEmail);
}
else
{
annotationUpdatable = annotationUpdatable
.Set(x => x.CreatedDate, createdDate)
.Set(x => x.CreatedEmail, createdEmail);
}
await annotationUpdatable
.Set(x => x.AnnotationStatus, status)