|
@@ -50,6 +50,7 @@ export const sentSave = (
|
|
|
editor: json.data.editor,
|
|
editor: json.data.editor,
|
|
|
studio: json.data.studio,
|
|
studio: json.data.studio,
|
|
|
channel: json.data.channel,
|
|
channel: json.data.channel,
|
|
|
|
|
+ forkAt: json.data.fork_at,
|
|
|
updateAt: json.data.updated_at,
|
|
updateAt: json.data.updated_at,
|
|
|
};
|
|
};
|
|
|
ok(newData);
|
|
ok(newData);
|
|
@@ -154,7 +155,6 @@ const SentCellEditableWidget = ({
|
|
|
setSaving(true);
|
|
setSaving(true);
|
|
|
let url = `/v2/sentence/${data.book}_${data.para}_${data.wordStart}_${data.wordEnd}_${data.channel.id}`;
|
|
let url = `/v2/sentence/${data.book}_${data.para}_${data.wordStart}_${data.wordEnd}_${data.channel.id}`;
|
|
|
url += "?mode=edit&html=true";
|
|
url += "?mode=edit&html=true";
|
|
|
- console.log("save url", url);
|
|
|
|
|
const body = {
|
|
const body = {
|
|
|
book: data.book,
|
|
book: data.book,
|
|
|
para: data.para,
|
|
para: data.para,
|
|
@@ -164,6 +164,7 @@ const SentCellEditableWidget = ({
|
|
|
content: value,
|
|
content: value,
|
|
|
channels: data.translationChannels?.join(),
|
|
channels: data.translationChannels?.join(),
|
|
|
};
|
|
};
|
|
|
|
|
+ console.debug("save url", url, body);
|
|
|
put<ISentenceRequest, ISentenceResponse>(url, body)
|
|
put<ISentenceRequest, ISentenceResponse>(url, body)
|
|
|
.then((json) => {
|
|
.then((json) => {
|
|
|
if (json.ok) {
|
|
if (json.ok) {
|
|
@@ -178,7 +179,9 @@ const SentCellEditableWidget = ({
|
|
|
wordStart: json.data.word_start,
|
|
wordStart: json.data.word_start,
|
|
|
wordEnd: json.data.word_end,
|
|
wordEnd: json.data.word_end,
|
|
|
editor: json.data.editor,
|
|
editor: json.data.editor,
|
|
|
|
|
+ studio: json.data.studio,
|
|
|
channel: json.data.channel,
|
|
channel: json.data.channel,
|
|
|
|
|
+ forkAt: json.data.fork_at,
|
|
|
updateAt: json.data.updated_at,
|
|
updateAt: json.data.updated_at,
|
|
|
};
|
|
};
|
|
|
onSave(newData);
|
|
onSave(newData);
|