io zuordnung; signal liste mit eas; links; csv ausgabe
This commit is contained in:
1 parent
13bbd26ce5
commit
f769ff7cc0
20 files changed
+594
-115
No files matched your search
@@ -11,6 +11,7 @@ import { componentDefaults, componentTypeDefinitions } from "@/actions/rk2/api-c
|
||||
import Breadcrumbs from "@/components/ui/navigation/breadcrumbs";
|
||||
|
||||
type Props = {
|
||||
searchParams: Promise<{ componentId?: string; from?: string }>;
|
||||
params: Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
@@ -18,7 +19,8 @@ type Props = {
|
||||
|
||||
|
||||
|
||||
export default async function PageUnitsEdit({ params }: Props) {
|
||||
export default async function PageUnitsEdit({ params, searchParams }: Props) {
|
||||
const { componentId, from } = await searchParams;
|
||||
|
||||
const { id } = await params;
|
||||
const resultFindUnitById = await api_units_byId(id);
|
||||
@@ -32,13 +34,14 @@ export default async function PageUnitsEdit({ params }: Props) {
|
||||
|
||||
return (
|
||||
<div className="">
|
||||
{from === 'io-assignment' && <Link className="m-4 inline-block underline" href="/rk2/signals/assignment">Zurück zur IO-Zuordnung</Link>}
|
||||
<div>
|
||||
<Breadcrumbs items={breadcrumb}/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col m-4 w-300 ">
|
||||
|
||||
<UnitEdit anlage={currentAnlage} groups={groups} selectedUnit={resultFindUnitById.data} componentTypes={componentTypes} componentDefaults={cd}></UnitEdit>
|
||||
<UnitEdit anlage={currentAnlage} groups={groups} selectedUnit={resultFindUnitById.data} componentTypes={componentTypes} componentDefaults={cd} initialComponentId={componentId}></UnitEdit>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { formatComponentName } from "@/lib/componentName";
|
||||
import { Sites } from "@/_config/sites";
|
||||
import { api_units } from "@/actions/rk2/api-units";
|
||||
import { api_anlage_getSelected } from "@/actions/rk/api-anlage";
|
||||
@@ -56,7 +57,7 @@ export default async function PageUnits() {
|
||||
<ListItemDescription className="ps-50 pt-1 flex gap-2">
|
||||
{unit.components?.map((comp) => <div key={comp.id}>
|
||||
{comp.prefix && comp.prefix}
|
||||
{comp.name}
|
||||
{formatComponentName(comp)}
|
||||
{comp.postfix && comp.postfix}
|
||||
{comp.index && comp.index>0 ? comp.index:""}
|
||||
</div>)}
|
||||
|
||||
Reference in new issue
Block a user