mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5015] DocumentList - favorites properties (#5278)
* merge entry properties to target * fix default properties undefined value * tests
This commit is contained in:
committed by
Eugenio Romano
parent
0fb954dd11
commit
90402ac43d
@@ -150,15 +150,19 @@ export class CustomResourcesService {
|
||||
const page: FavoritePaging = {
|
||||
list: {
|
||||
entries: result.list.entries
|
||||
.map(({ entry: { target } }: any) => ({
|
||||
entry: target.file || target.folder
|
||||
}))
|
||||
.map(({ entry }: any) => {
|
||||
entry.properties = {
|
||||
'cm:title': entry.title,
|
||||
'cm:description': entry.description
|
||||
};
|
||||
return { entry };
|
||||
const target = entry.target.file || entry.target.folder;
|
||||
target.properties = {
|
||||
...(target.properties || {
|
||||
'cm:title': entry.title || target.title,
|
||||
'cm:description': entry.description || target.description
|
||||
}),
|
||||
...(entry.properties || {})
|
||||
};
|
||||
|
||||
return {
|
||||
entry: target
|
||||
};
|
||||
}),
|
||||
pagination: result.list.pagination
|
||||
}
|
||||
|
Reference in New Issue
Block a user