Finished: tag
This commit is contained in:
@@ -7,6 +7,12 @@ function EditTag() {
|
||||
id: "",
|
||||
name: "",
|
||||
description: "",
|
||||
created_by_user: {
|
||||
id: "",
|
||||
username: "",
|
||||
role: "",
|
||||
avatar_id: "",
|
||||
},
|
||||
});
|
||||
|
||||
function refreshTagInfo() {
|
||||
@@ -69,6 +75,23 @@ function EditTag() {
|
||||
value={tag.id}
|
||||
onChange={(e) => setTag({ ...tag, id: e.target.value })}
|
||||
/>
|
||||
<label htmlFor="name">Created By</label>
|
||||
<input
|
||||
type="text"
|
||||
disabled
|
||||
name="created_by_user_username"
|
||||
id="created_by_user_username"
|
||||
value={tag.created_by_user.username}
|
||||
onChange={(e) =>
|
||||
setTag({
|
||||
...tag,
|
||||
created_by_user: {
|
||||
...tag.created_by_user,
|
||||
username: e.target.value,
|
||||
},
|
||||
})
|
||||
}
|
||||
/>
|
||||
<label htmlFor="name">Name</label>
|
||||
<input
|
||||
type="text"
|
||||
|
||||
@@ -31,6 +31,7 @@ function Tags() {
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Created By</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -39,6 +40,7 @@ function Tags() {
|
||||
<tr key={tag.id}>
|
||||
<td>{tag.name}</td>
|
||||
<td>{tag.description}</td>
|
||||
<td>{tag.created_by_user.username}</td>
|
||||
<td>
|
||||
<Link to={`/manage/tags/${tag.id}`}>Edit</Link>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user