We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cc1d9b commit b42c650Copy full SHA for b42c650
1 file changed
app/views/calendar/components/template.jsx
@@ -2,6 +2,7 @@
2
3
import React from 'react';
4
import ClassCard from '../card';
5
+import { client } from '../../../api';
6
import './template.css';
7
8
class Template extends React.Component {
@@ -17,6 +18,16 @@ class Template extends React.Component {
17
18
});
19
}
20
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
+ });
31
this.setState({
32
showCopyCard: false
33
0 commit comments