Skip to content

Commit

Permalink
Add icons to requests action menu
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko committed Dec 18, 2024
1 parent c58915b commit 51a8dbd
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Increase code coverage for src/ViewRequest.js by Jest/RTL tests. Refs UIREQ-1046.
* React v19: refactor away from default props for functional components. Refs UIREQ-1101.
* Add "Retrieval service point" filter. Refs UIREQ-1190.
* Add icons to requests action menu. Refs UIREQ-1116.

## [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
49 changes: 31 additions & 18 deletions src/deprecated/routes/RequestsRoute/RequestsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
DefaultMCLRowFormatter,
NoValue,
MCLPagingTypes,
Icon,
} from '@folio/stripes/components';
import {
deparseFilters,
Expand Down Expand Up @@ -1467,7 +1468,9 @@ class RequestsRoute extends React.Component {
to={`${this.props.location.pathname}?layer=create`}
onClick={onToggle}
>
<FormattedMessage id="stripes-smart-components.new" />
<Icon icon="plus-sign">
<FormattedMessage id="stripes-smart-components.new" />
</Icon>
</Button>
</IfPermission>
{csvReportPending ?
Expand All @@ -1484,7 +1487,9 @@ class RequestsRoute extends React.Component {
this.exportData();
}}
>
<FormattedMessage id="ui-requests.exportSearchResultsToCsv" />
<Icon icon="download">
<FormattedMessage id="ui-requests.exportSearchResultsToCsv" />
</Icon>
</Button>
}
{
Expand All @@ -1503,10 +1508,12 @@ class RequestsRoute extends React.Component {
this.exportExpiredHoldsToCSV();
}}
>
<FormattedMessage
id="ui-requests.exportExpiredHoldShelfToCsv"
values={{ currentServicePoint: servicePointName }}
/>
<Icon icon="download">
<FormattedMessage
id="ui-requests.exportExpiredHoldShelfToCsv"
values={{ currentServicePoint: servicePointName }}
/>
</Icon>
</Button>
<PrintButton
buttonStyle="dropdownItem"
Expand All @@ -1523,10 +1530,12 @@ class RequestsRoute extends React.Component {
}}
onAfterPrint={this.onAfterPrintForPrintButton}
>
<FormattedMessage
id="ui-requests.printPickSlips"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printPickSlips"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
<PrintButton
buttonStyle="dropdownItem"
Expand Down Expand Up @@ -1555,10 +1564,12 @@ class RequestsRoute extends React.Component {
}
onAfterPrint={this.onAfterPrintForPrintButton}
>
<FormattedMessage
id="ui-requests.printPickSlipsSelected"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printPickSlipsSelected"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
</>
}
Expand All @@ -1578,10 +1589,12 @@ class RequestsRoute extends React.Component {
contentRef={this.searchSlipsPrintContentRef}
onBeforeGetContent={() => this.onBeforeGetContentForPrintButton(onToggle)}
>
<FormattedMessage
id="ui-requests.printSearchSlips"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printSearchSlips"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
}
</>
Expand Down
49 changes: 31 additions & 18 deletions src/routes/RequestsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
DefaultMCLRowFormatter,
NoValue,
MCLPagingTypes,
Icon,
} from '@folio/stripes/components';
import {
deparseFilters,
Expand Down Expand Up @@ -1545,7 +1546,9 @@ class RequestsRoute extends React.Component {
to={`${this.props.location.pathname}?layer=create`}
onClick={onToggle}
>
<FormattedMessage id="stripes-smart-components.new" />
<Icon icon="plus-sign">
<FormattedMessage id="stripes-smart-components.new" />
</Icon>
</Button>
</IfPermission>
{csvReportPending ?
Expand All @@ -1562,7 +1565,9 @@ class RequestsRoute extends React.Component {
this.exportData();
}}
>
<FormattedMessage id="ui-requests.exportSearchResultsToCsv" />
<Icon icon="download">
<FormattedMessage id="ui-requests.exportSearchResultsToCsv" />
</Icon>
</Button>
}
{
Expand All @@ -1581,10 +1586,12 @@ class RequestsRoute extends React.Component {
this.exportExpiredHoldsToCSV();
}}
>
<FormattedMessage
id="ui-requests.exportExpiredHoldShelfToCsv"
values={{ currentServicePoint: servicePointName }}
/>
<Icon icon="download">
<FormattedMessage
id="ui-requests.exportExpiredHoldShelfToCsv"
values={{ currentServicePoint: servicePointName }}
/>
</Icon>
</Button>
<PrintButton
buttonStyle="dropdownItem"
Expand All @@ -1601,10 +1608,12 @@ class RequestsRoute extends React.Component {
}}
onAfterPrint={this.onAfterPrintForPrintButton}
>
<FormattedMessage
id="ui-requests.printPickSlips"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printPickSlips"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
<PrintButton
buttonStyle="dropdownItem"
Expand Down Expand Up @@ -1633,10 +1642,12 @@ class RequestsRoute extends React.Component {
}
onAfterPrint={this.onAfterPrintForPrintButton}
>
<FormattedMessage
id="ui-requests.printPickSlipsSelected"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printPickSlipsSelected"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
</>
}
Expand All @@ -1656,10 +1667,12 @@ class RequestsRoute extends React.Component {
contentRef={this.searchSlipsPrintContentRef}
onBeforeGetContent={() => this.onBeforeGetContentForPrintButton(onToggle)}
>
<FormattedMessage
id="ui-requests.printSearchSlips"
values={{ sp: servicePointName }}
/>
<Icon icon="print">
<FormattedMessage
id="ui-requests.printSearchSlips"
values={{ sp: servicePointName }}
/>
</Icon>
</PrintButton>
}
</>
Expand Down

0 comments on commit 51a8dbd

Please sign in to comment.