diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py index d61fa085..a7115745 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py @@ -18,13 +18,13 @@ def setup_database_uri(app: Flask) -> None: if app.config.get("SPIFFWORKFLOW_BACKEND_DATABASE_URI") is None: database_name = f"spiffworkflow_backend_{app.config['ENV_IDENTIFIER']}" if app.config.get("SPIFFWORKFLOW_BACKEND_DATABASE_TYPE") == "sqlite": - app.config["SQLALCHEMY_DATABASE_URI"] = ( - f"sqlite:///{app.instance_path}/db_{app.config['ENV_IDENTIFIER']}.sqlite3" - ) + app.config[ + "SQLALCHEMY_DATABASE_URI" + ] = f"sqlite:///{app.instance_path}/db_{app.config['ENV_IDENTIFIER']}.sqlite3" elif app.config.get("SPIFFWORKFLOW_BACKEND_DATABASE_TYPE") == "postgres": - app.config["SQLALCHEMY_DATABASE_URI"] = ( - f"postgresql://spiffworkflow_backend:spiffworkflow_backend@localhost:5432/{database_name}" - ) + app.config[ + "SQLALCHEMY_DATABASE_URI" + ] = f"postgresql://spiffworkflow_backend:spiffworkflow_backend@localhost:5432/{database_name}" else: # use pswd to trick flake8 with hardcoded passwords db_pswd = app.config.get("SPIFFWORKFLOW_BACKEND_DATABASE_PASSWORD") diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py index 1668565c..078925e7 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py @@ -129,9 +129,9 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel): def serialized_with_metadata(self) -> dict[str, Any]: process_instance_attributes = self.serialized process_instance_attributes["process_metadata"] = self.process_metadata - process_instance_attributes["process_model_with_diagram_identifier"] = ( - self.process_model_with_diagram_identifier - ) + process_instance_attributes[ + "process_model_with_diagram_identifier" + ] = self.process_model_with_diagram_identifier return process_instance_attributes @property diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index b64cedfd..2020c9d6 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -415,9 +415,9 @@ class ProcessInstanceProcessor: tld.process_instance_id = process_instance_model.id # we want this to be the fully qualified path to the process model including all group subcomponents - current_app.config["THREAD_LOCAL_DATA"].process_model_identifier = ( - f"{process_instance_model.process_model_identifier}" - ) + current_app.config[ + "THREAD_LOCAL_DATA" + ].process_model_identifier = f"{process_instance_model.process_model_identifier}" self.process_instance_model = process_instance_model self.process_model_service = ProcessModelService() @@ -577,9 +577,9 @@ class ProcessInstanceProcessor: bpmn_subprocess_definition.bpmn_identifier ] = bpmn_process_definition_dict spiff_bpmn_process_dict["subprocess_specs"][bpmn_subprocess_definition.bpmn_identifier]["task_specs"] = {} - bpmn_subprocess_definition_bpmn_identifiers[bpmn_subprocess_definition.id] = ( - bpmn_subprocess_definition.bpmn_identifier - ) + bpmn_subprocess_definition_bpmn_identifiers[ + bpmn_subprocess_definition.id + ] = bpmn_subprocess_definition.bpmn_identifier task_definitions = TaskDefinitionModel.query.filter( TaskDefinitionModel.bpmn_process_definition_id.in_( # type: ignore diff --git a/spiffworkflow-frontend/public/interstitial/completed.png b/spiffworkflow-frontend/public/interstitial/completed.png deleted file mode 100644 index 5dafcebc..00000000 Binary files a/spiffworkflow-frontend/public/interstitial/completed.png and /dev/null differ diff --git a/spiffworkflow-frontend/public/interstitial/errored.png b/spiffworkflow-frontend/public/interstitial/errored.png deleted file mode 100644 index a9aaba1e..00000000 Binary files a/spiffworkflow-frontend/public/interstitial/errored.png and /dev/null differ diff --git a/spiffworkflow-frontend/public/interstitial/locked.png b/spiffworkflow-frontend/public/interstitial/locked.png deleted file mode 100644 index 5c7ab758..00000000 Binary files a/spiffworkflow-frontend/public/interstitial/locked.png and /dev/null differ diff --git a/spiffworkflow-frontend/public/interstitial/redirect.png b/spiffworkflow-frontend/public/interstitial/redirect.png deleted file mode 100644 index 2d81b3f5..00000000 Binary files a/spiffworkflow-frontend/public/interstitial/redirect.png and /dev/null differ diff --git a/spiffworkflow-frontend/public/interstitial/waiting.png b/spiffworkflow-frontend/public/interstitial/waiting.png deleted file mode 100644 index 0701cdc9..00000000 Binary files a/spiffworkflow-frontend/public/interstitial/waiting.png and /dev/null differ diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index af70ff48..2b53d724 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -1601,14 +1601,17 @@ export default function ProcessInstanceListTable({ ) { hasAccessToCompleteTask = true; } - let buttonText = 'View'; if (hasAccessToCompleteTask && processInstance.task_id) { buttonText = 'Go'; } buttonElement = ( - ); diff --git a/spiffworkflow-frontend/src/index.css b/spiffworkflow-frontend/src/index.css index f0413204..cfea25f4 100644 --- a/spiffworkflow-frontend/src/index.css +++ b/spiffworkflow-frontend/src/index.css @@ -478,22 +478,28 @@ svg.notification-icon { .user_instructions_0 { filter: opacity(1); + font-size: 1.2em; + margin-bottom: 30px; } .user_instructions_1 { filter: opacity(60%); + font-size: 1.1em; } .user_instructions_2 { filter: opacity(40%); + font-size: 1em; } .user_instructions_3 { filter: opacity(20%); + font-size: 9em; } .user_instructions_4 { filter: opacity(10%); + font-size: 8em; } .float-right { diff --git a/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx b/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx index 368c3285..c906a0cd 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInterstitial.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { fetchEventSource } from '@microsoft/fetch-event-source'; // @ts-ignore -import { Loading, Grid, Column, Button } from '@carbon/react'; +import { Loading, Button } from '@carbon/react'; import { BACKEND_BASE_URL } from '../config'; import { getBasicHeaders } from '../services/HttpService'; @@ -89,26 +89,17 @@ export default function ProcessInterstitial() { return state; }; - const getStatusImage = () => { - switch (getStatus()) { - case 'RUNNING': - return ( - - ); - case 'LOCKED': - return Locked; - case 'READY': - case 'REDIRECTING': - return Redirecting ....; - case 'WAITING': - return Waiting ....; - case 'COMPLETED': - return Completed; - case 'ERROR': - return Errored; - default: - return getStatus(); + const getLoadingIcon = () => { + if (getStatus() === 'RUNNING') { + return ( + + ); } + return null; }; const getReturnHomeButton = (index: number) => { @@ -123,6 +114,7 @@ export default function ProcessInterstitial() { kind="secondary" data-qa="return-to-home-button" onClick={() => navigate(`/tasks`)} + style={{ marginBottom: 30 }} > Return to Home @@ -132,35 +124,14 @@ export default function ProcessInterstitial() { return ''; }; - const getHr = (index: number) => { - if (index === 0) { - return ( -
-
-
- ); - } - return ''; - }; - - function capitalize(str: string): string { - if (str && str.length > 0) { - return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); - } - return ''; - } - const userMessage = (myTask: ProcessInstanceTask) => { if (!processInstance || processInstance.status === 'completed') { if (!myTask.can_complete && userTasks.includes(myTask.type)) { return ( - <> -

Waiting on Someone Else

-

- This next task is assigned to a different person or team. There is - no action for you to take at this time. -

- +

+ This next task is assigned to a different person or team. There is + no action for you to take at this time. +

); } if (shouldRedirect(myTask)) { @@ -189,6 +160,7 @@ export default function ProcessInterstitial() { if (state === 'CLOSED' && lastTask === null) { navigate(`/tasks`); } + if (lastTask) { return ( <> @@ -206,21 +178,10 @@ export default function ProcessInterstitial() { ], ]} /> -
- {getStatusImage()} -
-

- {lastTask.process_model_display_name}:{' '} - {lastTask.process_instance_id} -

-
Status: {capitalize(getStatus())}
-
-
-
-
- {data.map((d, index) => ( - - + {getLoadingIcon()} +
+ {data.map((d, index) => ( + <>
{getReturnHomeButton(index)} - {getHr(index)} - - - ))} + + ))} +
); }