IO-1530 Email individual note.

This commit is contained in:
Patrick Fic
2021-11-15 11:06:10 -08:00
parent ab38f85d38
commit efc2844d99
11 changed files with 121 additions and 9 deletions

View File

@@ -13,7 +13,9 @@ import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { setModalContext } from "../../redux/modals/modals.actions";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import { TemplateList } from "../../utils/TemplateConstants";
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
const mapStateToProps = createStructuredSelector({
jobRO: selectJobReadOnly,
@@ -33,8 +35,12 @@ export function JobNotesComponent({
jobId,
setNoteUpsertContext,
deleteLoading,
ro_number,
}) {
const { t } = useTranslation();
const Templates = TemplateList("job_special", {
ro_number,
});
const columns = [
{
@@ -107,6 +113,18 @@ export function JobNotesComponent({
>
<EditFilled />
</Button>
<PrintWrapperComponent
emailOnly
templateObject={{
name: Templates.individual_job_note.key,
variables: { id: record.id },
}}
messageObject={{
subject: Templates.individual_job_note.subject,
}}
id={record.id}
/>
</Space>
),
},