TP-52973 | minor fix (#120)
This commit is contained in:
@@ -56,7 +56,6 @@ const AllDailogBox: FC = () => {
|
||||
const { updateIncident, markDuplicateIncident } = useIncidentApis();
|
||||
const incidentId = incidentData?.id?.toString() || '';
|
||||
const reduxDispatch = useDispatch();
|
||||
const incidentName = incidentData?.incidentName;
|
||||
|
||||
const handleopenNotParticipants = (): void => {
|
||||
reduxDispatch(setOpenDialognotParticipants(false));
|
||||
@@ -73,7 +72,7 @@ const AllDailogBox: FC = () => {
|
||||
reduxDispatch(setOpenDialogDuplicate(false));
|
||||
};
|
||||
const disable = (): boolean => {
|
||||
return !incidentName || !validate(incidentName);
|
||||
return !state.incidentName || !validate(state.incidentName);
|
||||
};
|
||||
|
||||
const extractIncidentId = (incidentName: string | null): number | null => {
|
||||
@@ -85,7 +84,7 @@ const AllDailogBox: FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const duplicateOfId = extractIncidentId(incidentName);
|
||||
const duplicateOfId = extractIncidentId(state.incidentName);
|
||||
|
||||
const handleIncidentChange = (
|
||||
e: React.ChangeEvent<HTMLInputElement>,
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
LINK_JIRA_INCIDENT,
|
||||
UNLINK_JIRA_INCIDENT,
|
||||
} from '@src/Pages/Incidents/constants';
|
||||
import { setOpenDialogDuplicate } from '@src/slices/IncidentSlice';
|
||||
import { useIncidentApiProps } from './types';
|
||||
import {
|
||||
FETCH_INCIDENT_DATA,
|
||||
@@ -102,6 +103,7 @@ const useIncidentApis = (): useIncidentApiProps => {
|
||||
const toastMessage = `This incident is marked as duplicate of _houston-${duplicateOfId}`;
|
||||
toast.success(toastMessage);
|
||||
startIncidentSearch(incidentId);
|
||||
dispatch(setOpenDialogDuplicate(false));
|
||||
}
|
||||
})
|
||||
.catch(handleApiError);
|
||||
|
||||
Reference in New Issue
Block a user