IO-1275 Finish appointment notes.

This commit is contained in:
Patrick Fic
2021-07-28 11:34:35 -07:00
parent 59b8bae182
commit 7c5aa9c913
3 changed files with 115 additions and 29 deletions

View File

@@ -1,4 +1,14 @@
import { Button, Col, Form, Input, Row, Select, Switch } from "antd";
import {
Button,
Col,
Form,
Input,
Row,
Select,
Space,
Switch,
Typography,
} from "antd";
import axios from "axios";
import moment from "moment";
import React, { useState } from "react";
@@ -91,31 +101,34 @@ export function ScheduleJobModalComponent({
<DateTimePicker onlyFuture />
</Form.Item>
</LayoutFormRow>
<LayoutFormRow header={t("appointments.labels.smartscheduling")}>
<Typography.Title level={4}>
{t("appointments.labels.smartscheduling")}
</Typography.Title>
{
// smartOptions.length > 0 && (
// <div>{t("appointments.labels.suggesteddates")}</div>
// )
}
<Space wrap>
<Button onClick={handleSmartScheduling} loading={loading}>
{t("appointments.actions.calculate")}
</Button>
{smartOptions.length > 0 && (
<div>{t("appointments.labels.suggesteddates")}</div>
)}
<div
className="imex-flex-row imex-flex-row__flex-space-around"
style={{ flexWrap: "wrap" }}
>
{smartOptions.map((d, idx) => (
<Button
className="imex-flex-row__margin"
key={idx}
onClick={() => {
form.setFieldsValue({ start: new moment(d).add(8, "hours") });
handleDateBlur();
}}
>
<DateFormatter>{d}</DateFormatter>
</Button>
))}
</div>
</LayoutFormRow>
{smartOptions.map((d, idx) => (
<Button
className="imex-flex-row__margin"
key={idx}
onClick={() => {
form.setFieldsValue({ start: new moment(d).add(8, "hours") });
handleDateBlur();
}}
>
<DateFormatter>{d}</DateFormatter>
</Button>
))}
</Space>
<LayoutFormRow grow>
<Form.Item
name="notifyCustomer"