Skip to content

Commit b42c650

Browse files
committed
working with data on creating class
1 parent 2cc1d9b commit b42c650

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

app/views/calendar/components/template.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import React from 'react';
44
import ClassCard from '../card';
5+
import { client } from '../../../api';
56
import './template.css';
67

78
class Template extends React.Component {
@@ -17,6 +18,16 @@ class Template extends React.Component {
1718
});
1819
}
1920
onPanEnd(event, data) {
21+
// TODO(Yorkie): this will move to calendar.updateClasses
22+
client.class.create({
23+
date: data.date,
24+
from: data.from,
25+
to: data.to,
26+
// TODO(Yorkie): will remove
27+
spots: {},
28+
templateId: data.template.id,
29+
trainerId: data.trainer.id,
30+
});
2031
this.setState({
2132
showCopyCard: false
2233
});

0 commit comments

Comments
 (0)