From 4bf37c143c0e1424758864eb38f9484d28c48a18 Mon Sep 17 00:00:00 2001
From: 1ilit
Date: Tue, 19 Sep 2023 15:47:52 +0300
Subject: [PATCH] comments for fields
---
src/components/canvas.jsx | 1 +
src/components/editor_panel.jsx | 2 ++
src/components/table.jsx | 24 ++++++++++++++++++++++--
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/components/canvas.jsx b/src/components/canvas.jsx
index 98c96ac..d1626a0 100644
--- a/src/components/canvas.jsx
+++ b/src/components/canvas.jsx
@@ -173,6 +173,7 @@ export default function Canvas(props) {
unique: true,
notNull: true,
increment: true,
+ comment: "",
},
],
comment: "",
diff --git a/src/components/editor_panel.jsx b/src/components/editor_panel.jsx
index ee292dd..3dff824 100644
--- a/src/components/editor_panel.jsx
+++ b/src/components/editor_panel.jsx
@@ -92,6 +92,7 @@ export default function EditorPanel(props) {
unique: true,
notNull: true,
increment: true,
+ comment: "",
},
],
comment: "",
@@ -149,6 +150,7 @@ export default function EditorPanel(props) {
unique: true,
notNull: true,
increment: true,
+ comment: "",
},
],
comment: "",
diff --git a/src/components/table.jsx b/src/components/table.jsx
index d493de8..01017cb 100644
--- a/src/components/table.jsx
+++ b/src/components/table.jsx
@@ -1,5 +1,5 @@
import { React, useState } from "react";
-import {sqlDataTypes} from "../data/data";
+import { sqlDataTypes } from "../data/data";
import {
IconEdit,
IconDelete,
@@ -33,6 +33,7 @@ export default function Table(props) {
unique: false,
notNull: false,
increment: false,
+ comment: "",
});
const handleEditField = () => {
@@ -50,6 +51,7 @@ export default function Table(props) {
unique: false,
notNull: false,
increment: false,
+ comment: "",
});
setEditFieldVisible(-1);
};
@@ -71,6 +73,7 @@ export default function Table(props) {
unique: false,
notNull: false,
increment: false,
+ comment: "",
});
setVisible(false);
};
@@ -200,6 +203,10 @@ export default function Table(props) {
Default :{" "}
{e.default === "" ? "Not set" : e.default}
+
+ Comment :{" "}
+ {e.default === "" ? "Not comment" : e.comment}
+
}
position="right"
@@ -282,7 +289,9 @@ export default function Table(props) {
);
})}
- { props.tableData.comment===""? "No comment": props.tableData.comment}
+ {props.tableData.comment === ""
+ ? "No comment"
+ : props.tableData.comment}
@@ -325,6 +334,7 @@ export default function Table(props) {
};
})}
>
+