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

UIIN-3120: Rename quick-marc routes from bib to bibliographic and duplicate to derive. #2666

Merged
merged 2 commits into from
Nov 14, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change history for ui-inventory

## [13.0.0] (IN PROGRESS)

* *BREAKING* Rename quick-marc routes from `bib` to `bibliographic` and `duplicate` to `derive`. Refs UIIN-3120.

## [12.0.1] (IN PROGRESS)

* Run `history.replace` once during component mount and update to avoid URL rewriting. Refs UIIN-3099.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/inventory",
"version": "12.0.0",
"version": "13.0.0",
"description": "Inventory manager",
"repository": "folio-org/ui-inventory",
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions src/ViewInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ import RequestsReorderButton from './components/ViewInstance/MenuSection/Request
import { IdReportGenerator } from './reports';

const quickMarcPages = {
editInstance: 'edit-bib',
duplicateInstance: 'duplicate-bib',
editInstance: 'edit-bibliographic',
duplicateInstance: 'derive-bibliographic',
createHoldings: 'create-holdings',
};

Expand Down
6 changes: 3 additions & 3 deletions src/ViewInstance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ describe('ViewInstance', () => {
it('push function should be called when the user clicks the "Edit MARC bibliographic record" button', async () => {
renderViewInstance();
const expectedValue = {
pathname: `/inventory/quick-marc/edit-bib/${defaultProp.selectedInstance.id}`,
pathname: `/inventory/quick-marc/edit-bibliographic/${defaultProp.selectedInstance.id}`,
search: 'filters=test1&query=test2&sort=test3&qindex=test',
};
fireEvent.click(screen.getByRole('button', { name: 'Actions' }));
Expand Down Expand Up @@ -991,7 +991,7 @@ describe('ViewInstance', () => {
it('push function should be called when the user clicks the "Derive new MARC bibliographic record" button', async () => {
renderViewInstance({ isShared: false });
const expectedValue = {
pathname: `/inventory/quick-marc/duplicate-bib/${defaultProp.selectedInstance.id}`,
pathname: `/inventory/quick-marc/derive-bibliographic/${defaultProp.selectedInstance.id}`,
search: 'filters=test1&query=test2&sort=test3&qindex=test',
};
fireEvent.click(screen.getByRole('button', { name: 'Actions' }));
Expand Down Expand Up @@ -1284,7 +1284,7 @@ describe('ViewInstance', () => {
fireEvent.click(screen.getByRole('button', { name: 'editMARC' }));

expect(mockPush).toHaveBeenLastCalledWith({
pathname: `/inventory/quick-marc/edit-bib/${instance.id}`,
pathname: `/inventory/quick-marc/edit-bibliographic/${instance.id}`,
search: 'filters=test1&query=test2&sort=test3&qindex=test&shared=true',
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/InstancesList/InstancesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class InstancesList extends React.Component {

openCreateMARCRecord = () => {
const searchParams = new URLSearchParams(this.props.location.search);
this.props.goTo(`/inventory/quick-marc/create-bib?${searchParams}`);
this.props.goTo(`/inventory/quick-marc/create-bibliographic?${searchParams}`);
}

copyInstance = (instance) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/InstancesList/InstancesList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ describe('InstancesList', () => {

fireEvent.click(button);

expect(history.push).toHaveBeenCalledWith('/inventory/quick-marc/create-bib?filters=staffSuppress.false&sort=contributors');
expect(history.push).toHaveBeenCalledWith('/inventory/quick-marc/create-bibliographic?filters=staffSuppress.false&sort=contributors');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/ViewSource/ViewSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const ViewSource = ({

const redirectToMARCEdit = useCallback(() => {
const urlId = isHoldingsRecord ? `${instanceId}/${holdingsRecordId}` : instanceId;
const pathname = `/inventory/quick-marc/edit-${isHoldingsRecord ? 'holdings' : 'bib'}/${urlId}`;
const pathname = `/inventory/quick-marc/edit-${isHoldingsRecord ? 'holdings' : 'bibliographic'}/${urlId}`;

redirectToMarcEditPage(pathname, instance, location, history);
}, [isHoldingsRecord]);
Expand Down
4 changes: 2 additions & 2 deletions src/components/ViewSource/ViewSource.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('ViewSource', () => {
fireEvent.click(screen.getByRole('button', { name: 'editMARC' }));

expect(mockPush).toHaveBeenLastCalledWith({
pathname: `/inventory/quick-marc/edit-bib/${mockInstance.id}`,
pathname: `/inventory/quick-marc/edit-bibliographic/${mockInstance.id}`,
search: '',
});
});
Expand All @@ -214,7 +214,7 @@ describe('ViewSource', () => {
fireEvent.click(screen.getByRole('button', { name: 'Edit MARC bibliographic record' }));

expect(mockPush).toHaveBeenLastCalledWith({
pathname: `/inventory/quick-marc/edit-bib/${mockInstance.id}`,
pathname: `/inventory/quick-marc/edit-bibliographic/${mockInstance.id}`,
search: '',
});
});
Expand Down
Loading