Skip to content

Commit

Permalink
some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmars committed Dec 16, 2024
1 parent a14c4c7 commit d0392f9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default styled.div(({ displayFormat }: { displayFormat: string }) => {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
grid-gap: 0.5rem;
overflow: hidden;
padding: 0.2rem;
}
& > fieldset > div > label {
display: block;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Pega_Extensions_FieldGroupAsRow/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default styled.div(({ theme }: { theme: typeof themeDefinition }) => {
max-width: unset;
}
& > div > div > div {
& fieldset > div > div > div > div > div > div > div:last-child > div {
display: flex;
flex-flow: row wrap;
}
& > div > div > div > h3 {
& fieldset > div h1 {
display: none;
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/Pega_Extensions_Map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export const PegaExtensionsMap = (props: MapProps) => {
let view: MapView;
let ptLayer: GraphicsLayer;

if (displayMode !== 'DISPLAY_ONLY') {
getPConnect().getListActions().initDefaultPageInstructions('.Locations');
}

/* Retrieve the name of the embedded object when bFreeFormDrawing is false */
if (!bFreeFormDrawing && tmpFields.length >= 2) {
let paths = tmpFields[0].path?.split(' ');
Expand Down
33 changes: 29 additions & 4 deletions src/components/Pega_Extensions_Map/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,41 @@ export const addPoint = (
const messageConfig = {
meta: props,
options: {
containerName: 'workarea',
context: getPConnect().getContextName(),
pageReference: `caseInfo.content${embedDataRef}[${index}]`,
hasForm: true,
pageReference: 'caseInfo.content',
referenceList: embedDataRef,
target: getPConnect().getTarget()
}
};
const c11nEnv = (window as any).PCore.createPConnect(messageConfig);
const actionsApi = c11nEnv.getPConnect().getActionsApi();
c11nEnv.index = index; // Is this needed?
c11nEnv
.getPConnect()
.getListActions()
.insert({ classID: 'OK5NFJ-Computer-Data-Location' }, index, 'caseInfo.content');

const messageConfig1 = {
meta: props,
options: {
context: getPConnect().getContextName(),
hasForm: true,
isInsideList: true,
pageReference: `caseInfo.content${embedDataRef}[${index}]`,
referenceList: embedDataRef
}
};
const c11nEnv1 = (window as any).PCore.createPConnect(messageConfig1);
const ll = webMercatorUtils.xyToLngLat(x[0], x[1]);
actionsApi?.updateFieldValue(longitudePropRef, ll[0]);
actionsApi?.updateFieldValue(latitudePropRef, ll[1]);
c11nEnv1
.getPConnect()
.getListActions()
.updateProperty(longitudePropRef, ll[0], { isArrayDeepMerge: true });
c11nEnv1
.getPConnect()
.getListActions()
.updateProperty(latitudePropRef, ll[1], { isArrayDeepMerge: true });
};

export const addScreenShot = (getPConnect: any, view: MapView, imageMapRef: string) => {
Expand Down

0 comments on commit d0392f9

Please sign in to comment.