mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 06:07:57 -06:00
Reworked inbox, added more information and allow suggestions to be directly clicked
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user