Move document improvements (#927)
* Show all collections in UI * Introduce command pattern * Actually remove from previous collection * Stash * Fixes: Promises resolved outside of response lifecycle * 💚 * 💚 * documentMover tests * Transaction * Perf. More in transactions
This commit is contained in:
@@ -24,6 +24,11 @@ export default class Collection extends BaseModel {
|
||||
updatedAt: ?string;
|
||||
url: string;
|
||||
|
||||
@computed
|
||||
get isPrivate(): boolean {
|
||||
return this.private;
|
||||
}
|
||||
|
||||
@computed
|
||||
get isEmpty(): boolean {
|
||||
return this.documents.length === 0;
|
||||
|
||||
@@ -234,8 +234,8 @@ export default class Document extends BaseModel {
|
||||
}
|
||||
};
|
||||
|
||||
move = (parentDocumentId: ?string) => {
|
||||
return this.store.move(this, parentDocumentId);
|
||||
move = (collectionId: string, parentDocumentId: ?string) => {
|
||||
return this.store.move(this, collectionId, parentDocumentId);
|
||||
};
|
||||
|
||||
duplicate = () => {
|
||||
|
||||
Reference in New Issue
Block a user