From f3503d7f7327cceae5e4f9ba3d80eef7abf3aeed Mon Sep 17 00:00:00 2001 From: Ronyell Henrique Date: Tue, 22 May 2018 23:00:20 -0300 Subject: [PATCH] #175 - Fitting source code to style sheet --- Routes.js | 10 +- __tests__/screens/ScheduleMeeting.test.js | 241 ++++ .../ScheduleMeeting.test.js.snap | 56 + docker-compose.yml | 3 + index.js | 3 + .../ScheduleMeetingContainer.js | 42 +- .../ScheduleMeetingMapContainer.js | 12 +- src/components/EmailField.js | 3 +- src/components/PasswordField.js | 2 +- src/components/PhoneField.js | 2 +- src/screens/InitialScreen.js | 1 - src/screens/ProfileInfoScreen.js | 2 +- src/screens/SchedulingVisit.js | 2 +- src/screens/SearchSchool.js | 2 +- .../legislation/MainLegislationScreen.js | 2 +- .../ManageAcceptedRegistersScreen.js | 2 +- .../ManageNotAcceptedRegistersScreen.js | 2 +- src/screens/reports/MainReportsScreen.js | 2 +- .../scheduleMeeting/ScheduleMeeting.js | 1146 ++++++++--------- 19 files changed, 920 insertions(+), 615 deletions(-) create mode 100644 __tests__/screens/ScheduleMeeting.test.js create mode 100644 __tests__/screens/__snapshots__/ScheduleMeeting.test.js.snap create mode 100644 index.js diff --git a/Routes.js b/Routes.js index 1c313bf..4497cec 100644 --- a/Routes.js +++ b/Routes.js @@ -22,7 +22,7 @@ import FoodHandlerCheckoutContainer from './src/Containers/reports/FoodHandlerCh import WaterSewerSupplyCheckoutContainer from './src/Containers/reports/WaterSewerSupplyCheckoutContainer'; import FoodPreparationCheckoutContainer from './src/Containers/reports/FoodPreparationCheckoutContainer'; import PrincipalStartInspection from './src/screens/startInspection/PrincipalStartInspection'; -// import ScheduleMeetingContainer from './src/Containers/scheduleMeeting/ScheduleMeetingContainer';;; +import ScheduleMeetingContainer from './src/Containers/scheduleMeeting/ScheduleMeetingContainer';;; // import ScheduleMeetingMapContainer from './src/Containers/scheduleMeeting/ScheduleMeetingMapContainer'; import PrincipalManageRegister from './src/screens/manageCounselors/PrincipalManageRegister'; import MainLegislationScreen from './src/screens/legislation/MainLegislationScreen'; @@ -60,11 +60,11 @@ const Routes = () => ({ hideNavBar /> */} - {/* */} + /> @@ -92,12 +92,12 @@ const Routes = () => ({ hideNavBar /> */} - {/* */} + /> { + it('renders as expected', () => { + const wrapper = shallow( + , + { context: { store } }, + ); + expect(wrapper).toMatchSnapshot(); + }); +}); + +describe('Testing ScheduleMeeting buttons', () => { + it('Test if goToMeetingMaps Button is rendered', () => { + jest.mock('react-native-router-flux'); + const wrapper = shallow(); + console.log(initialStateToScreen); + const button = wrapper.findWhere(c => c.key() === 'openMeetingMap'); + expect(button.length).toEqual(1); + button.simulate('press'); + }); + + it('Test if openMeetingLocation Button is rendered', () => { + const wrapper = shallow(); + const button = wrapper.findWhere(c => c.key() === 'openMeetingLocation'); + expect(button.length).toEqual(1); + button.simulate('press'); + }); + + it('Test if inviteCounselors Button is rendered', () => { + const wrapper = shallow(); + const button = wrapper.findWhere(c => c.key() === 'searchCounselorButton'); + expect(button.length).toEqual(1); + // We are not simulating button press because + // we faced problemns with .show from popUp + // button.simulate('press'); + }); + it('Test if schedule button is rendered', () => { + const asyncSchedulingMeeting = (state) => { + expect(state.nuvemCode).toEqual(1); + expect(state.appToken).toEqual('tokenGenerico'); + expect(state.meeting.date).toEqual('31-12-2017'); + expect(state.meeting.time).toEqual('18:30'); + expect(state.meeting.lat).toEqual(0.00); + expect(state.meeting.long).toEqual(0.00); + }; + + const wrapper = shallow(); + + wrapper.setState({ + nuvemCode: 1, + token: 'tokenGenerico', + meeting: { + date: '31-12-2017', + time: '18:30', + lat: 0.00, + long: 0.00, + meetingDescription: '', + meetingListOfInvitees: { + 6122: { + nuvemCode: 6122, + confirmed: false, + }, + 6201: { + nuvemCode: 6201, + confirmed: false, + }, + }, + }, + }); + + const button = wrapper.findWhere(c => c.key() === 'scheduleMeetingButton'); + expect(button.length).toEqual(1); + }); + it('Test if meetingDescription updates', () => { + const wrapper = shallow(); + const describeInputComponent = wrapper.find('TextInput').at(0); + describeInputComponent.simulate('ChangeText', 'descricao'); + expect(wrapper.state().meeting.meetingDescription).toEqual('descricao'); + }); +}); + +describe('Testing ScheduleMeeting DatePickers', () => { + const wrapper = shallow(); + + it('Test if date changes when DatePicker changes', () => { + const datePickerComponent = wrapper.find('DatePicker').at(0); + datePickerComponent.simulate('dateChange', '31-10-2017'); + expect(wrapper.state().meeting.date).toEqual('31-10-2017'); + }); + it('Test if time changes when DatePicker changes', () => { + const datePickerComponent = wrapper.find('DatePicker').at(1); + datePickerComponent.simulate('dateChange', '19:50'); + expect(wrapper.state().meeting.time).toEqual('19:50'); + }); +}); diff --git a/__tests__/screens/__snapshots__/ScheduleMeeting.test.js.snap b/__tests__/screens/__snapshots__/ScheduleMeeting.test.js.snap new file mode 100644 index 0000000..58635c5 --- /dev/null +++ b/__tests__/screens/__snapshots__/ScheduleMeeting.test.js.snap @@ -0,0 +1,56 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Testing ScheduleMeeting Screen renders as expected 1`] = ` + +`; diff --git a/docker-compose.yml b/docker-compose.yml index 19138aa..26a83c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,5 +15,8 @@ merenda-merenda: lsusb npm install --loglevel verbose adb reverse tcp:8081 tcp:8081 + echo 256 | tee -a /proc/sys/fs/inotify/max_user_instances + echo 32768 | tee -a /proc/sys/fs/inotify/max_queued_events + echo 65536 | tee -a /proc/sys/fs/inotify/max_user_watches react-native run-android " diff --git a/index.js b/index.js new file mode 100644 index 0000000..4bf4e78 --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +import { AppRegistry } from 'react-native'; +import App from './App'; +AppRegistry.registerComponent('MerendaMais', () => App); diff --git a/src/Containers/scheduleMeeting/ScheduleMeetingContainer.js b/src/Containers/scheduleMeeting/ScheduleMeetingContainer.js index 0db58af..14be451 100644 --- a/src/Containers/scheduleMeeting/ScheduleMeetingContainer.js +++ b/src/Containers/scheduleMeeting/ScheduleMeetingContainer.js @@ -1,27 +1,27 @@ -// import { connect } from 'react-redux'; -// import ScheduleMeeting from '../../screens/scheduleMeeting/ScheduleMeeting'; -// import asyncSchedulingMeeting from '../../actions/schedulingMeetingActions'; -// import { asyncGetCounselorFromGroup, setMeetingNewLists } from '../../actions/listActions'; +import { connect } from 'react-redux'; +import ScheduleMeeting from '../../screens/scheduleMeeting/ScheduleMeeting'; +import asyncSchedulingMeeting from '../../actions/schedulingMeetingActions'; +import { asyncGetCounselorFromGroup, setMeetingNewLists } from '../../actions/listActions'; -// const mapStateToProps = state => ({ -// isLoading: state.application.isLoading, -// listOfCounselorsInAGroup: state.list.listOfCounselorsInAGroup, -// meetingListOfInviteesWithCounselorInformations: -// state.list.meetingListOfInviteesWithCounselorInformations, -// meetingListOfInvitees: state.list.meetingListOfInvitees, -// counselor: state.counselor, -// scheduleMeeting: state.scheduleMeeting, -// }); +const mapStateToProps = state => ({ + isLoading: state.application.isLoading, + listOfCounselorsInAGroup: state.list.listOfCounselorsInAGroup, + meetingListOfInviteesWithCounselorInformations: + state.list.meetingListOfInviteesWithCounselorInformations, + meetingListOfInvitees: state.list.meetingListOfInvitees, + counselor: state.counselor, + scheduleMeeting: state.scheduleMeeting, +}); -// const mapDispatchToProps = dispatch => ({ -// asyncGetCounselorFromGroup: (CAE, CPF) => dispatch(asyncGetCounselorFromGroup(CAE, CPF)), +const mapDispatchToProps = dispatch => ({ + asyncGetCounselorFromGroup: (CAE, CPF) => dispatch(asyncGetCounselorFromGroup(CAE, CPF)), -// asyncSchedulingMeeting: meetingData => dispatch(asyncSchedulingMeeting(meetingData)), + asyncSchedulingMeeting: meetingData => dispatch(asyncSchedulingMeeting(meetingData)), -// setMeetingNewLists: meetingNewListWithInformations => -// dispatch(setMeetingNewLists(meetingNewListWithInformations)), -// }); + setMeetingNewLists: meetingNewListWithInformations => + dispatch(setMeetingNewLists(meetingNewListWithInformations)), +}); -// const ScheduleMeetingContainer = connect(mapStateToProps, mapDispatchToProps)(ScheduleMeeting); +const ScheduleMeetingContainer = connect(mapStateToProps, mapDispatchToProps)(ScheduleMeeting); -// export default ScheduleMeetingContainer; +export default ScheduleMeetingContainer; diff --git a/src/Containers/scheduleMeeting/ScheduleMeetingMapContainer.js b/src/Containers/scheduleMeeting/ScheduleMeetingMapContainer.js index ec59507..b662bb0 100644 --- a/src/Containers/scheduleMeeting/ScheduleMeetingMapContainer.js +++ b/src/Containers/scheduleMeeting/ScheduleMeetingMapContainer.js @@ -1,7 +1,11 @@ -// import { connect } from 'react-redux'; -// import ScheduleMeetingMap from '../../screens/scheduleMeeting/ScheduleMeetingMap'; -// import { setMeetingLocationLatitude, setMeetingLocationLongitude } from '../../actions/schedulingMeetingActions'; - +/* + import { connect } from 'react-redux'; + import ScheduleMeetingMap from '../../screens/scheduleMeeting/ScheduleMeetingMap'; + import { + setMeetingLocationLatitude, + setMeetingLocationLongitude + } from '../../actions/schedulingMeetingActions'; +*/ // const mapStateToProps = state => ({ // schedule: state.schedule, diff --git a/src/components/EmailField.js b/src/components/EmailField.js index 6676c1d..36223ce 100644 --- a/src/components/EmailField.js +++ b/src/components/EmailField.js @@ -1,8 +1,7 @@ +import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import React from 'react'; import PropTypes from 'prop-types'; import { View, TextInput } from 'react-native'; -import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; - import styles from '../Styles/GeneralStyles'; const EmailField = props => ( diff --git a/src/components/PasswordField.js b/src/components/PasswordField.js index d02f88f..414d2f5 100644 --- a/src/components/PasswordField.js +++ b/src/components/PasswordField.js @@ -1,8 +1,8 @@ +import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import React from 'react'; import PropTypes from 'prop-types'; import { View, TextInput } from 'react-native'; import styles from '../Styles/GeneralStyles'; -import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; const changePasswordStyleAccordingToInput = (password) => { const passwordRegex = /^(?=.{6,})(?!.*\s).*$/g; diff --git a/src/components/PhoneField.js b/src/components/PhoneField.js index 1e64fca..3d6e80e 100644 --- a/src/components/PhoneField.js +++ b/src/components/PhoneField.js @@ -1,8 +1,8 @@ +import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import React from 'react'; import PropTypes from 'prop-types'; import { View, TextInput } from 'react-native'; import styles from '../Styles/GeneralStyles'; -import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; const validatePhone = (phone, callback) => { const validPhone = phone.replace(/[^0-9]/g, ''); diff --git a/src/screens/InitialScreen.js b/src/screens/InitialScreen.js index 8b2a873..c60c6d8 100644 --- a/src/screens/InitialScreen.js +++ b/src/screens/InitialScreen.js @@ -3,7 +3,6 @@ import { Actions } from 'react-native-router-flux'; import { StyleSheet, Text, View, - Image, ImageBackground, TouchableOpacity } from 'react-native'; diff --git a/src/screens/ProfileInfoScreen.js b/src/screens/ProfileInfoScreen.js index eee261f..3de58d2 100644 --- a/src/screens/ProfileInfoScreen.js +++ b/src/screens/ProfileInfoScreen.js @@ -1,10 +1,10 @@ +import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import React from 'react'; import { Actions } from 'react-native-router-flux'; import PropTypes from 'prop-types'; import { Text, ScrollView, View, BackHandler } from 'react-native'; import Header from '../components/Header'; import Button from '../components/Button'; -import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import { backHandlerPopToMain } from '../NavigationFunctions'; import PROFILE_FIELDS from '../constants/profileInformations'; import styles from '../Styles/ProfileStyles'; diff --git a/src/screens/SchedulingVisit.js b/src/screens/SchedulingVisit.js index f06ddd3..809bec2 100644 --- a/src/screens/SchedulingVisit.js +++ b/src/screens/SchedulingVisit.js @@ -1,3 +1,4 @@ +import EvilIcons from 'react-native-vector-icons/EvilIcons'; import React from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, Text, View, TouchableOpacity, ScrollView, Dimensions, BackHandler, ActivityIndicator, Alert } from 'react-native'; @@ -16,7 +17,6 @@ import { backHandlerPopToMain } from '../NavigationFunctions'; import Header from '../components/Header'; import ShowToast from '../components/Toast'; import { NO_OTHER_COUNSELORS } from '../constants/generalConstants'; -import EvilIcons from 'react-native-vector-icons/EvilIcons'; const { width } = Dimensions.get('window'); diff --git a/src/screens/SearchSchool.js b/src/screens/SearchSchool.js index 61b20f2..3251eeb 100644 --- a/src/screens/SearchSchool.js +++ b/src/screens/SearchSchool.js @@ -1,3 +1,4 @@ +import FontAwesome from 'react-native-vector-icons/FontAwesome'; import { Actions } from 'react-native-router-flux'; import axios from 'axios'; import React from 'react'; @@ -23,7 +24,6 @@ import ShowToast from '../components/Toast'; import SchoolListButton from '../components/SchoolListButton'; import brazilianStates from '../constants/brazilianStates'; import municipalDistricts from '../constants/municipalDistricts'; -import FontAwesome from 'react-native-vector-icons/FontAwesome'; import { SCHOOL_ENDPOINT, diff --git a/src/screens/legislation/MainLegislationScreen.js b/src/screens/legislation/MainLegislationScreen.js index 63ff751..6296a4b 100644 --- a/src/screens/legislation/MainLegislationScreen.js +++ b/src/screens/legislation/MainLegislationScreen.js @@ -1,3 +1,4 @@ +import FontAwesome from 'react-native-vector-icons/FontAwesome'; import React from 'react'; import { StyleSheet, @@ -12,7 +13,6 @@ import { import { Actions } from 'react-native-router-flux'; import Header from '../../components/Header'; import { backHandlerPopToMain } from '../../NavigationFunctions'; -import FontAwesome from 'react-native-vector-icons/FontAwesome'; const styles = StyleSheet.create({ legislationScreen: { diff --git a/src/screens/manageCounselors/ManageAcceptedRegistersScreen.js b/src/screens/manageCounselors/ManageAcceptedRegistersScreen.js index e55193b..fb5943c 100644 --- a/src/screens/manageCounselors/ManageAcceptedRegistersScreen.js +++ b/src/screens/manageCounselors/ManageAcceptedRegistersScreen.js @@ -11,7 +11,7 @@ import PropTypes from 'prop-types'; import { backHandlerPop } from '../../NavigationFunctions'; import stylesList from '../../Styles/ListStyles'; import LoadingIndicator from '../../components/LoadingIndicator'; -import getManagerCounselorData from '../../services/extractDataCounselor'; +import { getManagerCounselorData } from '../../services/extractDataCounselor'; import ScheduleCard from '../../components/ScheduleCard'; import Button from '../../components/Button'; diff --git a/src/screens/manageCounselors/ManageNotAcceptedRegistersScreen.js b/src/screens/manageCounselors/ManageNotAcceptedRegistersScreen.js index 22df087..1318afd 100644 --- a/src/screens/manageCounselors/ManageNotAcceptedRegistersScreen.js +++ b/src/screens/manageCounselors/ManageNotAcceptedRegistersScreen.js @@ -12,7 +12,7 @@ import { backHandlerPop } from '../../NavigationFunctions'; import stylesList from '../../Styles/ListStyles'; import LoadingIndicator from '../../components/LoadingIndicator'; import Button from '../../components/Button'; -import getManagerCounselorData from '../../services/extractDataCounselor'; +import { getManagerCounselorData } from '../../services/extractDataCounselor'; import ScheduleCard from '../../components/ScheduleCard'; const buttonBoxGreen = StyleSheet.create({ diff --git a/src/screens/reports/MainReportsScreen.js b/src/screens/reports/MainReportsScreen.js index 34eb4a9..da18030 100644 --- a/src/screens/reports/MainReportsScreen.js +++ b/src/screens/reports/MainReportsScreen.js @@ -11,6 +11,7 @@ import { Alert, } from 'react-native'; import axios from 'axios'; +import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; import { Actions } from 'react-native-router-flux'; import { logInfo, logWarn } from '../../../logConfig/loggers'; import ShowToast from '../../components/Toast'; @@ -47,7 +48,6 @@ import { convertingJSONToString } from '../../actions/counselorActions'; import { errorGenerator } from '../../actions/schedulingVisitActions'; import Header from '../../components/Header'; import ButtonWithActivityIndicator from '../../components/ButtonWithActivityIndicator'; -import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; const { width } = Dimensions.get('window'); diff --git a/src/screens/scheduleMeeting/ScheduleMeeting.js b/src/screens/scheduleMeeting/ScheduleMeeting.js index 71875e1..9d117a7 100644 --- a/src/screens/scheduleMeeting/ScheduleMeeting.js +++ b/src/screens/scheduleMeeting/ScheduleMeeting.js @@ -1,573 +1,573 @@ -// import React from 'react'; -// import PropTypes from 'prop-types'; -// import openMap from 'react-native-open-maps'; -// import { Alert, StyleSheet, ActivityIndicator, Text, TextInput, View, TouchableOpacity, Dimensions, KeyboardAvoidingView, ScrollView, BackHandler } from 'react-native'; -// import PopupDialog, { -// DialogTitle, -// DialogButton, -// } from 'react-native-popup-dialog'; -// import { EvilIcons } from '@expo/vector-icons'; -// import { Actions } from 'react-native-router-flux'; -// import DatePicker from 'react-native-datepicker'; -// import InvitedCounselorsData from '../../components/InvitedCounselorsData'; -// import Button from '../../components/Button'; -// import { backHandlerPopToMain } from '../../NavigationFunctions'; -// import Header from '../../components/Header'; - - -// const { height } = Dimensions.get('window'); -// const { width } = Dimensions.get('window'); - -// const styles = StyleSheet.create({ - -// principal: { -// flex: 1, -// backgroundColor: 'white', -// }, - -// icon: { -// marginRight: 15, -// }, - -// button: { -// paddingVertical: 15, -// borderWidth: 1, -// borderRadius: 7, -// marginVertical: 10, -// backgroundColor: '#FF9500', -// justifyContent: 'flex-end', -// }, - -// buttonText: { -// textAlign: 'center', -// color: '#FFF', -// }, - -// content: { -// marginBottom: 9, -// flex: 6, -// flexDirection: 'column', -// }, - -// Container: { -// marginTop: 15, -// marginHorizontal: 20, -// }, - -// Picker: { -// marginHorizontal: 15, -// width: '95%', -// }, - -// popUp: { -// flex: 1, -// alignItems: 'center', -// margin: 20, -// }, - -// popUpText: { -// fontSize: 15, -// textAlign: 'justify', -// lineHeight: 20, -// }, - -// textInput: { -// borderWidth: 1, -// borderRadius: 12, -// height: height * 0.25, -// paddingLeft: 10, -// paddingTop: 10, -// fontSize: width * 0.05, -// textAlignVertical: 'top', -// }, - -// textBox: { -// margin: 1.5, -// paddingLeft: 2, -// justifyContent: 'flex-start', -// }, - -// text: { -// fontSize: 15, -// paddingVertical: 3, -// }, - -// textBoxDescription: { -// marginTop: 1, -// paddingLeft: 20, -// paddingRight: 20, -// marginBottom: 15, -// }, - -// textDescription: { -// marginTop: 20, -// marginLeft: 25, -// fontSize: 15, -// }, - -// listRegisters: { -// marginHorizontal: 10, -// marginVertical: 5, -// borderColor: 'black', -// borderWidth: 1.5, -// borderRadius: 7, -// backgroundColor: '#FAFAFA', -// justifyContent: 'space-between', -// }, - -// invitedList: { -// borderColor: 'black', -// height: 250, -// borderWidth: 1.5, -// padding: 1, -// marginHorizontal: 20, -// borderRadius: 5, -// }, - -// dialogButtonStyle: { -// marginVertical: -16, -// }, - -// footerPopUp: { -// backgroundColor: '#F9F9FB', -// borderColor: '#DAD9DC', -// borderTopWidth: 0.5, -// borderBottomLeftRadius: 8, -// borderBottomRightRadius: 8, -// flexDirection: 'row', -// alignItems: 'center', -// justifyContent: 'center', -// }, - -// TopListText: { -// fontSize: 20, -// textAlign: 'center', -// marginVertical: 8, -// }, - -// InputFieldStyle: { -// marginHorizontal: 65, -// marginLeft: 35, -// paddingVertical: 8, -// marginTop: 1, -// backgroundColor: '#FAFAFA', -// flexDirection: 'row', -// justifyContent: 'center', -// alignItems: 'center', -// borderRadius: 7, -// marginBottom: 10, -// borderWidth: 1, -// borderColor: 'gray', -// }, -// textLogo: { -// fontSize: width * 0.08, -// color: 'white', -// fontWeight: 'bold', -// marginTop: 10, -// marginLeft: 60, -// }, -// wrapper: { -// height: 100, -// flexDirection: 'row', -// paddingTop: 10, -// paddingBottom: 10, -// backgroundColor: '#FF9500', -// borderBottomColor: 'black', -// borderBottomWidth: 1, -// alignItems: 'center', -// }, -// icon_header: { -// marginLeft: 20, -// }, -// loading: { -// marginTop: 50, -// paddingVertical: 13, -// }, - -// }); - -// export default class ScheduleMeeting extends React.Component { -// constructor(props) { -// super(props); -// this.state = { -// enabled: true, -// appToken: this.props.counselor.token, -// nuvemCode: this.props.counselor.nuvemCode, -// codGrupoDestino: this.props.counselor.profile.codGroup, -// meeting: { -// lat: this.props.scheduleMeeting.meetingLatitude, -// long: this.props.scheduleMeeting.meetingLongitude, -// date: '', -// time: '', -// meetingListOfInvitees: this.props.meetingListOfInvitees, -// meetingDescription: '', -// }, -// }; -// } - -// componentWillMount() { -// BackHandler.addEventListener('hardwareBackPress', backHandlerPopToMain); -// } - -// componentWillUnmount() { -// BackHandler.removeEventListener('hardwareBackPress', backHandlerPopToMain); -// } - -// getCounselorFromGroup() { -// this.props.asyncGetCounselorFromGroup(this.props.counselor.profile.CAE, -// this.props.counselor.profile.cpf); -// } - -// changeStyleAccordingToInput(counselor) { -// if -// (this.props.meetingListOfInviteesWithCounselorInformations[counselor.nuvemCode] !== undefined) { -// return [styles.listRegisters, { borderColor: '#FF9500' }]; -// } -// return styles.listRegisters; -// } - -// cancelInviteList() { -// const meetingNewLists = { -// meetingNewListWithInformations: {}, -// meetingNewList: {}, -// }; - -// this.props.setMeetingNewLists(meetingNewLists); - -// this.popupDialogCounselor.dismiss(); -// } - -// manageInvitedListState(counselor) { -// const meetingNewLists = { -// meetingNewListWithInformations: this.props.meetingListOfInviteesWithCounselorInformations, -// meetingNewList: this.state.meeting.meetingListOfInvitees, -// }; -// // If the counselor is not at the list (undefined), -// // we will add him to the list, where its key is the counselor's nuvemCode -// if (meetingNewLists.meetingNewListWithInformations[counselor.nuvemCode] === undefined) { -// meetingNewLists.meetingNewListWithInformations[counselor.nuvemCode] = counselor; -// meetingNewLists.meetingNewList[counselor.nuvemCode] = { -// nuvemCode: counselor.nuvemCode, -// confirmed: false, -// }; -// this.props.setMeetingNewLists(meetingNewLists); -// } else { -// delete meetingNewLists.meetingNewListWithInformations[counselor.nuvemCode]; -// delete meetingNewLists.meetingNewList[counselor.nuvemCode]; -// this.props.setMeetingNewLists(meetingNewLists); -// } -// this.forceUpdate(); -// } - -// deleteSpecificCounselor(counselorNuvemCode) { -// const meetingNewLists = { -// meetingNewListWithInformations: this.props.meetingListOfInviteesWithCounselorInformations, -// meetingNewList: this.state.meeting.meetingListOfInvitees, -// }; - -// delete meetingNewLists.meetingNewListWithInformations[counselorNuvemCode]; -// delete meetingNewLists.meetingNewList[counselorNuvemCode]; - -// this.props.setMeetingNewLists(meetingNewLists); - -// this.forceUpdate(); -// } - -// showInvitedList() { -// // Check if the Object is empty -// if (Object.keys(this.props.meetingListOfInviteesWithCounselorInformations) -// .length !== 0) { -// return ( -// -// Lista de conselheiros convidados -// -// this.setState({ enabled: false })} -// onTouchEnd={() => this.setState({ enabled: true })} -// onScrollBeginDrag={() => this.setState({ enabled: false })} -// onScrollEndDrag={() => this.setState({ enabled: true })} -// > -// { -// Object.entries(this.props.meetingListOfInviteesWithCounselorInformations) -// .map(counselor => ( -// -// -// this.deleteSpecificCounselor(counselor[0])} -// > -// -// -// -// )) -// } -// -// -// -// ); -// } -// return null; -// } - -// buttonActivation() { -// if (this.state.meeting.date !== '' && this.state.meeting.lat !== null -// && Object.keys(this.state.meeting.meetingListOfInvitees).length !== 0 -// && this.state.meeting.long !== null && this.state.meeting.time !== '') { -// if (this.props.isLoading) { -// return ( -// -// ); -// } -// return ( -//