Sfoglia il codice sorgente

Added search screen and linked it with calendar screen

eduardo-santin 3 anni fa
parent
commit
8eee6cec38
7 ha cambiato i file con 636 aggiunte e 8 eliminazioni
  1. 13
    5
      App.js
  2. 339
    0
      package-lock.json
  3. 2
    0
      package.json
  4. 4
    2
      screens/main/Calendar.js
  5. 1
    1
      screens/main/Home_page.js
  6. 274
    0
      screens/main/Search.js
  7. 3
    0
      screens/main/StateTime.js

+ 13
- 5
App.js Vedi File

@@ -13,12 +13,15 @@ import MailScreen from './screens/MailScreen';
13 13
 import RegisterScreen from './screens/auth/RegisterScreen';
14 14
 //import LoginScreen from './screens/LoginScreen';
15 15
 import LoginScreen from './screens/auth/LoginScreen';
16
-import HomeScreen from './screens/HomeScreen';
16
+// import HomeScreen from './screens/HomeScreen';
17 17
 //import Loading from './components/Loading';
18 18
 import Loading from './screens/main/Loading';
19 19
 import { firebaseConfig } from './config/firebaseConfig';
20 20
 import rootReducer from './redux/reducers'
21
-
21
+import HomeScreen from './screens/main/Home_page';
22
+import Calendario from './screens/main/Calendar';
23
+import Time from './screens/main/StateTime';
24
+import Search from './screens/main/Search';
22 25
 
23 26
 
24 27
 if (firebase.apps.length === 0) {
@@ -85,11 +88,16 @@ export default class App extends Component {
85 88
     return(
86 89
       <Provider store={store}>
87 90
         <NavigationContainer>
88
-          <Drawer.Navigator>
89
-            <Drawer.Screen name={" "} options={{drawerLabel: "Home", headerTransparent: true}} children={this.createHomeStack}/>
90
-          </Drawer.Navigator>
91
+          <Stack.Navigator initialRouteName="Home">
92
+            <Stack.Screen name="Home" options={{headerTransparent: true, headerTitle: " "}} component={HomeScreen} />
93
+            <Stack.Screen name="Calendar"  component={Calendario}/>
94
+            <Stack.Screen name = "StateTime" component={Time}/>
95
+            <Stack.Screen name = "Search" component={Search}/>
96
+          </Stack.Navigator>
91 97
         </NavigationContainer>
92 98
       </Provider>
99
+
100
+
93 101
     );
94 102
   }
95 103
 }

+ 339
- 0
package-lock.json Vedi File

@@ -15,7 +15,9 @@
15 15
         "react": "16.13.1",
16 16
         "react-dom": "16.13.1",
17 17
         "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
18
+        "react-native-calendars": "^1.1268.0",
18 19
         "react-native-gifted-chat": "^0.16.3",
20
+        "react-native-multi-selectbox": "^1.5.0",
19 21
         "react-native-paper": "^4.9.2",
20 22
         "react-native-web": "~0.13.12",
21 23
         "react-redux": "^7.2.5",
@@ -4042,6 +4044,12 @@
4042 4044
       "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz",
4043 4045
       "integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q=="
4044 4046
     },
4047
+    "node_modules/boolbase": {
4048
+      "version": "1.0.0",
4049
+      "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
4050
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
4051
+      "peer": true
4052
+    },
4045 4053
     "node_modules/bplist-creator": {
4046 4054
       "version": "0.0.8",
4047 4055
       "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
@@ -4725,6 +4733,52 @@
4725 4733
         "isobject": "^3.0.1"
4726 4734
       }
4727 4735
     },
