fix(salesforce) require selected records + styling (#12669)

This commit is contained in:
Mihaela Dumitru 2022-12-12 19:15:45 +02:00 committed by GitHub
parent 338b02a6b6
commit 6a4276b4c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 9 deletions

View File

@ -44,7 +44,7 @@ const SalesforceLinkDialog = () => {
const handlePress = useCallback(() => { const handlePress = useCallback(() => {
navigate(screen.conference.main); navigate(screen.conference.main);
linkMeeting(); selectedRecord && linkMeeting();
}, [ navigate, linkMeeting ]); }, [ navigate, linkMeeting ]);
const renderSpinner = () => ( const renderSpinner = () => (

View File

@ -18,7 +18,7 @@ import { RecordItem } from './RecordItem';
const useStyles = makeStyles()(theme => { const useStyles = makeStyles()(theme => {
return { return {
container: { container: {
minHeight: '450px', height: '450px',
overflowY: 'auto', overflowY: 'auto',
position: 'relative' position: 'relative'
}, },
@ -56,23 +56,38 @@ const useStyles = makeStyles()(theme => {
spinner: { spinner: {
alignItems: 'center', alignItems: 'center',
display: 'flex', display: 'flex',
height: 'calc(100% - 100px)', height: 'calc(100% - 70px)',
justifyContent: 'center', justifyContent: 'center',
width: '100%' width: '100%',
'@media (max-width: 448px)': {
height: 'auto',
marginTop: '24px'
}
}, },
noRecords: { noRecords: {
height: 'calc(100% - 150px)', height: 'calc(100% - 150px)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexDirection: 'column' flexDirection: 'column',
'@media (max-width: 448px)': {
height: 'auto',
marginTop: '24px'
}
}, },
recordsError: { recordsError: {
height: 'calc(100% - 80px)', height: 'calc(100% - 42px)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexDirection: 'column' flexDirection: 'column',
'@media (max-width: 448px)': {
height: 'auto',
marginTop: '24px'
}
}, },
recordList: { recordList: {
listStyle: 'none', listStyle: 'none',
@ -145,7 +160,7 @@ function SalesforceLinkDialog() {
const handleSubmit = useCallback(() => { const handleSubmit = useCallback(() => {
dispatch(hideDialog()); dispatch(hideDialog());
linkMeeting(); selectedRecord && linkMeeting();
}, [ hideDialog, linkMeeting ]); }, [ hideDialog, linkMeeting ]);
const renderSpinner = () => ( const renderSpinner = () => (

View File

@ -83,7 +83,7 @@ export const useSalesforceLinkDialog = () => {
} }
}; };
fetchRecordDetails(); selectedRecord && fetchRecordDetails();
}, [ }, [
jwt, jwt,
getSessionRecordDetails, getSessionRecordDetails,