From 4d0f8f3b6b6f9a0940665b9c796c874fcd148078 Mon Sep 17 00:00:00 2001 From: chu eun ju Date: Wed, 17 Dec 2025 18:27:34 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=84=ED=84=B0=20=EC=B5=9C=EC=86=8C?= =?UTF-8?q?=EA=B0=92=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/cow/[cowNo]/page.tsx | 45 ++++++++++++++----- frontend/src/app/cow/page.tsx | 2 +- .../common/global-filter-dialog.tsx | 10 ++--- frontend/src/types/filter.types.ts | 10 ++--- 4 files changed, 44 insertions(+), 23 deletions(-) diff --git a/frontend/src/app/cow/[cowNo]/page.tsx b/frontend/src/app/cow/[cowNo]/page.tsx index 1b28f61..6ce7552 100644 --- a/frontend/src/app/cow/[cowNo]/page.tsx +++ b/frontend/src/app/cow/[cowNo]/page.tsx @@ -553,8 +553,8 @@ export default function CowOverviewPage() { > 유전체 - - {hasGenomeData ? '완료' : '미검사'} + + {hasGenomeData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? '완료' : '미검사'} 유전자 + + {hasGeneData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? '완료' : '미검사'} + -
-
-
접수일
-
+
+
+
접수일
+
{genomeData[0]?.request?.requestDt ? new Date(genomeData[0].request.requestDt).toLocaleDateString('ko-KR') : '-'}
-
-
분석 완료일
-
+
+
분석 완료일
+
{genomeData[0]?.request?.chipReportDt ? new Date(genomeData[0].request.chipReportDt).toLocaleDateString('ko-KR') : '-'}
-
-
칩 종류
-
+
+
칩 종류
+
{genomeData[0]?.request?.chipType || '-'}
@@ -1185,6 +1188,7 @@ export default function CowOverviewPage() { {/* 분석불가 메시지 */} +

유전체 분석 결과

@@ -1457,6 +1461,9 @@ export default function CowOverviewPage() { {/* 유전자 검색 및 필터 섹션 */}

유전자 분석 결과

+ {/* 친자확인 결과에 따른 분기 */} + {isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? ( + <>
{/* 검색창 */}
@@ -1828,6 +1835,20 @@ export default function CowOverviewPage() { ) })()} + + ) : ( + + + +

+ {getInvalidReason(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) || '유전자 분석 불가'} +

+

+ {getInvalidMessage(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId).replace('유전체', '유전자')} +

+
+
+ )} ) : ( diff --git a/frontend/src/app/cow/page.tsx b/frontend/src/app/cow/page.tsx index 0ac1210..ae3afbe 100644 --- a/frontend/src/app/cow/page.tsx +++ b/frontend/src/app/cow/page.tsx @@ -765,7 +765,7 @@ function MyCowContent() { value={sortOrder} onValueChange={(value) => setSortOrder(value as 'asc' | 'desc')} > - + diff --git a/frontend/src/components/common/global-filter-dialog.tsx b/frontend/src/components/common/global-filter-dialog.tsx index d44ea08..d5a7c81 100644 --- a/frontend/src/components/common/global-filter-dialog.tsx +++ b/frontend/src/components/common/global-filter-dialog.tsx @@ -141,7 +141,7 @@ function SortableTraitItem({ size="sm" className="h-6 w-6 p-0" onClick={() => onWeightChange(-1)} - disabled={weight <= 0} + disabled={weight <= 1} > - @@ -396,11 +396,11 @@ export function GlobalFilterDialog({ externalOpen, onExternalOpenChange, geneCou }) } - // 가중치 변경 + // 가중치 변경 (1~10 범위) const updateTraitWeight = (traitName: string, delta: number) => { setLocalFilters(prev => { - const current = prev.traitWeights[traitName as TraitName] || 0 - const newValue = Math.min(10, Math.max(0, current + delta)) + const current = prev.traitWeights[traitName as TraitName] || 1 + const newValue = Math.min(10, Math.max(1, current + delta)) return { ...prev, traitWeights: { ...prev.traitWeights, [traitName]: newValue } @@ -991,7 +991,7 @@ export function GlobalFilterDialog({ externalOpen, onExternalOpenChange, geneCou e.stopPropagation() updateTraitWeight(trait, -1) }} - disabled={(localFilters.traitWeights[trait as TraitName] || 0) <= 0} + disabled={(localFilters.traitWeights[trait as TraitName] || 1) <= 1} > - diff --git a/frontend/src/types/filter.types.ts b/frontend/src/types/filter.types.ts index a57f10e..5672903 100644 --- a/frontend/src/types/filter.types.ts +++ b/frontend/src/types/filter.types.ts @@ -131,16 +131,16 @@ export const DEFAULT_FILTER_SETTINGS: GlobalFilterSettings = { selectedTraits: ["도체중", "등심단면적", "등지방두께", "근내지방도", "체장", "체고", "흉위"], pinnedTraits: [], traitWeights: { - // 성장형질 (점수: 0 ~ 10) + // 성장형질 (점수: 1 ~ 10, 미선택 시 0) "12개월령체중": 0, - // 경제형질 (점수: 0 ~ 10) + // 경제형질 (점수: 1 ~ 10, 미선택 시 0) 도체중: 1, 등심단면적: 1, 등지방두께: 1, 근내지방도: 1, - // 체형형질 (점수: 0 ~ 10) - DB 형질명과 일치 + // 체형형질 (점수: 1 ~ 10, 미선택 시 0) - DB 형질명과 일치 체고: 1, 십자: 0, 체장: 1, @@ -152,7 +152,7 @@ export const DEFAULT_FILTER_SETTINGS: GlobalFilterSettings = { 곤폭: 0, 흉위: 1, - // 부위별무게 (점수: 0 ~ 10) - DB 형질명과 일치 + // 부위별무게 (점수: 1 ~ 10, 미선택 시 0) - DB 형질명과 일치 안심weight: 0, 등심weight: 0, 채끝weight: 0, @@ -164,7 +164,7 @@ export const DEFAULT_FILTER_SETTINGS: GlobalFilterSettings = { 양지weight: 0, 갈비weight: 0, - // 부위별비율 (점수: 0 ~ 10) - DB 형질명과 일치 + // 부위별비율 (점수: 1 ~ 10, 미선택 시 0) - DB 형질명과 일치 안심rate: 0, 등심rate: 0, 채끝rate: 0,