Documents
This commit is contained in:
parent
66948b9452
commit
8f7d66a60b
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue