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[]> {
|
getNodeAssignHolds(nodeId: string): Observable<Hold[]> {
|
||||||
const queryOptions = Object.assign({
|
const queryOptions = Object.assign({
|
||||||
maxItems: this.preferences.paginationSize,
|
|
||||||
skipCount: 0,
|
|
||||||
where: `(assocType='rma:frozenContent')`
|
where: `(assocType='rma:frozenContent')`
|
||||||
});
|
});
|
||||||
|
|
||||||
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
|
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
|
||||||
map((holds) =>
|
map(({ list }) =>
|
||||||
holds.list?.entries?.map((entity) => ({
|
list?.entries?.map(({ entry }) => ({
|
||||||
id: entity.entry.id,
|
id: entry?.id,
|
||||||
name: entity.entry.name
|
name: entry?.name
|
||||||
}))
|
}))
|
||||||
),
|
),
|
||||||
catchError((err) => throwError(err))
|
catchError((err) => throwError(err))
|
||||||
|
@@ -31,6 +31,7 @@ describe('LegalHoldsService', () => {
|
|||||||
imports: [ContentTestingModule]
|
imports: [ContentTestingModule]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(LegalHoldService);
|
service = TestBed.inject(LegalHoldService);
|
||||||
|
|
||||||
legalHolds = {
|
legalHolds = {
|
||||||
list: {
|
list: {
|
||||||
entries: [
|
entries: [
|
||||||
@@ -44,6 +45,7 @@ describe('LegalHoldsService', () => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
} as NodeChildAssociationPaging;
|
} as NodeChildAssociationPaging;
|
||||||
|
|
||||||
returnedHolds = [
|
returnedHolds = [
|
||||||
{
|
{
|
||||||
id: mockId,
|
id: mockId,
|
||||||
|
@@ -13,9 +13,10 @@ export interface Hold {
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
Name | Type | Default value | Description
|
Name | Type | Default value | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**id** | **string** | | hold id
|
**id** | **string** | | Hold id
|
||||||
**name** | **string** | | hold name
|
**name** | **string** | | Hold name
|
||||||
**reason** | **string** | | hold reason
|
**reason** | **string** | | Hold reason
|
||||||
**description** | **string** | | [optional] [additional information for a hold]
|
**description** | **string** | | [optional] [Additional information for a hold]
|
||||||
|
@@ -39,11 +39,11 @@ legalHoldApi.getHolds('-filePlan-', opts).then((data) => {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Default value | Description
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**filePlanId** | **string** | The site details |
|
**filePlanId** | **string** | | The site details
|
||||||
**skipCount** | **number**| The number of entities that exist in the collection before those included in this list. | [optional]
|
**skipCount** | **number**| `0` | 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]
|
**maxItems** | **number**| `100` | The maximum number of items to return in the list. [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user