Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Prasetya Saputra
new_excelso
Commits
844aff97
Commit
844aff97
authored
Jul 16, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update string table
parent
b508b908
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
122 additions
and
102 deletions
+122
-102
en.json
lib/en.json
+21
-1
id.json
lib/id.json
+21
-1
Account.js
view/Account.js
+19
-35
AddreesDetail.js
view/AddreesDetail.js
+14
-16
Camera.js
view/Camera.js
+5
-5
CardActivation.js
view/CardActivation.js
+14
-15
ChangeEmail.js
view/ChangeEmail.js
+4
-3
ChangePassword.js
view/ChangePassword.js
+5
-6
ChangeProfil.js
view/ChangeProfil.js
+3
-3
DeliveryAddrees.js
view/DeliveryAddrees.js
+6
-6
EmailConfirmation.js
view/EmailConfirmation.js
+10
-11
No files found.
lib/en.json
View file @
844aff97
...
@@ -149,5 +149,25 @@
...
@@ -149,5 +149,25 @@
"tax"
:
"Tax"
,
"tax"
:
"Tax"
,
"sendtoken"
:
"Send Token"
,
"sendtoken"
:
"Send Token"
,
"itemnotfound"
:
"There are no menu for this category"
,
"itemnotfound"
:
"There are no menu for this category"
,
"copyToClipboard"
:
"Copied To Clipboard"
"copyToClipboard"
:
"Copied To Clipboard"
,
"accessNotPermitted"
:
"Access Not Permitted!"
,
"tryItRealDevice"
:
"Please try it on a real Device"
,
"makeSureClaimCredit"
:
"Are you sure want to claim credit ?"
,
"notPremiumYet"
:
"Account Not Premium yet"
,
"wantUpgradePremium"
:
"Do you want a Premium Upgrade ?"
,
"alertCancel"
:
"Cancel"
,
"alertAddressNotFound"
:
"Address not found!"
,
"alertSuccessAddAddressTitle"
:
"Success"
,
"alertSuccessAddAddressContent"
:
"Successfully added address"
,
"findAddress"
:
"Find Address"
,
"yourLocation"
:
"Your Location"
,
"alertCamera"
:
"Sorry, we need camera permissions to make this work"
,
"inputPhoneNumber"
:
"Input phone number"
,
"alertSendOTP"
:
"We have sent an OTP to your number!"
,
"alertCardActivated"
:
"Your card has been successfully activated"
,
"alertCheckEmail"
:
"Please check your email"
,
"newEmail"
:
"New Email"
,
"alertChangePasswordSuccess"
:
"Change Password Successfully"
,
"alertSuccessTitle"
:
"Success"
,
"alertEmailSended"
:
"Email was sent"
}
}
\ No newline at end of file
lib/id.json
View file @
844aff97
...
@@ -151,5 +151,25 @@
...
@@ -151,5 +151,25 @@
"tax"
:
"Pajak"
,
"tax"
:
"Pajak"
,
"sendtoken"
:
"Kirim Token"
,
"sendtoken"
:
"Kirim Token"
,
"itemnotfound"
:
"Tidak ada menu untuk kategori ini !"
,
"itemnotfound"
:
"Tidak ada menu untuk kategori ini !"
,
"copyToClipboard"
:
"Disalin"
"copyToClipboard"
:
"Disalin"
,
"accessNotPermitted"
:
"Akses tidak dizinkan!"
,
"tryItRealDevice"
:
"Silahkan anda coba di real Device"
,
"makeSureClaimCredit"
:
"Anda yakin ingin mengklaim kredit ?"
,
"notPremiumYet"
:
"Akun Belum Premium"
,
"wantUpgradePremium"
:
"Apakah anda ingin Upgrade Premium ?"
,
"alertCancel"
:
"Batal"
,
"alertAddressNotFound"
:
"Alamat tidak di temukan!"
,
"alertSuccessAddAddressTitle"
:
"Berhasil"
,
"alertSuccessAddAddressContent"
:
"Berhasil menambahkan Alamat !"
,
"findAddress"
:
"Cari Alamat"
,
"yourLocation"
:
"Lokasi Kamu"
,
"alertCamera"
:
"Maaf, kami membutuhkan izin kamera untuk membuatnya bekerja"
,
"inputPhoneNumber"
:
"Masukan No telp"
,
"alertSendOTP"
:
"Kami telah mengirimkan sms OTP ke nomor anda!"
,
"alertCardActivated"
:
"Kartu anda berhasil di aktifkan"
,
"alertCheckEmail"
:
"Email terkirim, mohon dicek"
,
"newEmail"
:
"Email Baru"
,
"alertChangePasswordSuccess"
:
"Ganti Password Berhasil"
,
"alertSuccessTitle"
:
"Berhasil"
,
"alertEmailSended"
:
"Email Terkirim"
}
}
\ No newline at end of file
view/Account.js
View file @
844aff97
import
React
from
'react'
;
import
{
MaterialIcons
}
from
'@expo/vector-icons'
;
import
{
View
,
StyleSheet
,
Text
,
StatusBar
,
Image
,
ScrollView
,
TouchableOpacity
,
Alert
,
Button
,
ImageBackground
,
ActivityIndicator
}
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'
;
import
{
CommonActions
}
from
'@react-navigation/native'
;
import
{
Ionicons
,
MaterialIcons
,
AntDesign
,
FontAwesome
}
from
'@expo/vector-icons'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
Constants
from
'expo-constants'
;
import
*
as
Device
from
'expo-device'
;
import
*
as
Location
from
'expo-location'
;
import
*
as
Location
from
'expo-location'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
*
as
Device
from
'expo-device'
;
import
session
from
'../function/session'
;
import
Constants
from
'expo-constants'
;
import
Toast
from
'react-native-tiny-toast'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
{
ActivityIndicator
,
Alert
,
Image
,
ImageBackground
,
ScrollView
,
StatusBar
,
StyleSheet
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
Card
}
from
'react-native-shadow-cards'
;
import
Toast
from
'react-native-tiny-toast'
;
import
NumberFormat
from
'react-number-format'
;
import
NumberFormat
from
'react-number-format'
;
import
{
connect
}
from
'react-redux'
;
import
requestParams
from
'../helper/requestParams'
;
import
requestParams
from
'../helper/requestParams'
;
import
ActionType
from
'../redux/globalActionType'
;
class
Account
extends
React
.
Component
{
class
Account
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -85,10 +69,10 @@ class Account extends React.Component {
...
@@ -85,10 +69,10 @@ class Account extends React.Component {
try
{
try
{
let
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
LOCATION
);
let
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
LOCATION
);
if
(
status
!==
'granted'
)
{
if
(
status
!==
'granted'
)
{
Alert
.
alert
(
'Akses tidak dizinkan!'
)
Alert
.
alert
(
i18n
.
t
(
'accessNotPermitted'
)
)
}
else
if
(
Platform
.
OS
===
'android'
&&
!
Device
.
isDevice
)
{
}
else
if
(
Platform
.
OS
===
'android'
&&
!
Device
.
isDevice
)
{
Alert
.
alert
(
'Silahkan anda coba di real Device'
)
Alert
.
alert
(
i18n
.
t
(
'tryItRealDevice'
)
)
}
else
{
}
else
{
this
.
_getCurrentPosisition
()
this
.
_getCurrentPosisition
()
}
}
...
@@ -139,15 +123,15 @@ class Account extends React.Component {
...
@@ -139,15 +123,15 @@ class Account extends React.Component {
Alert
.
alert
(
Alert
.
alert
(
""
,
""
,
"Are you sure want to claim credit ?"
,
i18n
.
t
(
'makeSureClaimCredit'
)
,
[
[
{
{
text
:
'No'
,
text
:
i18n
.
t
(
'alertno'
)
,
onPress
:
()
=>
console
.
log
(
'Cancel Claim Credit'
),
onPress
:
()
=>
console
.
log
(
'Cancel Claim Credit'
),
style
:
'cancel'
,
style
:
'cancel'
,
},
},
{
{
text
:
'Yes'
,
onPress
:
()
=>
this
.
handleClaimCredit
()
text
:
i18n
.
t
(
'alertyes'
)
,
onPress
:
()
=>
this
.
handleClaimCredit
()
},
},
],
],
{
cancelable
:
false
},
{
cancelable
:
false
},
...
@@ -187,7 +171,7 @@ class Account extends React.Component {
...
@@ -187,7 +171,7 @@ class Account extends React.Component {
})
})
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
console
.
log
(
"INI DATANYA : "
+
JSON
.
stringify
(
res
))
//
console.log("INI DATANYA : " + JSON.stringify(res))
const
dataCard
=
res
.
data
const
dataCard
=
res
.
data
console
.
log
(
dataCard
)
console
.
log
(
dataCard
)
let
email
=
dataCard
.
email
let
email
=
dataCard
.
email
...
@@ -264,10 +248,10 @@ class Account extends React.Component {
...
@@ -264,10 +248,10 @@ class Account extends React.Component {
try
{
try
{
if
(
this
.
state
.
premium
===
false
)
{
if
(
this
.
state
.
premium
===
false
)
{
Alert
.
alert
(
Alert
.
alert
(
'Akun Belum Premium'
,
i18n
.
t
(
'notPremiumYet'
)
,
'Apakah anda ingin Upgrade Premium ?'
,
i18n
.
t
(
'wantUpgradePremium'
)
,
[{
text
:
'Cancel'
},
[{
text
:
i18n
.
t
(
'alertCancel'
)
},
{
text
:
'OK'
,
onPress
:
()
=>
this
.
props
.
navigation
.
navigate
(
'Upgrade Premium'
)
}
{
text
:
'OK'
,
onPress
:
()
=>
this
.
props
.
navigation
.
navigate
(
'Upgrade Premium'
)
}
]
]
)
)
...
...
view/AddreesDetail.js
View file @
844aff97
import
React
from
'react
'
;
import
{
Ionicons
,
MaterialCommunityIcons
}
from
'@expo/vector-icons
'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
Platform
,
Dimensions
,
Alert
,
Image
,
ActivityIndicator
}
from
'react-native
'
;
import
Axios
from
'axios
'
;
import
*
as
Device
from
'expo-device'
;
import
*
as
Device
from
'expo-device'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
*
as
Location
from
'expo-location'
;
import
*
as
Location
from
'expo-location'
;
import
MapView
,
{
PROVIDER_GOOGLE
,
Marker
}
from
'react-native-maps'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
{
ActivityIndicator
,
Alert
,
Platform
,
StyleSheet
,
Text
,
TextInput
,
View
}
from
'react-native'
;
import
{
ScrollView
,
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
{
ScrollView
,
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
MapView
,
{
PROVIDER_GOOGLE
}
from
'react-native-maps'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
{
MaterialCommunityIcons
,
Ionicons
}
from
'@expo/vector-icons'
;
import
ActionType
from
'../redux/globalActionType'
;
import
i18n
from
'i18n-js'
;
import
session
from
'../function/session'
;
import
session
from
'../function/session'
;
class
AddreesDetail
extends
React
.
Component
{
class
AddreesDetail
extends
React
.
Component
{
...
@@ -49,10 +47,10 @@ class AddreesDetail extends React.Component {
...
@@ -49,10 +47,10 @@ class AddreesDetail extends React.Component {
_getPermissions
=
async
()
=>
{
_getPermissions
=
async
()
=>
{
let
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
LOCATION
);
let
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
LOCATION
);
if
(
status
!==
'granted'
)
{
if
(
status
!==
'granted'
)
{
Alert
.
alert
(
'Akses tidak dizinkan!'
)
Alert
.
alert
(
i18n
.
t
(
'accessNotPermitted'
)
)
}
else
if
(
Platform
.
OS
===
'android'
&&
!
Device
.
isDevice
)
{
}
else
if
(
Platform
.
OS
===
'android'
&&
!
Device
.
isDevice
)
{
Alert
.
alert
(
'Silahkan anda coba di real Device'
)
Alert
.
alert
(
i18n
.
t
(
'tryItRealDevice'
)
)
}
else
{
}
else
{
this
.
_getLocationAsync
()
this
.
_getLocationAsync
()
}
}
...
@@ -156,7 +154,7 @@ class AddreesDetail extends React.Component {
...
@@ -156,7 +154,7 @@ class AddreesDetail extends React.Component {
let
search_location
=
await
Location
.
geocodeAsync
(
this
.
state
.
address
,
Location
.
Accuracy
.
Balanced
)
let
search_location
=
await
Location
.
geocodeAsync
(
this
.
state
.
address
,
Location
.
Accuracy
.
Balanced
)
if
(
search_location
.
length
===
0
)
{
if
(
search_location
.
length
===
0
)
{
Alert
.
alert
(
'Alamat tidak di temukan!'
);
Alert
.
alert
(
i18n
.
t
(
'alertAddressNotFound'
)
);
}
else
{
}
else
{
let
detail
=
await
Location
.
reverseGeocodeAsync
(
search_location
[
0
])
let
detail
=
await
Location
.
reverseGeocodeAsync
(
search_location
[
0
])
...
@@ -194,8 +192,8 @@ class AddreesDetail extends React.Component {
...
@@ -194,8 +192,8 @@ class AddreesDetail extends React.Component {
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/set_address'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/set_address'
,
params
).
then
(
res
=>
{
Alert
.
alert
(
Alert
.
alert
(
'Berhasil'
,
i18n
.
t
(
'alertSuccessAddAddressTitle'
)
,
'Berhasil menambahkan Alamat !'
i18n
.
t
(
'alertSuccessAddAddressContent'
)
)
)
this
.
setState
({
this
.
setState
({
...
@@ -229,7 +227,7 @@ class AddreesDetail extends React.Component {
...
@@ -229,7 +227,7 @@ class AddreesDetail extends React.Component {
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
MaterialCommunityIcons
name
=
"map-marker"
size
=
{
32
}
color
=
"#ccb46c"
/>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
6
}}
>
<
View
style
=
{{
flex
:
6
}}
>
<
TextInput
style
=
{{
height
:
45
}}
placeholder
=
"Cari Alamat"
<
TextInput
style
=
{{
height
:
45
}}
placeholder
=
{
i18n
.
t
(
'findAddress'
)}
caretHidden
=
{
this
.
state
.
caretHidden
}
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
onChangeText
=
{(
address
)
=>
this
.
setState
({
address
})}
>
onChangeText
=
{(
address
)
=>
this
.
setState
({
address
})}
>
...
@@ -263,7 +261,7 @@ class AddreesDetail extends React.Component {
...
@@ -263,7 +261,7 @@ class AddreesDetail extends React.Component {
latitude
:
this
.
state
.
latitude
,
latitude
:
this
.
state
.
latitude
,
longitude
:
this
.
state
.
longitude
longitude
:
this
.
state
.
longitude
}}
}}
title
=
{
"Lokasi Kamu "
}
title
=
{
i18n
.
t
(
'yourLocation'
)
}
description
=
{
this
.
state
.
street
}
description
=
{
this
.
state
.
street
}
/
>
/
>
<
/MapView
>
<
/MapView
>
...
...
view/Camera.js
View file @
844aff97
import
React
from
'react'
;
import
{
StyleSheet
,
Text
,
View
,
TouchableOpacity
,
Platform
,
}
from
'react-native'
;
import
{
Camera
}
from
'expo-camera'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
{
FontAwesome
,
Ionicons
,
MaterialCommunityIcons
}
from
'@expo/vector-icons'
;
import
{
FontAwesome
,
Ionicons
,
MaterialCommunityIcons
}
from
'@expo/vector-icons'
;
import
{
Camera
}
from
'expo-camera'
;
import
*
as
ImagePicker
from
'expo-image-picker'
;
import
*
as
ImagePicker
from
'expo-image-picker'
;
import
*
as
Permissions
from
'expo-permissions'
;
import
React
from
'react'
;
import
{
Platform
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
...
@@ -24,7 +24,7 @@ class Cameras extends React.Component {
...
@@ -24,7 +24,7 @@ class Cameras extends React.Component {
if
(
Platform
.
OS
===
'ios'
)
{
if
(
Platform
.
OS
===
'ios'
)
{
const
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
CAMERA_ROLL
);
const
{
status
}
=
await
Permissions
.
askAsync
(
Permissions
.
CAMERA_ROLL
);
if
(
status
!==
'granted'
)
{
if
(
status
!==
'granted'
)
{
alert
(
'Sorry, we need camera roll permissions to make this work!'
);
alert
(
i18n
.
t
(
'alertCamera'
)
);
}
}
}
}
// Camera Permission
// Camera Permission
...
...
view/CardActivation.js
View file @
844aff97
import
Axios
from
'axios'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
ScrollView
,
Alert
,
TouchableOpacity
}
from
'react-native'
;
import
{
Alert
,
ScrollView
,
StyleSheet
,
Text
,
TextInput
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
session
from
'../function/session'
;
import
i18n
from
'i18n-js'
;
class
CardActivation
extends
React
.
Component
{
class
CardActivation
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -26,7 +25,7 @@ class CardActivation extends React.Component {
...
@@ -26,7 +25,7 @@ class CardActivation extends React.Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
"INI CARD NUMBER : "
+
this
.
props
.
card_number
)
//
console.log("INI CARD NUMBER : "+this.props.card_number)
}
}
componentDidUpdate
(
prevProps
)
{
componentDidUpdate
(
prevProps
)
{
...
@@ -51,7 +50,7 @@ class CardActivation extends React.Component {
...
@@ -51,7 +50,7 @@ class CardActivation extends React.Component {
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
console
.
log
(
"INI DATANYA : "
+
JSON
.
stringify
(
res
))
//
console.log("INI DATANYA : " + JSON.stringify(res))
const
dataCard
=
res
.
data
const
dataCard
=
res
.
data
console
.
log
(
dataCard
)
console
.
log
(
dataCard
)
let
email
=
dataCard
.
email
let
email
=
dataCard
.
email
...
@@ -100,7 +99,7 @@ class CardActivation extends React.Component {
...
@@ -100,7 +99,7 @@ class CardActivation extends React.Component {
spinner
:
true
,
spinner
:
true
,
})
})
if
(
this
.
state
.
mobile_phone
==
''
)
{
if
(
this
.
state
.
mobile_phone
==
''
)
{
Alert
.
alert
(
''
,
'Masukan No telp '
);
Alert
.
alert
(
''
,
i18n
.
t
(
'inputPhoneNumber'
)
);
}
else
{
}
else
{
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
,
session_id
:
this
.
props
.
session_id
,
...
@@ -110,7 +109,7 @@ class CardActivation extends React.Component {
...
@@ -110,7 +109,7 @@ class CardActivation extends React.Component {
this
.
setState
({
this
.
setState
({
onclick
:
true
onclick
:
true
})
})
Alert
.
alert
(
'Kami telah mengirimkan sms otp ke nomor anda!'
);
Alert
.
alert
(
i18n
.
t
(
'alertSendOTP'
)
);
this
.
interval
=
setInterval
(
this
.
interval
=
setInterval
(
()
=>
this
.
setState
((
prevState
)
=>
({
timer
:
prevState
.
timer
-
1
})),
()
=>
this
.
setState
((
prevState
)
=>
({
timer
:
prevState
.
timer
-
1
})),
1000
1000
...
@@ -143,7 +142,7 @@ class CardActivation extends React.Component {
...
@@ -143,7 +142,7 @@ class CardActivation extends React.Component {
spinner
:
false
,
spinner
:
false
,
})
})
Alert
.
alert
(
'Kami telah kembali mengirimkan sms otp ke nomor anda!'
);
Alert
.
alert
(
i18n
.
t
(
'alertSendOTP'
)
);
this
.
setState
({
this
.
setState
({
timer
:
80
timer
:
80
})
})
...
@@ -168,7 +167,7 @@ class CardActivation extends React.Component {
...
@@ -168,7 +167,7 @@ class CardActivation extends React.Component {
token
:
this
.
state
.
token
token
:
this
.
state
.
token
}
}
console
.
log
(
"INI PARAMS "
+
JSON
.
stringify
(
params
))
//
console.log("INI PARAMS " + JSON.stringify(params))
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/activate'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/activate'
,
params
).
then
(
res
=>
{
let
setCardNumberProps
=
{
let
setCardNumberProps
=
{
...
@@ -177,7 +176,7 @@ class CardActivation extends React.Component {
...
@@ -177,7 +176,7 @@ class CardActivation extends React.Component {
this
.
props
.
setCardNumber
(
setCardNumberProps
)
this
.
props
.
setCardNumber
(
setCardNumberProps
)
Alert
.
alert
(
Alert
.
alert
(
""
,
""
,
"Kartu anda berhasil di aktifkan"
,
i18n
.
t
(
'alertCardActivated'
)
,
[
[
{
{
text
:
"OK"
,
onPress
:
()
=>
{
text
:
"OK"
,
onPress
:
()
=>
{
...
@@ -210,9 +209,9 @@ class CardActivation extends React.Component {
...
@@ -210,9 +209,9 @@ class CardActivation extends React.Component {
token
:
this
.
state
.
token
token
:
this
.
state
.
token
}
}
console
.
log
(
"INI STATENYA "
+
this
.
state
.
card_nums
)
//
console.log("INI STATENYA " + this.state.card_nums)
console
.
log
(
"INI PARAMS "
+
JSON
.
stringify
(
params
))
//
console.log("INI PARAMS " + JSON.stringify(params))
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/activate'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/activate'
,
params
).
then
(
res
=>
{
let
setCardNumberProps
=
{
let
setCardNumberProps
=
{
...
@@ -221,7 +220,7 @@ class CardActivation extends React.Component {
...
@@ -221,7 +220,7 @@ class CardActivation extends React.Component {
this
.
props
.
setCardNumber
(
setCardNumberProps
)
this
.
props
.
setCardNumber
(
setCardNumberProps
)
Alert
.
alert
(
Alert
.
alert
(
""
,
""
,
"Kartu anda berhasil di aktifkan"
,
i18n
.
t
(
'alertCardActivated'
)
,
[
[
{
{
text
:
"OK"
,
onPress
:
()
=>
{
text
:
"OK"
,
onPress
:
()
=>
{
...
...
view/ChangeEmail.js
View file @
844aff97
...
@@ -5,6 +5,7 @@ import Axios from 'axios';
...
@@ -5,6 +5,7 @@ import Axios from 'axios';
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
class
ChangeEmail
extends
React
.
Component
{
class
ChangeEmail
extends
React
.
Component
{
...
@@ -36,7 +37,7 @@ class ChangeEmail extends React.Component {
...
@@ -36,7 +37,7 @@ class ChangeEmail extends React.Component {
this
.
props
.
setEmailConfirm
(
emailConfirmProps
)
this
.
props
.
setEmailConfirm
(
emailConfirmProps
)
Alert
.
alert
(
Alert
.
alert
(
''
,
''
,
'Email terkirim, mohon dicek'
i18n
.
t
(
'alertCheckEmail'
)
,
,
)
)
this
.
props
.
navigation
.
navigate
(
"Email Confirmation"
);
this
.
props
.
navigation
.
navigate
(
"Email Confirmation"
);
...
@@ -58,7 +59,7 @@ class ChangeEmail extends React.Component {
...
@@ -58,7 +59,7 @@ class ChangeEmail extends React.Component {
/
>
/
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
top
:
50
}}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
top
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
}}
>
New
Email
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'newEmail'
)}
<
/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
}}
<
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
=
{(
email
)
=>
this
.
setState
({
email
})}
onChangeText
=
{(
email
)
=>
this
.
setState
({
email
})}
value
=
{
this
.
state
.
email
}
value
=
{
this
.
state
.
email
}
...
@@ -69,7 +70,7 @@ class ChangeEmail extends React.Component {
...
@@ -69,7 +70,7 @@ class ChangeEmail extends React.Component {
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
/
>
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
/
>
<
TouchableOpacity
style
=
{{
height
:
100
}}
onPress
=
{()
=>
this
.
changeEmail
()}
>
<
TouchableOpacity
style
=
{{
height
:
100
}}
onPress
=
{()
=>
this
.
changeEmail
()}
>
<
View
style
=
{{
backgroundColor
:
'#CFB368'
,
height
:
45
,
top
:
20
,
borderRadius
:
10
,
marginRight
:
50
,
marginLeft
:
50
}}
>
<
View
style
=
{{
backgroundColor
:
'#CFB368'
,
height
:
45
,
top
:
20
,
borderRadius
:
10
,
marginRight
:
50
,
marginLeft
:
50
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
top
:
10
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
}}
>
SUBMIT
<
/Text
>
<
Text
style
=
{{
alignSelf
:
'center'
,
top
:
10
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
}}
>
{
i18n
.
t
(
'submit'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
...
view/ChangePassword.js
View file @
844aff97
import
React
,
{
Component
,
PureComponent
}
from
'react'
;
import
{
StyleSheet
,
Text
,
TextInput
,
View
,
Button
,
Alert
,
TouchableOpacity
}
from
'react-native'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
{
BASE_URL_CHANGE_PASSWORD
}
from
'../model/Base_Model'
;
import
{
connect
}
from
'react-redux'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
{
Alert
,
StyleSheet
,
Text
,
TextInput
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
Toast
from
'react-native-tiny-toast'
;
import
Toast
from
'react-native-tiny-toast'
;
import
{
connect
}
from
'react-redux'
;
import
MyStatusBar
from
'./MyStatusBar'
;
class
ChangePassword
extends
React
.
Component
{
class
ChangePassword
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -32,7 +31,7 @@ class ChangePassword extends React.Component {
...
@@ -32,7 +31,7 @@ class ChangePassword extends React.Component {
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/auth/change_password'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/auth/change_password'
,
params
).
then
(
res
=>
{
this
.
props
.
navigation
.
navigate
(
'Profile'
);
this
.
props
.
navigation
.
navigate
(
'Profile'
);
Toast
.
show
(
'Ganti Password Berhasil'
)
Toast
.
show
(
i18n
.
t
(
'alertChangePasswordSuccess'
)
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
...
...
view/ChangeProfil.js
View file @
844aff97
import
React
,
{
PureComponent
}
from
'react'
;
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
Axios
from
'axios'
;
import
React
from
'react'
;
import
{
Image
,
ScrollView
,
StyleSheet
,
Text
,
TextInput
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
RNPickerSelect
from
'react-native-picker-select'
;
import
RNPickerSelect
from
'react-native-picker-select'
;
import
{
connect
}
from
'react-redux'
;
import
{
BASE_URL_GET_ENUM
}
from
'../model/Base_Model'
;
import
{
BASE_URL_GET_ENUM
}
from
'../model/Base_Model'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
...
...
view/DeliveryAddrees.js
View file @
844aff97
import
{
EvilIcons
,
Ionicons
,
MaterialCommunityIcons
}
from
'@expo/vector-icons'
;
import
Axios
from
'axios'
;
import
i18n
from
'i18n-js'
;
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
Button
,
FlatList
,
Alert
,
TextInput
,
Image
,
ScrollView
,
ActivityIndicator
}
from
'react-native'
;
import
{
ActivityIndicator
,
Alert
,
FlatList
,
ScrollView
,
StyleSheet
,
Text
,
TextInput
,
View
}
from
'react-native'
;
import
{
CheckBox
}
from
'react-native-elements'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
CheckBox
}
from
'react-native-elements'
;
import
Axios
from
'axios'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
{
MaterialCommunityIcons
,
Ionicons
,
EvilIcons
}
from
'@expo/vector-icons'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
// import ravLog from '../helper/debug';
// import ravLog from '../helper/debug';
...
@@ -54,7 +54,7 @@ class DeliveryAddrees extends React.Component {
...
@@ -54,7 +54,7 @@ class DeliveryAddrees extends React.Component {
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_address'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_address'
,
params
).
then
(
res
=>
{
const
dataAlamat
=
res
.
data
.
data
;
const
dataAlamat
=
res
.
data
.
data
;
console
.
log
(
"INI DATA :"
+
JSON
.
stringify
(
dataAlamat
))
//
console.log("INI DATA :" + JSON.stringify(dataAlamat))
let
address
=
[]
let
address
=
[]
for
(
let
i
=
0
;
i
<
dataAlamat
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dataAlamat
.
length
;
i
++
)
{
const
element
=
dataAlamat
[
i
];
const
element
=
dataAlamat
[
i
];
...
...
view/EmailConfirmation.js
View file @
844aff97
import
Axios
from
'axios'
;
import
i18n
from
'i18n-js'
;
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
Button
,
View
,
Text
,
StyleSheet
,
TextInput
,
Alert
,
Image
}
from
'react-native'
;
import
{
Alert
,
Image
,
StyleSheet
,
Text
,
TextInput
,
View
}
from
'react-native'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
Axios
from
'axios
'
;
import
Spinner
from
'react-native-loading-spinner-overlay
'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
{
BASE_URL_LOGIN
}
from
'../model/Base_Model'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
class
EmailConfirmation
extends
React
.
Component
{
class
EmailConfirmation
extends
React
.
Component
{
...
@@ -21,8 +20,8 @@ class EmailConfirmation extends React.Component {
...
@@ -21,8 +20,8 @@ class EmailConfirmation extends React.Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
"EMAIL KONFIRMATISI"
+
this
.
props
.
pageEmailConfirmation
)
//
console.log("EMAIL KONFIRMATISI" + this.props.pageEmailConfirmation)
console
.
log
(
"EMAIL proses"
+
this
.
props
.
proses
)
//
console.log("EMAIL proses" + this.props.proses)
}
}
handleSubmit
()
{
handleSubmit
()
{
...
@@ -99,7 +98,7 @@ class EmailConfirmation extends React.Component {
...
@@ -99,7 +98,7 @@ class EmailConfirmation extends React.Component {
this
.
setState
({
this
.
setState
({
spinner
:
false
,
spinner
:
false
,
})
})
console
.
log
(
'masuk pak eko'
)
//
console.log('masuk pak eko')
// this.props.navigation.reset("Login");
// this.props.navigation.reset("Login");
this
.
props
.
navigation
.
reset
({
this
.
props
.
navigation
.
reset
({
index
:
0
,
index
:
0
,
...
@@ -164,7 +163,7 @@ class EmailConfirmation extends React.Component {
...
@@ -164,7 +163,7 @@ class EmailConfirmation extends React.Component {
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
''
,
'Silahkan Cek Email Kembali'
);
Alert
.
alert
(
''
,
i18n
.
t
(
'alertCheckEmail'
)
);
this
.
setState
({
this
.
setState
({
spinner
:
false
,
spinner
:
false
,
})
})
...
@@ -185,8 +184,8 @@ class EmailConfirmation extends React.Component {
...
@@ -185,8 +184,8 @@ class EmailConfirmation extends React.Component {
spinner
:
false
,
spinner
:
false
,
})
})
Alert
.
alert
(
Alert
.
alert
(
'Sukses'
,
i18n
.
t
(
'alertSuccessTitle'
)
,
'Email berhasil di kirimkan! '
i18n
.
t
(
'alertEmailSended'
)
)
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
...
...
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