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
e0639065
Commit
e0639065
authored
May 27, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
c16a11f0
0885de3e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
66 deletions
+78
-66
ItemShopingCart.js
view/ItemShopingCart.js
+26
-21
ShoppingCart.js
view/ShoppingCart.js
+52
-45
No files found.
view/ItemShopingCart.js
View file @
e0639065
...
...
@@ -30,29 +30,35 @@ class ItemShoping extends React.Component {
// console.log(this.props)
return
(
<
View
style
=
{{
flex
:
1
,
margin
:
10
}}
key
=
{
item
.
id
}
>
<
View
style
=
{{
flex
:
1
}}
key
=
{
item
.
id
}
>
{
/* <Text style={{ fontSize: 20, color: '#c9af6d' }}>{item.name}</Text> */
}
<
View
style
=
{{
flexDirection
:
'row'
}}
>
<
View
>
<
Image
source
=
{{
uri
:
item
.
image
}}
style
=
{{
height
:
100
,
width
:
100
,
borderRadius
:
5
,
top
:
5
}}
><
/Image
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
,
height
:
100
,
marginVertical
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
100
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Menu Detail'
,
{
nameMenu
:
item
.
name
,
desc
:
item
.
description
,
image
:
item
.
image
})}
>
<
Image
source
=
{{
uri
:
item
.
image
}}
style
=
{{
height
:
100
,
width
:
100
,
borderRadius
:
10
,
}}
><
/Image
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flex
:
2
,
height
:
150
}}
>
<
View
style
=
{{
marginLeft
:
5
,
marginRight
:
5
}}
>
<
Text
style
=
{{
fontSize
:
14
,
margin
:
5
,
marginRight
:
10
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
{
item
.
name
}
<
/Text
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
item
.
price
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
margin
:
5
,
marginRight
:
10
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
View
>
<
Text
style
=
{{
fontSize
:
15
,
margin
:
5
,
marginRight
:
10
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
{
item
.
name
}
<
/Text
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
item
.
price
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
margin
:
5
,
marginRight
:
10
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
}}
>
<
View
style
=
{{
marginLeft
:
5
,
marginRight
:
5
,
flexDirection
:
'row'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleAddDescription
()}
>
<
View
style
=
{
styles
.
shadowEdit
}
>
<
Image
source
=
{(
require
(
'../assets/icon/icon-pencil.png'
))}
style
=
{{
height
:
25
,
width
:
25
,
marginLeft
:
5
}}
><
/Image
>
<
Image
source
=
{(
require
(
'../assets/icon/icon-pencil.png'
))}
style
=
{{
height
:
25
,
width
:
25
,
marginLeft
:
5
,
marginRight
:
5
}}
><
/Image
>
<
/View
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
shadowAdd
}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
handleMin
()}
>
<
Text
style
=
{{
fontSize
:
2
0
,
margin
:
2
,
color
:
'#CFB368'
}}
>
-
<
/Text
>
<
TouchableOpacity
style
=
{{
alignSelf
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
handleMin
()}
>
<
Text
style
=
{{
fontSize
:
2
5
,
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
-
<
/Text
>
<
/TouchableOpacity
>
<
TextInput
style
=
{{
height
:
25
,
padding
:
2
,
textAlign
:
'center'
,
margin
:
2
}}
style
=
{{
padding
:
2
,
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
marginRight
:
5
,
marginLeft
:
5
}}
keyboardType
=
{
'numeric'
}
onChangeText
=
{(
quantity
)
=>
this
.
handleChangeQuantity
(
item
,
quantity
)}
>
{
item
.
quantity
}
<
/TextInput
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
handleAdd
()}
>
<
Text
style
=
{{
fontSize
:
2
0
,
margin
:
2
,
color
:
'#CFB368'
}}
>
+
<
/Text
>
<
TouchableOpacity
style
=
{{
alignSelf
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
handleAdd
()}
>
<
Text
style
=
{{
fontSize
:
2
5
,
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Light'
,
color
:
'#CFB368'
}}
>
+
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
...
@@ -66,7 +72,7 @@ class ItemShoping extends React.Component {
const
styles
=
StyleSheet
.
create
({
shadowEdit
:
{
height
:
30
,
width
:
25
,
width
:
40
,
borderWidth
:
1
,
borderRadius
:
2
,
borderColor
:
'#ddd'
,
...
...
@@ -78,12 +84,11 @@ const styles = StyleSheet.create({
elevation
:
1
,
marginLeft
:
5
,
marginRight
:
5
,
marginTop
:
10
,
alignItems
:
'center'
marginTop
:
5
,
},
shadowAdd
:
{
height
:
30
,
width
:
75
,
width
:
90
,
borderWidth
:
1
,
borderRadius
:
2
,
borderColor
:
'#ddd'
,
...
...
@@ -95,7 +100,7 @@ const styles = StyleSheet.create({
elevation
:
1
,
marginLeft
:
5
,
marginRight
:
5
,
marginTop
:
10
,
marginTop
:
5
,
flexDirection
:
'row'
},
shadowMin
:
{
...
...
view/ShoppingCart.js
View file @
e0639065
This diff is collapsed.
Click to expand it.
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