diff --git a/projects/admin/src/app/api/ill-request-api.service.ts b/projects/admin/src/app/api/ill-request-api.service.ts index 740320a53..279c81e23 100644 --- a/projects/admin/src/app/api/ill-request-api.service.ts +++ b/projects/admin/src/app/api/ill-request-api.service.ts @@ -44,11 +44,15 @@ export class IllRequestApiService extends BaseApi { * @param filters - criteria to apply on the query to filter the result. * @returns Array of ill request record */ - getByPatronPid(patronPid: string, filters?: {[key: string]: string}): Observable { + getByPatronPid( + patronPid: string, + filters?: {[key: string]: string}, + sort: string = '-created' + ): Observable { const query = `patron.pid:${patronPid}`; return this._recordService .getRecords(this.RESOURCE_NAME, query , 1, RecordService.MAX_REST_RESULTS_SIZE, - undefined, filters, BaseApi.reroJsonheaders, 'created') + undefined, filters, BaseApi.reroJsonheaders, sort) .pipe(map((result: Record) => result.hits.hits)); } } diff --git a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html index e72d88a31..34b5184f1 100644 --- a/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html +++ b/projects/admin/src/app/circulation/patron/ill-request/ill-request-item/ill-request-item.component.html @@ -17,7 +17,7 @@ -->
-
+
-
+
{{ record.metadata.pickup_location.name }}
+
{{ record.created | dateTranslate:'medium'}}
+
{{ record.metadata.loan_status }} +
+
- -
Pickup location
-
{{ record.metadata.pickup_location.name }}
- -
Status
-
- {{ record.metadata.status }} -
Scope
@@ -91,6 +87,11 @@ {{ record.metadata.found_in.source }}
+ +
Request status
+
+ {{ record.metadata.status }} +
Note
diff --git a/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html b/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html index 609bb40dd..55c6b8298 100644 --- a/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html +++ b/projects/admin/src/app/circulation/patron/ill-request/ill-request.component.html @@ -18,7 +18,11 @@
-
Title
+
Document
+
Pickup location
+
Request date
+
Loan status
+
 
diff --git a/projects/admin/src/app/record/detail-view/ill-request-detail-view/ill-request-detail-view.component.html b/projects/admin/src/app/record/detail-view/ill-request-detail-view/ill-request-detail-view.component.html index 14bf09f53..eed013ca7 100644 --- a/projects/admin/src/app/record/detail-view/ill-request-detail-view/ill-request-detail-view.component.html +++ b/projects/admin/src/app/record/detail-view/ill-request-detail-view/ill-request-detail-view.component.html @@ -78,7 +78,7 @@
Request date
{{ record.created | dateTranslate : 'medium' }}
-
Status
+
Request status
{{ record.metadata.status }} diff --git a/projects/public-search/src/app/api/ill-request-api.service.ts b/projects/public-search/src/app/api/ill-request-api.service.ts index 34f79b6ed..b660bc242 100644 --- a/projects/public-search/src/app/api/ill-request-api.service.ts +++ b/projects/public-search/src/app/api/ill-request-api.service.ts @@ -63,9 +63,10 @@ export class IllRequestApiService extends BaseApi { patronPid: string, page: number, itemsPerPage: number = 10, - headers = BaseApi.reroJsonheaders + headers = BaseApi.reroJsonheaders, + sort: string = '-created' ): Observable { const query = `patron.pid:${patronPid} AND -status:denied AND -status:closed AND -loan_status:ITEM_RETURNED`; - return this._recordService.getRecords('ill_requests', query, page, itemsPerPage, undefined, undefined, headers); + return this._recordService.getRecords('ill_requests', query, page, itemsPerPage, undefined, undefined, headers, sort); } }