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

UIEXPMGR-105: Update HTML Page Title on Export Manager Tabs Page #174

Merged
merged 2 commits into from
Apr 10, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## (IN PROGRESS)

* Update HTML Page Title on Export Manager Tabs Page. Refs UIEXPMGR-105.

## [3.1.0](https://github.com/folio-org/ui-export-manager/tree/v3.1.0) (2024-03-19)
[Full Changelog](https://github.com/folio-org/ui-export-manager/compare/v3.0.0...v3.1.0)

Expand Down
61 changes: 33 additions & 28 deletions src/ExportEdiJobs/ExportEdiJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import {
} from 'react-router-dom';
import { useIntl } from 'react-intl';

import {
TitleManager,
} from '@folio/stripes/core';
import {
Paneset,
} from '@folio/stripes/components';
Expand Down Expand Up @@ -53,8 +56,9 @@ export const ExportEdiJobs = () => {
} = useExportEdiJobsQuery(location.search, pagination, filters);

return (
<Paneset>
{
<TitleManager record={formatMessage({ id: 'ui-export-manager.title.organizations' })}>
<Paneset>
{
isFiltersOpened && (
<FiltersPane
toggleFilters={toggleFilters}
Expand Down Expand Up @@ -84,39 +88,40 @@ export const ExportEdiJobs = () => {
)
}

<ResultsPane
title={formatMessage({ id: 'ui-export-manager.exportJobs' })}
count={totalCount}
filters={filters}
toggleFiltersPane={toggleFilters}
isFiltersOpened={isFiltersOpened}
isLoading={isLoading}
autosize
>
{(({ height, width }) => (
<ExportEdiJobsList
isLoading={isLoading}
onNeedMoreData={changePage}
exportJobs={exportEdiJobs}
totalCount={totalCount}
filters={filters}
isFiltersOpened={isFiltersOpened}
toggleFilters={toggleFilters}
height={height}
width={width}
pagination={pagination}
/>
))}
</ResultsPane>
<ResultsPane
title={formatMessage({ id: 'ui-export-manager.exportJobs' })}
count={totalCount}
filters={filters}
toggleFiltersPane={toggleFilters}
isFiltersOpened={isFiltersOpened}
isLoading={isLoading}
autosize
>
{(({ height, width }) => (
<ExportEdiJobsList
isLoading={isLoading}
onNeedMoreData={changePage}
exportJobs={exportEdiJobs}
totalCount={totalCount}
filters={filters}
isFiltersOpened={isFiltersOpened}
toggleFilters={toggleFilters}
height={height}
width={width}
pagination={pagination}
/>
))}
</ResultsPane>

{
{
Boolean(params.id) && (
<ExportEdiJobDetails
refetchJobs={refetch}
uuid={params.id}
/>
)
}
</Paneset>
</Paneset>
</TitleManager>
);
};
5 changes: 5 additions & 0 deletions src/ExportEdiJobs/ExportEdiJobs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { runAxeTest } from '@folio/stripes-testing';
import { useExportEdiJobsQuery } from './apiQuery';
import { ExportEdiJobs } from './ExportEdiJobs';

jest.mock('@folio/stripes/core', () => ({
...jest.requireActual('@folio/stripes/core'),
TitleManager: ({ children }) => <>{children}</>,
}), { virtual: true });

jest.mock('react-virtualized-auto-sizer', () => {
return jest.fn(({ children }) => <div>{children({})}</div>);
});
Expand Down
61 changes: 33 additions & 28 deletions src/ExportJobs/ExportJobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import {
} from 'react-router-dom';
import { useIntl } from 'react-intl';

import {
TitleManager,
} from '@folio/stripes/core';
import {
Paneset,
} from '@folio/stripes/components';
Expand Down Expand Up @@ -54,8 +57,9 @@ export const ExportJobs = () => {
} = useExportJobsQuery(location.search, pagination, filters);

return (
<Paneset>
{
<TitleManager record={formatMessage({ id: 'ui-export-manager.title.all' })}>
<Paneset>
{
isFiltersOpened && (
<FiltersPane
toggleFilters={toggleFilters}
Expand Down Expand Up @@ -85,36 +89,37 @@ export const ExportJobs = () => {
)
}

<ResultsPane
title={formatMessage({ id: 'ui-export-manager.exportJobs' })}
count={totalCount}
autosize
filters={filters}
toggleFiltersPane={toggleFilters}
isFiltersOpened={isFiltersOpened}
isLoading={isLoading}
>
{(({ height, width }) => (
<ExportJobsList
isLoading={isLoading}
onNeedMoreData={changePage}
exportJobs={exportJobs}
totalCount={totalCount}
filters={filters}
isFiltersOpened={isFiltersOpened}
toggleFilters={toggleFilters}
pagination={pagination}
height={height}
width={width}
/>
))}
</ResultsPane>
<ResultsPane
title={formatMessage({ id: 'ui-export-manager.exportJobs' })}
count={totalCount}
autosize
filters={filters}
toggleFiltersPane={toggleFilters}
isFiltersOpened={isFiltersOpened}
isLoading={isLoading}
>
{(({ height, width }) => (
<ExportJobsList
isLoading={isLoading}
onNeedMoreData={changePage}
exportJobs={exportJobs}
totalCount={totalCount}
filters={filters}
isFiltersOpened={isFiltersOpened}
toggleFilters={toggleFilters}
pagination={pagination}
height={height}
width={width}
/>
))}
</ResultsPane>

{
{
Boolean(params.id) && (
<ExportJob uuid={params.id} />
)
}
</Paneset>
</Paneset>
</TitleManager>
);
};
5 changes: 5 additions & 0 deletions src/ExportJobs/ExportJobs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import '@folio/stripes-acq-components/test/jest/__mock__';
import { useExportJobsQuery } from './apiQuery';
import { ExportJobs } from './ExportJobs';

jest.mock('@folio/stripes/core', () => ({
...jest.requireActual('@folio/stripes/core'),
TitleManager: ({ children }) => <>{children}</>,
}), { virtual: true });

jest.mock('react-virtualized-auto-sizer', () => {
return jest.fn(({ children }) => <div>{children({})}</div>);
});
Expand Down
2 changes: 2 additions & 0 deletions translations/ui-export-manager/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"meta.title": "Export manager",
"title.all": "All",
"title.organizations": "Organizations",

"exportJobs": "Export jobs",
"exportJobs.search": "Search",
Expand Down
Loading