visuddhinanda 1 год назад
Родитель
Сommit
ff25a564da

+ 4 - 1
dashboard-v4/dashboard/src/components/api/Corpus.ts

@@ -156,6 +156,7 @@ export interface ISentenceRequest {
   prEditAt?: string;
   channels?: string;
   html?: boolean;
+  token?: string | null;
 }
 
 export interface ISentenceData {
@@ -212,7 +213,9 @@ export interface IChapterToc {
   book: number;
   paragraph: number;
   level: string;
-  text: string;
+  text: string | null;
+  chapter_len: number;
+  chapter_strlen: number;
   parent: number;
 }
 

+ 1 - 0
dashboard-v4/dashboard/src/components/template/SentEdit/PrAcceptButton.tsx

@@ -32,6 +32,7 @@ const PrAcceptButtonWidget = ({ data, onAccept }: IWidget) => {
       prId: data.id,
       prUuid: data.uid,
       prEditAt: data.updateAt,
+      token: sessionStorage.getItem(data.channel.id),
     };
     console.debug("pr accept url", url, prData);
     put<ISentenceRequest, ISentenceResponse>(url, prData)

+ 2 - 0
dashboard-v4/dashboard/src/components/template/SentEdit/SentCellEditable.tsx

@@ -33,6 +33,7 @@ export const sentSave = (
     channel: data.channel.id,
     content: data.content,
     channels: data.translationChannels?.join(),
+    token: sessionStorage.getItem(data.channel.id),
   };
   console.log("save url", url, body);
   put<ISentenceRequest, ISentenceResponse>(url, body)
@@ -150,6 +151,7 @@ const SentCellEditableWidget = ({
       channel: data.channel.id,
       content: value,
       channels: data.translationChannels?.join(),
+      token: sessionStorage.getItem(data.channel.id),
     };
     console.debug("save url", url, body);
     put<ISentenceRequest, ISentenceResponse>(url, body)

+ 1 - 0
dashboard-v4/dashboard/src/components/template/SentEdit/SentWbwEdit.tsx

@@ -30,6 +30,7 @@ export const sentSave = async (
     channel: sent.channel.id,
     content: sent.content,
     contentType: sent.contentType,
+    token: sessionStorage.getItem(sent.channel.id),
   });
   if (res.ok) {
     store.dispatch(