BOD-84 Load calculates for this week. Bug exists going past current week.
This commit is contained in:
@@ -31,7 +31,7 @@ export function ScheduleCalendarContainer({ calculateScheduleLoad }) {
|
||||
);
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
let normalizedData = data.appointments.map((e) => {
|
||||
//Required becuase Hasura returns a string instead of a date object.
|
||||
return Object.assign(
|
||||
@@ -42,29 +42,13 @@ export function ScheduleCalendarContainer({ calculateScheduleLoad }) {
|
||||
);
|
||||
});
|
||||
|
||||
console.log("ScheduleCalendarContainer -> normalizedData", normalizedData);
|
||||
normalizedData.push({
|
||||
id: 1,
|
||||
title: "All day event",
|
||||
allDay: true,
|
||||
isintake: false,
|
||||
start: new Date(),
|
||||
end: new Date(),
|
||||
});
|
||||
calculateScheduleLoad(range.end);
|
||||
|
||||
return (
|
||||
<span>
|
||||
<button
|
||||
onClick={() => {
|
||||
calculateScheduleLoad(range.end);
|
||||
}}
|
||||
>
|
||||
Calc Load
|
||||
</button>
|
||||
<ScheduleCalendarComponent
|
||||
refetch={refetch}
|
||||
data={data ? normalizedData : null}
|
||||
/>
|
||||
</span>
|
||||
<ScheduleCalendarComponent
|
||||
refetch={refetch}
|
||||
data={data ? normalizedData : null}
|
||||
/>
|
||||
);
|
||||
}
|
||||
export default connect(
|
||||
|
||||
Reference in New Issue
Block a user