identification client ok

This commit is contained in:
Brice Zele 2020-06-16 10:25:46 +01:00
parent 60020b1cf8
commit 1bec6cc74c
31 changed files with 2228 additions and 365 deletions

2
App.js
View File

@ -51,6 +51,7 @@ import CreateIdentification from './screens/identification/createIdentification'
import WalletDetailUser from './screens/wallet/WalletDetailUser';
import WalletOptionSelect from './screens/wallet/WalletOptionSelect';
import ValidateIdentification from './screens/identification/validateIdentification';
import CreateIdentificationUser from './screens/identification/CreateIdentificationUser';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
@ -85,6 +86,7 @@ const AppStack = createDrawerNavigator({
},
},
walletSelect: WalletSelect,
createIdentificationUser: CreateIdentificationUser,
notificationview: Notifications,
configuration: Configurations,
about: About,

View File

@ -132,6 +132,7 @@ android {
applicationId "com.ilinktest"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
missingDimensionStrategy 'react-native-camera', 'general'
versionCode 1
versionName "1.0"
multiDexEnabled true

View File

@ -8,6 +8,10 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-sdk tools:overrideLibrary="com.shazam.android.widget.text.reflow" />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,788 @@
{
"glass": 61440,
"music": 61441,
"search": 61442,
"envelope-o": 61443,
"heart": 61444,
"star": 61445,
"star-o": 61446,
"user": 61447,
"film": 61448,
"th-large": 61449,
"th": 61450,
"th-list": 61451,
"check": 61452,
"remove": 61453,
"close": 61453,
"times": 61453,
"search-plus": 61454,
"search-minus": 61456,
"power-off": 61457,
"signal": 61458,
"gear": 61459,
"cog": 61459,
"trash-o": 61460,
"home": 61461,
"file-o": 61462,
"clock-o": 61463,
"road": 61464,
"download": 61465,
"arrow-circle-o-down": 61466,
"arrow-circle-o-up": 61467,
"inbox": 61468,
"play-circle-o": 61469,
"rotate-right": 61470,
"repeat": 61470,
"refresh": 61473,
"list-alt": 61474,
"lock": 61475,
"flag": 61476,
"headphones": 61477,
"volume-off": 61478,
"volume-down": 61479,
"volume-up": 61480,
"qrcode": 61481,
"barcode": 61482,
"tag": 61483,
"tags": 61484,
"book": 61485,
"bookmark": 61486,
"print": 61487,
"camera": 61488,
"font": 61489,
"bold": 61490,
"italic": 61491,
"text-height": 61492,
"text-width": 61493,
"align-left": 61494,
"align-center": 61495,
"align-right": 61496,
"align-justify": 61497,
"list": 61498,
"dedent": 61499,
"outdent": 61499,
"indent": 61500,
"video-camera": 61501,
"photo": 61502,
"image": 61502,
"picture-o": 61502,
"pencil": 61504,
"map-marker": 61505,
"adjust": 61506,
"tint": 61507,
"edit": 61508,
"pencil-square-o": 61508,
"share-square-o": 61509,
"check-square-o": 61510,
"arrows": 61511,
"step-backward": 61512,
"fast-backward": 61513,
"backward": 61514,
"play": 61515,
"pause": 61516,
"stop": 61517,
"forward": 61518,
"fast-forward": 61520,
"step-forward": 61521,
"eject": 61522,
"chevron-left": 61523,
"chevron-right": 61524,
"plus-circle": 61525,
"minus-circle": 61526,
"times-circle": 61527,
"check-circle": 61528,
"question-circle": 61529,
"info-circle": 61530,
"crosshairs": 61531,
"times-circle-o": 61532,
"check-circle-o": 61533,
"ban": 61534,
"arrow-left": 61536,
"arrow-right": 61537,
"arrow-up": 61538,
"arrow-down": 61539,
"mail-forward": 61540,
"share": 61540,
"expand": 61541,
"compress": 61542,
"plus": 61543,
"minus": 61544,
"asterisk": 61545,
"exclamation-circle": 61546,
"gift": 61547,
"leaf": 61548,
"fire": 61549,
"eye": 61550,
"eye-slash": 61552,
"warning": 61553,
"exclamation-triangle": 61553,
"plane": 61554,
"calendar": 61555,
"random": 61556,
"comment": 61557,
"magnet": 61558,
"chevron-up": 61559,
"chevron-down": 61560,
"retweet": 61561,
"shopping-cart": 61562,
"folder": 61563,
"folder-open": 61564,
"arrows-v": 61565,
"arrows-h": 61566,
"bar-chart-o": 61568,
"bar-chart": 61568,
"twitter-square": 61569,
"facebook-square": 61570,
"camera-retro": 61571,
"key": 61572,
"gears": 61573,
"cogs": 61573,
"comments": 61574,
"thumbs-o-up": 61575,
"thumbs-o-down": 61576,
"star-half": 61577,
"heart-o": 61578,
"sign-out": 61579,
"linkedin-square": 61580,
"thumb-tack": 61581,
"external-link": 61582,
"sign-in": 61584,
"trophy": 61585,
"github-square": 61586,
"upload": 61587,
"lemon-o": 61588,
"phone": 61589,
"square-o": 61590,
"bookmark-o": 61591,
"phone-square": 61592,
"twitter": 61593,
"facebook-f": 61594,
"facebook": 61594,
"github": 61595,
"unlock": 61596,
"credit-card": 61597,
"feed": 61598,
"rss": 61598,
"hdd-o": 61600,
"bullhorn": 61601,
"bell": 61683,
"certificate": 61603,
"hand-o-right": 61604,
"hand-o-left": 61605,
"hand-o-up": 61606,
"hand-o-down": 61607,
"arrow-circle-left": 61608,
"arrow-circle-right": 61609,
"arrow-circle-up": 61610,
"arrow-circle-down": 61611,
"globe": 61612,
"wrench": 61613,
"tasks": 61614,
"filter": 61616,
"briefcase": 61617,
"arrows-alt": 61618,
"group": 61632,
"users": 61632,
"chain": 61633,
"link": 61633,
"cloud": 61634,
"flask": 61635,
"cut": 61636,
"scissors": 61636,
"copy": 61637,
"files-o": 61637,
"paperclip": 61638,
"save": 61639,
"floppy-o": 61639,
"square": 61640,
"navicon": 61641,
"reorder": 61641,
"bars": 61641,
"list-ul": 61642,
"list-ol": 61643,
"strikethrough": 61644,
"underline": 61645,
"table": 61646,
"magic": 61648,
"truck": 61649,
"pinterest": 61650,
"pinterest-square": 61651,
"google-plus-square": 61652,
"google-plus": 61653,
"money": 61654,
"caret-down": 61655,
"caret-up": 61656,
"caret-left": 61657,
"caret-right": 61658,
"columns": 61659,
"unsorted": 61660,
"sort": 61660,
"sort-down": 61661,
"sort-desc": 61661,
"sort-up": 61662,
"sort-asc": 61662,
"envelope": 61664,
"linkedin": 61665,
"rotate-left": 61666,
"undo": 61666,
"legal": 61667,
"gavel": 61667,
"dashboard": 61668,
"tachometer": 61668,
"comment-o": 61669,
"comments-o": 61670,
"flash": 61671,
"bolt": 61671,
"sitemap": 61672,
"umbrella": 61673,
"paste": 61674,
"clipboard": 61674,
"lightbulb-o": 61675,
"exchange": 61676,
"cloud-download": 61677,
"cloud-upload": 61678,
"user-md": 61680,
"stethoscope": 61681,
"suitcase": 61682,
"bell-o": 61602,
"coffee": 61684,
"cutlery": 61685,
"file-text-o": 61686,
"building-o": 61687,
"hospital-o": 61688,
"ambulance": 61689,
"medkit": 61690,
"fighter-jet": 61691,
"beer": 61692,
"h-square": 61693,
"plus-square": 61694,
"angle-double-left": 61696,
"angle-double-right": 61697,
"angle-double-up": 61698,
"angle-double-down": 61699,
"angle-left": 61700,
"angle-right": 61701,
"angle-up": 61702,
"angle-down": 61703,
"desktop": 61704,
"laptop": 61705,
"tablet": 61706,
"mobile-phone": 61707,
"mobile": 61707,
"circle-o": 61708,
"quote-left": 61709,
"quote-right": 61710,
"spinner": 61712,
"circle": 61713,
"mail-reply": 61714,
"reply": 61714,
"github-alt": 61715,
"folder-o": 61716,
"folder-open-o": 61717,
"smile-o": 61720,
"frown-o": 61721,
"meh-o": 61722,
"gamepad": 61723,
"keyboard-o": 61724,
"flag-o": 61725,
"flag-checkered": 61726,
"terminal": 61728,
"code": 61729,
"mail-reply-all": 61730,
"reply-all": 61730,
"star-half-empty": 61731,
"star-half-full": 61731,
"star-half-o": 61731,
"location-arrow": 61732,
"crop": 61733,
"code-fork": 61734,
"unlink": 61735,
"chain-broken": 61735,
"question": 61736,
"info": 61737,
"exclamation": 61738,
"superscript": 61739,
"subscript": 61740,
"eraser": 61741,
"puzzle-piece": 61742,
"microphone": 61744,
"microphone-slash": 61745,
"shield": 61746,
"calendar-o": 61747,
"fire-extinguisher": 61748,
"rocket": 61749,
"maxcdn": 61750,
"chevron-circle-left": 61751,
"chevron-circle-right": 61752,
"chevron-circle-up": 61753,
"chevron-circle-down": 61754,
"html5": 61755,
"css3": 61756,
"anchor": 61757,
"unlock-alt": 61758,
"bullseye": 61760,
"ellipsis-h": 61761,
"ellipsis-v": 61762,
"rss-square": 61763,
"play-circle": 61764,
"ticket": 61765,
"minus-square": 61766,
"minus-square-o": 61767,
"level-up": 61768,
"level-down": 61769,
"check-square": 61770,
"pencil-square": 61771,
"external-link-square": 61772,
"share-square": 61773,
"compass": 61774,
"toggle-down": 61776,
"caret-square-o-down": 61776,
"toggle-up": 61777,
"caret-square-o-up": 61777,
"toggle-right": 61778,
"caret-square-o-right": 61778,
"euro": 61779,
"eur": 61779,
"gbp": 61780,
"dollar": 61781,
"usd": 61781,
"rupee": 61782,
"inr": 61782,
"cny": 61783,
"rmb": 61783,
"yen": 61783,
"jpy": 61783,
"ruble": 61784,
"rouble": 61784,
"rub": 61784,
"won": 61785,
"krw": 61785,
"bitcoin": 61786,
"btc": 61786,
"file": 61787,
"file-text": 61788,
"sort-alpha-asc": 61789,
"sort-alpha-desc": 61790,
"sort-amount-asc": 61792,
"sort-amount-desc": 61793,
"sort-numeric-asc": 61794,
"sort-numeric-desc": 61795,
"thumbs-up": 61796,
"thumbs-down": 61797,
"youtube-square": 61798,
"youtube": 61799,
"xing": 61800,
"xing-square": 61801,
"youtube-play": 61802,
"dropbox": 61803,
"stack-overflow": 61804,
"instagram": 61805,
"flickr": 61806,
"adn": 61808,
"bitbucket": 61809,
"bitbucket-square": 61810,
"tumblr": 61811,
"tumblr-square": 61812,
"long-arrow-down": 61813,
"long-arrow-up": 61814,
"long-arrow-left": 61815,
"long-arrow-right": 61816,
"apple": 61817,
"windows": 61818,
"android": 61819,
"linux": 61820,
"dribbble": 61821,
"skype": 61822,
"foursquare": 61824,
"trello": 61825,
"female": 61826,
"male": 61827,
"gittip": 61828,
"gratipay": 61828,
"sun-o": 61829,
"moon-o": 61830,
"archive": 61831,
"bug": 61832,
"vk": 61833,
"weibo": 61834,
"renren": 61835,
"pagelines": 61836,
"stack-exchange": 61837,
"arrow-circle-o-right": 61838,
"arrow-circle-o-left": 61840,
"toggle-left": 61841,
"caret-square-o-left": 61841,
"dot-circle-o": 61842,
"wheelchair": 61843,
"vimeo-square": 61844,
"turkish-lira": 61845,
"try": 61845,
"plus-square-o": 61846,
"space-shuttle": 61847,
"slack": 61848,
"envelope-square": 61849,
"wordpress": 61850,
"openid": 61851,
"institution": 61852,
"bank": 61852,
"university": 61852,
"mortar-board": 61853,
"graduation-cap": 61853,
"yahoo": 61854,
"google": 61856,
"reddit": 61857,
"reddit-square": 61858,
"stumbleupon-circle": 61859,
"stumbleupon": 61860,
"delicious": 61861,
"digg": 61862,
"pied-piper-pp": 61863,
"pied-piper-alt": 61864,
"drupal": 61865,
"joomla": 61866,
"language": 61867,
"fax": 61868,
"building": 61869,
"child": 61870,
"paw": 61872,
"spoon": 61873,
"cube": 61874,
"cubes": 61875,
"behance": 61876,
"behance-square": 61877,
"steam": 61878,
"steam-square": 61879,
"recycle": 61880,
"automobile": 61881,
"car": 61881,
"cab": 61882,
"taxi": 61882,
"tree": 61883,
"spotify": 61884,
"deviantart": 61885,
"soundcloud": 61886,
"database": 61888,
"file-pdf-o": 61889,
"file-word-o": 61890,
"file-excel-o": 61891,
"file-powerpoint-o": 61892,
"file-photo-o": 61893,
"file-picture-o": 61893,
"file-image-o": 61893,
"file-zip-o": 61894,
"file-archive-o": 61894,
"file-sound-o": 61895,
"file-audio-o": 61895,
"file-movie-o": 61896,
"file-video-o": 61896,
"file-code-o": 61897,
"vine": 61898,
"codepen": 61899,
"jsfiddle": 61900,
"life-bouy": 61901,
"life-buoy": 61901,
"life-saver": 61901,
"support": 61901,
"life-ring": 61901,
"circle-o-notch": 61902,
"ra": 61904,
"resistance": 61904,
"rebel": 61904,
"ge": 61905,
"empire": 61905,
"git-square": 61906,
"git": 61907,
"y-combinator-square": 61908,
"yc-square": 61908,
"hacker-news": 61908,
"tencent-weibo": 61909,
"qq": 61910,
"wechat": 61911,
"weixin": 61911,
"send": 61912,
"paper-plane": 61912,
"send-o": 61913,
"paper-plane-o": 61913,
"history": 61914,
"circle-thin": 61915,
"header": 61916,
"paragraph": 61917,
"sliders": 61918,
"share-alt": 61920,
"share-alt-square": 61921,
"bomb": 61922,
"soccer-ball-o": 61923,
"futbol-o": 61923,
"tty": 61924,
"binoculars": 61925,
"plug": 61926,
"slideshare": 61927,
"twitch": 61928,
"yelp": 61929,
"newspaper-o": 61930,
"wifi": 61931,
"calculator": 61932,
"paypal": 61933,
"google-wallet": 61934,
"cc-visa": 61936,
"cc-mastercard": 61937,
"cc-discover": 61938,
"cc-amex": 61939,
"cc-paypal": 61940,
"cc-stripe": 61941,
"bell-slash": 61942,
"bell-slash-o": 61943,
"trash": 61944,
"copyright": 61945,
"at": 61946,
"eyedropper": 61947,
"paint-brush": 61948,
"birthday-cake": 61949,
"area-chart": 61950,
"pie-chart": 61952,
"line-chart": 61953,
"lastfm": 61954,
"lastfm-square": 61955,
"toggle-off": 61956,
"toggle-on": 61957,
"bicycle": 61958,
"bus": 61959,
"ioxhost": 61960,
"angellist": 61961,
"cc": 61962,
"shekel": 61963,
"sheqel": 61963,
"ils": 61963,
"meanpath": 61964,
"buysellads": 61965,
"connectdevelop": 61966,
"dashcube": 61968,
"forumbee": 61969,
"leanpub": 61970,
"sellsy": 61971,
"shirtsinbulk": 61972,
"simplybuilt": 61973,
"skyatlas": 61974,
"cart-plus": 61975,
"cart-arrow-down": 61976,
"diamond": 61977,
"ship": 61978,
"user-secret": 61979,
"motorcycle": 61980,
"street-view": 61981,
"heartbeat": 61982,
"venus": 61985,
"mars": 61986,
"mercury": 61987,
"intersex": 61988,
"transgender": 61988,
"transgender-alt": 61989,
"venus-double": 61990,
"mars-double": 61991,
"venus-mars": 61992,
"mars-stroke": 61993,
"mars-stroke-v": 61994,
"mars-stroke-h": 61995,
"neuter": 61996,
"genderless": 61997,
"facebook-official": 62000,
"pinterest-p": 62001,
"whatsapp": 62002,
"server": 62003,
"user-plus": 62004,
"user-times": 62005,
"hotel": 62006,
"bed": 62006,
"viacoin": 62007,
"train": 62008,
"subway": 62009,
"medium": 62010,
"yc": 62011,
"y-combinator": 62011,
"optin-monster": 62012,
"opencart": 62013,
"expeditedssl": 62014,
"battery-4": 62016,
"battery": 62016,
"battery-full": 62016,
"battery-3": 62017,
"battery-three-quarters": 62017,
"battery-2": 62018,
"battery-half": 62018,
"battery-1": 62019,
"battery-quarter": 62019,
"battery-0": 62020,
"battery-empty": 62020,
"mouse-pointer": 62021,
"i-cursor": 62022,
"object-group": 62023,
"object-ungroup": 62024,
"sticky-note": 62025,
"sticky-note-o": 62026,
"cc-jcb": 62027,
"cc-diners-club": 62028,
"clone": 62029,
"balance-scale": 62030,
"hourglass-o": 62032,
"hourglass-1": 62033,
"hourglass-start": 62033,
"hourglass-2": 62034,
"hourglass-half": 62034,
"hourglass-3": 62035,
"hourglass-end": 62035,
"hourglass": 62036,
"hand-grab-o": 62037,
"hand-rock-o": 62037,
"hand-stop-o": 62038,
"hand-paper-o": 62038,
"hand-scissors-o": 62039,
"hand-lizard-o": 62040,
"hand-spock-o": 62041,
"hand-pointer-o": 62042,
"hand-peace-o": 62043,
"trademark": 62044,
"registered": 62045,
"creative-commons": 62046,
"gg": 62048,
"gg-circle": 62049,
"tripadvisor": 62050,
"odnoklassniki": 62051,
"odnoklassniki-square": 62052,
"get-pocket": 62053,
"wikipedia-w": 62054,
"safari": 62055,
"chrome": 62056,
"firefox": 62057,
"opera": 62058,
"internet-explorer": 62059,
"tv": 62060,
"television": 62060,
"contao": 62061,
"500px": 62062,
"amazon": 62064,
"calendar-plus-o": 62065,
"calendar-minus-o": 62066,
"calendar-times-o": 62067,
"calendar-check-o": 62068,
"industry": 62069,
"map-pin": 62070,
"map-signs": 62071,
"map-o": 62072,
"map": 62073,
"commenting": 62074,
"commenting-o": 62075,
"houzz": 62076,
"vimeo": 62077,
"black-tie": 62078,
"fonticons": 62080,
"reddit-alien": 62081,
"edge": 62082,
"credit-card-alt": 62083,
"codiepie": 62084,
"modx": 62085,
"fort-awesome": 62086,
"usb": 62087,
"product-hunt": 62088,
"mixcloud": 62089,
"scribd": 62090,
"pause-circle": 62091,
"pause-circle-o": 62092,
"stop-circle": 62093,
"stop-circle-o": 62094,
"shopping-bag": 62096,
"shopping-basket": 62097,
"hashtag": 62098,
"bluetooth": 62099,
"bluetooth-b": 62100,
"percent": 62101,
"gitlab": 62102,
"wpbeginner": 62103,
"wpforms": 62104,
"envira": 62105,
"universal-access": 62106,
"wheelchair-alt": 62107,
"question-circle-o": 62108,
"blind": 62109,
"audio-description": 62110,
"volume-control-phone": 62112,
"braille": 62113,
"assistive-listening-systems": 62114,
"asl-interpreting": 62115,
"american-sign-language-interpreting": 62115,
"deafness": 62116,
"hard-of-hearing": 62116,
"deaf": 62116,
"glide": 62117,
"glide-g": 62118,
"signing": 62119,
"sign-language": 62119,
"low-vision": 62120,
"viadeo": 62121,
"viadeo-square": 62122,
"snapchat": 62123,
"snapchat-ghost": 62124,
"snapchat-square": 62125,
"pied-piper": 62126,
"first-order": 62128,
"yoast": 62129,
"themeisle": 62130,
"google-plus-circle": 62131,
"google-plus-official": 62131,
"fa": 62132,
"font-awesome": 62132,
"handshake-o": 62133,
"envelope-open": 62134,
"envelope-open-o": 62135,
"linode": 62136,
"address-book": 62137,
"address-book-o": 62138,
"vcard": 62139,
"address-card": 62139,
"vcard-o": 62140,
"address-card-o": 62140,
"user-circle": 62141,
"user-circle-o": 62142,
"user-o": 62144,
"id-badge": 62145,
"drivers-license": 62146,
"id-card": 62146,
"drivers-license-o": 62147,
"id-card-o": 62147,
"quora": 62148,
"free-code-camp": 62149,
"telegram": 62150,
"thermometer-4": 62151,
"thermometer": 62151,
"thermometer-full": 62151,
"thermometer-3": 62152,
"thermometer-three-quarters": 62152,
"thermometer-2": 62153,
"thermometer-half": 62153,
"thermometer-1": 62154,
"thermometer-quarter": 62154,
"thermometer-0": 62155,
"thermometer-empty": 62155,
"shower": 62156,
"bathtub": 62157,
"s15": 62157,
"bath": 62157,
"podcast": 62158,
"window-maximize": 62160,
"window-minimize": 62161,
"window-restore": 62162,
"times-rectangle": 62163,
"window-close": 62163,
"times-rectangle-o": 62164,
"window-close-o": 62164,
"bandcamp": 62165,
"grav": 62166,
"etsy": 62167,
"imdb": 62168,
"ravelry": 62169,
"eercast": 62170,
"microchip": 62171,
"snowflake-o": 62172,
"superpowers": 62173,
"wpexplorer": 62174,
"meetup": 62176
}

View File

@ -34,5 +34,6 @@
"walletSelect": "walletSelect",
"walletOptionSelect": "walletOptionSelect",
"createIdentification": "createIdentification",
"createIdentificationUser": "createIdentificationUser",
"validateIdentification": "validateIdentification"
}

