Skip to content

Commit

Permalink
chore: Removed asset:prop:type. Fixed typescript error.
Browse files Browse the repository at this point in the history
  • Loading branch information
f-zimmer committed Apr 17, 2024
1 parent 9d3da8e commit 6ed34b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion frontend/src/models/types/edc/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ export type CatalogPermission = {
'odrl:action': {
'odrl:type': string;
}
'odrl:constraint': {
'odrl:constraint': {
'odrl:leftOperand': string;
'odrl:operator': {
'@id': string;
};
'odrl:rightOperand': string;
} | {
'@type': string,
'odrl:and': {
'@type': string,
'odrl:leftOperand': string;
'odrl:operator': {
'@id': string;
};
'odrl:rightOperand': string;
}[]
};
};

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/CatalogView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const CatalogView = () => {
<div className="flex">
<h4 className="font-semibold w-[20ch]">Asset condition(s): </h4>
<div className="flex flex-col gap-1 w-[30ch]">
{item.permission['odrl:constraint']['odrl:and'] ?
{'odrl:and' in item.permission['odrl:constraint'] ?
(item.permission['odrl:constraint']['odrl:and'].map(constraint => (
<div className="flex">
{constraint['odrl:leftOperand'] + ' '}
Expand Down

0 comments on commit 6ed34b2

Please sign in to comment.