8 Commit

Autore SHA1 Messaggio Data
  Ricardo-gonzalez32 33ab23f85e Merge branch 'MocionesIUPI' of https://git.ccom.uprrp.edu/CCOM4030/JeLuOrRi into MocionesIUPI 2 anni fa
  Ricardo-gonzalez32 5c8cd270d3 Merge branch 'PincodeB' into MocionesIUPI 2 anni fa
  Ricardo-gonzalez32 05fe05b4f2 increased pincode length to 6 2 anni fa
  Ricardo-gonzalez32 9b0c18b86b Update PincodeScreen.js 2 anni fa
  Ricardo-gonzalez32 9f76f7952b added pincode page 2 anni fa
  Ricardo-gonzalez32 9cebb52c2a Merge branch 'MocionesIUPI' into PincodeB 2 anni fa
  Ricardo-gonzalez32 939fcf3a0a added pincodescreen and testscreen 2 anni fa
  Ricardo-gonzalez32 dd28f29148 added pincode 2 anni fa

+ 313
- 0
MocionesIUPI/package-lock.json Vedi File

@@ -10,6 +10,7 @@
10 10
       "dependencies": {
11 11
         "@apollo/client": "^3.7.2",
12 12
         "@expo/webpack-config": "^0.17.2",
13
+        "deprecated-react-native-prop-types": "^2.2.0",
13 14
         "expo": "~47.0.6",
14 15
         "expo-status-bar": "~1.4.2",
15 16
         "graphql": "^15.8.0",
@@ -21,6 +22,8 @@
21 22
         "react-native-paper": "^3.12.0",
22 23
         "react-native-safe-area-context": "4.4.1",
23 24
         "react-native-screens": "~3.18.0",
25
+        "react-native-smooth-pincode-input": "^1.0.9",
26
+        "react-native-svg": "13.4.0",
24 27
         "react-native-svg": "^13.4.0",
25 28
         "react-native-vector-icons": "^9.2.0",
26 29
         "react-native-web": "~0.18.9",
@@ -1848,6 +1851,53 @@
1848 1851
       "version": "2.0.17",
1849 1852
       "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
1850 1853
       "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
1854
+      "peer": true,
1855
+      "dependencies": {
1856
+        "@types/hammerjs": "^2.0.36"
1857
+      },
1858
+      "engines": {
1859
+        "node": ">=0.8.0"
1860
+      }
1861
+    },
1862
+    "node_modules/@emotion/is-prop-valid": {
1863
+      "version": "1.2.0",
1864
+      "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz",
1865
+      "integrity": "sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==",
1866
+      "dependencies": {
1867
+        "@emotion/memoize": "^0.8.0"
1868
+      }
1869
+    },
1870
+    "node_modules/@emotion/memoize": {
1871
+      "version": "0.8.0",
1872
+      "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz",
1873
+      "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA=="
1874
+    },
1875
+    "node_modules/@emotion/stylis": {
1876
+      "version": "0.8.5",
1877
+      "resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",
1878
+      "integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="
1879
+    },
1880
+    "node_modules/@emotion/unitless": {
1881
+      "version": "0.7.5",
1882
+      "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
1883
+      "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
1884
+    },
1885
+    "node_modules/@callstack/react-theme-provider": {
1886
+      "version": "3.0.8",
1887
+      "resolved": "https://registry.npmjs.org/@callstack/react-theme-provider/-/react-theme-provider-3.0.8.tgz",
1888
+      "integrity": "sha512-5U231sYY2sqQOaELX0WBCn+iluV8bFaXIS7em03k4W5Xz0AhGvKlnpLIhDGFP8im/SvNW7/2XoR0BsClhn9t6Q==",
1889
+      "dependencies": {
1890
+        "deepmerge": "^3.2.0",
1891
+        "hoist-non-react-statics": "^3.3.0"
1892
+      },
1893
+      "peerDependencies": {
1894
+        "react": ">=16.3.0"
1895
+      }
1896
+    },
1897
+    "node_modules/@egjs/hammerjs": {
1898
+      "version": "2.0.17",
1899
+      "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
1900
+      "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
1851 1901
       "dependencies": {
1852 1902
         "@types/hammerjs": "^2.0.36"
1853 1903
       },
@@ -8900,6 +8950,16 @@
8900 8950
         "node": ">= 0.6"
8901 8951
       }
8902 8952
     },