View File

@ -129,6 +129,7 @@
"ADDRESS": "Address",
"CREDIT": "Credit",
"NEXT": "Next",
"PREVIOUS": "Previous",
"SPONSOR_CODE": "Sponsor Code",
"SOLDE_UNVAIBLE": "solde unavailable",
"TEXT_BIG_CREATE_AGENT_1": "Register as Agent",
@ -184,6 +185,8 @@
"TRANSFER_COMMISSION_IMPOSSIBLE": "Commissions transfer impossible",
"ERROR_FILTER_TEXT": "Problem encountered while filtering.",
"ERROR_TREATMENT_DEMAND": "Request processing error",
"ERROR_IDENTIFICATION": "Identification error",
"SUCCESS_IDENTIFICATION": "Identification successful",
"REFUSER_DEMANDE": "Reject the request",
"ACCEPTER_DEMANDE": "Accept the request",
"REFUSED": "Refuse",

View File

@ -133,6 +133,7 @@
"ADDRESS": "Adresse",
"CREDIT": "Crédit",
"NEXT": "Suivant",
"PREVIOUS": "Précédent",
"SPONSOR_CODE": "Code parrain",
"SOLDE_UNVAIBLE": "solde non disponible",
"TEXT_BIG_CREATE_AGENT_1": "Inscrivez-vous en comme Agent",
@ -189,6 +190,8 @@
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
"ERROR_TREATMENT_DEMAND": "Erreur de traitement de la demande",
"ERROR_IDENTIFICATION": "Erreur d'identification",
"SUCCESS_IDENTIFICATION": "Identification réussie",
"REFUSER_DEMANDE": "Refuser la demande",
"REFUSED": "Refusé",
"ACCEPTER_DEMANDE": "Accepter la demande",

