diff --git a/src/components/planning/PlanningsPage.tsx b/src/components/planning/PlanningsPage.tsx index 0a77bf5..9bb5d47 100644 --- a/src/components/planning/PlanningsPage.tsx +++ b/src/components/planning/PlanningsPage.tsx @@ -1,4 +1,4 @@ -import { Button, Calendar, Card, Col, List, notification, Popover, Row, Spin, Tag, Tooltip } from "antd"; +import { Button, Calendar, Card, Col, List, notification, Popconfirm, Popover, Row, Spin, Tag, Tooltip } from "antd"; import classNames from "classnames"; import moment from "moment"; import React from "react"; @@ -186,12 +186,15 @@ class PlanningsPage extends React.Component this.handlePlanStudent(student); + const onConfirmStudentClickFn = () => this.handleConfirmStudent(student); return ( Inplannen]}> {student.fullName}   {!student.isConfirmed && - Niet bevestigd + + Niet bevestigd + } ); @@ -213,7 +216,7 @@ class PlanningsPage extends React.Component - {department.name} + {department.name} ({department.totalCapacity} totale capaciteit) @@ -319,6 +322,26 @@ class PlanningsPage extends React.Component { + this.loadNotPlannedStudents(); + notification.success({ + message: "Student succesvol bevestigd", + }); + }) + .catch(() => { + notification.error({ + message: "Kon student niet bevestigen, probeer later opnieuw", + }); + }) + .finally(() => { + this.setState({ areStudentsLoading: false }); + }); + } + private handleNextMonth(): void { this.doMonthChange("next"); }