From f1f39c6d7e8b4d5b7fe8b1bf2cb3ab3e119154bc Mon Sep 17 00:00:00 2001 From: "saish.borkar" Date: Tue, 1 Oct 2024 13:09:56 +0530 Subject: [PATCH 1/2] fix --- generics/services/form.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generics/services/form.js b/generics/services/form.js index 41df7869..c536182b 100644 --- a/generics/services/form.js +++ b/generics/services/form.js @@ -30,8 +30,10 @@ const configForStateLocation = function ( stateLocationCode, entityKey ) { }) } - let subEntityData = subEntitiesDetails.data.form.data.fields[1].children.teacher; - + let subEntityData = subEntitiesDetails.data.form.data.fields.filter((fieldInstance)=>{ + return fieldInstance.code == 'persona' + })[0].children.administrator; + //Entity type is stored in a key called code let subEntities = subEntityData.map( subEntity => { return subEntity.code; From 3c0d60281ec87d658d705602124e625143eb108b Mon Sep 17 00:00:00 2001 From: "saish.borkar" Date: Tue, 1 Oct 2024 13:19:48 +0530 Subject: [PATCH 2/2] fix --- generics/messageConstants/common.js | 3 ++- generics/services/form.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/generics/messageConstants/common.js b/generics/messageConstants/common.js index 6a3370bc..21316e52 100644 --- a/generics/messageConstants/common.js +++ b/generics/messageConstants/common.js @@ -62,5 +62,6 @@ module.exports = { CACHE_TTL : 43200 , GET_METHOD : "GET", SUBENTITY :"subEntityTypesOf_", - STATE: "state" + STATE: "state", + PERSONA: "persona" } \ No newline at end of file diff --git a/generics/services/form.js b/generics/services/form.js index c536182b..c24fe9df 100644 --- a/generics/services/form.js +++ b/generics/services/form.js @@ -31,7 +31,7 @@ const configForStateLocation = function ( stateLocationCode, entityKey ) { } let subEntityData = subEntitiesDetails.data.form.data.fields.filter((fieldInstance)=>{ - return fieldInstance.code == 'persona' + return fieldInstance.code == messageConstants.common.PERSONA })[0].children.administrator; //Entity type is stored in a key called code