4736
+    "node_modules/css-select": {
4737
+      "version": "2.1.0",
4738
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
4739
+      "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
4740
+      "peer": true,
4741
+      "dependencies": {
4742
+        "boolbase": "^1.0.0",
4743
+        "css-what": "^3.2.1",
4744
+        "domutils": "^1.7.0",
4745
+        "nth-check": "^1.0.2"
4746
+      }
4747
+    },
4748
+    "node_modules/css-tree": {
4749
+      "version": "1.1.3",
4750
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
4751
+      "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
4752
+      "peer": true,
4753
+      "dependencies": {
4754
+        "mdn-data": "2.0.14",
4755
+        "source-map": "^0.6.1"
4756
+      },
4757
+      "engines": {
4758
+        "node": ">=8.0.0"
4759
+      }
4760
+    },
4761
+    "node_modules/css-tree/node_modules/source-map": {
4762
+      "version": "0.6.1",
4763
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
4764
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
4765
+      "peer": true,
4766
+      "engines": {
4767
+        "node": ">=0.10.0"
4768
+      }
4769
+    },
4770
+    "node_modules/css-what": {
4771
+      "version": "3.4.2",
4772
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
4773
+      "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
4774
+      "peer": true,
4775
+      "engines": {
4776
+        "node": ">= 6"
4777
+      },
4778
+      "funding": {
4779
+        "url": "https://github.com/sponsors/fb55"
4780
+      }
4781
+    },
4728 4782
     "node_modules/csstype": {
4729 4783
       "version": "3.0.9",
4730 4784
       "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz",
@@ -4836,6 +4890,28 @@
4836 4890
       "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
4837 4891
       "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
4838 4892
     },
4893
+    "node_modules/dom-serializer": {
4894
+      "version": "0.2.2",
4895
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
4896
+      "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
4897
+      "peer": true,
4898
+      "dependencies": {
4899
+        "domelementtype": "^2.0.1",
4900
+        "entities": "^2.0.0"
4901
+      }
4902
+    },
4903
+    "node_modules/dom-serializer/node_modules/domelementtype": {
4904
+      "version": "2.2.0",
4905
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
4906
+      "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
4907
+      "funding": [
4908
+        {
4909
+          "type": "github",
4910
+          "url": "https://github.com/sponsors/fb55"
4911
+        }
4912
+      ],
4913
+      "peer": true
4914
+    },
4839 4915
     "node_modules/dom-storage": {
4840 4916
       "version": "2.1.0",
4841 4917
       "resolved": "https://registry.npmjs.org/dom-storage/-/dom-storage-2.1.0.tgz",
@@ -4844,6 +4920,22 @@
4844 4920
         "node": "*"
4845 4921
       }
4846 4922
     },
4923
+    "node_modules/domelementtype": {
4924
+      "version": "1.3.1",
4925
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
4926
+      "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
4927
+      "peer": true
4928
+    },
4929
+    "node_modules/domutils": {
4930
+      "version": "1.7.0",
4931
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
4932
+      "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
4933
+      "peer": true,
4934
+      "dependencies": {
4935
+        "dom-serializer": "0",
4936
+        "domelementtype": "1"
4937
+      }
4938
+    },
4847 4939
     "node_modules/ee-first": {
4848 4940
       "version": "1.1.1",
4849 4941
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -4883,6 +4975,15 @@
4883 4975
         "once": "^1.4.0"
4884 4976
       }
4885 4977
     },
4978
+    "node_modules/entities": {
4979
+      "version": "2.2.0",
4980
+      "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
4981
+      "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
4982
+      "peer": true,
4983
+      "funding": {
4984
+        "url": "https://github.com/fb55/entities?sponsor=1"
4985
+      }
4986
+    },
4886 4987
     "node_modules/envinfo": {
4887 4988
       "version": "7.8.1",
4888 4989
       "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
@@ -6294,6 +6395,11 @@
6294 6395
         "node": ">=4.0"
6295 6396
       }
6296 6397
     },
6398
+    "node_modules/immutable": {
6399
+      "version": "4.0.0",
6400
+      "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz",
6401
+      "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw=="
6402
+    },
6297 6403
     "node_modules/import-fresh": {
6298 6404
       "version": "2.0.0",
6299 6405
       "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
@@ -7561,6 +7667,17 @@
7561 7667
         "node": ">=0.10"
7562 7668
       }
7563 7669
     },
7670
+    "node_modules/mdn-data": {
7671
+      "version": "2.0.14",
7672
+      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
7673
+      "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
7674
+      "peer": true
7675
+    },
7676
+    "node_modules/memoize-one": {
7677
+      "version": "5.2.1",
7678
+      "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
7679
+      "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
7680
+    },
7564 7681
     "node_modules/merge-stream": {
7565 7682
       "version": "1.0.1",
7566 7683
       "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
@@ -8351,6 +8468,15 @@
8351 8468
       "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==",
8352 8469
       "peer": true
8353 8470
     },
8471
+    "node_modules/moment": {
8472
+      "version": "2.29.1",
8473
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
8474
+      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
8475
+      "optional": true,
8476
+      "engines": {
8477
+        "node": "*"
8478
+      }
8479
+    },
8354 8480
     "node_modules/ms": {
8355 8481
       "version": "2.1.2",
8356 8482
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -8521,6 +8647,15 @@
8521 8647
         "node": ">=4"
8522 8648
       }
