페이지 수정사항 반영
This commit is contained in:
@@ -23,6 +23,7 @@ import { cowApi } from "@/lib/api"
|
||||
import { useAuthStore } from "@/store/auth-store"
|
||||
import { useGlobalFilter, GlobalFilterProvider } from "@/contexts/GlobalFilterContext"
|
||||
import { AnalysisYearProvider } from "@/contexts/AnalysisYearContext"
|
||||
import { AuthGuard } from "@/components/auth/auth-guard"
|
||||
|
||||
/**
|
||||
* 개체 리스트 페이지
|
||||
@@ -975,10 +976,10 @@ function MyCowContent() {
|
||||
{cow.cowSex === "암" ? "암소" : "수소"}
|
||||
</td>
|
||||
<td className="cow-table-cell">
|
||||
{cow.damCowId || '-'}
|
||||
{cow.damCowId && cow.damCowId !== '0' ? cow.damCowId : '-'}
|
||||
</td>
|
||||
<td className="cow-table-cell">
|
||||
{cow.sireKpn || '-'}
|
||||
{cow.sireKpn && cow.sireKpn !== '0' ? cow.sireKpn : '-'}
|
||||
</td>
|
||||
<td className="cow-table-cell">
|
||||
{cow.anlysDt ? new Date(cow.anlysDt).toLocaleDateString('ko-KR', {
|
||||
@@ -1176,7 +1177,7 @@ function MyCowContent() {
|
||||
<div className="flex justify-between">
|
||||
<span className="text-muted-foreground">모</span>
|
||||
<span className="font-medium">
|
||||
{cow.damCowId ? (() => {
|
||||
{cow.damCowId && cow.damCowId !== '0' ? (() => {
|
||||
const digits = cow.damCowId.replace(/\D/g, '')
|
||||
if (digits.length === 12) {
|
||||
return `${digits.slice(0, 3)} ${digits.slice(3, 7)} ${digits.slice(7, 11)} ${digits.slice(11)}`
|
||||
@@ -1187,7 +1188,7 @@ function MyCowContent() {
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-muted-foreground">부</span>
|
||||
<span className="font-medium">{cow.sireKpn || '-'}</span>
|
||||
<span className="font-medium">{cow.sireKpn && cow.sireKpn !== '0' ? cow.sireKpn : '-'}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-muted-foreground">분석일</span>
|
||||
@@ -1379,10 +1380,12 @@ function MyCowContent() {
|
||||
|
||||
export default function MyCowPage() {
|
||||
return (
|
||||
<GlobalFilterProvider>
|
||||
<AnalysisYearProvider>
|
||||
<MyCowContent />
|
||||
</AnalysisYearProvider>
|
||||
</GlobalFilterProvider>
|
||||
<AuthGuard>
|
||||
<GlobalFilterProvider>
|
||||
<AnalysisYearProvider>
|
||||
<MyCowContent />
|
||||
</AnalysisYearProvider>
|
||||
</GlobalFilterProvider>
|
||||
</AuthGuard>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user