diff --git a/app/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowOperations.tsx b/app/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowOperations.tsx index 2f364b8e16..57d9ddcda1 100644 --- a/app/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowOperations.tsx +++ b/app/src/components/events/partials/ModalTabsAndPages/EventDetailsWorkflowOperations.tsx @@ -3,12 +3,12 @@ import Notifications from "../../../shared/Notifications"; import { getWorkflow, getWorkflowOperations, - isFetchingWorkflowOperations, } from "../../../../selectors/eventDetailsSelectors"; import EventDetailsTabHierarchyNavigation from "./EventDetailsTabHierarchyNavigation"; import { useAppDispatch, useAppSelector } from "../../../../store"; import { removeNotificationWizardForm } from "../../../../slices/notificationSlice"; import { fetchWorkflowOperationDetails, fetchWorkflowOperations } from "../../../../slices/eventDetailsSlice"; +import { useTranslation } from "react-i18next"; /** * This component manages the workflow operations for the workflows tab of the event details modal @@ -16,20 +16,18 @@ import { fetchWorkflowOperationDetails, fetchWorkflowOperations } from "../../.. const EventDetailsWorkflowOperations = ({ // @ts-expect-error TS(7031): Binding element 'eventId' implicitly has an 'any' ... Remove this comment to see the full error message eventId, -// @ts-expect-error TS(7031): Binding element 't' implicitly has an 'any' type. - t, // @ts-expect-error TS(7031): Binding element 'setHierarchy' implicitly has an '... Remove this comment to see the full error message setHierarchy, }) => { + const { t } = useTranslation(); const dispatch = useAppDispatch(); const workflow = useAppSelector(state => getWorkflow(state)); const operations = useAppSelector(state => getWorkflowOperations(state)); - const isFetching = useAppSelector(state => isFetchingWorkflowOperations(state)); const loadWorkflowOperations = async () => { // Fetching workflow operations from server - await fetchWorkflowOperations({eventId, workflowId: workflow.wiid}); + dispatch(fetchWorkflowOperations({eventId, workflowId: workflow.wiid})); }; useEffect(() => { @@ -78,64 +76,60 @@ const EventDetailsWorkflowOperations = ({
- {isFetching || ( - <> - - - - + + + + + + + + {/* workflow operation details */} + {operations.entries.map((item, key) => ( + + + + + + {/* link to 'Operation Details' sub-Tab */} + - - - - {/* workflow operation details */} - {operations.entries.map((item, key) => ( - - - - - - {/* link to 'Operation Details' sub-Tab */} - - - ))} - - - )} + + + + ))} +
- { - t( - "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.STATUS" - ) /* Status */ - } - - { - t( - "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.TITLE" - ) /* Title */ +
+ { + t( + "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.STATUS" + ) /* Status */ + } + + { + t( + "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.TITLE" + ) /* Title */ + } + + + { + t( + "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.DESCRIPTION" + ) /* Description */ + } + + +
{t(item.status)}{item.title}{item.description} + + > { t( - "EVENTS.EVENTS.DETAILS.WORKFLOW_OPERATIONS.TABLE_HEADERS.DESCRIPTION" - ) /* Description */ + "EVENTS.EVENTS.DETAILS.MEDIA.DETAILS" + ) /* Details */ } - - -
{t(item.status)}{item.title}{item.description} - -
diff --git a/app/src/components/events/partials/modals/EventDetails.tsx b/app/src/components/events/partials/modals/EventDetails.tsx index e690ce0c1a..85a8afb145 100644 --- a/app/src/components/events/partials/modals/EventDetails.tsx +++ b/app/src/components/events/partials/modals/EventDetails.tsx @@ -328,7 +328,6 @@ const EventDetails : React.FC<{ (workflowTabHierarchy === "workflow-operations" && ( )) ||