visuddhinanda 2 лет назад
Родитель
Сommit
ca6ba258e9
1 измененных файлов с 11 добавлено и 6 удалено
  1. 11 6
      dashboard/src/components/corpus/SentHistory.tsx

+ 11 - 6
dashboard/src/components/corpus/SentHistory.tsx

@@ -1,15 +1,17 @@
 import { ProList } from "@ant-design/pro-components";
 import { ProList } from "@ant-design/pro-components";
-import { Typography } from "antd";
+import { Space } from "antd";
 
 
 import { get } from "../../request";
 import { get } from "../../request";
+import User from "../auth/User";
 import { IUser } from "../auth/UserName";
 import { IUser } from "../auth/UserName";
 import TimeShow from "../general/TimeShow";
 import TimeShow from "../general/TimeShow";
 
 
-const { Text } = Typography;
-
 interface ISentHistoryData {
 interface ISentHistoryData {
+  id: string;
+  sent_uid: string;
   content: string;
   content: string;
   editor: IUser;
   editor: IUser;
+  landmark: string;
   created_at: string;
   created_at: string;
 }
 }
 
 
@@ -31,8 +33,6 @@ const SentHistoryWidget = ({ sentId }: IWidget) => {
   return (
   return (
     <ProList<ISentHistory>
     <ProList<ISentHistory>
       rowKey="id"
       rowKey="id"
-      headerTitle={"time line"}
-      showActions="hover"
       request={async (params = {}, sorter, filter) => {
       request={async (params = {}, sorter, filter) => {
         if (typeof sentId === "undefined") {
         if (typeof sentId === "undefined") {
           return {
           return {
@@ -91,7 +91,12 @@ const SentHistoryWidget = ({ sentId }: IWidget) => {
         },
         },
         description: {
         description: {
           render: (text, row, index, action) => {
           render: (text, row, index, action) => {
-            return <TimeShow type="secondary" createdAt={row.createdAt} />;
+            return (
+              <Space style={{ fontSize: "80%" }}>
+                <User {...row.editor} />
+                <TimeShow type="secondary" createdAt={row.createdAt} />
+              </Space>
+            );
           },
           },
         },
         },
         actions: {
         actions: {