mam dosyć

This commit is contained in:
wrzesinski-hubert 2020-06-06 13:17:56 +02:00
parent 0054385c42
commit 08e963f105
2 changed files with 91 additions and 34 deletions

View File

@ -1,17 +1,33 @@
.schedule{ .schedule {
display: flex; display: flex;
} }
.calendar{ .calendar {
display: flex; display: flex;
width: 85%; width: 85%;
} }
.shop-cart{ .shop-cart {
padding-top: 10px; padding-top: 10px;
padding-left: 15px;
padding-right: 15px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
font-family: Lato;
flex-grow: 1;
}
.paper {
display: flex; display: flex;
text-align: center; margin-top: 10px;
font-family: Lato; height: 60px;
flex-grow: 1; width: 90%;
background-color: #D4A8FF !important;
align-items: center;
justify-content: center;
} }
.text {
border-bottom: 1px solid;
}
.chujec{
background-color: red;
}

View File

@ -10,9 +10,12 @@ import moment from "moment";
import "moment/locale/pl"; import "moment/locale/pl";
import { appointments } from "./appointments"; import { appointments } from "./appointments";
import "./index.scss"; import "./index.scss";
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles'; import { makeStyles, Theme, createStyles } from "@material-ui/core/styles";
import Paper from "@material-ui/core/Paper";
interface CalendarProps {} interface CalendarProps {
}
interface CalendarState { interface CalendarState {
data: Array<AppointmentModel>; data: Array<AppointmentModel>;
@ -30,29 +33,48 @@ const formatDayScaleDate = (
const useStyles = makeStyles((theme: Theme) => const useStyles = makeStyles((theme: Theme) =>
createStyles({ createStyles({
dayScaleCell:{ dayScaleCell: {
backgroundColor:"red" paddingTop: 10,
} paddingBottom: 10,
}), },
timeTableLayout: {
border: "1px solid rgba(224, 224, 224, 1);",
},
timeTableCell: {
//borderRadius:2,
},
})
); );
//don't know how to set proper type of function arguments //don't know how to set proper type of function arguments
const DayScaleCell = ({ formatDate, ...restProps }: any) => { const DayScaleCell = ({ formatDate, ...restProps }: any) => {
const classes = useStyles(); const classes = useStyles();
return ( return (
<WeekView.DayScaleCell <WeekView.DayScaleCell
{...restProps} {...restProps}
formatDate={formatDayScaleDate} formatDate={formatDayScaleDate}
today={false} today={false}
className={classes.dayScaleCell} className={classes.dayScaleCell}
/> />
); );
} };
const TimeTableCell = ({ ...restProps }: any) => {
const classes = useStyles();
return (
<WeekView.TimeTableCell {...restProps} className={classes.timeTableCell} />
);
};
const TimeTableLayout = ({ ...restProps }: any) => {
const classes = useStyles();
return (
<WeekView.TimeTableLayout
{...restProps}
className={classes.timeTableLayout}
/>
);
};
export default class Calendar extends React.PureComponent< export default class Calendar extends React.PureComponent<
CalendarProps, CalendarProps,
@ -60,13 +82,17 @@ export default class Calendar extends React.PureComponent<
> { > {
constructor(props: CalendarProps) { constructor(props: CalendarProps) {
super(props); super(props);
this.state = { this.state = {
data: appointments, data: appointments,
currentDate: new Date("2020-06-01"), currentDate: new Date("2020-06-01"),
}; };
} }
expand(e: React.MouseEvent) {
//this.classList.add("chujec");
console.log("chujec");
}
render() { render() {
const { data, currentDate } = this.state; const { data, currentDate } = this.state;
@ -75,7 +101,7 @@ export default class Calendar extends React.PureComponent<
<div className="calendar"> <div className="calendar">
<Scheduler <Scheduler
data={data} data={data}
height={700} height={850}
locale={"PL-PL"} locale={"PL-PL"}
firstDayOfWeek={1} firstDayOfWeek={1}
> >
@ -84,14 +110,29 @@ export default class Calendar extends React.PureComponent<
startDayHour={8} startDayHour={8}
endDayHour={20} endDayHour={20}
excludedDays={[0, 6]} excludedDays={[0, 6]}
cellDuration={60} cellDuration={45}
dayScaleCellComponent={DayScaleCell} dayScaleCellComponent={DayScaleCell}
timeTableLayoutComponent={TimeTableLayout}
timeTableCellComponent={TimeTableCell}
/> />
<Appointments /> <Appointments />
</Scheduler> </Scheduler>
</div> </div>
<div className="shop-cart"> <div className="shop-cart">
Hubert Wrzesiński Semestr zimowy 2020/2021 <div className="text">
Hubert Wrzesiński<br></br>
Semestr zimowy 2020/2021
</div>
<Paper className="paper" onClick={this.expand}>Chuj</Paper>
<Paper className="paper">Cipa</Paper>
<Paper className="paper">Pizda</Paper>
<Paper className="paper">Szmata</Paper>
<Paper className="paper">Jebać</Paper>
<Paper className="paper">Chuj</Paper>
<Paper className="paper">Cipa</Paper>
<Paper className="paper">Pizda</Paper>
<Paper className="paper">Szmata</Paper>
<Paper className="paper">Jebać</Paper>
</div> </div>
</div> </div>
); );