8953
+    "node_modules/deprecated-react-native-prop-types": {
8954
+      "version": "2.2.0",
8955
+      "resolved": "https://registry.npmjs.org/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.2.0.tgz",
8956
+      "integrity": "sha512-SiessglRbgelU8sHCrGRImdlNKfVGSp0n6+K304d0rCdHGU8wladJkPmufxE2AkjN2jy71sgekNd9IvdZp9jZg==",
8957
+      "dependencies": {
8958
+        "@react-native/normalize-color": "*",
8959
+        "invariant": "*",
8960
+        "prop-types": "*"
8961
+      }
8962
+    },
8903 8963
     "node_modules/des.js": {
8904 8964
       "version": "1.0.1",
8905 8965
       "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
@@ -16863,6 +16923,14 @@
16863 16923
         "react": "18.1.0"
16864 16924
       }
16865 16925
     },
16926
+    "node_modules/react-native-animatable": {
16927
+      "version": "1.3.3",
16928
+      "resolved": "https://registry.npmjs.org/react-native-animatable/-/react-native-animatable-1.3.3.tgz",
16929
+      "integrity": "sha512-2ckIxZQAsvWn25Ho+DK3d1mXIgj7tITkrS4pYDvx96WyOttSvzzFeQnM2od0+FUMzILbdHDsDEqZvnz1DYNQ1w==",
16930
+      "dependencies": {
16931
+        "prop-types": "^15.7.2"
16932
+      }
16933
+    },
16866 16934
     "node_modules/react-native-codegen": {
16867 16935
       "version": "0.70.6",
16868 16936
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.70.6.tgz",
@@ -16918,6 +16986,251 @@
16918 16986
         "react-native-vector-icons": "*"
16919 16987
       }
16920 16988
     },