8523 8649
     },
8650
+    "node_modules/nth-check": {
8651
+      "version": "1.0.2",
8652
+      "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
8653
+      "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
8654
+      "peer": true,
8655
+      "dependencies": {
8656
+        "boolbase": "~1.0.0"
8657
+      }
8658
+    },
8524 8659
     "node_modules/nullthrows": {
8525 8660
       "version": "1.1.1",
8526 8661
       "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz",
@@ -9305,6 +9440,23 @@
9305 9440
         "react": "16.13.1"
9306 9441
       }
9307 9442
     },
9443
+    "node_modules/react-native-calendars": {
9444
+      "version": "1.1268.0",
9445
+      "resolved": "https://registry.npmjs.org/react-native-calendars/-/react-native-calendars-1.1268.0.tgz",
9446
+      "integrity": "sha512-aot8/D4zvLUcqOvfo4kZk5IS6gkpT+Ew37Ez035OI8EDx1GDJxkqfO44Nhai1yLnIuvuOfbSIuOD4lJNn8A7hw==",
9447
+      "dependencies": {
9448
+        "hoist-non-react-statics": "^3.3.1",
9449
+        "immutable": "^4.0.0-rc.12",
9450
+        "lodash": "^4.17.15",
9451
+        "memoize-one": "^5.2.1",
9452
+        "prop-types": "^15.5.10",
9453
+        "react-native-swipe-gestures": "^1.0.5",
9454
+        "xdate": "^0.8.0"
9455
+      },
9456
+      "optionalDependencies": {
9457
+        "moment": "^2.24.0"
9458
+      }
9459
+    },
9308 9460
     "node_modules/react-native-communications": {
9309 9461
       "version": "2.2.1",
9310 9462
       "resolved": "https://registry.npmjs.org/react-native-communications/-/react-native-communications-2.2.1.tgz",
@@ -9409,6 +9561,15 @@
9409 9561
         "prop-types": "^15.7.2"
9410 9562
       }
9411 9563
     },
9564
+    "node_modules/react-native-multi-selectbox": {
9565
+      "version": "1.5.0",
9566
+      "resolved": "https://registry.npmjs.org/react-native-multi-selectbox/-/react-native-multi-selectbox-1.5.0.tgz",
9567
+      "integrity": "sha512-yRxV8PPD0TIRoXK4WduHcADzroB2UWGbJIlKEGkvz8sPPs80o8wdJDthuqbvO7U6rIP2ABb/TRaJAFAxFTi8jw==",
9568
+      "peerDependencies": {
9569
+        "lodash": "^4.17.19",
9570
+        "react-native-svg": "^12.1.0"
9571
+      }
9572
+    },
9412 9573
     "node_modules/react-native-paper": {
9413 9574
       "version": "4.9.2",
9414 9575
       "resolved": "https://registry.npmjs.org/react-native-paper/-/react-native-paper-4.9.2.tgz",
@@ -9499,6 +9660,25 @@
9499 9660
         "react-native": "*"
9500 9661
       }
9501 9662
     },
9663
+    "node_modules/react-native-svg": {
9664
+      "version": "12.1.1",
9665
+      "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz",
9666
+      "integrity": "sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q==",
9667
+      "peer": true,
9668
+      "dependencies": {
9669
+        "css-select": "^2.1.0",
9670
+        "css-tree": "^1.0.0-alpha.39"
9671
+      },
9672
+      "peerDependencies": {
9673
+        "react": "*",
9674
+        "react-native": ">=0.50.0"
9675
+      }
9676
+    },
9677
+    "node_modules/react-native-swipe-gestures": {
9678
+      "version": "1.0.5",
9679
+      "resolved": "https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.5.tgz",
9680
+      "integrity": "sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw=="
9681
+    },
9502 9682
     "node_modules/react-native-vector-icons": {
9503 9683
       "version": "8.1.0",
9504 9684
       "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-8.1.0.tgz",
@@ -11917,6 +12097,11 @@
11917 12097
         "uuid": "dist/bin/uuid"
11918 12098
       }
11919 12099
     },
