diff --git a/src/Pages/Dashboard/partials/CreateIncidentForm.tsx b/src/Pages/Dashboard/partials/CreateIncidentForm.tsx index e4b972c..e645f4d 100644 --- a/src/Pages/Dashboard/partials/CreateIncidentForm.tsx +++ b/src/Pages/Dashboard/partials/CreateIncidentForm.tsx @@ -73,7 +73,6 @@ const CreateIncidentForm: React.FC = ({ }; const handleTeamChange = (val: SelectPickerOptionProps[]): void => { dispatch({ type: actionTypes.SET_SELECTED_TEAM, payload: val }); - if (val?.length === 0) return; }; const handleAssignerChange = (val: SelectPickerValue): void => { dispatch({ type: actionTypes.SET_SELECTED_ASSIGNER, payload: val }); diff --git a/src/Pages/Incidents/Dropdowns/AllDailogBox.tsx b/src/Pages/Incidents/Dropdowns/AllDailogBox.tsx index 563156a..26e06ee 100644 --- a/src/Pages/Incidents/Dropdowns/AllDailogBox.tsx +++ b/src/Pages/Incidents/Dropdowns/AllDailogBox.tsx @@ -421,6 +421,7 @@ const AllDailogBox: FC = () => { UpdateData.type === 'severity' && showJustificationBox && state.reason.length <= 5; + const isProductAndDisabled = UpdateData.type === 'product' && !state.team; return (
{isSeverityAndDisabled ? ( @@ -430,7 +431,7 @@ const AllDailogBox: FC = () => { ) : ( diff --git a/src/Pages/Incidents/utils.ts b/src/Pages/Incidents/utils.ts index c6f83b3..7c4f004 100644 --- a/src/Pages/Incidents/utils.ts +++ b/src/Pages/Incidents/utils.ts @@ -108,12 +108,13 @@ export const getUpdateValueText = ({ } `; case ProductType: return ` ${ - initialValues.initialProducts?.length - ? initialValues.initialProducts - .map( - (product: { value: number }) => maps.productMap[product.value], + initialValues?.initialProducts?.length + ? initialValues?.initialProducts + ?.map( + (product: { value: number }) => + maps?.productMap?.[product?.value], ) - .join(', ') + ?.join(', ') : '-' } `; default: