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-1114: Revise "Enter" button on New request page #1257

Merged
merged 2 commits into from
Dec 30, 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 @@ -10,6 +10,7 @@
* 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.
* Revise "Enter" button on New request page. Refs UIREQ-1114.

## [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
12 changes: 12 additions & 0 deletions src/components/InstanceInformation/InstanceInformation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.fieldWrapper {
display: flex;
align-items: start;
}

.instanceHridField {
margin-right: 20px;
}

.enterButton {
margin-top: 25px;
}
13 changes: 7 additions & 6 deletions src/components/InstanceInformation/InstanceInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
memoizeValidation,
} from '../../utils';

import css from '../../requests.css';
import css from './InstanceInformation.css';

export const INSTANCE_SEGMENT_FOR_PLUGIN = 'instances';

Expand Down Expand Up @@ -174,7 +174,10 @@ class InstanceInformation extends Component {
!isEditForm &&
<>
<Row>
<Col xs={9}>
<Col
xs={12}
className={css.fieldWrapper}
>
<FormattedMessage id="ui-requests.instance.scanOrEnterBarcode">
{placeholder => {
const key = values.keyOfInstanceIdField ?? 0;
Expand Down Expand Up @@ -202,19 +205,17 @@ class InstanceInformation extends Component {
onChange={this.handleChange}
onBlur={this.handleBlur(input)}
onKeyDown={this.onKeyDown}
className={css.instanceHridField}
/>
);
}}
</Field>
);
}}
</FormattedMessage>
</Col>
<Col xs={3}>
<Button
buttonStyle="primary noRadius"
buttonStyle="default"
buttonClass={css.enterButton}
fullWidth
onClick={this.handleClick}
disabled={submitting}
>
Expand Down
12 changes: 12 additions & 0 deletions src/components/ItemInformation/ItemInformation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.fieldWrapper {
display: flex;
align-items: start;
}

.itemBarcodeField {
margin-right: 20px;
}

.enterButton {
margin-top: 25px;
}
13 changes: 7 additions & 6 deletions src/components/ItemInformation/ItemInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
memoizeValidation,
} from '../../utils';

import css from '../../requests.css';
import css from './ItemInformation.css';

class ItemInformation extends Component {
static propTypes = {
Expand Down Expand Up @@ -176,7 +176,10 @@ class ItemInformation extends Component {
{
!isEditForm &&
<Row>
<Col xs={9}>
<Col
xs={12}
className={css.fieldWrapper}
>
<FormattedMessage id="ui-requests.item.scanOrEnterBarcode">
{placeholder => {
const key = values.keyOfItemBarcodeField ?? 0;
Expand Down Expand Up @@ -204,20 +207,18 @@ class ItemInformation extends Component {
onChange={this.handleChange}
onBlur={this.handleBlur(input)}
onKeyDown={this.onKeyDown}
className={css.itemBarcodeField}
/>
);
}}
</Field>
);
}}
</FormattedMessage>
</Col>
<Col xs={3}>
<Button
id="clickable-select-item"
buttonStyle="primary noRadius"
buttonStyle="default"
buttonClass={css.enterButton}
fullWidth
onClick={this.handleClick}
disabled={submitting}
>
Expand Down
12 changes: 12 additions & 0 deletions src/components/RequesterInformation/RequesterInformation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.fieldWrapper {
display: flex;
align-items: start;
}

.requesterBarcodeField {
margin-right: 20px;
}

.enterButton {
margin-top: 25px;
}
39 changes: 20 additions & 19 deletions src/components/RequesterInformation/RequesterInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
BASE_SPINNER_PROPS,
} from '../../constants';

import css from '../../requests.css';
import css from './RequesterInformation.css';