12100
+    "node_modules/xdate": {
12101
+      "version": "0.8.2",
12102
+      "resolved": "https://registry.npmjs.org/xdate/-/xdate-0.8.2.tgz",
12103
+      "integrity": "sha1-17AzwASF0CaVuvAET06s2j/JYaM="
12104
+    },
11920 12105
     "node_modules/xml2js": {
11921 12106
       "version": "0.4.23",
11922 12107
       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
@@ -15097,6 +15282,12 @@
15097 15282
       "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz",
15098 15283
       "integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q=="
15099 15284
     },
15285
+    "boolbase": {
15286
+      "version": "1.0.0",
15287
+      "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
15288
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
15289
+      "peer": true
15290
+    },
15100 15291
     "bplist-creator": {
15101 15292
       "version": "0.0.8",
15102 15293
       "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
@@ -15659,6 +15850,42 @@
15659 15850
         "isobject": "^3.0.1"
15660 15851
       }
15661 15852
     },
15853
+    "css-select": {
15854
+      "version": "2.1.0",
15855
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
15856
+      "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
15857
+      "peer": true,
15858
+      "requires": {
15859
+        "boolbase": "^1.0.0",
15860
+        "css-what": "^3.2.1",
15861
+        "domutils": "^1.7.0",
15862
+        "nth-check": "^1.0.2"
15863
+      }
15864
+    },
15865
+    "css-tree": {
15866
+      "version": "1.1.3",
15867
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
15868
+      "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
15869
+      "peer": true,
15870
+      "requires": {
15871
+        "mdn-data": "2.0.14",
15872
+        "source-map": "^0.6.1"
15873
+      },
15874
+      "dependencies": {
15875
+        "source-map": {
15876
+          "version": "0.6.1",
15877
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
15878
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
15879
+          "peer": true
15880
+        }
15881
+      }
15882
+    },
15883
+    "css-what": {
15884
+      "version": "3.4.2",
15885
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
15886
+      "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
15887
+      "peer": true
15888
+    },
15662 15889
     "csstype": {
15663 15890
       "version": "3.0.9",
15664 15891
       "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz",
@@ -15740,11 +15967,45 @@
15740 15967
       "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
15741 15968
       "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
15742 15969
     },
15970
+    "dom-serializer": {
15971
+      "version": "0.2.2",
15972
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
15973
+      "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
15974
+      "peer": true,
15975
+      "requires": {
15976
+        "domelementtype": "^2.0.1",
15977
+        "entities": "^2.0.0"
15978
+      },
15979
+      "dependencies": {
15980
+        "domelementtype": {
15981
+          "version": "2.2.0",
15982
+          "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
15983
+          "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
15984
+          "peer": true
15985
+        }
15986
+      }
15987
+    },
15743 15988
     "dom-storage": {
15744 15989
       "version": "2.1.0",
15745 15990
       "resolved": "https://registry.npmjs.org/dom-storage/-/dom-storage-2.1.0.tgz",
15746 15991
       "integrity": "sha512-g6RpyWXzl0RR6OTElHKBl7nwnK87GUyZMYC7JWsB/IA73vpqK2K6LT39x4VepLxlSsWBFrPVLnsSR5Jyty0+2Q=="
15747 15992
     },
15993
+    "domelementtype": {
15994
+      "version": "1.3.1",
15995
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
15996
+      "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
15997
+      "peer": true
15998
+    },
15999
+    "domutils": {
16000
+      "version": "1.7.0",
16001
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
16002
+      "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
16003
+      "peer": true,
16004
+      "requires": {
16005
+        "dom-serializer": "0",
16006
+        "domelementtype": "1"
16007
+      }
16008
+    },
15748 16009
     "ee-first": {
15749 16010
       "version": "1.1.1",
15750 16011
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -15781,6 +16042,12 @@
15781 16042
         "once": "^1.4.0"
15782 16043
       }
15783 16044
     },
16045
+    "entities": {
16046
+      "version": "2.2.0",
16047
+      "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
16048
+      "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
16049
+      "peer": true
16050
+    },
15784 16051
     "envinfo": {
15785 16052
       "version": "7.8.1",
15786 16053
       "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
@@ -16938,6 +17205,11 @@
16938 17205
       "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.6.3.tgz",
16939 17206
       "integrity": "sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA=="
16940 17207
     },
17208
+    "immutable": {
17209
+      "version": "4.0.0",
17210
+      "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz",
17211
+      "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw=="
17212
+    },
16941 17213
     "import-fresh": {
16942 17214
       "version": "2.0.0",
16943 17215
       "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
@@ -17964,6 +18236,17 @@
17964 18236
         "buffer-alloc": "^1.1.0"
17965 18237
       }
