@@ -5,7 +5,7 @@ import {Alert, View} from "react-native";
55import Path from "../../framework/routing/Path" ;
66import IndividualProfile from "../common/IndividualProfile" ;
77import FamilyProfile from "../familyfolder/FamilyProfile" ;
8- import { Text } from "native-base" ;
8+ import { ScrollView , Text } from "native-base" ;
99import TypedTransition from "../../framework/routing/TypedTransition" ;
1010import WizardButtons from "../common/WizardButtons" ;
1111import AppHeader from "../common/AppHeader" ;
@@ -81,7 +81,7 @@ class SystemRecommendationView extends AbstractComponent {
8181
8282 get nextAndMore ( ) {
8383 let workListState = this . props . workListState ;
84- if ( _ . isNil ( workListState ) )
84+ if ( _ . isNil ( workListState ) )
8585 return { } ;
8686 if ( ! workListState . peekNextWorkItem ( ) ) return { } ;
8787
@@ -139,12 +139,12 @@ class SystemRecommendationView extends AbstractComponent {
139139 }
140140
141141 previous ( ) {
142- TypedTransition . from ( this ) . goBack ( ) ;
142+ TypedTransition . from ( this ) . goBack ( ) ;
143143 }
144144
145145 profile ( ) {
146146 return ( this . props . individual instanceof Individual ) ?
147- < IndividualProfile viewContext = { IndividualProfile . viewContext . Wizard }
147+ < IndividualProfile viewContext = { IndividualProfile . viewContext . SystemRecommendations }
148148 individual = { this . props . individual } style = { {
149149 backgroundColor : Colors . GreyContentBackground ,
150150 paddingHorizontal : 24 ,
@@ -176,54 +176,59 @@ class SystemRecommendationView extends AbstractComponent {
176176 func = { ( ) => this . onAppHeaderBack ( this . props . isSaveDraftOn ) }
177177 displayHomePressWarning = { ! this . props . isSaveDraftOn } />
178178 < RejectionMessage I18n = { this . I18n } entityApprovalStatus = { this . props . entityApprovalStatus } />
179- < View style = { { flexDirection : 'column' } } >
180- { ! _ . isNil ( this . props . individual ) && this . profile ( ) }
181- < View style = { { flexDirection : 'column' , marginHorizontal : Distances . ContentDistanceFromEdge } } >
182- < View style = { this . scaleStyle ( { paddingVertical : 12 , flexDirection : 'column' } ) } >
183- {
184- this . props . validationErrors . map ( ( validationResult , index ) => {
185- return (
186- < View style = { this . scaleStyle ( SystemRecommendationView . styles . rulesRowView ) }
187- key = { `error${ index } ` } >
188- < Text style = { {
189- fontSize : Fonts . Medium ,
190- color : Colors . ValidationError
191- } } > { this . I18n . t ( validationResult . messageKey ) } </ Text >
192- </ View >
193- ) ;
194- } )
195- }
196- < Observations highlight
197- observations = { this . context . getService ( ConceptService ) . getObservationsFromDecisions ( this . props . decisions ) }
198- title = { this . I18n . t ( 'systemRecommendations' ) } />
199- </ View >
200- < NextScheduledVisits nextScheduledVisits = { this . props . nextScheduledVisits . filter ( nsv => _ . isNil ( nsv . subject ) ) }
201- title = { this . I18n . t ( 'visitsBeingScheduled' ) } />
202- < NextScheduledVisitsForOtherSubjects nextScheduledVisits = { this . props . nextScheduledVisits . filter ( nsv => ! _ . isNil ( nsv . subject ) ) }
203- title = { this . I18n . t ( 'visitsBeingScheduledForOthers' ) } />
204- { ! _ . isNil ( this . props . individual ) &&
179+ < ScrollView >
180+ < View style = { { flexDirection : 'column' } } >
181+ { ! _ . isNil ( this . props . individual ) && this . profile ( ) }
182+ < View style = { { flexDirection : 'column' , marginHorizontal : Distances . ContentDistanceFromEdge } } >
183+ < View style = { this . scaleStyle ( { paddingVertical : 12 , flexDirection : 'column' } ) } >
184+ {
185+ this . props . validationErrors . map ( ( validationResult , index ) => {
186+ return (
187+ < View style = { this . scaleStyle ( SystemRecommendationView . styles . rulesRowView ) }
188+ key = { `error${ index } ` } >
189+ < Text style = { {
190+ fontSize : Fonts . Medium ,
191+ color : Colors . ValidationError
192+ } } > { this . I18n . t ( validationResult . messageKey ) } </ Text >
193+ </ View >
194+ ) ;
195+ } )
196+ }
197+ < Observations highlight
198+ observations = { this . context . getService ( ConceptService ) . getObservationsFromDecisions ( this . props . decisions ) }
199+ title = { this . I18n . t ( 'systemRecommendations' ) } />
200+ </ View >
201+ < NextScheduledVisits nextScheduledVisits = { this . props . nextScheduledVisits . filter ( nsv => _ . isNil ( nsv . subject ) ) }
202+ title = { this . I18n . t ( 'visitsBeingScheduled' ) } />
203+ < NextScheduledVisitsForOtherSubjects nextScheduledVisits = { this . props . nextScheduledVisits . filter ( nsv => ! _ . isNil ( nsv . subject ) ) }
204+ title = { this . I18n . t ( 'visitsBeingScheduledForOthers' ) } />
205+ { ! _ . isNil ( this . props . individual ) &&
205206 < GroupAffiliationInformation individual = { this . props . individual } I18n = { this . I18n } /> }
206- < Observations observations = { this . props . observations } form = { this . props . form }
207- title = { this . I18n . t ( 'observations' ) } />
208- < WizardButtons previous = { { func : ( ) => ! _ . isUndefined ( this . props . onPreviousCallback ) ? this . props . onPreviousCallback ( this . context ) : this . previous ( ) , label : this . I18n . t ( 'previous' ) } }
209- next = { {
210- func : ( ) => this . save ( ( ) => this . props . onSaveCallback ( this ) ) ,
211- visible : this . props . validationErrors . length === 0 ,
212- label : this . I18n . t ( 'save' )
213- } }
214- nextAndMore = { this . nextAndMore }
215- style = { { marginHorizontal : 24 } } />
207+ < Observations observations = { this . props . observations } form = { this . props . form }
208+ title = { this . I18n . t ( 'observations' ) } />
209+ < WizardButtons previous = { {
210+ func : ( ) => ! _ . isUndefined ( this . props . onPreviousCallback ) ? this . props . onPreviousCallback ( this . context ) : this . previous ( ) ,
211+ label : this . I18n . t ( 'previous' )
212+ } }
213+ next = { {
214+ func : ( ) => this . save ( ( ) => this . props . onSaveCallback ( this ) ) ,
215+ visible : this . props . validationErrors . length === 0 ,
216+ label : this . I18n . t ( 'save' )
217+ } }
218+ nextAndMore = { this . nextAndMore }
219+ style = { { marginHorizontal : 24 } } />
216220
221+ </ View >
222+ < ApprovalDialog
223+ primaryButton = { this . I18n . t ( 'yes' ) }
224+ secondaryButton = { this . I18n . t ( 'no' ) }
225+ onPrimaryPress = { ( ) => this . onYesPress ( ( ) => this . props . onSaveCallback ( this ) ) }
226+ onSecondaryPress = { ( ) => this . onNoPress ( ( ) => this . props . onSaveCallback ( this ) ) }
227+ onClose = { ( ) => this . onClose ( ) }
228+ state = { this . getDialogState ( ) }
229+ I18n = { this . I18n } />
217230 </ View >
218- < ApprovalDialog
219- primaryButton = { this . I18n . t ( 'yes' ) }
220- secondaryButton = { this . I18n . t ( 'no' ) }
221- onPrimaryPress = { ( ) => this . onYesPress ( ( ) => this . props . onSaveCallback ( this ) ) }
222- onSecondaryPress = { ( ) => this . onNoPress ( ( ) => this . props . onSaveCallback ( this ) ) }
223- onClose = { ( ) => this . onClose ( ) }
224- state = { this . getDialogState ( ) }
225- I18n = { this . I18n } />
226- </ View >
231+ </ ScrollView >
227232 </ CHSContent >
228233 </ CHSContainer >
229234 ) ;
0 commit comments