View File

@ -0,0 +1,74 @@
import React, { PureComponent } from 'react';
import { RNCamera } from 'react-native-camera';
import Icon from 'react-native-vector-icons/dist/FontAwesome';
import { TouchableOpacity, Alert, StyleSheet } from 'react-native';
export default class Camera extends PureComponent {
constructor(props) {
super(props);
this.state = {
takingPic: false,
};
}
takePicture = async () => {
if (this.camera && !this.state.takingPic) {
let options = {
quality: 0.85,
fixOrientation: true,
forceUpOrientation: true,
};
this.setState({ takingPic: true });
try {
const data = await this.camera.takePictureAsync(options);
this.props.onPicture(data);
} catch (err) {
Alert.alert('Error', 'Failed to take picture: ' + (err.message || err));
return;
} finally {
this.setState({ takingPic: false });
}
}
};
render() {
return (
<RNCamera
ref={ref => {
this.camera = ref;
}}
captureAudio={false}
style={{ flex: 1 }}
type={RNCamera.Constants.Type.back}
androidCameraPermissionOptions={{
title: 'Permission to use camera',
message: 'We need your permission to use your camera',
buttonPositive: 'Ok',
buttonNegative: 'Cancel',
}}>
<TouchableOpacity
activeOpacity={0.5}
style={styles.btnAlignment}
onPress={this.takePicture}>
<Icon name="camera" size={50} color="#fff" />
</TouchableOpacity>
</RNCamera>
);
}
}
const styles = StyleSheet.create({
btnAlignment: {
flex: 1,
flexDirection: 'column',
justifyContent: 'flex-end',
alignItems: 'center',
marginBottom: 20,
},
});

View File

File diff suppressed because one or more lines are too long

View File

@ -39,6 +39,23 @@
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<key>NSCameraUsageDescription</key>
<string>ReactNativeCamera</string>
<!-- Required with iOS 10 and higher -->
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
<!-- Required with iOS 11 and higher: include this only if you are planning to use the camera roll -->
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
<!-- Include this only if you are planning to use the camera roll -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>
<!-- Include this only if you are planning to use the microphone for video recording -->
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microphone is accessed for the first time</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>

View File

@ -33,6 +33,7 @@
"react-native-blur-overlay": "^1.0.6",
"react-native-bottom-sheet-behavior": "^2.0.0",
"react-native-calendario": "^0.2.10",
"react-native-camera": "^3.30.0",
"react-native-cardview": "^2.0.2",
"react-native-copilot": "^2.4.3",
"react-native-credit-card-input": "^0.4.1",

View File

