libraries are kept in dialog data

but data is manipulated outside of the dialog
This commit is contained in:
alicia pritchett 2021-09-27 10:55:46 -04:00
parent bd49c777c7
commit 90c8f84ea4
2 changed files with 12 additions and 3 deletions

View File

@ -89,6 +89,16 @@ export class WorkflowSpecDialogComponent {
required: true, required: true,
}, },
}, },
{
key: 'standalone',
defaultValue: this.data.standalone ? this.data.standalone : false,
hideExpression: true,
},
{
key: 'library',
defaultValue: this.data.library ? this.data.library : false,
hideExpression: true,
},
]; ];
}); });
} }

View File

@ -112,7 +112,7 @@ export class WorkflowSpecListComponent implements OnInit {
} }
canSaveWorkflowSpec(proposed: WorkflowSpecDialogData){ canSaveWorkflowSpec(proposed: WorkflowSpecDialogData){
console.log(proposed); // Can possibly remove or bypass this method alltogether
if ((this.selectedSpec.parents.length > 0) && (!proposed.library)){ if ((this.selectedSpec.parents.length > 0) && (!proposed.library)){
this.snackBar.open('This Workflow Specification is still being used as a Library. Please remove references first!', 'Ok', { duration: 5000 }); this.snackBar.open('This Workflow Specification is still being used as a Library. Please remove references first!', 'Ok', { duration: 5000 });
return false; return false;
@ -135,7 +135,7 @@ export class WorkflowSpecListComponent implements OnInit {
category_id: selectedSpec ? selectedSpec.category_id : null, category_id: selectedSpec ? selectedSpec.category_id : null,
display_order: hasDisplayOrder ? selectedSpec.display_order : 0, display_order: hasDisplayOrder ? selectedSpec.display_order : 0,
standalone: selectedSpec ? selectedSpec.standalone : null, standalone: selectedSpec ? selectedSpec.standalone : null,
library: selectedSpec ? selectedSpec.library : null, library: selectedSpec ? selectedSpec.library : (state === 'library' ? true : null),
}; };
// Open new filename/workflow spec dialog // Open new filename/workflow spec dialog
@ -302,7 +302,6 @@ export class WorkflowSpecListComponent implements OnInit {
display_name: data.display_name, display_name: data.display_name,
description: data.description, description: data.description,
category_id: data.category_id, category_id: data.category_id,
// display_order: data.display_order,
standalone: data.standalone, standalone: data.standalone,
library: data.library, library: data.library,
}; };