Skip to content

Commit

Permalink
fix: add scrollview style to enable scrollview (#662)
Browse files Browse the repository at this point in the history
* RM#80721
  • Loading branch information
gca-axelor authored Aug 2, 2024
1 parent a57ebf2 commit b5a6bf1
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
5 changes: 5 additions & 0 deletions changelogs/unreleased/80721.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"title": "Details screens: manage scroll style for small screens",
"type": "fix",
"packages": "crm"
}
11 changes: 10 additions & 1 deletion packages/apps/crm/src/screens/client/ClientDetailsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import React, {useCallback, useEffect} from 'react';
import {StyleSheet} from 'react-native';
import {
Screen,
HeaderContainer,
Expand Down Expand Up @@ -61,7 +62,9 @@ const ClientDetailsScreen = ({route}) => {
return (
<Screen removeSpaceOnTop={true}>
<HeaderContainer expandableFilter={false} fixedItems={<ClientHeader />} />
<ScrollView refresh={{loadingClient, fetcher: getClient}}>
<ScrollView
refresh={{loadingClient, fetcher: getClient}}
style={styles.scrollView}>
<NotesCard title={I18n.t('Crm_Notes')} data={client.description} />
<ClientDropdownCards />
</ScrollView>
Expand All @@ -70,4 +73,10 @@ const ClientDetailsScreen = ({route}) => {
);
};

const styles = StyleSheet.create({
scrollView: {
height: null,
},
});

export default ClientDetailsScreen;
11 changes: 10 additions & 1 deletion packages/apps/crm/src/screens/contact/ContactDetailsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import React, {useCallback, useEffect} from 'react';
import {StyleSheet} from 'react-native';
import {
Screen,
HeaderContainer,
Expand Down Expand Up @@ -65,7 +66,9 @@ const ContactDetailsScreen = ({route}) => {
expandableFilter={false}
fixedItems={<ContactHeader />}
/>
<ScrollView refresh={{loading, fetcher: getContactAPI}}>
<ScrollView
refresh={{loading, fetcher: getContactAPI}}
style={styles.scrollView}>
<ContactPartnerCard />
<NotesCard title={I18n.t('Crm_Notes')} data={contact.description} />
<ContactDropdownCards />
Expand All @@ -75,4 +78,10 @@ const ContactDetailsScreen = ({route}) => {
);
};

const styles = StyleSheet.create({
scrollView: {
height: null,
},
});

export default ContactDetailsScreen;
11 changes: 10 additions & 1 deletion packages/apps/crm/src/screens/lead/LeadDetailsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import React, {useCallback, useEffect} from 'react';
import {StyleSheet} from 'react-native';
import {
Screen,
HeaderContainer,
Expand Down Expand Up @@ -60,7 +61,9 @@ const LeadDetailsScreen = ({route}) => {
expandableFilter={false}
fixedItems={<LeadHeader idLead={idLead} versionLead={versionLead} />}
/>
<ScrollView refresh={{loading: loadingLead, fetcher: getLead}}>
<ScrollView
refresh={{loading: loadingLead, fetcher: getLead}}
style={styles.scrollView}>
<NotesCard title={I18n.t('Crm_Description')} data={lead.description} />
<LeadDropdownCards />
</ScrollView>
Expand All @@ -69,4 +72,10 @@ const LeadDetailsScreen = ({route}) => {
);
};

const styles = StyleSheet.create({
scrollView: {
height: null,
},
});

export default LeadDetailsScreen;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import React, {useCallback, useEffect} from 'react';
import {StyleSheet} from 'react-native';
import {
Screen,
HeaderContainer,
Expand Down Expand Up @@ -65,7 +66,8 @@ const OpportunityDetailsScreen = ({route}) => {
fixedItems={<OpportunityHeader />}
/>
<ScrollView
refresh={{loading: loadingOpportunity, fetcher: getOpportunityAPI}}>
refresh={{loading: loadingOpportunity, fetcher: getOpportunityAPI}}
style={styles.scrollView}>
<OpportunityPartnerCard />
<OpportunityDropdownInfo />
<NotesCard
Expand All @@ -79,4 +81,10 @@ const OpportunityDetailsScreen = ({route}) => {
);
};

const styles = StyleSheet.create({
scrollView: {
height: null,
},
});

export default OpportunityDetailsScreen;
12 changes: 11 additions & 1 deletion packages/apps/crm/src/screens/prospect/ProspectDetailsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/

import React, {useCallback, useEffect} from 'react';
import {StyleSheet} from 'react-native';

import {
Screen,
HeaderContainer,
Expand Down Expand Up @@ -64,7 +66,9 @@ const ProspectDetailsScreen = ({route}) => {
expandableFilter={false}
fixedItems={<ProspectHeader />}
/>
<ScrollView refresh={{loading, fetcher: getProspect}}>
<ScrollView
refresh={{loading, fetcher: getProspect}}
style={styles.scrollView}>
<NotesCard title={I18n.t('Crm_Notes')} data={prospect.description} />
<ProspectDropdownCards />
</ScrollView>
Expand All @@ -73,4 +77,10 @@ const ProspectDetailsScreen = ({route}) => {
);
};

const styles = StyleSheet.create({
scrollView: {
height: null,
},
});

export default ProspectDetailsScreen;

0 comments on commit b5a6bf1

Please sign in to comment.