-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mohas22
authored and
mohas22
committed
Nov 5, 2024
1 parent
fe71b47
commit 9e36409
Showing
4 changed files
with
33 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export function getDetailsFieldArray(arFields) { | ||
const fields: any[] = []; | ||
arFields?.forEach(field => { | ||
const thePConn = field.getPConnect(); | ||
const theCompType = thePConn.getComponentName().toLowerCase(); | ||
if (theCompType === 'reference') { | ||
const configObj = thePConn.getReferencedView(); | ||
configObj.config.readOnly = true; | ||
configObj.config.displayMode = 'DISPLAY_ONLY'; | ||
const propToUse = { ...thePConn.getInheritedProps() }; | ||
configObj.config.label = propToUse?.label; | ||
const loadedPConn = thePConn.getReferencedViewPConnect(true).getPConnect(); | ||
const data = { | ||
type: theCompType, | ||
pConn: loadedPConn | ||
}; | ||
fields.push(data); | ||
} else { | ||
const data = { | ||
type: theCompType, | ||
config: thePConn.getConfigProps() | ||
}; | ||
fields.push(data); | ||
} | ||
}); | ||
return fields; | ||
} |