16989
+    "node_modules/react-native-safe-area-context": {
16990
+      "version": "4.4.1",
16991
+      "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz",
16992
+      "integrity": "sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA==",
16993
+      "peerDependencies": {
16994
+        "react": "*",
16995
+        "react-native": "*"
16996
+      }
16997
+    },
16998
+    "node_modules/react-native-safe-area-view": {
16999
+      "version": "0.14.9",
17000
+      "resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz",
17001
+      "integrity": "sha512-WII/ulhpVyL/qbYb7vydq7dJAfZRBcEhg4/UWt6F6nAKpLa3gAceMOxBxI914ppwSP/TdUsandFy6lkJQE0z4A==",
17002
+      "dependencies": {
17003
+        "hoist-non-react-statics": "^2.3.1"
17004
+      },
17005
+      "peerDependencies": {
17006
+        "react": "*",
17007
+        "react-native": "*"
17008
+      }
17009
+    },
17010
+    "node_modules/react-native-safe-area-view/node_modules/hoist-non-react-statics": {
17011
+      "version": "2.5.5",
17012
+      "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
17013
+      "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
17014
+    },
17015
+    "node_modules/react-native-screens": {
17016
+      "version": "3.18.2",
17017
+      "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.18.2.tgz",
17018
+      "integrity": "sha512-ANUEuvMUlsYJ1QKukEhzhfrvOUO9BVH9Nzg+6eWxpn3cfD/O83yPBOF8Mx6x5H/2+sMy+VS5x/chWOOo/U7QJw==",
17019
+      "dependencies": {
17020
+        "react-freeze": "^1.0.0",
17021
+        "warn-once": "^0.1.0"
17022
+      },
17023
+      "peerDependencies": {
17024
+        "react": "*",
17025
+        "react-native": "*"
17026
+      }
17027
+    },
17028
+    "node_modules/react-native-smooth-pincode-input": {
17029
+      "version": "1.0.9",
17030
+      "resolved": "https://registry.npmjs.org/react-native-smooth-pincode-input/-/react-native-smooth-pincode-input-1.0.9.tgz",
17031
+      "integrity": "sha512-4V4tyUGJaze55FHuJW/gYVOD3fc4Pd7cTIrv7liTRIXR49y09C2O3XqJUdgNR+UwTgLrTt/8L2lvEuEVUk3kig==",
17032
+      "dependencies": {
17033
+        "prop-types": "^15.5.10",
17034
+        "react-native-animatable": "^1.3.0"
17035
+      },
17036
+      "peerDependencies": {
17037
+        "react-native": "*"
17038
+      }
17039
+    },
17040
+    "node_modules/react-native-svg": {
17041
+      "version": "13.4.0",
17042
+      "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-13.4.0.tgz",
17043
+      "integrity": "sha512-B3TwK+H0+JuRhYPzF21AgqMt4fjhCwDZ9QUtwNstT5XcslJBXC0FoTkdZo8IEb1Sv4suSqhZwlAY6lwOv3tHag==",
17044
+      "dependencies": {
17045
+        "css-select": "^5.1.0",
17046
+        "css-tree": "^1.1.3"
17047
+      },
17048
+      "peerDependencies": {
17049
+        "react": "*",
17050
+        "react-native": "*"
17051
+      }
17052
+    },
17053
+    "node_modules/react-native-svg/node_modules/css-select": {
17054
+      "version": "5.1.0",
17055
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
17056
+      "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
17057
+      "dependencies": {
17058
+        "boolbase": "^1.0.0",
17059
+        "css-what": "^6.1.0",
17060
+        "domhandler": "^5.0.2",
17061
+        "domutils": "^3.0.1",
17062
+        "nth-check": "^2.0.1"
17063
+      },
17064
+      "funding": {
17065
+        "url": "https://github.com/sponsors/fb55"
17066
+      }
17067
+    },
17068
+    "node_modules/react-native-svg/node_modules/css-tree": {
17069
+      "version": "1.1.3",
17070
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
17071
+      "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
17072
+      "dependencies": {
17073
+        "mdn-data": "2.0.14",
17074
+        "source-map": "^0.6.1"
17075
+      },
17076
+      "engines": {
17077
+        "node": ">=8.0.0"
17078
+      }
17079
+    },
17080
+    "node_modules/react-native-svg/node_modules/dom-serializer": {
17081
+      "version": "2.0.0",
17082
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
17083
+      "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
17084
+      "dependencies": {
17085
+        "domelementtype": "^2.3.0",
17086
+        "domhandler": "^5.0.2",
17087
+        "entities": "^4.2.0"
17088
+      },
17089
+      "funding": {
17090
+        "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
17091
+      }
17092
+    },
17093
+    "node_modules/react-native-svg/node_modules/domhandler": {
17094
+      "version": "5.0.3",
17095
+      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
17096
+      "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
17097
+      "dependencies": {
17098
+        "domelementtype": "^2.3.0"
17099
+      },
17100
+      "engines": {
17101
+        "node": ">= 4"
17102
+      },
17103
+      "funding": {
17104
+        "url": "https://github.com/fb55/domhandler?sponsor=1"
17105
+      }
17106
+    },
17107
+    "node_modules/react-native-svg/node_modules/domutils": {
17108
+      "version": "3.0.1",
17109
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz",
17110
+      "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==",
17111
+      "dependencies": {
17112
+        "dom-serializer": "^2.0.0",
17113
+        "domelementtype": "^2.3.0",
17114
+        "domhandler": "^5.0.1"
17115
+      },
17116
+      "funding": {
17117
+        "url": "https://github.com/fb55/domutils?sponsor=1"
17118
+      }
17119
+    },
17120
+    "node_modules/react-native-svg/node_modules/entities": {
17121
+      "version": "4.4.0",
17122
+      "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz",
17123
+      "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==",
17124
+      "engines": {
17125
+        "node": ">=0.12"
17126
+      },
17127
+      "funding": {
17128
+        "url": "https://github.com/fb55/entities?sponsor=1"
17129
+      }
17130
+    },
17131
+    "node_modules/react-native-svg/node_modules/mdn-data": {
17132
+      "version": "2.0.14",
17133
+      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
17134
+      "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
17135
+    },
17136
+    "node_modules/react-native-svg/node_modules/source-map": {
17137
+      "version": "0.6.1",
17138
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
17139
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
17140
+      "engines": {
17141
+        "node": ">=0.10.0"
17142
+      }
17143
+    },
17144
+    "node_modules/react-native-vector-icons": {
17145
+      "version": "9.2.0",
17146
+      "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-9.2.0.tgz",
17147
+      "integrity": "sha512-wKYLaFuQST/chH3AJRjmOLoLy3JEs1JR6zMNgTaemFpNoXs0ztRnTxcxFD9xhX7cJe1/zoN5BpQYe7kL0m5yyA==",
17148
+      "dependencies": {
17149
+        "prop-types": "^15.7.2",
17150
+        "yargs": "^16.1.1"
17151
+      },
17152
+      "bin": {
17153
+        "fa5-upgrade": "bin/fa5-upgrade.sh",
17154
+        "generate-icon": "bin/generate-icon.js"
17155
+      }
17156
+    },
17157
+    "node_modules/react-native-vector-icons/node_modules/cliui": {
17158
+      "version": "7.0.4",
17159
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
17160
+      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
17161
+      "dependencies": {
17162
+        "string-width": "^4.2.0",
17163
+        "strip-ansi": "^6.0.0",
17164
+        "wrap-ansi": "^7.0.0"
17165
+      }
17166
+    },
17167
+    "node_modules/react-native-vector-icons/node_modules/strip-ansi": {
17168
+      "version": "6.0.1",
17169
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
17170
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
17171
+      "dependencies": {
17172
+        "ansi-regex": "^5.0.1"
17173
+      },
17174
+      "engines": {
17175
+        "node": ">=8"
17176
+      }
17177
+    },
17178
+    "node_modules/react-native-vector-icons/node_modules/y18n": {
17179
+      "version": "5.0.8",
17180
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
17181
+      "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
17182
+      "engines": {
17183
+        "node": ">=10"
17184
+      }
17185
+    },
17186
+    "node_modules/react-native-vector-icons/node_modules/yargs": {
17187
+      "version": "16.2.0",
17188
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
17189
+      "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
17190
+      "dependencies": {
17191
+        "cliui": "^7.0.2",
17192
+        "escalade": "^3.1.1",
17193
+        "get-caller-file": "^2.0.5",
17194
+        "require-directory": "^2.1.1",
17195
+        "string-width": "^4.2.0",
17196
+        "y18n": "^5.0.5",
17197
+        "yargs-parser": "^20.2.2"
17198
+      },
17199
+      "engines": {
17200
+        "node": ">=10"
17201
+      }
17202
+    },
17203
+    "node_modules/react-native-vector-icons/node_modules/yargs-parser": {
17204
+      "version": "20.2.9",
17205
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
17206
+      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
17207
+      "engines": {
17208
+        "node": ">=10"
17209
+      }
17210
+    },
17211
+    "node_modules/react-native-iphone-x-helper": {
17212
+      "version": "1.3.1",
17213
+      "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz",
17214
+      "integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==",
17215
+      "peerDependencies": {
17216
+        "react-native": ">=0.42.0"
17217
+      }
17218
+    },
17219
+    "node_modules/react-native-paper": {
17220
+      "version": "3.12.0",
17221
+      "resolved": "https://registry.npmjs.org/react-native-paper/-/react-native-paper-3.12.0.tgz",
17222
+      "integrity": "sha512-c5GfDkITfrutoVB4+pE/kL2gH7sHuxD9eAs8+cY1q4PjuYW8geV1Hst14HQstSrYkksXN9StI0wryyb21BDfrw==",
17223
+      "dependencies": {
17224
+        "@callstack/react-theme-provider": "^3.0.5",
17225
+        "color": "^3.1.2",
17226
+        "react-native-safe-area-view": "^0.14.9"
17227
+      },
17228
+      "peerDependencies": {
17229
+        "react": "*",
17230
+        "react-native": "*",
17231
+        "react-native-vector-icons": "*"
17232
+      }
17233
+    },
16921 17234
     "node_modules/react-native-reanimated": {
16922 17235
       "version": "1.13.4",
16923 17236
       "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.13.4.tgz",

+ 2
- 0
MocionesIUPI/package.json Vedi File

@@ -11,6 +11,7 @@
11 11
   "dependencies": {
12 12
     "@apollo/client": "^3.7.2",
13 13
     "@expo/webpack-config": "^0.17.2",
14
+    "deprecated-react-native-prop-types": "^2.2.0",
14 15
     "expo": "~47.0.6",
15 16
     "expo-status-bar": "~1.4.2",
16 17
     "graphql": "^15.8.0",
@@ -22,6 +23,7 @@
22 23
     "react-native-paper": "^3.12.0",
23 24
     "react-native-safe-area-context": "4.4.1",
24 25
     "react-native-screens": "~3.18.0",
26
+    "react-native-smooth-pincode-input": "^1.0.9",
25 27
     "react-native-svg": "^13.4.0",
26 28
     "react-native-vector-icons": "^9.2.0",
27 29
     "react-native-web": "~0.18.9",

+ 11
- 1
MocionesIUPI/routes/homeStack.js Vedi File

@@ -3,6 +3,9 @@ import { createAppContainer } from 'react-navigation';
3 3
 import React from "react";
4 4
 
5 5
 import HomeScreen from '../screens/HomeScreen';
6
+import PincodeScreen from '../screens/PincodeScreen';
7
+import testscreen from '../screens/testscreen';
8
+
6 9
 import MocionScreen from '../screens/MocionScreen';
7 10
 import Header from '../shared/header';
8 11
 
@@ -18,11 +21,18 @@ const screens = {
18 21
 
19 22
     Mocion: {
20 23
         screen: MocionScreen,
24
+    },
25
+
26
+    Pinpage: {
27
+        screen: PincodeScreen,
28
+    },
21 29
         navigationOptions: {
22 30
             headerTitle: () => <Header />
23
-        }
31
+        },
24 32
 
25 33
 
34
+    test: {
35
+        screen: testscreen,
26 36
     }
27 37
 }
28 38
 

+ 5
- 2
MocionesIUPI/screens/HomeScreen.js Vedi File

@@ -28,7 +28,7 @@ export default App = ({ navigation }) => {
28 28
     }
29 29
 
30 30
     const pressHandler = () => {
31
-        navigation.navigate('Mocion');
31
+        navigation.navigate('Pinpage')
32 32
     }
33 33
     
34 34
     useEffect(() => {
@@ -38,7 +38,10 @@ export default App = ({ navigation }) => {
38 38
     return (
39 39
         <View style = {globalStyles.container}>
40 40
             <Text style = {globalStyles.tittleText}>Home Screen</Text>
41
-            <Button title="go to pin page" onPress={pressHandler}/>
41
+            <Button title='Ir a pagina de pin' onPress={pressHandler} />
42 42
         </View>
43
+        
44
+        
45
+
43 46
     )
44 47
 }

+ 60
- 0
MocionesIUPI/screens/PincodeScreen.js Vedi File

@@ -0,0 +1,60 @@
1
+import React from "react";
2
+import { StyleSheet, View, Text, Button } from 'react-native';
3
+import { globalStyles } from "../styles/global";
4
+import SmoothPinCodeInput from 'react-native-smooth-pincode-input';
5
+
6
+const pin = 123456;
7
+
8
+//comentario
9
+
10
+export default class App extends React.Component {
11
+    
12
+    pressHandler = () => {
13
+    {/*Dentro del parentesis va el path al screen para redirigir*/}
14
+      this.props.navigation.navigate('test')
15
+    }
16
+
17
+    state = {
18
+      code: '',
19
+      pincode: false,
20
+    };
21
+    pinInput = React.createRef();
22
+  
23
+    _checkCode = (code) => {
24
+      if (code != pin) {
25
+        this.pinInput.current.shake()
26
+          .then(() => this.setState({ code: '' }));
27
+      } else {
28
+        this.setState({ pincode: true});
29
+      }
30
+    }
31
+  
32
+    render() {
33
+      const { code } = this.state;
34
+      const { pincode } = this.state;
35
+      return (
36
+        <View style={globalStyles.container}>
37
+          {/* Pin container */}
38
+          <View style={globalStyles.section}>
39
+            <Text style={globalStyles.titleText}>Entra el Pin de la mocion</Text>
40
+            <SmoothPinCodeInput
41
+              ref={this.pinInput}
42
+              value={code}
43
+              codeLength={6}
44
+              onTextChange={code => this.setState({ code })}
45
+              onFulfill={this._checkCode}
46
+              onBackspace={() => console.log('No more back.')}
47
+              />
48
+          </View>
49
+          
50
+          <View style={globalStyles.container}>
51
+            { pincode && <Button title='Ir a mocion' onPress={this.pressHandler} />}
52
+          </View>
53
+
54
+        </View>
55
+      );
56
+    }
57
+  }
58
+
59
+
60
+  

+ 11
- 0
MocionesIUPI/screens/testscreen.js Vedi File

@@ -0,0 +1,11 @@
1
+import React from "react";
2
+import { StyleSheet, View, Text, Button } from 'react-native';
3
+import { globalStyles } from "../styles/global";
4
+
5
+export default function testscreen() {
6
+    return (
7
+        <View style = {globalStyles.container}>
8
+            <Text style = {globalStyles.tittleText}>This is a test for pin button</Text>
9
+        </View>
10
+    )
11
+}