Task body with "Open in ourtlook" link
This commit is contained in:
parent
0fbe0d1edc
commit
c4638b908e
|
@ -55,6 +55,8 @@ react-outlook-add-todo-task|Luis Mañez (MVP, [ClearPeople](http://www.clearpeop
|
||||||
Version|Date|Comments
|
Version|Date|Comments
|
||||||
-------|----|--------
|
-------|----|--------
|
||||||
1.0.0|Jun 3, 2020|Initial release
|
1.0.0|Jun 3, 2020|Initial release
|
||||||
|
1.1.0|Sep 3, 2020|To Do item body coming from email body
|
||||||
|
1.2.0|Oct 16, 2020|To Do item body included a "open in outlook" link
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,8 @@ export default class CreateTask extends React.Component<
|
||||||
status: "notStarted",
|
status: "notStarted",
|
||||||
title: taskTitle,
|
title: taskTitle,
|
||||||
body: {
|
body: {
|
||||||
content: this.props.context.item.body,
|
content: this._composeBody(this.props.context.item.body),
|
||||||
contentType: "text",
|
contentType: "html",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,4 +180,10 @@ export default class CreateTask extends React.Component<
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _composeBody(emailBody: string): string {
|
||||||
|
const id: string = encodeURIComponent(this.props.context.item.id);
|
||||||
|
const link: string = `<a href='https://outlook.office365.com/owa/?ItemID=${id}&exvsurl=1&viewmodel=ReadMessageItem'>Open in Outlook</a>`;
|
||||||
|
return `${emailBody}<p style='font-size: large; padding-top: 10px;'>${link}</p>`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue