import { setEventDetails } from "../../store/searchOutput/action"; import { setCurrentPage } from "../../store/currentView/action"; import { connect } from "react-redux"; import useTranslation from "next-translate/useTranslation"; import { formatDates } from "../utils"; import { useState } from "react"; import { getStagesForAppealType } from "./summary/utils/caseStagesByAppealType"; const statusClassMap = { complete: "govuk-tag govuk-!-margin-top-2", "in-progress": "govuk-tag govuk-tag--yellow govuk-!-margin-top-2", "not-started": "govuk-tag govuk-tag--grey govuk-!-margin-top-2", blocked: "govuk-tag govuk-tag--red govuk-!-margin-top-2" }; const statusTextMap = { complete: "status-complete", "in-progress": "status-in-progress", "not-started": "status-not-started", blocked: "status-blocked" }; const StatusDetails = (props) => { let { t } = useTranslation(); const stages = getStagesForAppealType( props.currentView?.caseReference?.appealType, props.currentView?.caseReference?.statuscode ); const EventView = (eventsArr) => { eventsArr = eventsArr.value; return eventsArr.map((item, key) => {