17966 18238
     },
18239
+    "mdn-data": {
18240
+      "version": "2.0.14",
18241
+      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
18242
+      "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
18243
+      "peer": true
18244
+    },
18245
+    "memoize-one": {
18246
+      "version": "5.2.1",
18247
+      "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
18248
+      "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
18249
+    },
17967 18250
     "merge-stream": {
17968 18251
       "version": "1.0.1",
17969 18252
       "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz",
@@ -18638,6 +18921,12 @@
18638 18921
       "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==",
18639 18922
       "peer": true
18640 18923
     },
18924
+    "moment": {
18925
+      "version": "2.29.1",
18926
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
18927
+      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
18928
+      "optional": true
18929
+    },
18641 18930
     "ms": {
18642 18931
       "version": "2.1.2",
18643 18932
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -18773,6 +19062,15 @@
18773 19062
         "path-key": "^2.0.0"
18774 19063
       }
18775 19064
     },
19065
+    "nth-check": {
19066
+      "version": "1.0.2",
19067
+      "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
19068
+      "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
19069
+      "peer": true,
19070
+      "requires": {
19071
+        "boolbase": "~1.0.0"
19072
+      }
19073
+    },
18776 19074
     "nullthrows": {
18777 19075
       "version": "1.1.1",
18778 19076
       "resolved": "https://registry.npmjs.org/nullthrows/-/nullthrows-1.1.1.tgz",
@@ -19638,6 +19936,21 @@
19638 19936
         }
19639 19937
       }
19640 19938
     },
19939
+    "react-native-calendars": {
19940
+      "version": "1.1268.0",
19941
+      "resolved": "https://registry.npmjs.org/react-native-calendars/-/react-native-calendars-1.1268.0.tgz",
19942
+      "integrity": "sha512-aot8/D4zvLUcqOvfo4kZk5IS6gkpT+Ew37Ez035OI8EDx1GDJxkqfO44Nhai1yLnIuvuOfbSIuOD4lJNn8A7hw==",
19943
+      "requires": {
19944
+        "hoist-non-react-statics": "^3.3.1",
19945
+        "immutable": "^4.0.0-rc.12",
19946
+        "lodash": "^4.17.15",
19947
+        "memoize-one": "^5.2.1",
19948
+        "moment": "^2.24.0",
19949
+        "prop-types": "^15.5.10",
19950
+        "react-native-swipe-gestures": "^1.0.5",
19951
+        "xdate": "^0.8.0"
19952
+      }
19953
+    },
19641 19954
     "react-native-communications": {
19642 19955
       "version": "2.2.1",
19643 19956
       "resolved": "https://registry.npmjs.org/react-native-communications/-/react-native-communications-2.2.1.tgz",
@@ -19728,6 +20041,12 @@
19728 20041
         "prop-types": "^15.7.2"
19729 20042
       }
19730 20043
     },
20044
+    "react-native-multi-selectbox": {
20045
+      "version": "1.5.0",
20046
+      "resolved": "https://registry.npmjs.org/react-native-multi-selectbox/-/react-native-multi-selectbox-1.5.0.tgz",
20047
+      "integrity": "sha512-yRxV8PPD0TIRoXK4WduHcADzroB2UWGbJIlKEGkvz8sPPs80o8wdJDthuqbvO7U6rIP2ABb/TRaJAFAxFTi8jw==",
20048
+      "requires": {}
20049
+    },
19731 20050
     "react-native-paper": {
19732 20051
       "version": "4.9.2",
19733 20052
       "resolved": "https://registry.npmjs.org/react-native-paper/-/react-native-paper-4.9.2.tgz",
@@ -19800,6 +20119,21 @@
19800 20119
         "warn-once": "^0.1.0"
19801 20120
       }
19802 20121
     },
20122
+    "react-native-svg": {
20123
+      "version": "12.1.1",
20124
+      "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz",
20125
+      "integrity": "sha512-NIAJ8jCnXGCqGWXkkJ1GTzO4a3Md5at5sagYV8Vh4MXYnL4z5Rh428Wahjhh+LIjx40EE5xM5YtwyJBqOIba2Q==",
20126
+      "peer": true,
20127
+      "requires": {
20128
+        "css-select": "^2.1.0",
20129
+        "css-tree": "^1.0.0-alpha.39"
20130
+      }
20131
+    },
20132
+    "react-native-swipe-gestures": {
20133
+      "version": "1.0.5",
20134
+      "resolved": "https://registry.npmjs.org/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.5.tgz",
20135
+      "integrity": "sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw=="
20136
+    },
19803 20137
     "react-native-vector-icons": {
19804 20138
       "version": "8.1.0",
19805 20139
       "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-8.1.0.tgz",
@@ -21442,6 +21776,11 @@
21442 21776
         }
