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
e884ad26
Commit
e884ad26
authored
Sep 02, 2020
by
Afid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error dialog
parent
e29f3b08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
Renewal.js
view/Renewal.js
+37
-6
No files found.
view/Renewal.js
View file @
e884ad26
...
...
@@ -55,15 +55,29 @@ class Renewal extends React.Component {
// console.log(params);
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/card/renewal'
,
params
).
then
(
res
=>
{
// console.log('ini res ' + JSON.stringify(res.data))
this
.
setState
({
spinner
:
false
})
this
.
_getProfile
();
Toast
.
show
(
i18n
.
t
(
'successRenewal'
))
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
screen
:
'ACCOUNT'
});
this
.
setState
({
spinner
:
false
})
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
// console.log(response.msg)
Alert
.
alert
(
''
,
response
.
msg
);
this
.
setState
({
spinner
:
false
})
let
msg
=
''
;
try
{
let
response
=
error
.
response
.
data
;
msg
=
response
.
msg
;
}
catch
(
err
)
{
msg
=
'Error Connection'
;
}
Alert
.
alert
(
''
,
msg
,
[
{
text
:
'OK'
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
,
})
}
]
);
})
}
...
...
@@ -102,7 +116,24 @@ class Renewal extends React.Component {
})
}
}).
catch
(
error
=>
{
Alert
.
alert
(
''
,
response
.
msg
);
let
msg
=
''
;
try
{
let
response
=
error
.
response
.
data
;
msg
=
response
.
msg
;
}
catch
(
err
)
{
msg
=
'Error Connection'
;
}
Alert
.
alert
(
''
,
msg
,
[
{
text
:
'OK'
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
,
})
}
]
);
})
}
...
...
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