Skip to content

Commit

Permalink
Add icons to requests action menu (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-blazhko authored Dec 24, 2024
1 parent fe3825c commit 460b29a
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 @@ -9,6 +9,7 @@
* React v19: refactor away from default props for functional components. Refs UIREQ-1101.
* Add "Retrieval service point" filter. Refs UIREQ-1190.
* Include `Retrieval service point` column in csv exports. Refs UIREQ-1191.
* 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 @@ -1548,7 +1549,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 @@ -1565,7 +1568,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 @@ -1584,10 +1589,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 @@ -1604,10 +1611,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 @@ -1636,10 +1645,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 @@ -1659,10 +1670,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 460b29a

Please sign in to comment.