@ -1,4 +1,4 @@
import { CREATE_IDENTIFICATION_PENDING, CREATE_IDENTIFICATION_SUCCESS, CREATE_IDENTIFICATION_ERROR, CREATE_IDENTIFICATION_RESET } from "../types/IdentificationType";
import { CREATE_IDENTIFICATION_PENDING, CREATE_IDENTIFICATION_SUCCESS, CREATE_IDENTIFICATION_ERROR, CREATE_IDENTIFICATION_RESET, GET_NUMBER_DETAIL_PENDING, GET_NUMBER_DETAIL_SUCCESS, GET_NUMBER_DETAIL_ERROR, GET_NUMBER_DETAIL_RESET } from "../types/IdentificationType";
export const fetchCreateIdentificationPending = () => ({
type: CREATE_IDENTIFICATION_PENDING
@ -16,4 +16,22 @@ export const fetchCreateIdentificationError = (error) => ({
export const fetchCreateIdentificationReset = () => ({
type: CREATE_IDENTIFICATION_RESET
});
export const fetchGetNumberInformationPending = () => ({
type: GET_NUMBER_DETAIL_PENDING
});
export const fetchGetNumberInformationSuccess = (res) => ({
type: GET_NUMBER_DETAIL_SUCCESS,
result: res,
});
export const fetchGetNumberInformationError = (error) => ({
type: GET_NUMBER_DETAIL_ERROR,
result: error
});
export const fetchGetNumberInformationReset = () => ({
type: GET_NUMBER_DETAIL_RESET
});

View File

@ -0,0 +1,33 @@
import { GET_NUMBER_DETAIL_PENDING, GET_NUMBER_DETAIL_SUCCESS, GET_NUMBER_DETAIL_ERROR, GET_NUMBER_DETAIL_RESET } from "../types/IdentificationType";
const initialState = {
loading: false,
result: null,
error: null
};
export default (state = initialState, action) => {
switch (action.type) {
case GET_NUMBER_DETAIL_PENDING: return {
...state,
loading: true
}
case GET_NUMBER_DETAIL_SUCCESS: return {
...state,
loading: false,
result: action.result.data,
error: null
}
case GET_NUMBER_DETAIL_ERROR: return {
...state,
loading: false,
result: null,
error: action.result
}
case GET_NUMBER_DETAIL_RESET: return initialState;
default: {
return state;
}
}
};

View File

@ -9,6 +9,7 @@ import WalletGetCommissionReducer from "./WalletGetCommissionReducer";
import walletHistoryReducer from "./WalletTransactionHistoryReducer";
import walletTransferCommissionReducer from "./WalletTransferCommission";
import CreateIdentificationReducer from "./IdentificationReducer";
import GetNumberInformation from "./GetNumberInformation";
import { persistCombineReducers } from "redux-persist";
import { AsyncStorage } from "react-native";
@ -29,7 +30,8 @@ const rootReducer = persistCombineReducers(persistConfig, {
creditTreatDemandReducer: creditTreatDemandReducer,
creditCancelDemandReducer: creditCancelDemandReducer,
walletGetCommission: WalletGetCommissionReducer,
createIdentificationReducer: CreateIdentificationReducer
createIdentificationReducer: CreateIdentificationReducer,
getNumberInformationReducer: GetNumberInformation
});
export default rootReducer;

View File

@ -1,4 +1,9 @@
export const CREATE_IDENTIFICATION_PENDING = 'CREATE_IDENTIFICATION_PENDING';
export const CREATE_IDENTIFICATION_SUCCESS = 'CREATE_IDENTIFICATION_SUCCESS';
export const CREATE_IDENTIFICATION_ERROR = 'CREATE_IDENTIFICATION_ERROR';
export const CREATE_IDENTIFICATION_RESET = 'CREATE_IDENTIFICATION_RESET';
export const CREATE_IDENTIFICATION_RESET = 'CREATE_IDENTIFICATION_RESET';
export const GET_NUMBER_DETAIL_PENDING = 'GET_NUMBER_DETAIL_PENDING';
export const GET_NUMBER_DETAIL_SUCCESS = 'GET_NUMBER_DETAIL_SUCCESS';
export const GET_NUMBER_DETAIL_ERROR = 'GET_NUMBER_DETAIL_ERROR';
export const GET_NUMBER_DETAIL_RESET = 'GET_NUMBER_DETAIL_RESET';

View File

@ -34,5 +34,6 @@
"walletSelect": "walletSelect",
"walletOptionSelect": "walletOptionSelect",
"createIdentification": "createIdentification",
"createIdentificationUser": "createIdentificationUser",
"validateIdentification": "validateIdentification"
}

View File

@ -0,0 +1,625 @@
import React, { Component } from 'react';
import { Alert, ActivityIndicator, StyleSheet, Text, View, Image, ScrollView, Platform, ProgressBarAndroid, PermissionsAndroid, Keyboard } from 'react-native';
import PropTypes from 'prop-types';
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { responsiveHeight, responsiveWidth, responsiveFontSize } from 'react-native-responsive-dimensions';
import { Fumi, Kaede } from 'react-native-textinput-effects'
import * as Animatable from 'react-native-animatable';
import Button from 'apsl-react-native-button';
let theme = require('./../../utils/theme.json');
let route = require('./../../route.json');
import I18n from 'react-native-i18n';
import isEqual from 'lodash/isEqual';
import isNil from 'lodash/isNil';
import { Color } from '../../config/Color';
import DateTimePicker from '@react-native-community/datetimepicker';
import { Dropdown } from 'react-native-material-dropdown';
import { getPositionInformation } from './../../webservice/MapService';
import { ProgressDialog } from 'react-native-simple-dialogs';
import { getCountryNetwork, createGeolocatedAccount, createUserAccount, getTownInformationName, getListCountriesActive, getCodeInformation, readUser } from './../../webservice/AuthApi';
import { SinglePickerMaterialDialog, MultiPickerMaterialDialog, MaterialDialog } from "react-native-material-dialog";
import Geolocation from 'react-native-geolocation-service';
import { identityPieces } from '../../utils/UtilsFunction';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createIndentificationAction, createIndentificationResetAction } from '../../webservice/IdentificationApi';
const GEOLOCATION_OPTIONS = { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true };
const moment = require('moment');
class CreateIdentificationUser extends Component {
static navigatorStyle = {
navBarBackgroundColor: Color.primaryColor,
statusBarColor: Color.primaryDarkColor,
navBarTextColor: '#FFFFFF',
navBarButtonColor: '#FFFFFF'
};
static navigationOptions = () => {
return {
drawerLabel: () => null,
headerTitle: I18n.t('CREATION_IDENTIFICATION_DESCRIPTION'),
headerTintColor: 'white',
headerStyle: {
backgroundColor: Color.primaryColor,
marginTop: 0,
color: 'white'
},
headerTitleStyle: {
color: "white"
},
title: I18n.t('CREATION_IDENTIFICATION_DESCRIPTION')
}
};
constructor(props) {
super(props);
this.state = {
lastname: '',
numeroIdentite: null,
dateNaissance: null,
dateExpiration: null,
networksinglePickerVisible: false,
isLoging: false,
countries: [],
town: [],
townName: null,
country: null,
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
snackVisible: false,
snackText: '',
disableNetwork: false,
networks: [],
showPickerDateNaissance: false,
showPickerDateExpiration: false,
modalVisible: true,
select_network: I18n.t("SELECT_NETWORK"),
user: null,
triggerSubmitClick: false
};
this.dateNaissanceFumiProps = {};
this.dateExpirationFumiProps = {};
this.props.createIndentificationResetAction();
}
componentDidMount() {
readUser().then((user) => {
if (user) {
if (user !== undefined) {
this.setState({
user,
lastname: `${user.firstname} ${user.lastname}`
});
}
}
});
if (Platform.OS === 'android') {
this.requestCameraPermission();
} else {
this.watchLocation();
}
}
renderCreateIdentificationResponse() {
const { result, error } = this.props;
console.log("PROPS", this.props);
if (result !== null) {
if (typeof result.response !== 'undefined') {
Alert.alert(
I18n.t('SUCCESS_IDENTIFICATION'),
result.response,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
this.setState({ triggerSubmitClick: false });
this.props.navigation.pop();
}
}
],
{ cancelable: false }
)
}
}
if (error !== null) {
if (typeof error.data !== 'undefined') {
Alert.alert(
I18n.t('ERROR_IDENTIFICATION'),
error.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
this.setState({ triggerSubmitClick: false });
}
}
],
{ cancelable: false }
)
} else {
Alert.alert(
I18n.t('ERROR_IDENTIFICATION'),
JSON.stringify(error),
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
}
}
],
{ cancelable: false }
)
}
}
}
componentWillUpdate(nextProps, nextState) {
let dateNaissance = nextState.dateNaissance || new Date();
if (this.state.showPickerDateNaissance)
this.dateNaissanceFumiProps.value = moment(dateNaissance).format('DD-MM-YYYY');
if (this.state.showPickerDateExpiration)
this.dateExpirationFumiProps.value = moment(nextState.dateExpiration).format('DD-MM-YYYY');
}
componentWillUnmount() {
this.mounted = false;
if (this.watchID) Geolocation.clearWatch(this.watchID);
}
showErrorDialog() {
this.setState({ modalDialog: false })
Aler.alert("Une erreur est survenue", "Impossible de récuperer des informations du pays verifier que votre gps est activé," +
"et que vous êtes connecté à internet puis ressayer", [{
text: "Recommencer", onPress: () => {
this.watchLocation()
}
}, { text: "Annuler", onPress: () => { this.props.navigation.popToTop() } }])
}
async watchLocation() {
Geolocation.getCurrentPosition((position) => {
this.treatPosition(position)
}, (e) => {
this.showErrorDialog()
}, this.props.geolocationOptions);
if (!this.watchID) {
Geolocation.watchPosition((position) => { this.treatPosition(position) }, (e) => { this.showErrorDialog() }, this.props.geolocationOptions)
}
}
async requestCameraPermission() {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
{
'title': 'Cool Photo App Camera Permission',
'message': 'Cool Photo App needs access to your camera ' +
'so you can take awesome pictures.'
}
)
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
this.watchLocation();
} else {
this.setState({ modalDialog: false })
Alert.alert("Echec à l'autorisation",
"L'application n'est pas autorisé à acceder à votre position veuillez verifier que votre GPS est activé et configurer en mode Haute Precision",
[{
text: "Ok", onPress: () => {
this.props.navigation.popToTop()
}
}])
}
} catch (err) {
this.setState({ modalDialog: false })
Alert.alert("Une erreur est Survenue",
"Une erreur est survenu lors du demarrage de l'application veuillez relancer l'application",
[{
text: "Ok", onPress: () => {
BackHandler.exitApp()
}
}])
}
}
treatPosition(position) {
const myLastPosition = this.state.myPosition;
const myPosition = position.coords;
if (!isEqual(myPosition, myLastPosition)) {
getPositionInformation(myPosition).then((response) => {
if (response.results !== undefined) {
if (response.results.length > 0) {
let most = response.results[0]
let { address_components, formatted_address, place_id } = most
this.setState({ address: address_components, textadress: formatted_address, place: place_id })
let results = response.results;
let shortcountry;
let mcountry;
for (let i = 0; i < results[0].address_components.length; i++) {
for (let j = 0; j < results[0].address_components[i].types.length; j++) {
if (results[0].address_components[i].types[j] === "country") {
mcountry = results[0].address_components[i];
shortcountry = mcountry.short_name;
this.setState({ shortCountry: mcountry.short_name, longCountry: mcountry.long_name })
} else if (results[0].address_components[i].types[j] === "locality") {
const name = results[0].address_components[i].short_name;
this.setState({ townName: name });
getTownInformationName(name).then((result) => {
let town = null;
if (result instanceof Array) {
town = result[0];
} else {
town = result;
}
this.setState({ modalVisible: false, town: new Array(town) });
})
}
}
}
getListCountriesActive().then((cnt) => {
this.setState({ countries: cnt })
console.debug(cnt, shortcountry);
var found = false
for (let i of cnt) {
if (i.code_country === shortcountry) {
found = true;
this.setState({ modalVisible: false, country: i.name })
/* this.getNetworks(i.code_dial); */
}
}
if (!found) {
Alert.alert("Impossible de recupérer vos informations", "Nous n'avons pas pu recuperer les informations de votre pays veuillez contacter les administrateurs", [{ text: "OK" }]);
}
})
}
}
}).catch((e) => {
this.showErrorDialog()
});
this.setState({ myPosition: myPosition });
/* if (this.mapRef !== undefined && this.mapRef !== null) {
this.mapRef.animateToCoordinate({
latitude: myPosition.latitude,
longitude: myPosition.longitude
}, 1000);
this.mapRef.animateToRegion({
latitude: myPosition.latitude,
longitude: myPosition.longitude,
latitudeDelta: 0.03,
longitudeDelta: 0.01,
}, 1000)
} */
}
}
onChangeDateNaissance = (event, selectedDate) => {
let dateNaissance = isNil(this.state.dateNaissance) ? new Date() : this.state.dateNaissance;
const currentDate = selectedDate || dateNaissance;
this.setState({
showPickerDateNaissance: Platform.OS === 'ios' || false,
dateNaissance: currentDate,
});
};
onChangeDateExpiration = (event, selectedDate) => {
let dateExpiration = isNil(this.state.dateExpiration) ? new Date() : this.state.dateExpiration;
const currentDate = selectedDate || dateExpiration;
this.setState({
showPickerDateExpiration: Platform.OS === 'ios' || false,
dateExpiration: currentDate,
});
};
ckeckIfFieldIsOK(champ) {
return (isNil(champ) || isEqual(champ.length, 0));
}
onSubmitIdentityClient = () => {
const { lastname, numeroIdentite, dateNaissance, dateExpiration, country, townName, identityPiecesName } = this.state;
if (this.ckeckIfFieldIsOK(lastname))
this.lastnameAnim.shake(800);
else if (this.ckeckIfFieldIsOK(dateNaissance))
this.datenaissanceAnim.shake(800);
else if (this.ckeckIfFieldIsOK(country))
this.countryAnim.shake(800);
else if (this.ckeckIfFieldIsOK(townName))
this.townAnim.shake(800);
else if (this.ckeckIfFieldIsOK(identityPiecesName))
this.identityPiecesAnim.shake(800);
else if (this.ckeckIfFieldIsOK(numeroIdentite))
this.numeroIdentiteAnim.shake(800);
else if (this.ckeckIfFieldIsOK(dateExpiration))
this.identityDateExpiryAnim.shake(800);
else {
this.props.createIndentificationAction({
lastname: this.state.lastname,
firstname: "",
birth_date: moment(this.state.dateNaissance).format('DD-MM-YYYY'),
town: this.state.townName,
country: this.state.country,
identity_document: this.state.identityPiecesName,
id_identity_document: this.state.numeroIdentite,
expiry_date_document: moment(this.state.dateExpiration).format('DD-MM-YYYY'),
phone_number: null,
id_user: 321
});
}
this.setState({
triggerSubmitClick: true
})
}
renderLoaderModal() {
return (
<MaterialDialog
visible={this.state.modalVisible}
title={I18n.t("LOADING_INFO")}>
<View style={{ justifyContent: 'center', alignItems: 'center' }}>
<Text>{I18n.t("LOADING_DESCRIPTION_COUNTRY")}</Text>
<ProgressBarAndroid />
</View>
</MaterialDialog>)
}
renderLoader = () => {
return (
<ProgressDialog
visible={this.props.loading}
title={I18n.t('LOADING')}
message={I18n.t('LOADING_INFO')}
/>
)
}
renderDateNaissancePicker = () => {
return (
<DateTimePicker
testID="dateTimePicker"
timeZoneOffsetInMinutes={0}
is24Hour={true}
value={isNil(this.state.dateNaissance) ? new Date() : this.state.dateNaissance}
mode='date'
maximumDate={new Date()}
display="spinner"
onChange={this.onChangeDateNaissance}
/>
);
}
renderDateExpirationPicker = () => {
return (
<DateTimePicker
testID="dateTimePicker"
timeZoneOffsetInMinutes={0}
is24Hour={true}
value={isNil(this.state.dateExpiration) ? new Date() : this.state.dateExpiration}
mode='date'
maximumDate={new Date(2300, 10, 20)}
display="spinner"
onChange={this.onChangeDateExpiration}
/>
);
}
render() {
console.log("STATE", this.state);
return (
<>
{this.state.showPickerDateNaissance && this.renderDateNaissancePicker()}
{this.state.showPickerDateExpiration && this.renderDateExpirationPicker()}
{this.state.modalVisible && this.renderLoaderModal()}
{this.props.loading && this.renderLoader()}
{this.state.triggerSubmitClick && this.renderCreateIdentificationResponse()}
<ScrollView style={styles.container}>
<Text style={styles.subbigtitle}>{I18n.t('CREATE_IDENTIFICATION_TITLE')}</Text>
<Animatable.View ref={(comp) => { this.lastnameAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user'}
label={`${I18n.t('NAME')} ${I18n.t('AND')} ${I18n.t('FIRSTNAME')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.lastname}
onChangeText={(lastname) => {
this.setState({ lastname })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.datenaissanceAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar'}
label={I18n.t('DATE_NAISSANCE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateNaissance: true })
}}
{...this.dateNaissanceFumiProps}>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.countryAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('COUNTRY_CHOICE')}
data={this.state.countries}
useNativeDriver={true}
value={this.state.country === null ? "" :
this.state.country}
onChangeText={(value, index, data) => {
this.setState({ country: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.townAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('CHOICE_TOWN')}
data={this.state.town}
useNativeDriver={true}
value={this.state.townName === null ? "" :
this.state.townName}
onChangeText={(value, index, data) => {
this.setState({ townName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityPiecesAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('PIECE_IDENTITE')}
data={this.state.identityPieces}
useNativeDriver={true}
value={this.state.identityPiecesName}
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'address-card'}
label={`${I18n.t('NUMERO_IDENTITE')}`}
iconColor={'#f95a25'}
iconSize={20}
onChangeText={(numeroIdentite) => {
this.setState({ numeroIdentite })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityDateExpiryAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar-times-o'}
label={I18n.t('IDENTITY_PIECE_EXPIRY_DATE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateExpiration: true })
}}
{...this.dateExpirationFumiProps}>
</Fumi>
</Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitIdentityClient() }}>
{I18n.t('SUBMIT_LABEL')}</Button>
</ScrollView>
</>
)
}
}
const maptStateToProps = state => ({
loading: state.createIdentificationReducer.loading,
result: state.createIdentificationReducer.result,
error: state.createIdentificationReducer.error,
});
const mapDispatchToProps = dispatch => bindActionCreators({
createIndentificationAction,
createIndentificationResetAction
}, dispatch);
export default connect(maptStateToProps, mapDispatchToProps)(CreateIdentificationUser);
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Color.primaryDarkColor,
},
textbtnvalide: {
color: 'white',
fontWeight: 'bold'
},
bigtitle: {
color: 'white',
fontSize: 20,
flex: 1,
fontWeight: 'bold',
textAlign: 'center',
margin: 20,
},
subbigtitle: {
color: 'white',
fontSize: 17,
textAlign: 'center',
margin: 5,
},
btnvalide: {
marginTop: 20,
marginLeft: 20,
marginRight: 20,
borderColor: 'transparent',
backgroundColor: Color.accentLightColor,
height: 52
},
input: {
height: 60,
marginTop: responsiveHeight(2),
marginLeft: responsiveWidth(5),
marginRight: responsiveWidth(5),
borderRadius: 5,
}
});

View File

@ -24,7 +24,7 @@ import Geolocation from 'react-native-geolocation-service';
import { identityPieces } from '../../utils/UtilsFunction';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createIndentificationAction, createIndentificationResetAction } from '../../webservice/IdentificationApi';
import { createIndentificationAction, createIndentificationResetAction, getNumberResetAction, getNumberDetailAction } from '../../webservice/IdentificationApi';
const GEOLOCATION_OPTIONS = { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true };
const moment = require('moment');
@ -66,6 +66,7 @@ class CreateIdentification extends Component {
numeroTelephone: null,
networksinglePickerVisible: false,
confirmpassanim: null,
userId: null,
isLoging: false,
countries: [],
town: [],
@ -82,11 +83,15 @@ class CreateIdentification extends Component {
modalVisible: true,
select_network: I18n.t("SELECT_NETWORK"),
user: null,
triggerSubmitClick: false
triggerSubmitClick: false,
triggerNextClick: false,
displayFirstStep: true,
displaySecondStep: false,
};
this.dateNaissanceFumiProps = {};
this.dateExpirationFumiProps = {};
this.props.createIndentificationResetAction();
this.props.getNumberResetAction();
}
componentDidMount() {
@ -115,12 +120,14 @@ class CreateIdentification extends Component {
if (result !== null) {
if (typeof result.response !== 'undefined') {
Alert.alert(
"SUCCES",
JSON.stringify(result.response),
I18n.t('SUCCESS_IDENTIFICATION'),
result.response,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
this.setState({ triggerSubmitClick: false });
this.props.navigation.pop();
}
}
@ -133,12 +140,13 @@ class CreateIdentification extends Component {
if (error !== null) {
if (typeof error.data !== 'undefined') {
Alert.alert(
"ERREUR",
JSON.stringify(error.data),
I18n.t('ERROR_IDENTIFICATION'),
error.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
this.setState({ triggerSubmitClick: false });
}
}
@ -147,7 +155,7 @@ class CreateIdentification extends Component {
)
} else {
Alert.alert(
"ERREUR",
I18n.t('ERROR_IDENTIFICATION'),
JSON.stringify(error),
[
{
@ -162,9 +170,12 @@ class CreateIdentification extends Component {
}
}
}
componentWillUpdate(nextProps, nextState) {
let dateNaissance = nextState.dateNaissance || new Date();
if (this.state.showPickerDateNaissance)
this.dateNaissanceFumiProps.value = moment(nextState.dateNaissance).format('DD-MM-YYYY');
this.dateNaissanceFumiProps.value = moment(dateNaissance).format('DD-MM-YYYY');
if (this.state.showPickerDateExpiration)
this.dateExpirationFumiProps.value = moment(nextState.dateExpiration).format('DD-MM-YYYY');
}
@ -308,21 +319,41 @@ class CreateIdentification extends Component {
}
onChangeDateNaissance = (event, selectedDate) => {
const currentDate = selectedDate || new Date();
let dateNaissance = isNil(this.state.dateNaissance) ? new Date() : this.state.dateNaissance;
const currentDate = selectedDate || dateNaissance;
this.setState({
showPickerDateNaissance: Platform.OS === 'ios' || false,
dateNaissance: moment(currentDate).format('DD-MM-YYYY'),
dateNaissance: currentDate,
});
};
onChangeDateExpiration = (event, selectedDate) => {
const currentDate = selectedDate || new Date();
let dateExpiration = isNil(this.state.dateExpiration) ? new Date() : this.state.dateExpiration;
const currentDate = selectedDate || dateExpiration;
this.setState({
showPickerDateExpiration: Platform.OS === 'ios' || false,
dateExpiration: moment(currentDate).format('DD-MM-YYYY'),
dateExpiration: currentDate,
});
};
onSubmitNextStep = () => {
const { numeroTelephone } = this.state;
this.props.getNumberResetAction();
if (this.ckeckIfFieldIsOK(numeroTelephone))
this.numeroTelephoneAnim.shake(800);
else {
this.props.getNumberDetailAction(numeroTelephone);
this.setState({ triggerNextClick: true });
}
}
onSubmitPrevious = () => {
this.setState({
displayFirstStep: !this.state.displayFirstStep,
displaySecondStep: !this.state.displaySecondStep,
})
}
ckeckIfFieldIsOK(champ) {
return (isNil(champ) || isEqual(champ.length, 0));
}
@ -332,8 +363,6 @@ class CreateIdentification extends Component {
if (this.ckeckIfFieldIsOK(lastname))
this.lastnameAnim.shake(800);
if (this.ckeckIfFieldIsOK(numeroTelephone))
this.numeroTelephoneAnim.shake(800);
else if (this.ckeckIfFieldIsOK(dateNaissance))
this.datenaissanceAnim.shake(800);
else if (this.ckeckIfFieldIsOK(country))
@ -347,16 +376,18 @@ class CreateIdentification extends Component {
else if (this.ckeckIfFieldIsOK(dateExpiration))
this.identityDateExpiryAnim.shake(800);
else {
moment(dateNaissance).format('DD-MM-YYYY')
this.props.createIndentificationAction({
lastname: this.state.lastname,
firstname: "",
birth_date: this.state.dateNaissance,
birth_date: moment(this.state.dateNaissance).format('DD-MM-YYYY'),
town: this.state.townName,
country: this.state.country,
identity_document: this.state.identityPiecesName,
id_identity_document: this.state.numeroIdentite,
expiry_date_document: this.state.dateExpiration,
id_user: 321
expiry_date_document: moment(this.state.dateExpiration).format('DD-MM-YYYY'),
phone_number: this.state.numeroTelephone,
id_user: this.state.userId
});
}
this.setState({
@ -365,6 +396,75 @@ class CreateIdentification extends Component {
}
renderGetNumberResponse = () => {
const { resultNumberDetail, errorNumberDetail } = this.props;
console.log("PROPS", this.props);
if (resultNumberDetail !== null) {
if (resultNumberDetail.status === 200) {
this.setState({
lastname: resultNumberDetail.response.lastname,
userId: resultNumberDetail.response.id,
displayFirstStep: !this.state.displayFirstStep,
displaySecondStep: !this.state.displaySecondStep,
});
this.props.getNumberResetAction();
}
/* if (typeof resultNumberDetail.response !== 'undefined') {
Alert.alert(
"SUCCES",
JSON.stringify(resultNumberDetail.response),
[
{
text: I18n.t("OK"), onPress: () => {
this.props.getNumberResetAction();
this.setState({ triggerNextClick: false })
}
}
],
{ cancelable: false }
)
} */
}
if (errorNumberDetail !== null) {
if (typeof errorNumberDetail.data !== 'undefined') {
Alert.alert(
I18n.t('ERROR_IDENTIFICATION'),
errorNumberDetail.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
this.setState({ triggerNextClick: false })
}
}
],
{ cancelable: false }
)
} else {
Alert.alert(
I18n.t('ERROR_IDENTIFICATION'),
JSON.stringify(errorNumberDetail),
[
{
text: I18n.t("OK"), onPress: () => {
this.props.createIndentificationResetAction();
}
}
],
{ cancelable: false }
)
}
}
}
renderLoaderModal() {
return (
<MaterialDialog
@ -380,7 +480,7 @@ class CreateIdentification extends Component {
renderLoader = () => {
return (
<ProgressDialog
visible={this.props.loading}
visible={this.props.loading || this.props.loadingNumberDetail}
title={I18n.t('LOADING')}
message={I18n.t('LOADING_INFO')}
/>
@ -393,7 +493,7 @@ class CreateIdentification extends Component {
testID="dateTimePicker"
timeZoneOffsetInMinutes={0}
is24Hour={true}
value={this.state.dateNaissance === null ? new Date() : this.state.dateNaissance}
value={isNil(this.state.dateNaissance) ? new Date() : this.state.dateNaissance}
mode='date'
maximumDate={new Date()}
display="spinner"
@ -408,7 +508,7 @@ class CreateIdentification extends Component {
testID="dateTimePicker"
timeZoneOffsetInMinutes={0}
is24Hour={true}
value={this.state.dateExpiration === null ? new Date() : this.state.dateExpiration}
value={isNil(this.state.dateExpiration) ? new Date() : this.state.dateExpiration}
mode='date'
maximumDate={new Date(2300, 10, 20)}
display="spinner"
@ -425,151 +525,176 @@ class CreateIdentification extends Component {
{this.state.showPickerDateNaissance && this.renderDateNaissancePicker()}
{this.state.showPickerDateExpiration && this.renderDateExpirationPicker()}
{this.state.modalVisible && this.renderLoaderModal()}
{this.props.loading && this.renderLoader()}
{(this.props.loading || this.props.loadingNumberDetail) && this.renderLoader()}
{this.state.triggerSubmitClick && this.renderCreateIdentificationResponse()}
{this.state.triggerNextClick && this.renderGetNumberResponse()}
<ScrollView style={styles.container}>
<Text style={styles.subbigtitle}>{I18n.t('CREATE_IDENTIFICATION_TITLE')}</Text>
<Animatable.View ref={(comp) => { this.lastnameAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user'}
label={`${I18n.t('NAME')} ${I18n.t('AND')} ${I18n.t('FIRSTNAME')}`}
iconColor={'#f95a25'}
iconSize={20}
onChangeText={(lastname) => {
this.setState({ lastname })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroTelephoneAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'phone'}
label={I18n.t('PHONE')}
iconColor={'#f95a25'}
value={this.state.numeroTelephone === null ? this.state.indicatif : this.state.numeroTelephone}
iconSize={20}
onChangeText={(numeroTelephone) => {
this.setState({ numeroTelephone })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.datenaissanceAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar'}
label={I18n.t('DATE_NAISSANCE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateNaissance: true })
}}
{...this.dateNaissanceFumiProps}>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.countryAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('COUNTRY_CHOICE')}
data={this.state.countries}
useNativeDriver={true}
value={this.state.country === null ? "" :
this.state.country}
onChangeText={(value, index, data) => {
this.setState({ country: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.townAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('CHOICE_TOWN')}
data={this.state.town}
useNativeDriver={true}
value={this.state.townName === null ? "" :
this.state.townName}
onChangeText={(value, index, data) => {
this.setState({ townName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityPiecesAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('PIECE_IDENTITE')}
data={this.state.identityPieces}
useNativeDriver={true}
value={this.state.identityPiecesName}
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'address-card'}
label={`${I18n.t('NUMERO_IDENTITE')}`}
iconColor={'#f95a25'}
iconSize={20}
onChangeText={(numeroIdentite) => {
this.setState({ numeroIdentite })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityDateExpiryAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar-times-o'}
label={I18n.t('IDENTITY_PIECE_EXPIRY_DATE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateExpiration: true })
}}
{...this.dateExpirationFumiProps}>
</Fumi>
</Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitIdentityClient() }}>
{I18n.t('SUBMIT_LABEL')}</Button>
{this.state.displayFirstStep &&
<>
<Text style={styles.subbigtitle}>{I18n.t('CREATE_IDENTIFICATION_TITLE')}</Text>
<Animatable.View ref={(comp) => { this.numeroTelephoneAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'phone'}
label={I18n.t('PHONE')}
iconColor={'#f95a25'}
value={this.state.numeroTelephone === null ? this.state.indicatif : this.state.numeroTelephone}
iconSize={20}
onChangeText={(numeroTelephone) => {
this.setState({ numeroTelephone })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.countryAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('COUNTRY_CHOICE')}
data={this.state.countries}
useNativeDriver={true}
value={this.state.country === null ? "" :
this.state.country}
onChangeText={(value, index, data) => {
this.setState({ country: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.townAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('CHOICE_TOWN')}
data={this.state.town}
useNativeDriver={true}
value={this.state.townName === null ? "" :
this.state.townName}
onChangeText={(value, index, data) => {
this.setState({ townName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitNextStep() }}>
{I18n.t('NEXT')}</Button>
</>}
{this.state.displaySecondStep &&
<>
<Animatable.View ref={(comp) => { this.lastnameAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user'}
label={`${I18n.t('NAME')} ${I18n.t('AND')} ${I18n.t('FIRSTNAME')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.lastname}
onChangeText={(lastname) => {
this.setState({ lastname })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.datenaissanceAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar'}
label={I18n.t('DATE_NAISSANCE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateNaissance: true })
}}
{...this.dateNaissanceFumiProps}>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityPiecesAnim = comp }}
style={{
width: responsiveWidth(90),
height: 60,
marginTop: 20,
alignSelf: 'center',
borderRadius: 10,
paddingLeft: 20,
paddingRight: 20,
backgroundColor: 'white'
}}>
<Dropdown
label={I18n.t('PIECE_IDENTITE')}
data={this.state.identityPieces}
useNativeDriver={true}
value={this.state.identityPiecesName}
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'address-card'}
label={`${I18n.t('NUMERO_IDENTITE')}`}
iconColor={'#f95a25'}
iconSize={20}
onChangeText={(numeroIdentite) => {
this.setState({ numeroIdentite })
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityDateExpiryAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'calendar-times-o'}
label={I18n.t('IDENTITY_PIECE_EXPIRY_DATE')}
iconColor={'#f95a25'}
iconSize={20}
style={styles.input}
onFocus={() => {
Keyboard.dismiss();
this.setState({ showPickerDateExpiration: true })
}}
{...this.dateExpirationFumiProps}>
</Fumi>
</Animatable.View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', flex: 1 }}>
<Button style={styles.btnSubmit}
textStyle={styles.textbtnvalide}
onPress={() => { this.onSubmitPrevious() }}>
{I18n.t('PREVIOUS')}</Button>
<Button style={styles.btnSubmit}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitIdentityClient() }}>
{I18n.t('SUBMIT_LABEL')}</Button>
</View>
</>
}
</ScrollView>
</>
)
@ -580,11 +705,17 @@ const maptStateToProps = state => ({
loading: state.createIdentificationReducer.loading,
result: state.createIdentificationReducer.result,
error: state.createIdentificationReducer.error,
loadingNumberDetail: state.getNumberInformationReducer.loading,
resultNumberDetail: state.getNumberInformationReducer.result,
errorNumberDetail: state.getNumberInformationReducer.error,
});
const mapDispatchToProps = dispatch => bindActionCreators({
createIndentificationAction,
createIndentificationResetAction
createIndentificationResetAction,
getNumberDetailAction,
getNumberResetAction
}, dispatch);
export default connect(maptStateToProps, mapDispatchToProps)(CreateIdentification);
@ -620,6 +751,15 @@ const styles = StyleSheet.create({
backgroundColor: Color.accentLightColor,
height: 52
},
btnSubmit: {
marginTop: 20,
borderColor: 'transparent',
backgroundColor: Color.accentLightColor,
height: 52,
width: "30%",
marginLeft: 20,
marginRight: 20,
},
input: {
height: 60,
marginTop: responsiveHeight(2),

View File

@ -23,6 +23,8 @@ import { identityPieces } from '../../utils/UtilsFunction';
const GEOLOCATION_OPTIONS = { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true };
const moment = require('moment');
import LottieView from 'lottie-react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import Camera from '../../components/Camera';
export default class ValidateIdentification extends Component {
@ -47,14 +49,16 @@ export default class ValidateIdentification extends Component {
headerTitleStyle: {
color: "white"
},
title: I18n.t('VALIDATE_IDENTIFICATION_DESCRIPTION')
title: I18n.t('VALIDATE_IDENTIFICATION_DESCRIPTION'),
}
};
constructor(props) {
super(props);
this.state = {
memberCode: null
memberCode: null,
image: null,
displayCamera: false
};
}
@ -115,6 +119,15 @@ export default class ValidateIdentification extends Component {
}
}
onPicture = ({ uri }) => {
this.setState({ image: uri, displayCamera: true });
console.log("URI", uri);
}
onBackToCamera = () => {
this.setState({ image: null, displayCamera: false });
}
render() {
console.log("STATE", this.state);
const { showPickerDateNaissance } = this.state;
@ -128,12 +141,29 @@ export default class ValidateIdentification extends Component {
justifyContent: 'center',
alignItems: 'center'
}} ref={(comp) => { this.nameanim = comp }}>
<LottieView
style={styles.lottie}
source={require('../../datas/json/identity_scan.json')}
autoPlay
loop={true}
/>
<TouchableOpacity onPress={() => {
this.onBackToCamera();
this.setState({ displayCamera: true })
}}>
{
this.state.displayCamera ?
<View style={styles.lottie}>
{
this.state.image ?
<Image source={{ uri: this.state.image }} style={{ flex: 1 }} />
: <Camera onPicture={this.onPicture} />
}
</View>
:
<LottieView
style={styles.lottie}
source={require('../../datas/json/identity_scan.json')}
autoPlay
loop={true}
/>
}
</TouchableOpacity>
</Animatable.View>
<Animatable.View ref={(comp) => { this.nameanim = comp }}>

View File

@ -252,7 +252,8 @@ export default class OptionsMenu extends Component {
}
_renderItem = (item) => {
if (item === "creditrequest" || item === 'historyItemDetails' || item === 'filter' || item === 'networks' || item === 'walletDetail' || item === 'walletDetailUser'
|| item === 'walletDepot' || item === 'walletRetrait' || item === 'createIdentification' || item === 'walletOptionSelect' || item === 'validateIdentification') {
|| item === 'walletDepot' || item === 'walletRetrait' || item === 'createIdentification' || item === 'walletOptionSelect' || item === 'validateIdentification'
|| item === 'createIdentificationUser') {
return null
} else {
const color = this.state.currentId === item.id ? theme.accent : "grey"

View File

@ -31,7 +31,7 @@ import 'moment/locale/en-nz'
import 'moment/locale/en-gb'
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionDepotScreen, optionRetraitScreen, optionRetraitUserScreen, transactionHistoryLabel, isIlinkWorldWallet, cutString, optionIdentificationScreen } from '../../utils/UtilsFunction';
import { thousandsSeparators, isEmptyObject, optionPaiementFacture, transactionHistoryUser, optionDepotUserScreen, optionDepotScreen, optionRetraitScreen, optionRetraitUserScreen, transactionHistoryLabel, isIlinkWorldWallet, cutString, optionIdentificationScreen } from '../../utils/UtilsFunction';
import DeviceInfo from 'react-native-device-info';
const thousands = require('thousands');
@ -697,7 +697,16 @@ class WalletDetail extends Component {
<View style={[styles.containerTouch]}>
<TouchableOpacity style={styles.contain}
onPress={() => { }}
onPress={() => {
this.props.navigation.push(route.walletOptionSelect, {
optionSelect: optionPaiementFacture,
onGoBack: () => this.refresh(),
lottie: {
source: require("./../../datas/json/paiement_facture.json"),
loop: true
}
})
}}
activeOpacity={0.9}>
<Icon name='file-document'

View File

@ -32,7 +32,7 @@ import 'moment/locale/en-nz'
import 'moment/locale/en-gb'
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel } from '../../utils/UtilsFunction';
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel, optionPaiementFacture } from '../../utils/UtilsFunction';
import DeviceInfo from 'react-native-device-info';
const thousands = require('thousands');
@ -496,8 +496,16 @@ class WalletDetailUser extends Component {
<View style={[styles.containerTouch]}>
<TouchableOpacity style={styles.contain}
onPress={() => { }}
activeOpacity={0.9}>
onPress={() => {
this.props.navigation.push(route.walletOptionSelect, {
optionSelect: optionPaiementFacture,
onGoBack: () => this.refresh(),
lottie: {
source: require("./../../datas/json/paiement_facture.json"),
loop: true
}
})
}} activeOpacity={0.9}>
<Icon name='file-document'
color={Color.primaryColor}
@ -526,7 +534,7 @@ class WalletDetailUser extends Component {
<TouchableOpacity style={styles.contain}
onPress={() => {
this.props.navigation.push(route.createIdentification)
this.props.navigation.push(route.createIdentificationUser)
}}
activeOpacity={0.9}>

View File

@ -206,4 +206,31 @@ export const optionIdentificationScreen = {
title: I18n.t('VALIDATE_IDENTIFICATION_DESCRIPTION'),
},
]
}
export const optionPaiementFacture = {
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPTION'),
options: [
{
screen: route.walletDepot,
icon: 'water',
title: 'Paiement eau'
},
{
screen: route.walletDepot,
icon: 'school',
title: 'Paiement école'
},
{
screen: route.walletDepot,
icon: 'file-document',
title: 'Paiement électricité'
},
{
screen: route.walletDepot,
icon: 'cellphone',
title: 'Paiement crédit téléphonique'
},
]
}

View File

@ -129,6 +129,7 @@
"ADDRESS": "Address",
"CREDIT": "Credit",
"NEXT": "Next",
"PREVIOUS": "Previous",
"SPONSOR_CODE": "Sponsor Code",
"SOLDE_UNVAIBLE": "solde unavailable",
"TEXT_BIG_CREATE_AGENT_1": "Register as Agent",
@ -184,6 +185,8 @@
"TRANSFER_COMMISSION_IMPOSSIBLE": "Commissions transfer impossible",
"ERROR_FILTER_TEXT": "Problem encountered while filtering.",
"ERROR_TREATMENT_DEMAND": "Request processing error",
"ERROR_IDENTIFICATION": "Identification error",
"SUCCESS_IDENTIFICATION": "Identification successful",
"REFUSER_DEMANDE": "Reject the request",
"ACCEPTER_DEMANDE": "Accept the request",
"REFUSED": "Refuse",

View File

@ -133,6 +133,7 @@
"ADDRESS": "Adresse",
"CREDIT": "Crédit",
"NEXT": "Suivant",
"PREVIOUS": "Précédent",
"SPONSOR_CODE": "Code parrain",
"SOLDE_UNVAIBLE": "solde non disponible",
"TEXT_BIG_CREATE_AGENT_1": "Inscrivez-vous en comme Agent",
@ -189,6 +190,8 @@
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
"ERROR_TREATMENT_DEMAND": "Erreur de traitement de la demande",
"ERROR_IDENTIFICATION": "Erreur d'identification",
"SUCCESS_IDENTIFICATION": "Identification réussie",
"REFUSER_DEMANDE": "Refuser la demande",
"REFUSED": "Refusé",
"ACCEPTER_DEMANDE": "Accepter la demande",

View File

@ -1,9 +1,10 @@
import { createIdentificationUrl } from "./IlinkConstants";
import { createIdentificationUrl, getNumberInformationUrl } from "./IlinkConstants";
import { store } from "../redux/store";
import axios from "axios";
import I18n from 'react-native-i18n'
import { fetchCreateIdentificationReset, fetchCreateIdentificationSuccess, fetchCreateIdentificationError, fetchCreateIdentificationPending } from "../redux/actions/IdentificationAction";
import { fetchCreateIdentificationReset, fetchCreateIdentificationSuccess, fetchCreateIdentificationError, fetchCreateIdentificationPending, fetchGetNumberInformationPending, fetchGetNumberInformationSuccess, fetchGetNumberInformationError, fetchGetNumberInformationReset } from "../redux/actions/IdentificationAction";
export const createIndentificationAction = (data) => {
@ -43,4 +44,42 @@ export const createIndentificationResetAction = () => {
return dispatch => {
dispatch(fetchCreateIdentificationReset());
}
}
export const getNumberDetailAction = (number) => {
const auth = store.getState().authKeyReducer;
const authKey = auth !== null ? `${auth.authKey.token_type} ${auth.authKey.access_token}` : '';
return dispatch => {
dispatch(fetchGetNumberInformationPending());
axios({
url: `${getNumberInformationUrl}/${number}`,
method: 'GET',
headers: {
'Authorization': authKey,
'X-Localization': I18n.currentLocale()
},
})
.then(response => {
console.log(response);
dispatch(fetchGetNumberInformationSuccess(response));
})
.catch(error => {
console.log(error);
if (error.response)
dispatch(fetchGetNumberInformationError(error.response));
else if (error.request)
dispatch(fetchGetNumberInformationError(error.request))
else
dispatch(fetchGetNumberInformationError(error.message))
});
}
}
export const getNumberResetAction = () => {
return dispatch => {
dispatch(fetchGetNumberInformationReset());
}
}

View File

@ -33,6 +33,7 @@ export const commissionAmount = testBaseUrl + '/walletService/transactions/commi
export const transactionUrl = testBaseUrl + '/walletService/transactions';
export const transferCommission = testBaseUrl + '/walletService/virement';
export const createIdentificationUrl = testBaseUrl + '/walletService/identifications';
export const getNumberInformationUrl = testBaseUrl + '/walletService/identifications/verify';
export const authKeyUrl = testBaseUrl + '/oauth/token';
export const videoUrl = "https://www.youtube.com/watch?v=wwGPDPsSLWY";
export const MARKER_URL = baseUrl + "/interacted/LocationAction.php";

View File

@ -6375,6 +6375,13 @@ react-native-calendario@^0.2.10:
dependencies:
moment "^2.24.0"
react-native-camera@^3.30.0:
version "3.30.0"
resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.30.0.tgz#b81ea540b06b40464a43931e86b870ffbeb280e6"
integrity sha512-rZorpBHXnc4MT9N6ddV4iC7h9dSUx4umtXvAKMkdYr3ZONlZcEfWxup7YCeAZ5wu4x43SvhSiTfYd8g0q+V0wg==
dependencies:
prop-types "^15.6.2"
react-native-cardview@^2.0.2:
version "2.0.5"
resolved "https://registry.yarnpkg.com/react-native-cardview/-/react-native-cardview-2.0.5.tgz#e7c112c15f7dafdf791e6ccba55b65a9e640ecef"