diff --git a/.env.example b/.env.example index 4476567fe..b7b8f6f63 100644 --- a/.env.example +++ b/.env.example @@ -22,7 +22,7 @@ SFDC_CONSUMER_KEY='3MVG9tSqyyAXNH5ItQtuplEg40Ks_MLSG37L1PV.TLDjsCbdp7EDonFUW0csS SFDC_CONSUMER_SECRET='F77C1B4AF03CF51B290A591766F4C430E3136949A636D4AA5339F8EB6A40052A' # API VERSION TO USE -NX_SFDC_API_VERSION='55.0' +NX_SFDC_API_VERSION='58.0' # If set to true, then authentication will be bypassed # You will use a test account instead of a real account - only works if running locally diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 782abc6c8..577db44ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: SFDC_CONSUMER_KEY: ${{ secrets.SFDC_CONSUMER_KEY }} SFDC_CONSUMER_SECRET: ${{ secrets.SFDC_CONSUMER_SECRET }} SFDC_ENC_KEY: ${{ secrets.SFDC_ENC_KEY }} - SFDC_API_VERSION: '57.0' + SFDC_API_VERSION: '58.0' services: postgres: diff --git a/apps/jetstream/src/app/components/load-records/utils/load-records-utils.tsx b/apps/jetstream/src/app/components/load-records/utils/load-records-utils.tsx index 827f05faa..bba6ebeb8 100644 --- a/apps/jetstream/src/app/components/load-records/utils/load-records-utils.tsx +++ b/apps/jetstream/src/app/components/load-records/utils/load-records-utils.tsx @@ -96,7 +96,7 @@ export async function getFieldMetadata(org: SalesforceOrgUi, sobject: string): P // related records if (relatedObjects.size > 0) { const relatedEntities = ( - await queryWithCache(org, getExternalIdFieldsForSobjectsQuery(Array.from(relatedObjects)), true) + await queryWithCache(org, getExternalIdFieldsForSobjectsQuery(Array.from(relatedObjects))) ).data; const relatedEntitiesByObj = groupBy(relatedEntities.queryResults.records, 'EntityDefinition.QualifiedApiName'); fieldsWithRelationships.forEach((field) => { diff --git a/apps/jetstream/src/app/components/manage-permissions/utils/permission-manager-table-utils.tsx b/apps/jetstream/src/app/components/manage-permissions/utils/permission-manager-table-utils.tsx index 2536099d8..94dc27cf9 100644 --- a/apps/jetstream/src/app/components/manage-permissions/utils/permission-manager-table-utils.tsx +++ b/apps/jetstream/src/app/components/manage-permissions/utils/permission-manager-table-utils.tsx @@ -482,6 +482,17 @@ function getColumnForProfileOrPermSet({ filters: ['BOOLEAN_SET'], cellClass: (row) => { const permission = row.permissions[id]; + if (permissionType === 'object') { + const permission = row.permissions[id] as PermissionTableObjectCellPermission; + if ( + (actionKey === 'create' && permission.createIsDirty) || + (actionKey === 'delete' && permission.deleteIsDirty) || + (actionKey === 'viewAll' && permission.viewAllIsDirty) || + (actionKey === 'modifyAll' && permission.modifyAllIsDirty) + ) { + return 'active-item-yellow-bg'; + } + } if ((actionKey === 'read' && permission.readIsDirty) || (actionKey === 'edit' && permission.editIsDirty)) { return 'active-item-yellow-bg'; } @@ -777,6 +788,58 @@ export function updateRowsFromRowAction(type: PermissionType, rows: TRows[]): TRows[] { + const newRows = [...rows]; + return newRows.map((row) => { + row = { ...row }; + row.permissions = { ...row.permissions }; + for (const permissionId in row.permissions) { + row.permissions = { ...row.permissions, [permissionId]: { ...row.permissions[permissionId] } } as any; + if (type === 'object') { + const permission = row.permissions[permissionId] as PermissionTableObjectCellPermission; + + if (permission.createIsDirty) { + permission.create = !permission.create; + } + if (permission.readIsDirty) { + permission.read = !permission.read; + } + if (permission.editIsDirty) { + permission.edit = !permission.edit; + } + if (permission.deleteIsDirty) { + permission.delete = !permission.delete; + } + if (permission.viewAllIsDirty) { + permission.viewAll = !permission.viewAll; + } + if (permission.modifyAllIsDirty) { + permission.modifyAll = !permission.modifyAll; + } + + permission.createIsDirty = false; + permission.readIsDirty = false; + permission.editIsDirty = false; + permission.deleteIsDirty = false; + permission.viewAllIsDirty = false; + permission.modifyAllIsDirty = false; + } else { + const permission = row.permissions[permissionId] as PermissionTableFieldCellPermission; + if (permission.readIsDirty) { + permission.read = !permission.read; + } + if (permission.editIsDirty) { + permission.edit = !permission.edit; + } + + permission.readIsDirty = false; + permission.editIsDirty = false; + } + } + return row; + }); +} + /** * Pinned row selection renderer */ @@ -980,12 +1043,13 @@ export const RowActionRenderer: FunctionComponent -