This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { connect } from 'react-redux'; | |
| import { StyleSheet, View } from 'react-native'; | |
| import FitImage from 'react-native-fit-image'; | |
| import { | |
| Container, | |
| Footer, | |
| FooterTab, | |
| Content, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { call, put, select, take, fork, all, takeLatest } from 'redux-saga/effects'; | |
| import axios from 'axios'; | |
| import querystring from 'query-string'; | |
| import Config from 'react-native-config'; | |
| import { | |
| REQUEST_ADMIN_ATTACHED_FACILITIES, | |
| netWorkError, | |
| responseAdminAttachedFacilities, | |
| showLoading, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { RESPONSE_ADMIN_ATTACHED_FACILITIES, ERROR } from '../actions/pickFacility'; | |
| const initialState = { | |
| attachedFacilities: [], | |
| msg: false, | |
| isLoading: false, | |
| }; | |
| export default (state = initialState, action) => { | |
| switch (action.type) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | export const RESPONSE_ADMIN_ATTACHED_FACILITIES = 'RESPONSE_ADMIN_ATTACHED_FACILITIES'; | |
| export const ERROR = 'ERROR'; | |
| export const REQUEST_ATTACHED_FACILITIES = 'REQUEST_ATTACHED_FACILITIES'; | |
| export const responseAdminAttachedFacilities = data => ({ | |
| type: RESPONSE_ADMIN_ATTACHED_FACILITIES, | |
| attachedFacilities: data.attachedFacilities, | |
| }); | |
| export const errorFetchFacilties = () => ({ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { call, put, select, take, fork, all, takeLatest } from 'redux-saga/effects'; | |
| import axios from 'axios'; | |
| import querystring from 'query-string'; | |
| import Config from 'react-native-config'; | |
| import { | |
| REQUEST_ATTACHED_FACILITIES, | |
| responseAdminAttachedFacilities, | |
| errorFetchFacilties, | |
| } from '../../../actions/pickFacility'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | render() { | |
| console.log(`i am in the render method with this.props.PickFacility.msg ${this.props.PickFacility.msg}`); | |
| const displayView = this.props.PickFacility.msg ? ( | |
| <View | |
| style={{ | |
| flex: 1, | |
| alignSelf: 'center', | |
| marginTop: '50%', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import { | |
| RESPONSE_ADMIN_ATTACHED_FACILITIES, | |
| ERROR, | |
| REQUEST_ATTACHED_ENTITIES_STARTED, | |
| } from '../actions/pickFacility'; | |
| const initialState = { | |
| attachedFacilities: [], | |
| msg: false, | |
| isLoading: true, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -------------- REDUCER ----------------------- | |
| import { RESPONSE_ADMIN_ATTACHED_FACILITIES, ERROR, RESET_DATA } from '../actions/pickFacility'; | |
| const initialState = { | |
| isLoading: true, | |
| msg: null, | |
| attachedFacilities: [], | |
| }; | |
| export default (state = initialState, action) => { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { connect } from 'react-redux'; | |
| import { StyleSheet, View, FlatList } from 'react-native'; | |
| import Icon from 'react-native-vector-icons/FontAwesome'; | |
| import { List, ListItem, SearchBar } from 'react-native-elements'; | |
| import { Container, Content, Text, Button, Label } from 'native-base'; | |
| import Spinner from 'react-native-loading-spinner-overlay'; | |
| import { requestAttachedFacilities } from '../actions/pickFacility'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { Component } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { connect } from 'react-redux'; | |
| import { StyleSheet, View, FlatList } from 'react-native'; | |
| import Icon from 'react-native-vector-icons/FontAwesome'; | |
| import { List, ListItem, SearchBar } from 'react-native-elements'; | |
| import { Container, Content, Text, Button, Label } from 'native-base'; | |
| import Spinner from 'react-native-loading-spinner-overlay'; | |
| import { requestAttachedFacilities } from '../actions/pickFacility'; | 
OlderNewer