21443 21777
       }
21444 21778
     },
21779
+    "xdate": {
21780
+      "version": "0.8.2",
21781
+      "resolved": "https://registry.npmjs.org/xdate/-/xdate-0.8.2.tgz",
21782
+      "integrity": "sha1-17AzwASF0CaVuvAET06s2j/JYaM="
21783
+    },
21445 21784
     "xml2js": {
21446 21785
       "version": "0.4.23",
21447 21786
       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",

+ 2
- 0
package.json Vedi File

@@ -18,7 +18,9 @@
18 18
     "react": "16.13.1",
19 19
     "react-dom": "16.13.1",
20 20
     "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
21
+    "react-native-calendars": "^1.1268.0",
21 22
     "react-native-gifted-chat": "^0.16.3",
23
+    "react-native-multi-selectbox": "^1.5.0",
22 24
     "react-native-paper": "^4.9.2",
23 25
     "react-native-web": "~0.13.12",
24 26
     "react-redux": "^7.2.5",

+ 4
- 2
screens/main/Calendar.js Vedi File

@@ -4,7 +4,7 @@ import {
4 4
   Text,
5 5
   View
6 6
 } from 'react-native';
7
-import CalendarPicker from 'react-native-calendar-picker';
7
+//import CalendarPicker from 'react-native-calendar-picker';
8 8
 import {Calendar, CalendarList} from 'react-native-calendars';
9 9
 
10 10
 
@@ -13,6 +13,7 @@ export default class Calendario extends Component {
13 13
     super(props);
14 14
     this.state = {
15 15
       selectedStartDate: null,
16
+      interpreter_id : this.props.route.params.Intereprete_id,
16 17
     };
17 18
     this.onDayPress = this.onDayPress.bind(this);
18 19
     
@@ -23,13 +24,14 @@ export default class Calendario extends Component {
23 24
       selectedStartDate: date,
24 25
     });
25 26
 
26
-    this.props.navigation.navigate('StateTime', {Appointment_Date: date});
27
+    this.props.navigation.navigate('StateTime', {Appointment_Date: date, int_id : this.state.interpreter_id});
27 28
   }
28 29
   