export const VISIBLE_COLUMNS = ['active', 'name', 'patronGroup', 'username', 'barcode'];
export const COLUMN_MAPPING = {
Expand Down Expand Up @@ -224,7 +224,10 @@ class RequesterInformation extends Component {
<Col xs={12}>
{!isEditForm &&
<Row>
<Col xs={9}>
<Col
xs={12}
className={css.fieldWrapper}
>
<FormattedMessage id="ui-requests.requester.scanOrEnterBarcode">
{placeholder => {
const key = values.keyOfUserBarcodeField ?? 0;
Expand Down Expand Up @@ -252,40 +255,38 @@ class RequesterInformation extends Component {
onChange={this.handleChange}
onBlur={this.handleBlur(input)}
onKeyDown={this.onKeyDown}
className={css.requesterBarcodeField}
/>
);
}}
</Field>
);
}}
</FormattedMessage>
<Pluggable
{...this.props}
aria-haspopup="true"
type="find-user"
searchLabel={<FormattedMessage id="ui-requests.requester.findUserPluginLabel" />}
searchButtonStyle="link"
dataKey="users"
selectUser={this.onSelectUser}
visibleColumns={VISIBLE_COLUMNS}
columnMapping={COLUMN_MAPPING}
disableRecordCreation
marginTop0
/>
</Col>
<Col xs={3}>
<Button
id="clickable-select-requester"
buttonStyle="primary noRadius"
buttonStyle="default"
buttonClass={css.enterButton}
fullWidth
onClick={this.handleClick}
disabled={submitting}
>
<FormattedMessage id="ui-requests.enter" />
</Button>
</Col>
</Row>}
<Pluggable
{...this.props}
aria-haspopup="true"
type="find-user"
searchLabel={<FormattedMessage id="ui-requests.requester.findUserPluginLabel" />}
searchButtonStyle="link"
dataKey="users"
selectUser={this.onSelectUser}
visibleColumns={VISIBLE_COLUMNS}
columnMapping={COLUMN_MAPPING}
disableRecordCreation
marginTop0
/>
{(selectedUser?.id || isEditForm) &&
<UserForm
user={request ? request.requester : selectedUser}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.fieldWrapper {
display: flex;
align-items: start;
}

.instanceHridField {
margin-right: 20px;
}

.enterButton {
margin-top: 25px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ class InstanceInformation extends Component {
!isEditForm &&
<>
<Row>
<Col xs={9}>
<Col
xs={12}
className={css.fieldWrapper}
>
<FormattedMessage id="ui-requests.instance.scanOrEnterBarcode">
{placeholder => {
const key = values.keyOfInstanceIdField ?? 0;
Expand Down Expand Up @@ -204,19 +207,17 @@ class InstanceInformation extends Component {
onChange={this.handleChange}
onBlur={this.handleBlur(input)}
onKeyDown={this.onKeyDown}
className={css.instanceHridField}
/>
);
}}
</Field>
);
}}
</FormattedMessage>
</Col>
<Col xs={3}>
<Button
buttonStyle="primary noRadius"
buttonStyle="default"
buttonClass={css.enterButton}
fullWidth
onClick={this.handleClick}
disabled={submitting}
>
Expand Down
9 changes: 9 additions & 0 deletions src/deprecated/components/ItemInformation/ItemInformation.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.fieldWrapper {
display: flex;
align-items: start;
}

.itemBarcodeField {
margin-right: 20px;
}

.enterButton {
margin-top: 25px;
}
11 changes: 6 additions & 5 deletions src/deprecated/components/ItemInformation/ItemInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ class ItemInformation extends Component {
{
!isEditForm &&
<Row>
<Col xs={9}>
<Col
xs={12}
className={css.fieldWrapper}
>
<FormattedMessage id="ui-requests.item.scanOrEnterBarcode">
{placeholder => {
const key = values.keyOfItemBarcodeField ?? 0;
Expand Down Expand Up @@ -206,20 +209,18 @@ class ItemInformation extends Component {
onChange={this.handleChange}
onBlur={this.handleBlur(input)}
onKeyDown={this.onKeyDown}
className={css.itemBarcodeField}
/>
);
}}
</Field>
);
}}
</FormattedMessage>
</Col>
<Col xs={3}>
<Button
id="clickable-select-item"
buttonStyle="primary noRadius"
buttonStyle="default"
buttonClass={css.enterButton}
fullWidth
onClick={this.handleClick}
disabled={submitting}
>
Expand Down
4 changes: 0 additions & 4 deletions src/requests.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@
margin-bottom: 0.5em;
user-select: none;
}

.enterButton {
margin-top: 25px;
}
Loading