2017-05-10 11:29:33 +00:00
|
|
|
export default class Store {
|
|
|
|
constructor({
|
2017-05-10 16:28:36 +00:00
|
|
|
titleHtml,
|
2017-05-10 11:29:33 +00:00
|
|
|
descriptionHtml,
|
|
|
|
descriptionText,
|
|
|
|
}) {
|
|
|
|
this.state = {
|
2017-05-10 16:28:36 +00:00
|
|
|
titleHtml,
|
2017-05-10 11:29:33 +00:00
|
|
|
titleText: '',
|
|
|
|
descriptionHtml,
|
|
|
|
descriptionText,
|
|
|
|
taskStatus: '',
|
|
|
|
updatedAt: '',
|
|
|
|
};
|
2017-05-12 10:23:30 +00:00
|
|
|
this.formState = {};
|
2017-05-10 11:29:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
updateState(data) {
|
|
|
|
this.state.titleHtml = data.title;
|
|
|
|
this.state.titleText = data.title_text;
|
|
|
|
this.state.descriptionHtml = data.description;
|
|
|
|
this.state.descriptionText = data.description_text;
|
|
|
|
this.state.taskStatus = data.task_status;
|
|
|
|
this.state.updatedAt = data.updated_at;
|
|
|
|
}
|
|
|
|
}
|