fix: display owner_name in project detail
This commit is contained in:
@@ -25,7 +25,7 @@ export default function ProjectDetailPage() {
|
||||
api.get<Project>(`/projects/${id}`).then(({ data }) => {
|
||||
setProject(data)
|
||||
setEditForm({
|
||||
owner: data.owner || '',
|
||||
owner: data.owner_name || data.owner || '',
|
||||
repo: data.repo || '',
|
||||
description: data.description || '',
|
||||
sub_projects: data.sub_projects || [],
|
||||
@@ -114,7 +114,7 @@ export default function ProjectDetailPage() {
|
||||
<>
|
||||
<h2>📁 {project.name} {project.project_code && <span className="badge">{project.project_code}</span>}</h2>
|
||||
<p style={{ color: 'var(--text-dim)', marginTop: 4 }}>{project.description || 'No description'}</p>
|
||||
<div className="text-dim">Owner: {project.owner}</div>
|
||||
<div className="text-dim">Owner: {project.owner_name || project.owner || "Unknown"}</div>
|
||||
<button className="btn-transition" style={{ marginTop: 8 }} onClick={() => setEditing(true)}>Edit</button>
|
||||
<button className="btn-danger" style={{ marginLeft: 8 }} onClick={deleteProject}>Delete</button>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user