From 149d6b102b97a011f43ad8a3e206989ff23e92ab Mon Sep 17 00:00:00 2001 From: utsukta1 Date: Tue, 16 Jan 2024 11:02:39 +0545 Subject: [PATCH] Error message display in rapid response personnel table --- .../RapidResponsePerosnnelTable/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/views/EmergencySurge/RapidResponsePerosnnelTable/index.tsx b/src/views/EmergencySurge/RapidResponsePerosnnelTable/index.tsx index 63f230c03..9d1d7b4f1 100644 --- a/src/views/EmergencySurge/RapidResponsePerosnnelTable/index.tsx +++ b/src/views/EmergencySurge/RapidResponsePerosnnelTable/index.tsx @@ -140,10 +140,15 @@ export default function RapidResponsePersonnelTable(props: Props) { 'country_from', strings.personnelTableDeployedParty, (item) => item.country_from?.society_name, - (item) => ({ - to: 'countriesLayout', - urlParams: { countryId: item.country_from?.id }, - }), + (item) => { + if (item.country_from?.id) { + return { + to: 'countriesLayout', + urlParams: { countryId: item.country_from?.id }, + }; + } + return strings.emergencySurgePartyNotFound; + }, { sortable: true }, ), createLinkColumn(