Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Add icon button to copy email from owner (#244)
Browse files Browse the repository at this point in the history
* Add icon button to copy email from owner

Signed-off-by: Tomás Castillo <[email protected]>

* Change value to copy when there's no email

Signed-off-by: Tomás Castillo <[email protected]>

---------

Signed-off-by: Tomás Castillo <[email protected]>
  • Loading branch information
tomrndom authored Jul 10, 2023
1 parent 47d7866 commit 98a29b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/inputs/owner-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ export default class OwnerInput extends React.Component {
return (
<div className="row">
<div className="col-md-4">
<label> {T.translate("edit_purchase_order.owner_email")}</label>
<label>
{T.translate("edit_purchase_order.owner_email")} &nbsp;
<i className='copy-button fa fa-clipboard'
onClick={() => { navigator.clipboard.writeText(owner.hasOwnProperty("email") ? owner.email : '')}}
title="Copy to clipboard" />
</label>
<AsyncCreatableSelect
value={theValue}
onChange={this.handleMemberChange}
Expand Down

0 comments on commit 98a29b4

Please sign in to comment.