Appt reminder from event IO-612
This commit is contained in:
@@ -6,10 +6,11 @@ import { Link } from "react-router-dom";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import DataLabel from "../data-label/data-label.component";
|
||||
import ScheduleAtChange from "./schedule-event.at.component";
|
||||
import ScheduleEventColor from "./schedule-event.color.component";
|
||||
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setScheduleContext: (context) =>
|
||||
dispatch(setModalContext({ context: context, modal: "schedule" })),
|
||||
@@ -77,6 +78,21 @@ export function ScheduleEventComponent({
|
||||
<Button>{t("appointments.actions.viewjob")}</Button>
|
||||
</Link>
|
||||
) : null}
|
||||
<Button
|
||||
onClick={() => {
|
||||
GenerateDocument(
|
||||
{
|
||||
name: TemplateList("job").appointment_reminder.key,
|
||||
variables: { id: event.job.id },
|
||||
},
|
||||
{ to: event.job && event.job.ownr_ea },
|
||||
"e"
|
||||
);
|
||||
}}
|
||||
disabled={event.arrived}
|
||||
>
|
||||
{t("appointments.actions.sendreminder")}
|
||||
</Button>
|
||||
<Button onClick={() => handleCancel(event.id)} disabled={event.arrived}>
|
||||
{t("appointments.actions.cancel")}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user