Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_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
clone_excelso
Commits
774d4b0f
Commit
774d4b0f
authored
Feb 15, 2021
by
Prasetya Saputra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable button cek & fix migrasi card cek
parent
75b76c77
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
49 deletions
+53
-49
en.json
lib/en.json
+1
-0
id.json
lib/id.json
+1
-0
CardActivation.js
view/CardActivation.js
+51
-49
No files found.
lib/en.json
View file @
774d4b0f
...
...
@@ -238,6 +238,7 @@
"alertVoucher"
:
"Voucher cannot be used with point"
,
"alertemailblank"
:
"Email cannot be empty"
,
"check"
:
"Check Card"
,
"cardAvailable"
:
"Card Found"
,
"waCallCenter"
:
"Hello, I have a problem with trans no"
,
"renewal_notEnoughBalance"
:
"You don't have enough balance"
,
...
...
lib/id.json
View file @
774d4b0f
...
...
@@ -238,6 +238,7 @@
"alertVoucher"
:
"Voucher tidak bisa digunakan dengan point"
,
"alertemailblank"
:
"Email tidak boleh kosong"
,
"check"
:
"Cek Kartu"
,
"cardAvailable"
:
"Kartu Ditemukan"
,
"waCallCenter"
:
"Halo, saya ada masalah dengan trans no"
,
"renewal_notEnoughBalance"
:
"Saldo anda tidak mencukupi."
,
...
...
view/CardActivation.js
View file @
774d4b0f
...
...
@@ -20,10 +20,9 @@ class CardActivation extends React.Component {
timer
:
80
,
onclickToken
:
false
,
onclick
:
false
,
onClickCard
:
false
,
// Modifikasi Aktivasi Kartu | Hidden Check Card Button
spinner
:
false
,
caretHidden
:
true
,
tnc_link
:
''
,
tnc_link
:
''
,
TextInputDisableStatus
:
true
,
// Modifikasi Aktivasi Kartu | Disable Edit
}
}
...
...
@@ -32,13 +31,16 @@ class CardActivation extends React.Component {
// Modifikasi Aktivasi Kartu | Function Disable Edit + Check Card API
let
params
=
{
session_id
:
this
.
props
.
session_id
,
card_number
:
this
.
state
.
card_number
,
card_number
:
this
.
props
.
card_number
||
this
.
state
.
card_number
,
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/series_info'
,
params
).
then
(
res
=>
{
// Mengambil Data TnC Link dari API
console
.
log
(
'LINK TNC : '
,
res
.
data
.
data
.
tnc_link
);
this
.
setState
({
TextInputDisableStatus
:
false
,
tnc_link
:
res
.
data
.
data
.
tnc_link
,
onClickCard
:
true
})
this
.
setState
({
TextInputDisableStatus
:
false
,
tnc_link
:
res
.
data
.
data
.
tnc_link
})
Alert
.
alert
(
''
,
i18n
.
t
(
'cardAvailable'
))
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
...
...
@@ -47,7 +49,8 @@ class CardActivation extends React.Component {
[
{
text
:
"OK"
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
onPress
:
()
=>
this
.
setState
({
spinner
:
false
})
}
],
);
})
...
...
@@ -330,6 +333,41 @@ class CardActivation extends React.Component {
/
>
<
View
style
=
{
styles
.
form
}
>
{
/* Modifikasi Aktivasi Kartu | Disable Edit */
}
<
View
style
=
{
styles
.
field_email
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
19
,
textAlign
:
'center'
,
marginBottom
:
5
}}
>
{
i18n
.
t
(
'cardNumber'
)}
<
/Text
>
{
this
.
state
.
card_nums
==
""
?
(
<
TextInput
style
=
{{
backgroundColor
:
this
.
state
.
TextInputDisableStatus
?
'#FFF'
:
'#e3e3e3'
,
height
:
40
,
borderColor
:
'gray'
,
borderWidth
:
1
,
padding
:
5
,
borderRadius
:
10
,
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
16
}}
onChangeText
=
{
card_number
=>
this
.
setState
({
card_number
})}
keyboardType
=
'numeric'
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
editable
=
{
this
.
state
.
TextInputDisableStatus
}
/
>
)
:
(
<
TextInput
style
=
{{
backgroundColor
:
this
.
state
.
TextInputDisableStatus
?
'#FFF'
:
'#e3e3e3'
,
height
:
40
,
borderColor
:
'gray'
,
borderWidth
:
1
,
padding
:
5
,
borderRadius
:
10
,
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
16
}}
onChangeText
=
{
card_nums
=>
this
.
setState
({
card_nums
})}
value
=
{
this
.
state
.
card_nums
}
editable
=
{
false
}
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
/
>
)
}
<
/View
>
{
/* Modifikasi Aktivasi Kartu | Cek Kartu */
}
<
View
style
=
{
styles
.
button
}
>
<
TouchableOpacity
style
=
{{
top
:
25
}}
onPress
=
{
this
.
checkCard
}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
10
}}
>
{
i18n
.
t
(
'check'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
field_phone
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
19
,
textAlign
:
'center'
,
marginBottom
:
5
}}
>
{
i18n
.
t
(
'mobilePhone'
)}
<
/Text
>
...
...
@@ -345,8 +383,8 @@ class CardActivation extends React.Component {
<
/View
>
{
this
.
state
.
onclick
==
true
?
(
null
)
:
(
<
View
style
=
{
styles
.
button
}
>
<
TouchableOpacity
disabled
=
{
this
.
state
.
mobile_phone
.
length
<
1
}
style
=
{{
top
:
25
}}
onPress
=
{()
=>
this
.
handleToken
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
this
.
state
.
mobile_phone
.
length
<
1
?
'#e3e3e3'
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
TouchableOpacity
style
=
{{
top
:
25
}}
onPress
=
{()
=>
this
.
handleToken
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
10
}}
>
{
i18n
.
t
(
'sendtoken'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
...
...
@@ -370,42 +408,6 @@ class CardActivation extends React.Component {
<
/TouchableOpacity
>
)
:
(
null
)}
{
/* Modifikasi Aktivasi Kartu | Disable Edit */
}
<
View
style
=
{
styles
.
field_email
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
19
,
textAlign
:
'center'
,
marginBottom
:
5
}}
>
{
i18n
.
t
(
'cardNumber'
)}
<
/Text
>
{
this
.
state
.
card_nums
==
""
?
(
<
TextInput
style
=
{{
backgroundColor
:
this
.
state
.
TextInputDisableStatus
?
'#FFF'
:
'#e3e3e3'
,
height
:
40
,
borderColor
:
'gray'
,
borderWidth
:
1
,
padding
:
5
,
borderRadius
:
10
,
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
16
}}
onChangeText
=
{
card_number
=>
this
.
setState
({
card_number
})}
keyboardType
=
'numeric'
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
editable
=
{
this
.
state
.
TextInputDisableStatus
}
/
>
)
:
(
<
TextInput
style
=
{{
backgroundColor
:
this
.
state
.
TextInputDisableStatus
?
'#FFF'
:
'#e3e3e3'
,
height
:
40
,
borderColor
:
'gray'
,
borderWidth
:
1
,
padding
:
5
,
borderRadius
:
10
,
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
16
}}
onChangeText
=
{
card_nums
=>
this
.
setState
({
card_nums
})}
value
=
{
this
.
state
.
card_nums
}
editable
=
{
false
}
caretHidden
=
{
this
.
state
.
caretHidden
}
onFocus
=
{()
=>
this
.
setState
({
caretHidden
:
false
})}
/
>
)
}
<
/View
>
{
/* Modifikasi Aktivasi Kartu | Cek Kartu */
}
{
this
.
state
.
onClickCard
==
true
?
(
null
)
:
(
<
View
style
=
{
styles
.
button
}
>
<
TouchableOpacity
disabled
=
{
this
.
state
.
card_number
.
length
<
1
}
style
=
{{
top
:
25
}}
onPress
=
{
this
.
checkCard
}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
this
.
state
.
card_number
.
length
<
1
?
'#e3e3e3'
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
10
}}
>
{
i18n
.
t
(
'check'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
)}
<
/View
>
<
View
style
=
{
styles
.
field_email
}
>
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
19
,
textAlign
:
'center'
,
marginBottom
:
5
}}
>
Token
<
/Text
>
...
...
@@ -437,7 +439,7 @@ class CardActivation extends React.Component {
<
ListItem
style
=
{{
borderBottomColor
:
'white'
,
alignItems
:
'center'
,
alignContent
:
'center'
}}
>
<
CheckBox
color
=
"#CFB368"
checked
=
{
this
.
state
.
terms_condition
}
onPress
=
{()
=>
this
.
checkboxPressed
()}
/
>
<
Body
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
{
this
.
props
.
navigation
.
navigate
(
'Card Privacy Statement'
,
{
tnc_link
:
this
.
state
.
tnc_link
})
}}
>
<
TouchableWithoutFeedback
onPress
=
{()
=>
{
this
.
props
.
navigation
.
navigate
(
'Card Privacy Statement'
,
{
tnc_link
:
this
.
state
.
tnc_link
})
}}
>
<
Text
style
=
{{
marginLeft
:
16
,
color
:
'#CFB368'
,
fontWeight
:
'bold'
}}
>
{
i18n
.
t
(
'accept_terms_condition'
)}
<
/Text
>
<
/TouchableWithoutFeedback
>
<
/Body
>
...
...
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