ACS-8055 clean up code

This commit is contained in:
DaryaBalvanovich
2024-06-06 09:50:33 +02:00
parent 0bdcc38367
commit 907a607a96
4 changed files with 15 additions and 14 deletions

View File

@@ -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))

View File

@@ -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,

View File

@@ -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]

View File

@@ -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