Reworked inbox, added more information and allow suggestions to be directly clicked

This commit is contained in:
Anton Stubenbord
2023-01-15 01:05:57 +01:00
parent 21462c0463
commit 31b6335f95
13 changed files with 551 additions and 210 deletions

View File

@@ -4,6 +4,7 @@ part 'field_suggestions.g.dart';
@JsonSerializable(fieldRename: FieldRename.snake)
class FieldSuggestions {
final int? documentId;
final Iterable<int> correspondents;
final Iterable<int> tags;
final Iterable<int> documentTypes;
@@ -11,6 +12,7 @@ class FieldSuggestions {
final Iterable<DateTime> dates;
const FieldSuggestions({
this.documentId,
this.correspondents = const [],
this.tags = const [],
this.documentTypes = const [],
@@ -38,6 +40,15 @@ class FieldSuggestions {
(storagePaths.isNotEmpty ? 1 : 0) +
(dates.isNotEmpty ? 1 : 0);
FieldSuggestions forDocumentId(int id) => FieldSuggestions(
documentId: id,
correspondents: correspondents,
dates: dates,
documentTypes: documentTypes,
tags: tags,
storagePaths: storagePaths,
);
factory FieldSuggestions.fromJson(Map<String, dynamic> json) =>
_$FieldSuggestionsFromJson(json);