Table updates for new appointments fields. Schedule modal baseline functionality. Refactor schedule components to be more reusable.
This commit is contained in:
@@ -2,22 +2,16 @@ import React from "react";
|
||||
|
||||
export default function ScheduleDateCellWrapper(dateCellWrapperProps) {
|
||||
// Show 'click me' text in arbitrary places by using the range prop
|
||||
const hasAlert = dateCellWrapperProps.range
|
||||
? dateCellWrapperProps.range.some(date => {
|
||||
return date.getDate() % 12 === 0;
|
||||
})
|
||||
: false;
|
||||
|
||||
const style = {
|
||||
display: "flex",
|
||||
flex: 1,
|
||||
borderLeft: "1px solid #DDD",
|
||||
backgroundColor: hasAlert ? "#f5f5dc" : "#fff"
|
||||
backgroundColor: "#fff"
|
||||
};
|
||||
return (
|
||||
<div style={style}>
|
||||
DateCellWrapper
|
||||
{hasAlert && <button onClick={e => alert(e)}>Click me</button>}
|
||||
PLACEHOLDER:DATA
|
||||
{dateCellWrapperProps.children}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user