Skip to content

Commit

Permalink
can not change components if managed client or adapter 🐰
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-fintlabs committed Dec 13, 2024
1 parent e77c1ba commit 12659b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/routes/adapter.$name/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export default function Index() {
selectedItems={getComponentIds(adapter.components)}
toggle={handleToggle}
hideLink={true}
isManaged={adapter.managed}
/>
</HGrid>
</Box>
Expand Down
1 change: 1 addition & 0 deletions app/routes/klienter.$id/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export default function ClientDetails() {
selectedItems={getComponentIds(client.components)}
toggle={handleToggle}
hideLink={true}
isManaged={client.managed}
/>
</>
)}
Expand Down
5 changes: 4 additions & 1 deletion app/routes/komponenter._index/ComponentsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface ComponentsSectionProps {
hideLink?: boolean;
adapterName?: string;
clientName?: string;
isManaged: boolean;
}

type ComponentType = {
Expand All @@ -27,6 +28,7 @@ const ComponentsTable = ({
hideLink = false,
adapterName,
clientName,
isManaged,
}: ComponentsSectionProps) => {
const navigate = useNavigate();

Expand Down Expand Up @@ -110,7 +112,8 @@ const ComponentsTable = ({
key={groupName + i}
onChange={(e) => {
handleToggle(e);
}}>
}}
disabled={isManaged}>
{splitted.length > 1
? splitted[1]
: splitted[0]}
Expand Down

0 comments on commit 12659b5

Please sign in to comment.