Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit 82f0c4e

Browse files
committed
Add schedule and course name to registration
1 parent 3f3e691 commit 82f0c4e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/views/pages/Course/ApplyModal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const useStyles = makeStyles(theme => ({
3939
}
4040
}));
4141

42-
export default function ApplyModal({ batch, fullWidth = false, ...rest }) {
42+
export default function ApplyModal({ course, batch, fullWidth = false, ...rest }) {
4343
const classes = useStyles();
4444
const [open, setOpen] = useState(false);
4545
const [formData, updateFormData] = useState({});
@@ -72,6 +72,8 @@ export default function ApplyModal({ batch, fullWidth = false, ...rest }) {
7272
const handleSubmit = e => {
7373
formData.phone = `${formData.countryCode}-${formData.phone}`;
7474
formData.source = window.location.href;
75+
formData.schedule = batch.schedule;
76+
formData.courseName = course.title;
7577
setSubmitting(1);
7678
e.preventDefault();
7779
axios({

src/views/pages/Course/FinalAction.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export default function FinalAction({ course, batch }) {
229229
</Card>
230230
<Box style={{ width: '100%' }}>
231231
<ApplyModal
232+
course={course}
232233
batch={batch}
233234
fullWidth={true}
234235
style={{

src/views/pages/Course/Schedule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function BatchDropBox({ course, batch, batchIndex, expanded, setExpanded }) {
278278
borderRadius: '5px'
279279
}}
280280
>
281-
<ApplyModal batch={batch}/>
281+
<ApplyModal course={course} batch={batch}/>
282282
</Box>
283283
</Box>
284284
</Collapse>

0 commit comments

Comments
 (0)