1 - feat(dynamic-table): 컬럼 너비 조절 및 고정 기능 추가
3 - 사용자가 직접 컬럼의 너비를 조절할 수 있도록 리사이즈 핸들러를 추가 4 - '생성일'과 '수정일' 컬럼의 너비를 120px로 고정하여 가독성을 높임 5 - 리사이즈 핸들러가 올바르게 표시되도록 관련 CSS 스타일을 추가했습니다.
This commit is contained in:
@@ -25,36 +25,96 @@ export interface IssueField {
|
||||
* 이슈 목록에 표시할 필드 스키마를 반환합니다.
|
||||
* 순서: Status, ID, Name, Description, Category
|
||||
*/
|
||||
export const getIssueFields = async (): Promise<IssueField[]> => {
|
||||
const fields: IssueField[] = [
|
||||
{ id: "status", name: "Status", type: "text" },
|
||||
{ id: "id", name: "ID", type: "text" },
|
||||
{ id: "name", name: "Name", type: "text" },
|
||||
{ id: "description", name: "Description", type: "textarea" },
|
||||
{ id: "category", name: "Category", type: "text" },
|
||||
export async function getIssues(projectId: string): Promise<Issue[]> {
|
||||
console.log(`Fetching issues for project: ${projectId}`);
|
||||
// ... 실제 API 호출 로직 ...
|
||||
return [
|
||||
{
|
||||
id: "1",
|
||||
name: "로그인 버튼 실종",
|
||||
description: "메인 화면에서 로그인 버튼이 보이지 않는 버그 발생",
|
||||
status: "Open",
|
||||
priority: "High",
|
||||
createdAt: "2023-10-01T10:00:00Z",
|
||||
updatedAt: "2023-10-01T11:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "데이터 로딩 속도 저하",
|
||||
description: "대시보드 로딩 시 5초 이상 소요됨",
|
||||
status: "In Progress",
|
||||
priority: "Medium",
|
||||
createdAt: "2023-10-02T14:00:00Z",
|
||||
updatedAt: "2023-10-02T15:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "모바일 화면 깨짐",
|
||||
description: "iPhone 14 Pro에서 프로필 페이지 레이아웃이 깨져 보임",
|
||||
status: "Open",
|
||||
priority: "High",
|
||||
createdAt: "2023-10-03T09:00:00Z",
|
||||
updatedAt: "2023-10-03T09:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
name: "API 요청 실패",
|
||||
description: "특정 조건에서 사용자 정보 업데이트 시 500 에러 발생",
|
||||
status: "Closed",
|
||||
priority: "Critical",
|
||||
createdAt: "2023-09-28T11:00:00Z",
|
||||
updatedAt: "2023-10-01T18:00:00Z",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
name: "오타 수정",
|
||||
description: "이용약관 페이지의 '개인정보'가 '개인정ㅂ'로 표시됨",
|
||||
status: "Closed",
|
||||
priority: "Low",
|
||||
createdAt: "2023-10-04T16:00:00Z",
|
||||
updatedAt: "2023-10-04T16:30:00Z",
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
name: "다크 모드 지원",
|
||||
description: "사용자 편의를 위해 다크 모드 기능 추가 필요",
|
||||
status: "Open",
|
||||
priority: "Medium",
|
||||
createdAt: "2023-10-05T11:20:00Z",
|
||||
updatedAt: "2023-10-05T11:20:00Z",
|
||||
},
|
||||
];
|
||||
return Promise.resolve(fields);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 특정 프로젝트의 모든 이슈를 검색합니다.
|
||||
*/
|
||||
export const getIssues = async (projectId: string): Promise<Issue[]> => {
|
||||
const url = `/api/projects/${projectId}/issues/search`;
|
||||
const response = await fetch(url, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
await handleApiError("이슈 목록을 불러오는 데 실패했습니다.", response);
|
||||
export async function getIssueById(
|
||||
projectId: string,
|
||||
issueId: string,
|
||||
): Promise<Issue> {
|
||||
console.log(
|
||||
`Fetching issue ${issueId} for project: ${projectId}`,
|
||||
);
|
||||
// 실제 API 호출에서는 projectId와 issueId를 사용해야 합니다.
|
||||
// 여기서는 모든 이슈를 가져온 후 ID로 필터링하여 모의합니다.
|
||||
const issues = await getIssues(projectId);
|
||||
const issue = issues.find((i) => i.id === issueId);
|
||||
if (!issue) {
|
||||
throw new Error("Issue not found");
|
||||
}
|
||||
return issue;
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
// API 응답을 그대로 사용합니다.
|
||||
return result.items || [];
|
||||
};
|
||||
export async function getIssueFields(): Promise<IssueField[]> {
|
||||
// ... 기존 코드 ...
|
||||
return [
|
||||
{ id: "id", name: "ID", type: "text" },
|
||||
{ id: "name", name: "이름", type: "text" },
|
||||
{ id: "description", name: "설명", type: "text" },
|
||||
{ id: "status", name: "상태", type: "text" },
|
||||
{ id: "priority", name: "우선순위", type: "text" },
|
||||
{ id: "createdAt", name: "생성일", type: "date" },
|
||||
{ id: "updatedAt", name: "수정일", type: "date" },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 특정 프로젝트의 단일 이슈 상세 정보를 가져옵니다.
|
||||
|
||||
Reference in New Issue
Block a user