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
db8652b4
Commit
db8652b4
authored
Jun 17, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing alert on ios
parent
4b7171da
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
71 deletions
+73
-71
New_Register.js
view/New_Register.js
+73
-71
No files found.
view/New_Register.js
View file @
db8652b4
...
@@ -59,19 +59,19 @@ class NewRegister extends React.Component {
...
@@ -59,19 +59,19 @@ class NewRegister extends React.Component {
let
date_list
=
[]
let
date_list
=
[]
for
(
let
i
=
1
;
i
<=
31
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
31
;
i
++
)
{
date_list
.
push
({
label
:
String
(
i
),
value
:
i
});
date_list
.
push
({
label
:
String
(
i
),
value
:
i
});
}
}
let
month_list
=
[]
let
month_list
=
[]
for
(
let
i
=
1
;
i
<=
12
;
i
++
)
{
for
(
let
i
=
1
;
i
<=
12
;
i
++
)
{
const
month_name
=
month
[
i
];
const
month_name
=
month
[
i
];
month_list
.
push
({
label
:
month_name
,
value
:
i
});
month_list
.
push
({
label
:
month_name
,
value
:
i
});
}
}
let
year_list
=
[]
let
year_list
=
[]
let
current_year
=
new
Date
().
getFullYear
();
let
current_year
=
new
Date
().
getFullYear
();
let
start_year
=
current_year
-
65
;
let
start_year
=
current_year
-
65
;
let
end_year
=
current_year
-
13
;
let
end_year
=
current_year
-
13
;
for
(
let
i
=
start_year
;
i
<=
end_year
;
i
++
)
{
for
(
let
i
=
start_year
;
i
<=
end_year
;
i
++
)
{
year_list
.
push
({
label
:
String
(
i
),
value
:
i
});
year_list
.
push
({
label
:
String
(
i
),
value
:
i
});
}
}
this
.
setState
({
this
.
setState
({
date
:
date_list
,
date
:
date_list
,
...
@@ -91,7 +91,7 @@ class NewRegister extends React.Component {
...
@@ -91,7 +91,7 @@ class NewRegister extends React.Component {
for
(
const
key
in
list_gender
)
{
for
(
const
key
in
list_gender
)
{
if
(
list_gender
.
hasOwnProperty
(
key
))
{
if
(
list_gender
.
hasOwnProperty
(
key
))
{
const
row
=
list_gender
[
key
];
const
row
=
list_gender
[
key
];
gender_list
.
push
({
label
:
row
,
value
:
key
})
gender_list
.
push
({
label
:
row
,
value
:
key
})
}
}
}
}
this
.
setState
({
this
.
setState
({
...
@@ -245,16 +245,18 @@ class NewRegister extends React.Component {
...
@@ -245,16 +245,18 @@ class NewRegister extends React.Component {
this
.
props
.
navigation
.
navigate
(
'Email Confirmation'
)
this
.
props
.
navigation
.
navigate
(
'Email Confirmation'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
this
.
setState
({
spinner
:
false
,
})
// console.log(JSON.stringify(error.response));
// console.log(JSON.stringify(error.response));
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
Alert
.
alert
(
''
,
''
,
response
.
msg
,
response
.
msg
,
[
[
{
text
:
'OK'
}
{
text
:
'OK'
,
onPress
:
()
=>
this
.
setState
({
spinner
:
false
,
})
}
]
]
)
)
})
})
...
@@ -351,21 +353,21 @@ class NewRegister extends React.Component {
...
@@ -351,21 +353,21 @@ class NewRegister extends React.Component {
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_day
:
value
})}
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_day
:
value
})}
items
=
{
this
.
state
.
date
}
items
=
{
this
.
state
.
date
}
placeholder
=
{{
label
:
'-- Select --'
}}
placeholder
=
{{
label
:
'-- Select --'
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_month
:
value
})}
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_month
:
value
})}
items
=
{
this
.
state
.
month
}
items
=
{
this
.
state
.
month
}
placeholder
=
{{
label
:
'-- Select --'
}}
placeholder
=
{{
label
:
'-- Select --'
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
marginRight
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
marginRight
:
10
}}
>
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_year
:
value
})}
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
dob_year
:
value
})}
items
=
{
this
.
state
.
year
}
items
=
{
this
.
state
.
year
}
placeholder
=
{{
label
:
'-- Select --'
}}
placeholder
=
{{
label
:
'-- Select --'
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -425,7 +427,7 @@ class NewRegister extends React.Component {
...
@@ -425,7 +427,7 @@ class NewRegister extends React.Component {
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
gender
:
value
})}
<
RNPickerSelect
onValueChange
=
{(
value
)
=>
this
.
setState
({
gender
:
value
})}
items
=
{
this
.
state
.
gender_list
}
items
=
{
this
.
state
.
gender_list
}
placeholder
=
{{
label
:
'-- Select --'
}}
placeholder
=
{{
label
:
'-- Select --'
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
style
=
{{
inputIOSContainer
:
{
paddingVertical
:
10
,
alignItems
:
'center'
}
}}
/
>
/
>
<
/View
>
<
/View
>
)
:
(
)
:
(
...
@@ -453,8 +455,8 @@ class NewRegister extends React.Component {
...
@@ -453,8 +455,8 @@ class NewRegister extends React.Component {
<
Text
style
=
{{
color
:
'#CFB368'
}}
>
SIGN
IN
<
/Text
>
<
Text
style
=
{{
color
:
'#CFB368'
}}
>
SIGN
IN
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
Image
source
=
{
require
(
'../assets/images/file-register.png'
)}
resizeMethod
=
'resize'
resizeMode
=
'contain'
style
=
{{
height
:
300
,
width
:
'100%'
}}
><
/Image
>
<
Image
source
=
{
require
(
'../assets/images/file-register.png'
)}
resizeMethod
=
'resize'
resizeMode
=
'contain'
style
=
{{
height
:
300
,
width
:
'100%'
}}
><
/Image
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
...
@@ -519,7 +521,7 @@ const styles = StyleSheet.create({
...
@@ -519,7 +521,7 @@ const styles = StyleSheet.create({
fontSize
:
26
,
fontSize
:
26
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
color
:
'white'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
fontFamily
:
'Gotham-Black'
},
},
textInput
:
{
textInput
:
{
height
:
40
,
height
:
40
,
...
...
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