Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIREQ-1211 - Cleanup retrieval service point implementation from deprecated folder. #1247

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Add optional column "Retrieval service point" to requests search list. Refs UIREQ-1188.
* Increase code coverage for src/ChooseRequestTypeDialog.js by Jest/RTL tests. Refs UIREQ-1044.
* Cleanup retrieval service point implementation from deprecated folder. Refs UIREQ-1211.

## [11.0.2] (https://github.com/folio-org/ui-requests/tree/v11.0.2) (2024-12-10)
[Full Changelog](https://github.com/folio-org/ui-requests/compare/v11.0.1...v11.0.2)
Expand Down
5 changes: 1 addition & 4 deletions src/deprecated/routes/RequestsRoute/RequestsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ export const getListFormatter = (
<SinglePrintButtonForPickSlip {...singlePrintButtonProps} />);
},
'requesterBarcode': rq => (rq.requester ? rq.requester.barcode : DEFAULT_FORMATTER_VALUE),
'retrievalServicePoint': rq => get(rq, 'item.retrievalServicePointName', DEFAULT_FORMATTER_VALUE),
'requestStatus': rq => (requestStatusesTranslations[rq.status]
? <FormattedMessage id={requestStatusesTranslations[rq.status]} />
: <NoValue />),
Expand Down Expand Up @@ -335,7 +334,6 @@ class RequestsRoute extends React.Component {
'requestStatus': 'status',
'servicePoint': 'searchIndex.pickupServicePointName',
'requesterBarcode': 'requester.barcode',
'retrievalServicePoint': 'item.retrievalServicePointName',
'requestDate': 'requestDate',
'position': 'position/number',
'proxy': 'proxy',
Expand Down Expand Up @@ -1418,7 +1416,6 @@ class RequestsRoute extends React.Component {
servicePoint: <FormattedMessage id="ui-requests.requests.servicePoint" />,
requester: <FormattedMessage id="ui-requests.requests.requester" />,
requesterBarcode: <FormattedMessage id="ui-requests.requests.requesterBarcode" />,
retrievalServicePoint: <FormattedMessage id="ui-requests.requests.retrievalServicePoint" />,
singlePrint: <FormattedMessage id="ui-requests.requests.singlePrint" />,
proxy: <FormattedMessage id="ui-requests.requests.proxy" />,
...(isViewPrintDetailsEnabled && {
Expand Down Expand Up @@ -1689,7 +1686,7 @@ class RequestsRoute extends React.Component {
resultIsSelected={this.resultIsSelected}
onFilterChange={this.handleFilterChange}
sortableColumns={['requestDate', 'title', 'year', 'itemBarcode', 'callNumber', 'type', 'requestStatus',
'position', 'servicePoint', 'requester', 'requesterBarcode', 'retrievalServicePoint', 'proxy', 'copies', 'printed']}
'position', 'servicePoint', 'requester', 'requesterBarcode', 'proxy', 'copies', 'printed']}
pageAmount={100}
pagingType={MCLPagingTypes.PREV_NEXT}
/>
Expand Down
8 changes: 0 additions & 8 deletions src/deprecated/routes/RequestsRoute/RequestsRoute.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,6 @@ describe('RequestsRoute', () => {
select: 'test value',
item: {
barcode: 'itemBarcode',
retrievalServicePointId: '3a40852d-49fd-4df2-a1f9-6e2641a6e91f',
retrievalServicePointName: 'Circ Desk 1',
},
position: 'position',
proxy: {},
Expand Down Expand Up @@ -1373,12 +1371,6 @@ describe('RequestsRoute', () => {
});
});

describe('retrieval service point', () => {
it('should return retrieval service point', () => {
expect(listFormatter.retrievalServicePoint(requestWithData)).toBe(requestWithData.item.retrievalServicePointName);
});
});

describe('when formatting copies column', () => {
it('should return copies for copies column', () => {
expect(listFormatter.copies(requestWithData)).toBe(requestWithData.printDetails.printCount);
Expand Down
Loading