Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
85e40365
Commit
85e40365
authored
Apr 16, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
e124cc2b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
7 deletions
+59
-7
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+5
-0
project.pbxproj
ios/Invest.xcodeproj/project.pbxproj
+2
-2
Info.plist
ios/Invest/Info.plist
+1
-1
Functions.js
src/Config/Functions.js
+31
-1
Profile.js
src/Screens/AccountVerification/Tab/Profile.js
+1
-0
Calendar.js
src/Screens/NewFeed/Calendar/Calendar.js
+1
-1
PickerImgUni.js
src/components/Picker/PickerImgUni.js
+18
-2
No files found.
android/app/src/main/AndroidManifest.xml
View file @
85e40365
...
...
@@ -5,6 +5,11 @@
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-feature
android:name=
"android.hardware.camera"
/>
<uses-feature
android:name=
"android.hardware.camera.autofocus"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<application
android:name=
".MainApplication"
...
...
ios/Invest.xcodeproj/project.pbxproj
View file @
85e40365
...
...
@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1
7
;
CURRENT_PROJECT_VERSION
=
1
8
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
ENABLE_BITCODE
=
NO
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
...
...
@@ -936,7 +936,7 @@
CODE_SIGN_ENTITLEMENTS
=
Invest/Invest.entitlements
;
CODE_SIGN_IDENTITY
=
"Apple Development"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1
7
;
CURRENT_PROJECT_VERSION
=
1
8
;
DEVELOPMENT_TEAM
=
MXZ24GRH48
;
INFOPLIST_FILE
=
Invest/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
...
...
ios/Invest/Info.plist
View file @
85e40365
...
...
@@ -42,7 +42,7 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
string
/
>
<
string
><
/string
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
string
>
To
upload
images
<
/string
>
<
k
e
y
>
UIAppFonts
<
/k
e
y
>
...
...
src/Config/Functions.js
View file @
85e40365
import
React
from
'react'
;
import
{
Dimensions
,
Platform
,
Alert
,
Text
}
from
'react-native'
;
import
{
Dimensions
,
Platform
,
Alert
,
Text
,
PermissionsAndroid
,
}
from
'react-native'
;
import
moment
from
'moment'
;
import
_
from
'lodash'
;
export
const
requestCameraPermission
=
async
()
=>
{
try
{
const
granted
=
await
PermissionsAndroid
.
request
(
PermissionsAndroid
.
PERMISSIONS
.
CAMERA
,
{
title
:
'Cool Photo App Camera Permission'
,
message
:
'Cool Photo App needs access to your camera '
+
'so you can take awesome pictures.'
,
buttonNeutral
:
'Ask Me Later'
,
buttonNegative
:
'Cancel'
,
buttonPositive
:
'OK'
,
},
);
if
(
granted
===
PermissionsAndroid
.
RESULTS
.
GRANTED
)
{
console
.
log
(
'You can use the camera'
);
}
else
{
console
.
log
(
'Camera permission denied'
);
}
}
catch
(
err
)
{
console
.
warn
(
err
);
}
};
export
const
renderStatus
=
(
status
)
=>
{
switch
(
status
)
{
case
2
:
...
...
src/Screens/AccountVerification/Tab/Profile.js
View file @
85e40365
...
...
@@ -105,6 +105,7 @@ const Profile = (props) => {
props
.
showLoading
();
const
res
=
await
verifyAccountApi
(
data
);
props
.
hideLoading
();
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
...
...
src/Screens/NewFeed/Calendar/Calendar.js
View file @
85e40365
...
...
@@ -58,7 +58,7 @@ const NewFeed = (props) => {
const
getItemLayout
=
(
data
,
index
)
=>
({
length
:
100
,
offset
:
6
0
*
index
,
offset
:
7
0
*
index
,
index
,
});
...
...
src/components/Picker/PickerImgUni.js
View file @
85e40365
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
View
,
Text
,
...
...
@@ -6,9 +6,16 @@ import {
StyleSheet
,
TouchableOpacity
,
TouchableWithoutFeedback
,
Platform
,
PermissionsAndroid
,
}
from
'react-native'
;
import
R
from
'../../assets/R'
;
import
{
HEIGHTXD
,
WIDTHXD
,
getFontXD
}
from
'../../Config/Functions'
;
import
{
HEIGHTXD
,
WIDTHXD
,
getFontXD
,
requestCameraPermission
,
}
from
'../../Config/Functions'
;
import
Icon
from
'react-native-vector-icons/AntDesign'
;
import
Modal
from
'react-native-modal'
;
import
Block
from
'../Block'
;
...
...
@@ -29,6 +36,14 @@ const PickerImgUni = (props) => {
const
[
urlImg
,
setUrlImg
]
=
useState
(
''
);
// const [imgPicker, setImgPicker] = useState('');
const
checkPermissionAndroid
=
()
=>
{
console
.
log
(
'Chay vao day'
);
if
(
!
PermissionsAndroid
.
check
(
'CAMERA'
))
{
console
.
log
(
'Chay vao day'
);
requestCameraPermission
();
}
};
const
onchoosGalery
=
()
=>
{
ImagePicker
.
openPicker
({
mediaType
:
'photo'
,
...
...
@@ -41,6 +56,7 @@ const PickerImgUni = (props) => {
};
const
onCapture
=
()
=>
{
if
(
Platform
.
OS
==
'android'
)
checkPermissionAndroid
();
ImagePicker
.
openCamera
({
mediaType
:
'photo'
,
width
:
300
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment