diff --git a/src/modules/edc-demo/components/new-policy-dialog/new-policy-dialog.component.ts b/src/modules/edc-demo/components/new-policy-dialog/new-policy-dialog.component.ts index c85c72e5b..5cb13854b 100644 --- a/src/modules/edc-demo/components/new-policy-dialog/new-policy-dialog.component.ts +++ b/src/modules/edc-demo/components/new-policy-dialog/new-policy-dialog.component.ts @@ -29,20 +29,24 @@ export class NewPolicyDialogComponent implements OnInit { onSave() { if (this.permissionsJson && this.permissionsJson !== '') { - this.policy["permission"] = JSON.parse(this.permissionsJson); + this.policy.permission = JSON.parse(this.permissionsJson); } if (this.prohibitionsJson && this.prohibitionsJson !== '') { - this.policy["prohibitions"] = JSON.parse(this.prohibitionsJson); + this.policy.prohibition = JSON.parse(this.prohibitionsJson); } if (this.obligationsJson && this.obligationsJson !== '') { - this.policy["obligations"] = JSON.parse(this.obligationsJson); + this.policy.obligation = JSON.parse(this.obligationsJson); } + this.policy["@context"]="http://www.w3.org/ns/odrl.jsonld" + + this.dialogRef.close({ - policy: this.policyDefinition.policy, - id: this.policyDefinition.id + + policy : this.policyDefinition.policy, + '@id': this.policyDefinition.id }) } }