use the correct interface for process callers since backend returns references and print errors to the console in boundary fallback
This commit is contained in:
parent
6463a7461f
commit
3a94db8a2e
|
@ -12,9 +12,12 @@ export function ErrorBoundaryFallback({ error }: ErrorProps) {
|
|||
// This is displayed if the ErrorBoundary catches an error when rendering the form.
|
||||
const { resetBoundary } = useErrorBoundary();
|
||||
|
||||
// print the error to the console so we can debug issues
|
||||
console.error(error);
|
||||
|
||||
return (
|
||||
<Notification
|
||||
title="Something Went Wrong. "
|
||||
title="Something Went Wrong."
|
||||
onClose={() => resetBoundary()}
|
||||
type="error"
|
||||
>
|
||||
|
|
|
@ -64,7 +64,7 @@ import {
|
|||
modifyProcessIdentifierForPathParam,
|
||||
} from '../helpers';
|
||||
import { useUriListForPermissions } from '../hooks/UriListForPermissions';
|
||||
import { PermissionsToCheck, ProcessModelCaller, Task } from '../interfaces';
|
||||
import { PermissionsToCheck, ProcessReference, Task } from '../interfaces';
|
||||
import { usePermissionFetcher } from '../hooks/PermissionService';
|
||||
|
||||
type OwnProps = {
|
||||
|
@ -89,7 +89,7 @@ type OwnProps = {
|
|||
onSearchProcessModels?: (..._args: any[]) => any;
|
||||
onElementsChanged?: (..._args: any[]) => any;
|
||||
url?: string;
|
||||
callers?: ProcessModelCaller[];
|
||||
callers?: ProcessReference[];
|
||||
activeUserElement?: React.ReactElement;
|
||||
};
|
||||
|
||||
|
@ -628,17 +628,17 @@ export default function ReactDiagramEditor({
|
|||
passiveModal
|
||||
>
|
||||
<UnorderedList>
|
||||
{callers.map((ref: ProcessModelCaller) => (
|
||||
{callers.map((ref: ProcessReference) => (
|
||||
<li>
|
||||
<Link
|
||||
size="lg"
|
||||
href={`/process-models/${modifyProcessIdentifierForPathParam(
|
||||
ref.process_model_id
|
||||
ref.relative_location
|
||||
)}`}
|
||||
>
|
||||
{`${ref.display_name}`}
|
||||
</Link>{' '}
|
||||
({ref.process_model_id})
|
||||
({ref.relative_location})
|
||||
</li>
|
||||
))}
|
||||
</UnorderedList>
|
||||
|
|
|
@ -43,7 +43,6 @@ import {
|
|||
CarbonComboBoxProcessSelection,
|
||||
ProcessFile,
|
||||
ProcessModel,
|
||||
ProcessModelCaller,
|
||||
ProcessReference,
|
||||
} from '../interfaces';
|
||||
import ProcessSearch from '../components/ProcessSearch';
|
||||
|
@ -136,7 +135,7 @@ export default function ProcessModelEditDiagram() {
|
|||
|
||||
const processModelPath = `process-models/${modifiedProcessModelId}`;
|
||||
|
||||
const [callers, setCallers] = useState<ProcessModelCaller[]>([]);
|
||||
const [callers, setCallers] = useState<ProcessReference[]>([]);
|
||||
|
||||
usePrompt('Changes you made may not be saved.', diagramHasChanges);
|
||||
|
||||
|
|
Loading…
Reference in New Issue