Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
eCartPro-Customer
Project
Project
Details
Activity
Releases
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
Dida Adams Arizona
eCartPro-Customer
Commits
7dacb22f
Commit
7dacb22f
authored
Jul 23, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isu category + minor
parent
f1051d9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
CategoryScreen.js
App/Containers/CategoryScreen.js
+3
-2
PaymentMethodScreen.js
App/Containers/PaymentMethodScreen.js
+0
-1
Utils.js
App/Lib/Utils.js
+9
-1
No files found.
App/Containers/CategoryScreen.js
View file @
7dacb22f
...
...
@@ -10,6 +10,7 @@ import BaseHeader from '../Components/BaseHeader';
import
{
Images
}
from
'../Themes'
;
import
Api
from
'../Services/Api'
;
import
BaseText
from
'../Components/BaseText'
;
import
{
toTitleCase
}
from
'../Lib/Utils'
;
class
CategoryScreen
extends
Component
{
constructor
(
props
)
{
...
...
@@ -65,8 +66,8 @@ class CategoryScreen extends Component {
style
=
{{
backgroundColor
:
index
%
2
==
0
?
'#b89469'
:
index
%
3
==
0
?
'#7a7a7d'
:
'#636066'
,
borderRadius
:
16
,
height
:
90
,
width
:
'100%'
,
marginBottom
:
15
,
marginTop
:
index
==
0
?
20
:
0
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'ListSearchScreen'
,
{
catID
:
item
.
cat_id
})}
>
<
BaseText
type
=
{
"bold"
}
text
=
{
item
.
title
}
style
=
{{
fontSize
:
16
,
color
:
'white'
,
marginTop
:
5
,
alignSelf
:
'center'
}}
/
>
<
View
style
=
{{}}
>
<
BaseText
type
=
{
"bold"
}
text
=
{
toTitleCase
(
item
.
title
)
}
style
=
{{
fontSize
:
16
,
color
:
'white'
,
marginTop
:
5
,
alignSelf
:
'center'
}}
/
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Image
source
=
{{
uri
:
item
.
category_image
}}
style
=
{{
height
:
90
,
width
:
90
}}
/
>
<
/View
>
<
/TouchableOpacity
>
...
...
App/Containers/PaymentMethodScreen.js
View file @
7dacb22f
...
...
@@ -13,7 +13,6 @@ import BaseButton from '../Components/BaseButton';
import
BaseText
from
'../Components/BaseText'
;
import
{
formatRp
}
from
'../Lib/Utils'
;
import
Constant
from
'../Lib/Constant'
;
import
RadioForm
,
{
RadioButton
,
RadioButtonInput
,
RadioButtonLabel
}
from
'react-native-simple-radio-button'
;
import
Api
from
'../Services/Api'
;
...
...
App/Lib/Utils.js
View file @
7dacb22f
import
R
from
'ramda'
import
R
,
{
isNil
,
isEmpty
}
from
'ramda'
export
function
validateEmail
(
email
)
{
var
re
=
/^
(([^
<>()
\[\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\[\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
...
...
@@ -43,3 +43,11 @@ export function handlePhone(angka) {
let
value
=
String
(
angka
).
replace
(
/
\D
+/g
,
""
);
return
value
}
export
function
toTitleCase
(
str
)
{
if
(
isNil
(
str
)
||
isEmpty
(
str
))
return
''
;
let
newstr
=
str
.
split
(
'_'
).
join
(
" "
);
return
newstr
.
replace
(
/
\w\S
*/g
,
function
(
txt
)
{
return
txt
.
charAt
(
0
).
toUpperCase
()
+
txt
.
substr
(
1
).
toLowerCase
();
});
}
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