feature/IO-3499-React-19: Cursor style adjustments for Employee Assignments
This commit is contained in:
@@ -15,7 +15,20 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
const mapDispatchToProps = () => ({});
|
const mapDispatchToProps = () => ({});
|
||||||
|
|
||||||
const iconStyle = { marginLeft: ".3rem" };
|
const iconStyle = {
|
||||||
|
marginLeft: ".3rem"
|
||||||
|
};
|
||||||
|
|
||||||
|
const iconClickableStyle = {
|
||||||
|
marginLeft: ".3rem",
|
||||||
|
cursor: "pointer"
|
||||||
|
};
|
||||||
|
|
||||||
|
const iconDisabledStyle = {
|
||||||
|
marginLeft: ".3rem",
|
||||||
|
cursor: "not-allowed",
|
||||||
|
opacity: 0.5
|
||||||
|
};
|
||||||
|
|
||||||
export function JobEmployeeAssignments({
|
export function JobEmployeeAssignments({
|
||||||
bodyshop,
|
bodyshop,
|
||||||
@@ -58,7 +71,7 @@ export function JobEmployeeAssignments({
|
|||||||
|
|
||||||
const renderAssigner = (operation) => {
|
const renderAssigner = (operation) => {
|
||||||
if (jobRO) {
|
if (jobRO) {
|
||||||
return <PlusCircleFilled disabled style={iconStyle} />;
|
return <PlusCircleFilled style={iconDisabledStyle} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const popContent = (
|
const popContent = (
|
||||||
@@ -117,6 +130,7 @@ export function JobEmployeeAssignments({
|
|||||||
<span
|
<span
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
|
style={{ display: "inline-flex", alignItems: "center", cursor: "pointer" }}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
// Prevent the click from being re-interpreted as "outside"
|
// Prevent the click from being re-interpreted as "outside"
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -129,9 +143,8 @@ export function JobEmployeeAssignments({
|
|||||||
openFor(operation);
|
openFor(operation);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
style={{ display: "inline-flex", alignItems: "center" }}
|
|
||||||
>
|
>
|
||||||
<PlusCircleFilled style={iconStyle} />
|
<PlusCircleFilled style={iconClickableStyle} />
|
||||||
</span>
|
</span>
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user