feat: 신규 페이지 구현 및 HR/설정 기능 개선
신규 페이지: - 회계관리: 거래처, 예상비용, 청구서, 발주서 - 게시판: 공지사항, 자료실, 커뮤니티 - 고객센터: 문의/FAQ - 설정: 계정, 알림, 출퇴근, 팝업, 구독, 결제내역 - 리포트 (차트 시각화) - 개발자 테스트 URL 페이지 기능 개선: - HR 직원관리/휴가관리/카드관리 강화 - IntegratedListTemplateV2 확장 - AuthenticatedLayout 패딩 표준화 - 로그인 페이지 UI 개선 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -208,15 +208,16 @@ export async function getPricingById(id: string): Promise<PricingData | null> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 품목 정보 조회 (품목기준관리 API)
|
||||
* 품목 정보 조회 (통합 품목 API)
|
||||
*
|
||||
* GET /api/v1/items/{id}
|
||||
*/
|
||||
export async function getItemInfo(itemId: string): Promise<ItemInfo | null> {
|
||||
try {
|
||||
const headers = await getApiHeaders();
|
||||
|
||||
// materials API로 자재 정보 조회
|
||||
const response = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/api/v1/materials/${itemId}`,
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/api/v1/items/${itemId}`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers,
|
||||
@@ -225,35 +226,8 @@ export async function getItemInfo(itemId: string): Promise<ItemInfo | null> {
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
// materials에서 못 찾으면 products에서 조회
|
||||
const productResponse = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/api/v1/products/${itemId}`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers,
|
||||
cache: 'no-store',
|
||||
}
|
||||
);
|
||||
|
||||
if (!productResponse.ok) {
|
||||
console.error('[PricingActions] Item not found:', itemId);
|
||||
return null;
|
||||
}
|
||||
|
||||
const productResult = await productResponse.json();
|
||||
if (!productResult.success || !productResult.data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const product = productResult.data;
|
||||
return {
|
||||
id: String(product.id),
|
||||
itemCode: product.product_code,
|
||||
itemName: product.product_name,
|
||||
itemType: product.product_type || 'FG',
|
||||
specification: product.specification || undefined,
|
||||
unit: product.unit || 'EA',
|
||||
};
|
||||
console.error('[PricingActions] Item not found:', itemId);
|
||||
return null;
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
@@ -261,14 +235,14 @@ export async function getItemInfo(itemId: string): Promise<ItemInfo | null> {
|
||||
return null;
|
||||
}
|
||||
|
||||
const material = result.data;
|
||||
const item = result.data;
|
||||
return {
|
||||
id: String(material.id),
|
||||
itemCode: material.item_code,
|
||||
itemName: material.item_name,
|
||||
itemType: material.product_type || 'RM',
|
||||
specification: material.specification || undefined,
|
||||
unit: material.unit || 'EA',
|
||||
id: String(item.id),
|
||||
itemCode: item.code,
|
||||
itemName: item.name,
|
||||
itemType: item.item_type || 'PT',
|
||||
specification: item.specification || undefined,
|
||||
unit: item.unit || 'EA',
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('[PricingActions] getItemInfo error:', error);
|
||||
|
||||
Reference in New Issue
Block a user