Commit 71aa7f84 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

add edit profile page design

parent ad48184d
{
"expo": {
"name": "Excelso_update 11.30 / 14.05.2020",
"name": "Excelso_update 09.00 / 14.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......@@ -41,7 +41,7 @@
"organization": "ravintola",
"project": "ravintola",
"authToken": "5a140e31fb884af58c7d9e20e8baa5ddc8fee9ac79ba427786da245b3015f6d3",
"url": "your sentry url here" // OPTIONAL- only necessary when self-hosting Sentry
"url": "your sentry url here"
}
}
]
......
import { Alert } from 'react-native';
export default function session(response,navigation) {
export default function session(response,error_status, navigation) {
if (response.code === "WRONG_SESSION_ID") {
Alert.alert(
......@@ -9,9 +9,21 @@ export default function session(response,navigation) {
'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ',
[
{ text: 'OK', onPress: () => navigation.replace('Login') }
{ text: 'OK', onPress: () => navigation.replace('Login') }
]
)
} else if (error_status == 500) {
Alert.alert(
'Server',
'Server Error ',
[
{ text: 'OK' }
]
)
}else{
Alert.alert(response_data.msg);
}
}
\ No newline at end of file
......@@ -1003,6 +1003,14 @@
"@types/hammerjs": "^2.0.36"
}
},
"@expo/spawn-async": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@expo/spawn-async/-/spawn-async-1.5.0.tgz",
"integrity": "sha512-LB7jWkqrHo+5fJHNrLAFdimuSXQ2MQ4lA7SQW5bf/HbsXuV2VrT/jN/M8f/KoWt0uJMGN4k/j7Opx4AvOOxSew==",
"requires": {
"cross-spawn": "^6.0.5"
}
},
"@expo/vector-icons": {
"version": "10.0.6",
"resolved": "https://registry.npmjs.org/@expo/vector-icons/-/vector-icons-10.0.6.tgz",
......@@ -1264,6 +1272,308 @@
"react-native-iphone-x-helper": "^1.2.1"
}
},
"@sentry/browser": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.15.5.tgz",
"integrity": "sha512-rqDvjk/EvogfdbZ4TiEpxM/lwpPKmq23z9YKEO4q81+1SwJNua53H60dOk9HpRU8nOJ1g84TMKT2Ov8H7sqDWA==",
"requires": {
"@sentry/core": "5.15.5",
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/cli": {
"version": "1.52.3",
"resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-1.52.3.tgz",
"integrity": "sha512-QOSIg5hxAEa6v6H7oEeF6A/Rpa0wloMhbu0Qed6zHv3lyoqf0Z34Kq2jCXdqGsOE3IzkO+3CNy81F6361j5TKg==",
"requires": {
"https-proxy-agent": "^5.0.0",
"mkdirp": "^0.5.5",
"node-fetch": "^2.6.0",
"progress": "^2.0.3",
"proxy-from-env": "^1.1.0"
},
"dependencies": {
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": {
"minimist": "^1.2.5"
}
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
}
}
},
"@sentry/core": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.15.5.tgz",
"integrity": "sha512-enxBLv5eibBMqcWyr+vApqeix8uqkfn0iGsD3piKvoMXCgKsrfMwlb/qo9Ox0lKr71qIlZVt+9/A2vZohdgnlg==",
"requires": {
"@sentry/hub": "5.15.5",
"@sentry/minimal": "5.15.5",
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.15.5.tgz",
"integrity": "sha512-zX9o49PcNIVMA4BZHe//GkbQ4Jx+nVofqU/Il32/IbwKhcpPlhGX3c1sOVQo4uag3cqd/JuQsk+DML9TKkN0Lw==",
"requires": {
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/integrations": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-5.15.5.tgz",
"integrity": "sha512-s9N9altnGkDH+vNNUZu1dKuMVLAgJNYtgs6DMJTrZRswFl8gzZytYTZCdpzjBgTsqkLaGbRDIjQeE/yP3gnrqw==",
"requires": {
"@sentry/types": "5.15.5",
"@sentry/utils": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.15.5.tgz",
"integrity": "sha512-zQkkJ1l9AjmU/Us5IrOTzu7bic4sTPKCatptXvLSTfyKW7N6K9MPIIFeSpZf9o1yM2sRYdK7GV08wS2eCT3JYw==",
"requires": {
"@sentry/hub": "5.15.5",
"@sentry/types": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/react-native": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/@sentry/react-native/-/react-native-1.3.8.tgz",
"integrity": "sha512-IGyieKGATYJp0PDqrmJsbtuhzFHnvYyDIMdNtDGA/28mY5I/xTWGEtChwiOuBIGQyYaocGUK9hWEfKKO2Ebhew==",
"requires": {
"@sentry/browser": "^5.15.4",
"@sentry/core": "^5.15.4",
"@sentry/integrations": "^5.15.4",
"@sentry/types": "^5.15.4",
"@sentry/utils": "^5.15.4",
"@sentry/wizard": "^1.1.1"
}
},
"@sentry/types": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.15.5.tgz",
"integrity": "sha512-F9A5W7ucgQLJUG4LXw1ZIy4iLevrYZzbeZ7GJ09aMlmXH9PqGThm1t5LSZlVpZvUfQ2rYA8NU6BdKJSt7B5LPw=="
},
"@sentry/utils": {
"version": "5.15.5",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.15.5.tgz",
"integrity": "sha512-Nl9gl/MGnzSkuKeo3QaefoD/OJrFLB8HmwQ7HUbTXb6E7yyEzNKAQMHXGkwNAjbdYyYbd42iABP6Y5F/h39NtA==",
"requires": {
"@sentry/types": "5.15.5",
"tslib": "^1.9.3"
}
},
"@sentry/wizard": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@sentry/wizard/-/wizard-1.1.2.tgz",
"integrity": "sha512-z7Ck5uli91omT+xSGzOXA3XNj0IUFritzZ5Qjf/KcuSUZuyqLCH2olAR6pXl262tC6kBbWw/xb+AOgPsAQ7u/Q==",
"requires": {
"@sentry/cli": "^1.51.0",
"chalk": "^2.4.1",
"glob": "^7.1.3",
"inquirer": "^6.2.0",
"lodash": "^4.17.15",
"opn": "^5.4.0",
"r2": "^2.0.1",
"read-env": "^1.3.0",
"xcode": "2.0.0",
"yargs": "^12.0.2"
},
"dependencies": {
"chardet": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
"integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
},
"cliui": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
"requires": {
"string-width": "^2.1.1",
"strip-ansi": "^4.0.0",
"wrap-ansi": "^2.0.0"
},
"dependencies": {
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
}
}
},
"external-editor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
"integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
"requires": {
"chardet": "^0.7.0",
"iconv-lite": "^0.4.24",
"tmp": "^0.0.33"
}
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"inquirer": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz",
"integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==",
"requires": {
"ansi-escapes": "^3.2.0",
"chalk": "^2.4.2",
"cli-cursor": "^2.1.0",
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
"lodash": "^4.17.12",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
"string-width": "^2.1.0",
"strip-ansi": "^5.1.0",
"through": "^2.3.6"
}
},
"invert-kv": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
},
"lcid": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
"requires": {
"invert-kv": "^2.0.0"
}
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"mem": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
"integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^2.0.0",
"p-is-promise": "^2.0.0"
}
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
},
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
"requires": {
"execa": "^1.0.0",
"lcid": "^2.0.0",
"mem": "^4.0.0"
}
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"rxjs": {
"version": "6.5.5",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
"integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
"requires": {
"tslib": "^1.9.0"
}
},
"xcode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xcode/-/xcode-2.0.0.tgz",
"integrity": "sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw==",
"requires": {
"simple-plist": "^1.0.0",
"uuid": "^3.3.2"
}
},
"yargs": {
"version": "12.0.5",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
"integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
"requires": {
"cliui": "^4.0.0",
"decamelize": "^1.2.0",
"find-up": "^3.0.0",
"get-caller-file": "^1.0.1",
"os-locale": "^3.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1 || ^4.0.0",
"yargs-parser": "^11.1.1"
}
},
"yargs-parser": {
"version": "11.1.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
}
}
},
"@shankarmorwal/rn-viewpager": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/@shankarmorwal/rn-viewpager/-/rn-viewpager-1.2.11.tgz",
......@@ -1449,6 +1759,14 @@
"lodash.get": "4.4.2"
}
},
"agent-base": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz",
"integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==",
"requires": {
"debug": "4"
}
},
"ansi-colors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
......@@ -1964,6 +2282,11 @@
"rsvp": "^4.8.4"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
......@@ -3783,6 +4106,15 @@
"toidentifier": "1.0.0"
}
},
"https-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
"integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
"requires": {
"agent-base": "6",
"debug": "4"
}
},
"hyphenate-style-name": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz",
......@@ -4028,6 +4360,11 @@
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
......@@ -5355,6 +5692,14 @@
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
},
"opn": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz",
"integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
"requires": {
"is-wsl": "^1.1.0"
}
},
"options": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz",
......@@ -5733,6 +6078,11 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"progress": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
......@@ -5756,6 +6106,11 @@
"react-is": "^16.8.1"
}
},
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
......@@ -5790,6 +6145,23 @@
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA=="
},
"r2": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/r2/-/r2-2.0.1.tgz",
"integrity": "sha512-EEmxoxYCe3LHzAUhRIRxdCKERpeRNmlLj6KLUSORqnK6dWl/K5ShmDGZqM2lRZQeqJgF+wyqk0s1M7SWUveNOQ==",
"requires": {
"caseless": "^0.12.0",
"node-fetch": "^2.0.0-alpha.8",
"typedarray-to-buffer": "^3.1.2"
},
"dependencies": {
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
}
}
},
"raf": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
......@@ -6807,6 +7179,21 @@
"tween-functions": "^1.0.1"
}
},
"read-env": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/read-env/-/read-env-1.3.0.tgz",
"integrity": "sha512-DbCgZ8oHwZreK/E2E27RGk3EUPapMhYGSGIt02k9sX6R3tCFc4u4tkltKvkCvzEQ3SOLUaiYHAnGb+TdsnPp0A==",
"requires": {
"camelcase": "5.0.0"
},
"dependencies": {
"camelcase": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz",
"integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA=="
}
}
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
......@@ -7143,6 +7530,26 @@
}
}
},
"sentry-expo": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/sentry-expo/-/sentry-expo-2.0.4.tgz",
"integrity": "sha512-yKo3j/DK2FlACoTvEUKhdrQvaHEFIPB6BE5PlBKA4HF/cErDVfrFQjYuJU2jdrG/+H0BqEQoKoMg/Yt6+v2stQ==",
"requires": {
"@expo/spawn-async": "^1.2.8",
"@sentry/integrations": "^5.5.0",
"@sentry/react-native": "^1.0.0",
"expo-constants": "*",
"mkdirp": "^1.0.3",
"rimraf": "^2.6.1"
},
"dependencies": {
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
}
}
},
"serialize-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
......@@ -7699,6 +8106,11 @@
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
},
"tween-functions": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz",
......@@ -7714,6 +8126,14 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"requires": {
"is-typedarray": "^1.0.0"
}
},
"ua-parser-js": {
"version": "0.7.21",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz",
......
......@@ -8,10 +8,12 @@ import {
ScrollView,
TouchableOpacity,
Alert,
Button
Button,
ImageBackground
} from 'react-native';
import { StackActions } from '@react-navigation/native';
import { Icon } from 'react-native-elements'
import { connect } from 'react-redux';
import { Card } from 'react-native-shadow-cards';
import ActionType from '../redux/globalActionType';
......@@ -97,10 +99,11 @@ class Account extends React.Component {
lat: this.state.my_lat,
long: this.state.my_long,
closest_outlet: 1
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
// console.log('WAKWAWWWW ' + JSON.stringify(res.data))
console.log('WAKWAWWWW ' + JSON.stringify(res.data))
const dataCard = res.data
let email = dataCard.email
let point = dataCard.kaspro_point
......@@ -126,7 +129,7 @@ class Account extends React.Component {
this.props.setCardactive(cardProps)
}
let account_number = dataCard.kaspro_account_number
let account_number = dataCard.card_number
this.setState({
email: email,
......@@ -141,9 +144,9 @@ class Account extends React.Component {
})
}).catch(error => {
const {navigation} = this.props
const { navigation } = this.props
let response = error.response.data
session(response,navigation)
session(response, navigation)
Alert.alert(response.msg);
console.log('ini error ' + error)
})
......@@ -171,18 +174,27 @@ class Account extends React.Component {
return (
<View style={styles.container}>
<ScrollView>
<View style={styles.profil}>
<Image
style={{ height: 70, width: 70, top: 15, }}
source={require('../assets/images/people-actv.png')}
/>
<Text style={styles.txtNama}>
{this.props.username}
</Text>
<Text style={styles.txtEmail}>
{this.state.email} {this.props.set_card}
</Text>
<View style={{ flex: 1, height: 90, top: 30 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
</View>
<View style={{ height: 60, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center', margin: 15 }}>
{this.state.email} {this.props.set_card}
</Text>
</TouchableOpacity>
<Icon
containerStyle={{ top: 8 }}
name='ios-create'
type='ionicon'
/>
</View>
</View>
{
this.props.set_card === false ? (
<View>
......@@ -211,65 +223,61 @@ class Account extends React.Component {
</Text>
</Card> */}
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
</View>
</Card>
</TouchableOpacity>
<View style={{ width: 5 }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>ACTIVATION CARD</Text>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 20 }}>
<View style={{ height: 250, flex: 1, backgroundColor: 'grey', marginRight: 20, marginLeft: 20, top: 25, borderRadius: 20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', top: 20 }}>No card yet</Text>
<TouchableOpacity onPress={() => this.handleLoggin()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, top: 90 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATION CARD</Text>
</View>
</Card>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 40 }}>
<Button
title="Logout"
onPress={() => this.logout()}
/>
</TouchableOpacity>
</View>
</View>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 40, top: 30 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
</TouchableOpacity>
</View>
) : (
<View>
<View style={styles.Card}>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<Text>
YOUR CARD NUMBER | {this.state.expire_date}{'\n'}
<Card style={{ padding: 10, margin: 20, alignContent: 'center' }}>
<Text style={{fontSize:12, fontFamily: 'Gotham-Black', }}>
YOUR CARD NUMBER | EXPIRED ON {this.state.expire_date}{'\n'}
</Text>
<Text style={{ textAlign: "center", fontSize: 40, color: '#c9af6d' }}>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: "center", fontSize: 40, color: '#c9af6d' }}>
{this.state.account_number}
</Text>
<View style={styles.line}></View>
<Text style={{ textAlign: 'left', fontWeight: 'bold' }}> {'\n'}
BALANCE: {this.state.balance}{'\n'}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold' }}> {'\n'}
BALANCE : {this.state.balance}{'\n'}
</Text>
<View style={styles.line}></View>
<Text style={{ textAlign: 'left', fontWeight: 'bold' }}>{'\n'}
POINTS: {this.state.points}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold' }}>{'\n'}
POINTS : {this.state.points}
</Text>
</Card>
</View>
<TouchableOpacity style={styles.submitTopUp} activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<Text style={{ color: '#fff', textAlign: 'center' }}>TOP UP BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#fff', textAlign: 'center' }}>TOP UP BALANCE</Text>
</TouchableOpacity>
<View style={{ padding: 10, margin: 10, height: 200 }}>
<Image style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null} />
<View style={{ padding: 10, margin: 10, height: 200, top: 15 }}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}>
<View style={{justifyContent:'center'}}>
<Text style={{ fontFamily: 'Gotham-Black', margin:15,fontSize: 20, color: '#c9af6d',top:120 }}>
{this.state.account_number}
</Text>
</View>
</ImageBackground>
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 10 }}>
<TouchableOpacity style={{ marginBottom: 10 }} onPress={() => this.TransferBalance()} >
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>TRANSFER BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>TRANSFER BALANCE</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -278,7 +286,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>USE BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>USE BALANCE</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -288,7 +296,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>RENEWAL</Text>
<Text style={{fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>RENEWAL</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -296,7 +304,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>TRANSACTION HISTORY</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>TRANSACTION HISTORY</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -307,32 +315,27 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>UPGRADE PREMIUM</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>UPGRADE PREMIUM</Text>
</View>
</Card>
</TouchableOpacity>
) : (
null
)}
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
</View>
</Card>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 40 }}>
<Button
title="Logout"
onPress={() => this.logout()}
/>
<View style={{ flex: 1}}>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
</TouchableOpacity>
</View>
</View>
)
}
</ScrollView>
</View>
)
}
......@@ -353,22 +356,26 @@ const styles = StyleSheet.create({
height: 150,
backgroundColor: 'white',
alignItems: 'center',
top: 20,
top: 40,
},
Card: {
top: 50,
alignItems: 'center',
backgroundColor: 'white',
alignContent: 'center',
},
line: {
borderBottomColor: "black",
borderBottomWidth: StyleSheet.hairlineWidth,
top:3,
borderRadius:1,
borderColor:'#c9af6d',
borderWidth:1,
alignSelf: 'stretch',
width: "100%",
height: 3,
bottom: 5,
},
imgBackground: {
......@@ -377,7 +384,8 @@ const styles = StyleSheet.create({
flex: 1
},
submitTopUp: {
marginTop: 10,
marginTop: 35,
top: 25,
paddingTop: 15,
paddingBottom: 15,
marginLeft: 15,
......@@ -388,6 +396,19 @@ const styles = StyleSheet.create({
borderColor: '#fff',
textAlign: 'center',
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
}
})
//subscribe
......@@ -416,3 +437,23 @@ const mapDispatchToProps = (dispacth) => {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Account);
{/* <TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
</View>
</Card>
</TouchableOpacity>
<View style={{ width: 5 }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>ACTIVATION CARD</Text>
</View>
</Card>
</TouchableOpacity> */}
\ No newline at end of file
......@@ -51,6 +51,7 @@ import RewardSelect from './RewardSelect';
import Outlets from './Outlets';
import RewardHistory from './RewardHistory';
import WelcomeReg from './WelcomeReg';
import WelcomeLog from './WelcomeLog';
enableScreens();
......@@ -113,9 +114,36 @@ class Auth extends React.Component {
<>
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false ,
}} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Profile" component={ProfilePage} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'PROFIL'
}}/>
<Stack.Screen name="Change Profil" component={ChangeProfile} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PROFIL'
}}/>
<Stack.Screen name="Register" component={Register} />
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
......@@ -130,14 +158,18 @@ class Auth extends React.Component {
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Welcomes" component={WelcomeReg} options={{
<Stack.Screen name="Welcomes" component={WelcomeReg} options={{
headerShown: false ,
}} />
</>
) : this.props.pageEmailConfirmation === true ? (
<>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false ,
}} />
<Stack.Screen name="Home" component={Home} options={{ headerShown: false }} />
</>
) : (
......@@ -156,10 +188,33 @@ class Auth extends React.Component {
}
}} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Profile" component={ProfilePage}
options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'PROFIL'
}}/>
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Change language" component={ChangeLanguage} />
<Stack.Screen name="Change password" component={ChangePassword} />
<Stack.Screen name="Change password" component={ChangePassword} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PROFIL'
}}/>
<Stack.Screen name="Card Activation" component={CardActivation} />
<Stack.Screen name="Renewal" component={Renewal} />
<Stack.Screen name="Account" component={Account} />
......@@ -172,7 +227,18 @@ class Auth extends React.Component {
<Stack.Screen name="Delivery Address" component={DeliveryAddress} />
<Stack.Screen name="Address Detail" component={AddressDetail} />
<Stack.Screen name="Menu Detail" component={MenuDetail} />
<Stack.Screen name="Pickup Name" component={PickupName} options={{ title: "PICKUP STORE", headerStyle: { backgroundColor: "#ccb46c", alignSelf: 'center' }, headerTitleAlign: 'center', headerTitleStyle: { color: 'white', fontWeight: 'bold' } }} />
<Stack.Screen name="Pickup Name" component={PickupName} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'PICKUP STORE'
}}/>
<Stack.Screen name="Outlet Detail" component={OutletDetail} />
<Stack.Screen name="Menu Select" component={MenuSelection} options={{ headerShown: false }} />
<Stack.Screen name="Card Info" component={CardInfo} />
......
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, TextInput, Picker, Alert } from 'react-native';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity,Image,ScrollView,TouchableHighlight } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import RNPickerSelect from 'react-native-picker-select';
......@@ -87,60 +87,65 @@ class ChangeProfil extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Change Profile </Text>
<View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Name </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
onChangeText={(full_name) => this.setState({ full_name })}
value={this.state.full_name}
<ScrollView>
<View style={{ flex: 1, height: 90, top: 10 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Date of {'\n'}Birth </Text>
<Text style={{ fontSize: 15, margin: 5, borderWidth: 1, flex: 2, padding: 5 }}>{this.state.dob_day} - {this.state.dob_month} - {this.state.dob_year} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<View style={{ flex: 1 }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Gender </Text>
</View>
<View style={{ height: 50, flex: 1 }}>
<RNPickerSelect
value={this.state.gender_selected}
// itemKey="1"
placeholderTextColor='gray'
onValueChange={(value) => this.setState({ gender_selected: value })}
items={this.state.gender} />
</View>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Email </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
onChangeText={(full_name) => this.setState({ full_name })}
value={this.state.email}
/>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Mobile phone </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2, margin: 10 }}
onChangeText={(no_tlp) => this.setState({ no_tlp })}
value={this.state.no_tlp}
/>
</View>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, margin: 20,top:20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Name</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(full_name) => this.setState({ full_name })} value={this.state.full_name}>
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Date of Birth</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin:3 }}>Gender</Text>
<View style={{justifyContent:'center',borderRadius:10,borderWidth:1,borderColor:'grey',height:40,marginRight:10,marginLeft:10}}>
<RNPickerSelect
value={this.state.gender_selected}
// itemKey="1"
placeholderTextColor='gray'
onValueChange={(value) => this.setState({ gender_selected: value })}
items={this.state.gender} />
</View>
<View style={{ flexDirection: 'row', top: 0, margin: 10, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Mobile</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(no_tlp) => this.setState({ no_tlp })}
editable={true}>
</TextInput>
</View>
</View>
<View style={{ flex: 2 }}>
<View style={{ flex: 1 }}>
<View style={{ flex: 1, flexDirection: 'row', top: 10, margin: 5,marginBottom:20,marginLeft:20,marginRight:20}}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Save" onPress={() => this.saveData()}></Button>
<TouchableOpacity title="Edit" onPress={() => this.saveData()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Save</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Cancel"></Button>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Profile')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Cancel</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</View>
</ScrollView>
</View>
)
}
}
......@@ -150,7 +155,7 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
}
})
......@@ -168,12 +173,67 @@ const mapDispatchToProps = (dispacth) => {
}
const mapStateToProps = (state) => {
return {
session_id: state.session_id,
gender_display: state.gender_display,
full_name: state.full_name
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ChangeProfil);
\ No newline at end of file
export default connect(mapStateToProps, mapDispatchToProps)(ChangeProfil);
// <View style={styles.container}>
// <Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Change Profile </Text>
// <View style={{ margin: 10, flex: 1, }}>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Name </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
// onChangeText={(full_name) => this.setState({ full_name })}
// value={this.state.full_name}
// />
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Date of {'\n'}Birth </Text>
// <Text style={{ fontSize: 15, margin: 5, borderWidth: 1, flex: 2, padding: 5 }}>{this.state.dob_day} - {this.state.dob_month} - {this.state.dob_year} </Text>
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <View style={{ flex: 1 }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Gender </Text>
// </View>
// <View style={{ height: 50, flex: 1 }}>
// <RNPickerSelect
// value={this.state.gender_selected}
// // itemKey="1"
// placeholderTextColor='gray'
// onValueChange={(value) => this.setState({ gender_selected: value })}
// items={this.state.gender} />
// </View>
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Email </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
// onChangeText={(full_name) => this.setState({ full_name })}
// value={this.state.email}
// />
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Mobile phone </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2, margin: 10 }}
// onChangeText={(no_tlp) => this.setState({ no_tlp })}
// value={this.state.no_tlp}
// />
// </View>
// <View style={{ flexDirection: 'row', top: 0, margin: 10, }}>
// <View style={{ flex: 1, margin: 5 }}>
// <Button title="Save" onPress={() => this.saveData()}></Button>
// </View>
// <View style={{ flex: 1, margin: 5 }}>
// <Button title="Cancel"></Button>
// </View>
// </View>
// </View>
// </View>
\ No newline at end of file
......@@ -66,7 +66,7 @@ class EmailConfirmation extends React.Component {
index: 0,
routes: [
{
name: 'Home',
name: 'Welcome log',
},
],
})
......
......@@ -37,11 +37,9 @@ class Home extends React.Component {
}
componentDidMount() {
console.log("INI BUILD VERSION : " + Constants.nativeBuildVersio)
this._account();
this._getPermissions()
this._renderCarousell()
console.log("INI LAT : " + this.props.lat)
this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.setState({
......@@ -109,6 +107,11 @@ class Home extends React.Component {
this.setState({
images: imageLink
})
}).catch(error =>{
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
})
}
......@@ -133,10 +136,11 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
// console.log("INI ERROR " + error);
// const { navigation } = this.props
// let response = error.response.data
// session(response, navigation)
// Alert.alert(response.msg);
})
}
......@@ -162,10 +166,12 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
let response_data = error.response.data
let error_status = error.response.status
session(response_data,error_status,navigation)
})
}
......
......@@ -138,13 +138,13 @@ class Login extends React.Component {
index: 0,
routes: [
{
name: 'Home',
name: 'Welcome log',
params: { someParam: 'Param1' },
},
],
})
console.log("INI SESSION : " + this.props.session_id)
}).catch(error => {
......@@ -181,9 +181,7 @@ class Login extends React.Component {
}
}
render() {
return (
<View style={styles.container}>
<Spinner
......@@ -259,7 +257,7 @@ const styles = StyleSheet.create({
height: 50
},
imageslogo: {
height: 170,
height: 150,
margin: 10,
width: 150,
justifyContent: 'center',
......
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, Alert } from 'react-native';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity,Image } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import i18n from 'i18n-js';
import { StackActions } from '@react-navigation/native';
import { ScrollView, TouchableHighlight } from 'react-native-gesture-handler';
class ProfilePage extends PureComponent {
constructor(props) {
......@@ -16,6 +17,7 @@ class ProfilePage extends PureComponent {
dob_year: '',
gender: '',
email: '',
onClicked: false,
}
}
......@@ -54,6 +56,9 @@ class ProfilePage extends PureComponent {
}
handleChangeProfil() {
this.setState({
onClicked:true
})
this.props.navigation.navigate('Change Profil', { 'data': 'sample', onChangeProfil: this.onChangeProfil })
}
......@@ -75,59 +80,89 @@ class ProfilePage extends PureComponent {
navigation.reset({
index: 0,
routes: [
{
name: 'Login',
params: { someParam: 'Param1' },
},
{
name: 'Login',
params: { someParam: 'Param1' },
},
],
})
})
}
render() {
return (
<View style={styles.container}>
<Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Profil </Text>
<View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Name : </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.full_name} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Date of Birth </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Gender :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.gender} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Email :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.email} </Text>
</View>
<ScrollView>
<View style={{ flex: 1, height: 90, top: 10 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
</View>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center', margin: 15 }}>
{this.state.full_name}
</Text>
</View>
<View style={{ flexDirection: 'row', top: 20, margin: 5, }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Edit" onPress={() => this.handleChangeProfil()}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Change Password" onPress={() => this.props.navigation.navigate('Change password')}></Button>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, margin: 20,top:20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Email</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false} value={this.state.email}>
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Date of Birth</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Gender</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false} value={this.state.gender}>
</TextInput>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', top: 20, margin: 5 }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Language" onPress={() => this.props.navigation.navigate('Change language')}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Logout" onPress={() => this.logout()}></Button>
<View style={{ flex: 2 }}>
<View style={{ flex: 1 }}>
<View style={{ flexDirection: 'row', top: 10, margin: 5,marginRight:20,marginLeft:20 }}>
<View style={{ flex: 1, margin: 5 }}>
<TouchableHighlight title="Edit" onPress={() => this.handleChangeProfil()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Edit</Text>
</View>
</TouchableHighlight>
</View>
<View style={{ flex: 1, margin: 5 }}>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Change password')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 15 }}>Change Password</Text>
</View>
</TouchableOpacity>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', top: 10, margin: 5, marginRight:20,marginLeft:20 }}>
<View style={{ flex: 1, margin: 5 }}>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Change language')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Language</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 5 }}>
<TouchableOpacity title="Edit" onPress={() => this.logout()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Logout</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</View>
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
......@@ -158,3 +193,38 @@ const mapStateToProps = (state) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(ProfilePage);
{/* <View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50 }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Name : </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.full_name} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Date of Birth </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Gender :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.gender} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Email :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.email} </Text>
</View>
</View>
<View style={{ flexDirection: 'row', top: 20, margin: 5, }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Edit" onPress={() => this.handleChangeProfil()}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Change Password" onPress={() => this.props.navigation.navigate('Change password')}></Button>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', top: 20, margin: 5 }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Language" onPress={() => this.props.navigation.navigate('Change language')}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Logout" onPress={() => this.logout()}></Button>
</View>
</View> */}
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground, ScrollView } from 'react-native';
import Axios from 'axios';
import Constants from 'expo-constants';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model';
import { Notifications } from 'expo';
import Spinner from 'react-native-loading-spinner-overlay';
export default class WelcomeLog extends React.Component {
constructor(props) {
super(props);
this.state = ({
spinner: ''
})
}
componentDidMount() {
// console.log(this.props.language)
}
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<StatusBar
hidden={true} />
<ImageBackground source={require('../assets/images/after-log.jpg')} style={{ width: '100%', height: '100%' }}>
<View style={styles.v_form}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
</View>
</View>
<View style={styles.v_policy}>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => navigation.reset({
index: 0,
routes: [
{
name: 'Home',
params: { someParam: 'Param9' },
},
],
})}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'black', fontSize: 20, textAlign: 'center', margin: 15 }}>NEXT</Text>
</View>
</TouchableOpacity>
</View>
</View>
</ImageBackground>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#151515',
},
logo: {
flex: 2.5,
height: 50
},
imageslogo: {
height: 170,
margin: 10,
width: 150,
justifyContent: 'center',
alignSelf: 'center',
top: 50
},
v_form: {
flex: 3,
},
v_policy: {
flex: 2,
}
})
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground, ScrollView } from 'react-native';
import Axios from 'axios';
import Constants from 'expo-constants';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model';
import { Notifications } from 'expo';
import { View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
export default class Welcome extends React.Component {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment