필터 최소값 수정

This commit is contained in:
2025-12-17 18:27:34 +09:00
parent a3f0d8bc62
commit 4d0f8f3b6b
4 changed files with 44 additions and 23 deletions

View File

@@ -553,8 +553,8 @@ export default function CowOverviewPage() {
>
<BarChart3 className="hidden sm:block h-6 w-6 shrink-0" />
<span className="font-bold text-sm sm:text-xl"></span>
<span className={`text-xs sm:text-sm px-1.5 sm:px-2.5 py-0.5 sm:py-1 rounded font-semibold shrink-0 ${hasGenomeData ? 'bg-green-500 text-white' : 'bg-slate-300 text-slate-600'}`}>
{hasGenomeData ? '완료' : '미검사'}
<span className={`text-xs sm:text-sm px-1.5 sm:px-2.5 py-0.5 sm:py-1 rounded font-semibold shrink-0 ${hasGenomeData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? 'bg-green-500 text-white' : 'bg-slate-300 text-slate-600'}`}>
{hasGenomeData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? '완료' : '미검사'}
</span>
</TabsTrigger>
<TabsTrigger
@@ -563,6 +563,9 @@ export default function CowOverviewPage() {
>
<Dna className="hidden sm:block h-6 w-6 shrink-0" />
<span className="font-bold text-sm sm:text-xl"></span>
<span className={`text-xs sm:text-sm px-1.5 sm:px-2.5 py-0.5 sm:py-1 rounded font-semibold shrink-0 ${hasGeneData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? 'bg-green-500 text-white' : 'bg-slate-300 text-slate-600'}`}>
{hasGeneData && isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? '완료' : '미검사'}
</span>
</TabsTrigger>
<TabsTrigger
value="reproduction"
@@ -891,26 +894,26 @@ export default function CowOverviewPage() {
<Card className="bg-white border border-border rounded-xl overflow-hidden">
<CardContent className="p-0">
<div className="grid grid-cols-3 divide-x divide-border">
<div className="p-4">
<div className="text-xs font-medium text-muted-foreground mb-1"></div>
<div className="text-sm font-semibold text-foreground truncate">
<div className="grid grid-cols-1 sm:grid-cols-3 divide-y sm:divide-y-0 sm:divide-x divide-border">
<div className="p-3 sm:p-4 flex justify-between sm:block">
<div className="text-xs font-medium text-muted-foreground sm:mb-1"></div>
<div className="text-sm font-semibold text-foreground">
{genomeData[0]?.request?.requestDt
? new Date(genomeData[0].request.requestDt).toLocaleDateString('ko-KR')
: '-'}
</div>
</div>
<div className="p-4">
<div className="text-xs font-medium text-muted-foreground mb-1"> </div>
<div className="text-sm font-semibold text-foreground truncate">
<div className="p-3 sm:p-4 flex justify-between sm:block">
<div className="text-xs font-medium text-muted-foreground sm:mb-1"> </div>
<div className="text-sm font-semibold text-foreground">
{genomeData[0]?.request?.chipReportDt
? new Date(genomeData[0].request.chipReportDt).toLocaleDateString('ko-KR')
: '-'}
</div>
</div>
<div className="p-4">
<div className="text-xs font-medium text-muted-foreground mb-1"> </div>
<div className="text-sm font-semibold text-foreground truncate">
<div className="p-3 sm:p-4 flex justify-between sm:block">
<div className="text-xs font-medium text-muted-foreground sm:mb-1"> </div>
<div className="text-sm font-semibold text-foreground">
{genomeData[0]?.request?.chipType || '-'}
</div>
</div>
@@ -1185,6 +1188,7 @@ export default function CowOverviewPage() {
</Card>
{/* 분석불가 메시지 */}
<h3 className="text-lg lg:text-xl font-bold text-foreground"> </h3>
<Card className="bg-slate-100 border border-slate-300 rounded-2xl">
<CardContent className="p-8 text-center">
<BarChart3 className="h-12 w-12 text-slate-400 mx-auto mb-4" />
@@ -1457,6 +1461,9 @@ export default function CowOverviewPage() {
{/* 유전자 검색 및 필터 섹션 */}
<h3 className="text-lg lg:text-xl font-bold text-foreground"> </h3>
{/* 친자확인 결과에 따른 분기 */}
{isValidGenomeAnalysis(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) ? (
<>
<div className="flex flex-col gap-3 sm:gap-3 p-3.5 max-sm:p-3 sm:px-4 sm:py-3 rounded-xl bg-slate-50/50 border border-slate-200/50">
{/* 검색창 */}
<div className="relative w-full">
@@ -1828,6 +1835,20 @@ export default function CowOverviewPage() {
</>
)
})()}
</>
) : (
<Card className="bg-slate-100 border border-slate-300 rounded-2xl">
<CardContent className="p-8 text-center">
<Dna className="h-12 w-12 text-slate-400 mx-auto mb-4" />
<h3 className="text-lg font-semibold text-slate-700 mb-2">
{getInvalidReason(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId) || '유전자 분석 불가'}
</h3>
<p className="text-sm text-slate-500">
{getInvalidMessage(genomeRequest?.chipSireName, genomeRequest?.chipDamName, cow?.cowId).replace('유전체', '유전자')}
</p>
</CardContent>
</Card>
)}
</>
) : (
<Card className="bg-slate-50 border border-border rounded-2xl">

View File

@@ -765,7 +765,7 @@ function MyCowContent() {
value={sortOrder}
onValueChange={(value) => setSortOrder(value as 'asc' | 'desc')}
>
<SelectTrigger className="w-full sm:w-[100px] h-10 sm:h-9 text-sm border-slate-200 bg-white">
<SelectTrigger className="w-full sm:w-[120px] h-10 sm:h-9 text-sm border-slate-200 bg-white">
<SelectValue />
</SelectTrigger>
<SelectContent>