[ADF-2176] [Destination picker] File Libraries are not displayed (#2868)

* [ADF-2176] [Destination picker] File Libraries are not displayed

update columns used for display according to the folder node to display

* [ADF-2176] revert initial changes

* [ADF-2176] assure that site entries have 'name' property set

* [ADF-2176] add unit test
This commit is contained in:
suzanadirla
2018-02-06 15:53:44 +02:00
committed by Eugenio Romano
parent 03cca19599
commit 9e6469c566
3 changed files with 145 additions and 2 deletions

View File

@@ -608,7 +608,15 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
};
this.apiService.sitesApi.getSites(options)
.then((page: NodePaging) => this.onPageLoaded(page, merge))
.then((page: NodePaging) => {
page.list.entries.map(
({entry}: any) => {
entry.name = entry.name || entry.title;
return {entry};
}
);
this.onPageLoaded(page, merge);
})
.catch(error => this.error.emit(error));
}
@@ -626,6 +634,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
entries: result.list.entries
.map(({entry: {site}}: any) => {
site.allowableOperations = site.allowableOperations ? site.allowableOperations : [this.CREATE_PERMISSION];
site.name = site.name || site.title;
return {
entry: site
};