mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
ACS-8055 clean up code
This commit is contained in:
@@ -248,16 +248,14 @@ export class NodesApiService {
|
||||
*/
|
||||
getNodeAssignHolds(nodeId: string): Observable<Hold[]> {
|
||||
const queryOptions = Object.assign({
|
||||
maxItems: this.preferences.paginationSize,
|
||||
skipCount: 0,
|
||||
where: `(assocType='rma:frozenContent')`
|
||||
});
|
||||
|
||||
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
|
||||
map((holds) =>
|
||||
holds.list?.entries?.map((entity) => ({
|
||||
id: entity.entry.id,
|
||||
name: entity.entry.name
|
||||
map(({ list }) =>
|
||||
list?.entries?.map(({ entry }) => ({
|
||||
id: entry?.id,
|
||||
name: entry?.name
|
||||
}))
|
||||
),
|
||||
catchError((err) => throwError(err))
|
||||
|
@@ -31,6 +31,7 @@ describe('LegalHoldsService', () => {
|
||||
imports: [ContentTestingModule]
|
||||
});
|
||||
service = TestBed.inject(LegalHoldService);
|
||||
|
||||
legalHolds = {
|
||||
list: {
|
||||
entries: [
|
||||
@@ -44,6 +45,7 @@ describe('LegalHoldsService', () => {
|
||||
]
|
||||
}
|
||||
} as NodeChildAssociationPaging;
|
||||
|
||||
returnedHolds = [
|
||||
{
|
||||
id: mockId,
|
||||
|
@@ -13,9 +13,10 @@ export interface Hold {
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Default value | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | hold id
|
||||
**name** | **string** | | hold name
|
||||
**reason** | **string** | | hold reason
|
||||
**description** | **string** | | [optional] [additional information for a hold]
|
||||
**id** | **string** | | Hold id
|
||||
**name** | **string** | | Hold name
|
||||
**reason** | **string** | | Hold reason
|
||||
**description** | **string** | | [optional] [Additional information for a hold]
|
||||
|
@@ -39,11 +39,11 @@ legalHoldApi.getHolds('-filePlan-', opts).then((data) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
Name | Type | Default value | Description
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**filePlanId** | **string** | The site details |
|
||||
**skipCount** | **number**| The number of entities that exist in the collection before those included in this list. | [optional]
|
||||
**maxItems** | **number**| The maximum number of items to return in the list. | [optional]
|
||||
**filePlanId** | **string** | | The site details
|
||||
**skipCount** | **number**| `0` | The number of entities that exist in the collection before those included in this list. [optional]
|
||||
**maxItems** | **number**| `100` | The maximum number of items to return in the list. [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
Reference in New Issue
Block a user