Added schedule load to daily veiw with additional CSS fixes. BOD-319

This commit is contained in:
Patrick Fic
2020-08-27 14:30:07 -07:00
parent 3150fdaade
commit 661241091a
8 changed files with 291 additions and 319 deletions

View File

@@ -1,16 +1,16 @@
import { Button, Checkbox, Col, Row } from "antd";
import axios from "axios";
import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { auth } from "../../firebase/firebase.utils";
import { DateFormatter } from "../../utils/DateFormatter";
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
import EmailInput from "../form-items-formatted/email-form-item.component";
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
import ScheduleExistingAppointmentsList from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
import moment from "moment";
export default function ScheduleJobModalComponent({
jobId,
existingAppointments,
appData,
setAppData,
@@ -20,15 +20,9 @@ export default function ScheduleJobModalComponent({
const handleAuto = async () => {
setLoading(true);
try {
const response = await axios.post(
"/scheduling/job",
{ jobId: "661dd1d5-bf06-426f-8bd2-bd9e41de8eb1" },
{
headers: {
Authorization: `Bearer ${await auth.currentUser.getIdToken(true)}`,
},
}
);
const response = await axios.post("/scheduling/job", {
jobId: "661dd1d5-bf06-426f-8bd2-bd9e41de8eb1",
});
setAppData({ ...appData, smartDates: response.data });
} catch (error) {
console.log("error", error, error.message);

View File

@@ -27,6 +27,7 @@ const mapDispatchToProps = (dispatch) => ({
toggleModalVisible: () => dispatch(toggleModalVisible("schedule")),
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
});
export function ScheduleJobModalContainer({
scheduleModal,
bodyshop,
@@ -163,6 +164,7 @@ export function ScheduleJobModalContainer({
}}
>
<ScheduleJobModalComponent
jobId={jobId}
existingAppointments={existingAppointments}
appData={appData}
setAppData={setAppData}