fix:开发完毕
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useCallback, useMemo, useState } from "react";
|
||||
import { GitFork } from "lucide-react";
|
||||
import { BrapiEntityPage, type BrapiFormField } from "@/components/brapi/BrapiEntityPage";
|
||||
@@ -123,12 +124,43 @@ export function CrossEntityTab() {
|
||||
icon={GitFork}
|
||||
iconBg="bg-gradient-to-br from-emerald-500 to-green-600"
|
||||
title="计划杂交"
|
||||
description="cross_entity(planned=true):录入杂交计划,亲本请在「杂交亲本」Tab 维护"
|
||||
description="cross_entity(planned=true):录入杂交计划;亲本与详情页 Parents Tab 维护"
|
||||
addLabel="新增计划杂交"
|
||||
useEnhancedDialog
|
||||
columns={[
|
||||
{ key: "plannedCrossDbId", label: "Cross ID" },
|
||||
{ key: "name", label: "名称" },
|
||||
{
|
||||
key: "plannedCrossDbId",
|
||||
label: "Cross ID",
|
||||
render: (value, row) => {
|
||||
const id = String(row.id ?? row.plannedCrossDbId ?? value ?? "");
|
||||
if (!id) return "—";
|
||||
return (
|
||||
<Link
|
||||
href={`/germplasm/cross-pedigree/planned-crosses/${encodeURIComponent(id)}`}
|
||||
className="font-medium text-emerald-600 hover:underline dark:text-emerald-400"
|
||||
>
|
||||
{id}
|
||||
</Link>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "name",
|
||||
label: "名称",
|
||||
render: (value, row) => {
|
||||
const id = String(row.id ?? row.plannedCrossDbId ?? "");
|
||||
const name = String(value ?? "—");
|
||||
if (!id) return name;
|
||||
return (
|
||||
<Link
|
||||
href={`/germplasm/cross-pedigree/planned-crosses/${encodeURIComponent(id)}`}
|
||||
className="font-medium text-emerald-600 hover:underline dark:text-emerald-400"
|
||||
>
|
||||
{name}
|
||||
</Link>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ key: "crossing_project_name", label: "杂交项目" },
|
||||
{ key: "cross_type", label: "类型", render: crossTypeLabel },
|
||||
{ key: "status", label: "状态", render: plannedStatusLabel },
|
||||
@@ -156,12 +188,43 @@ export function CrossEntityTab() {
|
||||
icon={GitFork}
|
||||
iconBg="bg-gradient-to-br from-green-600 to-emerald-700"
|
||||
title="实际杂交"
|
||||
description="cross_entity(planned=false):完成实际杂交后可关联来源计划杂交;亲本请在「杂交亲本」Tab 维护"
|
||||
description="cross_entity(planned=false):完成实际杂交后可关联来源计划杂交并继承亲本;详情页维护 Parents 与授粉事件"
|
||||
addLabel="新增实际杂交"
|
||||
useEnhancedDialog
|
||||
columns={[
|
||||
{ key: "crossDbId", label: "Cross ID" },
|
||||
{ key: "name", label: "名称" },
|
||||
{
|
||||
key: "crossDbId",
|
||||
label: "Cross ID",
|
||||
render: (value, row) => {
|
||||
const id = String(row.id ?? row.crossDbId ?? value ?? "");
|
||||
if (!id) return "—";
|
||||
return (
|
||||
<Link
|
||||
href={`/germplasm/cross-pedigree/crosses/${encodeURIComponent(id)}`}
|
||||
className="font-medium text-green-600 hover:underline dark:text-green-400"
|
||||
>
|
||||
{id}
|
||||
</Link>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "name",
|
||||
label: "名称",
|
||||
render: (value, row) => {
|
||||
const id = String(row.id ?? row.crossDbId ?? "");
|
||||
const name = String(value ?? "—");
|
||||
if (!id) return name;
|
||||
return (
|
||||
<Link
|
||||
href={`/germplasm/cross-pedigree/crosses/${encodeURIComponent(id)}`}
|
||||
className="font-medium text-green-600 hover:underline dark:text-green-400"
|
||||
>
|
||||
{name}
|
||||
</Link>
|
||||
);
|
||||
},
|
||||
},
|
||||
{ key: "crossing_project_name", label: "杂交项目" },
|
||||
{ key: "plannedCrossName", label: "来源计划杂交" },
|
||||
{ key: "cross_type", label: "类型", render: crossTypeLabel },
|
||||
|
||||
Reference in New Issue
Block a user