29 30
   render() {
30 31
     const { selectedStartDate } = this.state;
31 32
     const today = new Date();
32 33
     const appointment = selectedStartDate ? selectedStartDate.toString() : '';
34
+    console.log(this.props.route.params)
33 35
     return (
34 36
       <View style={styles.container}>
35 37
         <Calendar

+ 1
- 1
screens/main/Home_page.js Vedi File

@@ -94,7 +94,7 @@ export function Home_page({navigation}) {
94 94
       />
95 95
       <Button
96 96
         title ='Hacer Busqueda'
97
-        onPress= {() => navigation.navigate('Busqueda')}
97
+        onPress= {() => navigation.navigate('Search')}
98 98
       />
99 99
         </ImageBackground>
100 100
     );

+ 274
- 0
screens/main/Search.js Vedi File

@@ -0,0 +1,274 @@
1
+import React, { useState } from 'react'
2
+import { Text, View,  StyleSheet, FlatList, TouchableOpacity } from 'react-native'
3
+import SelectBox from 'react-native-multi-selectbox'
4
+import { xorBy } from 'lodash'
5
+import firebase from 'firebase'
6
+import { firebaseConfig } from '../../config/firebaseConfig'
7
+  
8
+
9
+if (firebase.apps.length === 0) {
10
+  firebase.initializeApp(firebaseConfig)
11
+}
12
+
13
+require('firebase/firestore')
14
+// Options data must contain 'item' & 'id' keys
15
+
16
+const Tags = [
17
+  {
18
+    item: 'Presencial',
19
+    id: 'PL',
20
+  },
21
+  {
22
+    item: 'Online',
23
+    id: 'ON',
24
+  },
25
+  {
26
+    item: 'Individual',
27
+    id: 'IL',
28
+  },
29
+  {
30
+    item: 'Grupal',
31
+    id: 'GL',
32
+  },
33
+  {
34
+    item: 'Esp',
35
+    id: 'ESP',
36
+  },
37
+  {
38
+    item: 'Ing',
39
+    id: 'ING',
40
+  }
41
+
42
+]
43
+
44
+
45
+const Days = [
46
+  {
47
+    item: 'Lunes',
48
+    id: 'L',
49
+  },
50
+  {
51
+    item: 'Martes',
52
+    id: 'M',
53
+  },
54
+  {
55
+    item: 'Miercoles',
56
+    id: 'W',
57
+  },
58
+  {
59
+    item: 'Jueves',
60
+    id: 'J',
61
+  },
62
+  {
63
+    item: 'Viernes',
64
+    id: 'V',
65
+  },
66
+  {
67
+    item: 'Sabado',
68
+    id: 'S',
69
+  },
70
+  {
71
+    item: 'Domingo',
72
+    id: 'D',
73
+  },
74
+  {
75
+    item: 'Feriados',
76
+    id: 'F',
77
+  }
78
+]
79
+
80
+
81
+
82
+function Search({ navigation }) {
83
+
84
+  
85
+  const [users, setUsers] = useState([])
86
+  const [selectedTags, setSelectedTags] = useState([])
87
+  const [selectedDays, setSelectedDays] = useState([])
88
+
89
+  
90
+  const fetchUsers = (tags, days) => {
91
+    
92
+    //if the array that have the interpreter tags
93
+    //and the day tags are empty we dont send the query seeing as the user
94
+    //is not searching for anything yet 
95
+    if (tags.length === 0 && days.length === 0) {
96
+      return
97
+    }
98
+
99
+    //reset the users usestate to empty
100
+    const users = []
101
+    
102
+    
103
+
104
+    const db = firebase.firestore()
105
+    var query = db.collection('Interprete')
106
+    
107
+    for (let i = 0; i < tags.length; i++) {
108
+      //check which tags where called in the search 
109
+      if (tags[i].id === 'PL') {
110
+        console.log('Presencial')
111
+        query = query.where('Modalidad.Presencial', '==', true)
112
+      }
113
+      if (tags[i] == 'OL') {
114
+        query = query.where('Modalidad.Online', '==', true)
115
+      }
116
+      if (tags[i] == 'IL') {
117
+        query = query.where('Cantidad.Individual', '==', true)
118
+      }
119
+      if (tags[i] == 'GL') {
120
+        query = query.where('Cantidad.Grupal', '==', true)
121
+      }
122
+      if (tags[i] == 'ESP') {
123
+        query = query.where('Lenguaje.Esp', '==', true)
124
+      }
125
+      if (tags[i] == 'ING') {
126
+        query = query.where('Lenguaje.Ing', '==', true)
127
+      }
128
+  }
129
+  for(let i = 0; i < days.length; i++) {
130
+    if (days[i].id === 'L') {
131
+      query = query.where('dias.Lunes', '==', true)
132
+    }
133
+    if (days[i].id === 'M') {
134
+      query = query.where('dias.Martes', '==', true)
135
+    }
136
+    if (days[i].id === 'W') {
137
+      query = query.where('dias.Miercoles', '==', true)
138
+    }
139
+    if (days[i].id === 'J') {
140
+      query = query.where('dias.Jueves', '==', true)
141
+    }
142
+    if (days[i].id === 'V') {
143
+      query = query.where('dias.Viernes', '==', true)
144
+    }
145
+    if (days[i].id === 'S') {
146
+      query = query.where('dias.Sabado', '==', true)
147
+    }
148
+    if (days[i].id === 'D') {
149
+      query = query.where('dias.Domingo', '==', true)
150
+    }
151
+    if (days[i].id === 'F') {
152
+      query = query.where('dias.Feriados', '==', true)
153
+    }
154
+  }
155
+    query.get().then(querySnapshot => {
156
+      console.log('Total users: ', querySnapshot.size);
157
+      //traverse the query snapshot
158
+      //add the user to the users array
159
+      querySnapshot.forEach(documentSnapshot => {
160
+        //save the user id and the user data
161
+        const user = {
162
+          id: documentSnapshot.id,
163
+          data: documentSnapshot.data()
164
+        }
165
+        users.push(user)
166
+        setUsers(users)
167
+      });
168
+    });
169
+    console.log('These are the users after the query is executed: ',  users)
170
+    
171
+  }
172
+
173
+
174
+  return (
175
+    <View style={{ margin: 30 }}>
176
+      <View style={{ width: '100%', alignItems: 'center' }}>
177
+        <Text style={{ fontSize: 30, paddingBottom: 20 }}>Busqueda</Text>
178
+      </View>
179
+      <Text style={{ fontSize: 20, paddingBottom: 10 }}>Filtro de Interpretes</Text>
180
+      <SelectBox
181
+        arrowIconColor='#E4CD05'
182
+        toggleIconColor='#E4CD05'
183
+        searchIconColor='#E4CD05'
184
+        multiOptionContainerStyle = {{
185
+          backgroundColor: '#E4CD05',
186
+          borderColor: '#E4CD05',
187
+          borderWidth: 1,
188
+          borderRadius: 5,
189
+          marginBottom: 10,
190
+          marginTop: 10,
191
+          padding: 10,
192
+        }}
193
+        multiOptionsLabelStyle = {{
194
+          color: '#000000',
195
+          fontSize: 20,
196
+        }}
197
+        label="Select multiple"
198
+        options={Tags}
199
+        selectedValues={selectedTags}
200
+        onMultiSelect={onMultiChange()}
201
+        onTapClose={onMultiChange()}
202
+        isMulti
203
+      />
204
+      <Text style={{ fontSize: 20, paddingBottom: 10 }}>Dias Disponibles</Text>
205
+      <SelectBox
206
+      arrowIconColor='#E4CD05'
207
+      toggleIconColor='#E4CD05'
208
+      searchIconColor='#E4CD05'
209
+      multiOptionContainerStyle = {{
210
+        backgroundColor: '#E4CD05',
211
+        borderColor: '#E4CD05',
212
+        borderWidth: 1,
213
+        borderRadius: 5,
214
+        marginBottom: 10,
215
+        marginTop: 10,
216
+        padding: 10,
217
+      }}
218
+      multiOptionsLabelStyle = {{
219
+        color: '#000000',
220
+        fontSize: 20,
221
+      }}
222
+        label="Select multiple"
223
+        options={Days}
224
+        selectedValues={selectedDays}
225
+        onMultiSelect={(item) => setSelectedDays(xorBy(selectedDays, [item], 'id'))}
226
+        onTapClose={(item) => setSelectedDays(xorBy(selectedDays, [item], 'id'))}
227
+        isMulti
228
+      />
229
+
230
+      {/* button that will fetch the users */}
231
+      <button onClick={() => fetchUsers(selectedTags, selectedDays)}>Buscar</button>
232
+
233
+
234
+      <FlatList
235
+        numColumns={1}
236
+        horizontal={false}
237
+        data={users}
238
+        
239
+        renderItem={({ item, }) => {
240
+          return (
241
+            <View style={{ flexDirection: "row", justifyContent: "space-between" }}>
242
+              <Text>{item.data.name}</Text>
243
+              <button  styles = {styles.button}     onClick={() => { dothing(item.id) }}>Button</button>
244
+            </View>
245
+          )
246
+        }}
247
+        />
248
+
249
+    </View>
250
+  );
251
+
252
+  function onMultiChange() {
253
+    return (item) => setSelectedTags(xorBy(selectedTags, [item], 'id'))
254
+  }
255
+  
256
+  function dothing(item) {
257
+    console.log('This is the item id: ', item)
258
+    navigation.navigate('Calendar', {Intereprete_id: item})
259
+  } 
260
+
261
+}
262
+
263
+const styles = StyleSheet.create({
264
+  
265
+  button: {
266
+    alignItems: "center",
267
+    backgroundColor: 'transparent'
268
+  },
269
+});
270
+
271
+
272
+
273
+
274
+export default Search

+ 3
- 0
screens/main/StateTime.js Vedi File

@@ -10,6 +10,7 @@ export default class Time extends Component{
10 10
     super(props);
11 11
     this.state = {
12 12
       Appointment : this.props.route.params.Appointment_Date,
13
+      int2_id : this.props.route.params.int_id,
13 14
     }
14 15
     this.time_assignment = this.time_assignment.bind(this);
15 16
   }
@@ -27,9 +28,11 @@ export default class Time extends Component{
27 28
   const month = this.state.Appointment.month
28 29
   const day = this.state.Appointment.day
29 30
   const _time_ = selectedTime
31
+  const i_id = this.state.int2_id
30 32
   firebase.firestore()
31 33
   .collection('APPOINTMENTS')
32 34
   .add({ 
35
+    i_id : i_id,
33 36
     uid1: uid, 
34 37
     Month : month,
35 38
     Day: day,