Documents

This commit is contained in:
Hillel Coren 2023-08-13 16:42:13 +03:00
parent 66948b9452
commit 8f7d66a60b
2 changed files with 6 additions and 1 deletions

View File

@ -107,10 +107,14 @@ Middleware<AppState> _saveDocument(DocumentRepository repository) {
repository repository
.saveData(store.state.credentials, action.document) .saveData(store.state.credentials, action.document)
.then((DocumentEntity document) { .then((DocumentEntity document) {
document = document.rebuild((b) => b
..parentId = action.document.parentId
..parentType = action.document.parentType);
store.dispatch(SaveDocumentSuccess(document)); store.dispatch(SaveDocumentSuccess(document));
if (action.completer != null) { if (action.completer != null) {
action.completer.complete(null); action.completer.complete(document);
} }
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);

View File

@ -40,6 +40,7 @@ class EntityPresenter {
EntityType.user, EntityType.user,
EntityType.product, EntityType.product,
EntityType.transaction, EntityType.transaction,
EntityType.document,
].contains(entity.entityType) || ].contains(entity.entityType) ||
isNarrow) { isNarrow) {
return name; return name;