mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
feat: Add bulk edit options (WIP)
This commit is contained in:
@@ -48,3 +48,34 @@ class BulkModifyTagsAction extends BulkAction {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class BulkModifyLabelAction extends BulkAction {
|
||||
final String _labelName;
|
||||
final int? labelId;
|
||||
|
||||
BulkModifyLabelAction.correspondent(
|
||||
super.documents, {
|
||||
required this.labelId,
|
||||
}) : _labelName = 'correspondent';
|
||||
|
||||
BulkModifyLabelAction.documentType(
|
||||
super.documents, {
|
||||
required this.labelId,
|
||||
}) : _labelName = 'document_type';
|
||||
|
||||
BulkModifyLabelAction.storagePath(
|
||||
super.documents, {
|
||||
required this.labelId,
|
||||
}) : _labelName = 'storage_path';
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'documents': documentIds.toList(),
|
||||
'method': 'set_$_labelName',
|
||||
'parameters': {
|
||||
_labelName: labelId,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user