Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
safetcut-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
atichat
safetcut-app
Commits
1e69a248
Commit
1e69a248
authored
Sep 27, 2019
by
Tonk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
309f8333
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
screens/Private/SmartMeterScreen/McbLinkScreen.js
+11
-5
No files found.
screens/Private/SmartMeterScreen/McbLinkScreen.js
View file @
1e69a248
...
...
@@ -22,7 +22,7 @@ let checkedTimes = 0;
class
McbLinkScreen
extends
React
.
Component
{
static
navigationOptions
=
({
navigation
})
=>
{
return
{
title
:
navigation
.
getParam
(
'mcbLink'
).
name
,
title
:
navigation
.
getParam
(
'mcbLink'
).
name
||
`MCB Link
${
navigation
.
getParam
(
'mcbIndex'
)
+
1
}
`
,
headerLeft
:
(
<
HeaderButtons
HeaderButtonComponent
=
{
IoniconsHeaderButton
}
>
<
Item
title
=
"back"
iconName
=
"ios-arrow-back"
onPress
=
{()
=>
navigation
.
pop
()}
/
>
...
...
@@ -136,14 +136,16 @@ class McbLinkScreen extends React.Component {
<
View
style
=
{[
theme
.
container
,
theme
.
containerWithPadding
]}
>
<
Card
style
=
{{
borderRadius
:
10
,
padding
:
10
,
paddingHorizontal
:
15
,
borderColor
:
'transparent'
}}
>
<
View
style
=
{[
theme
.
rowContainer
,
{
justifyContent
:
'space-between'
}]}
>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDark
]}
>
{
item
.
name
}
<
/Text
>
<
Text
style
=
{[
theme
.
smallTitle
,
theme
.
textDark
]}
>
{
item
.
name
||
`Sub Breaker
${
index
+
1
}
`
}
<
/Text
>
<
Switch
disabled
=
{
isWaiting
?
true
:
false
}
value
=
{
subStatus
}
onValueChange
=
{
value
=>
handleOnPressSubBreakerSwitch
(
value
)}
/
>
<
/View
>
<
Text
style
=
{[
theme
.
description
,
theme
.
mt1
]}
>
{
item
.
description
}
<
/Text
>
<
Text
style
=
{[
theme
.
description
,
theme
.
mt1
]}
>
{
item
.
description
||
'No description'
}
<
/Text
>
<
/Card
>
{
this
.
renderData
(
item
)}
...
...
@@ -158,6 +160,7 @@ class McbLinkScreen extends React.Component {
};
renderData
=
item
=>
{
const
data
=
item
.
data
;
if
(
data
)
{
return
(
<
View
style
=
{{
flexDirection
:
'row'
}}
>
{
Object
.
keys
(
data
).
map
((
key
,
index
)
=>
(
...
...
@@ -167,12 +170,15 @@ class McbLinkScreen extends React.Component {
<
/Text
>
<
Text
style
=
{
styles
.
dataCurrent
}
>
{
data
[
key
]}{
' '
}
{
key
===
'ARC'
?
null
:
<
Text
style
=
{
styles
.
dataUnit
}
>
{
key
===
'AMP'
?
'A'
:
'mA'
}
<
/Text>
}
{
key
===
'ARC'
?
null
:
(
<
Text
style
=
{
styles
.
dataUnit
}
>
{
key
===
'AMP'
?
'A'
:
'mA'
}
<
/Text
>
)}
<
/Text
>
<
/Card
>
))}
<
/View
>
);
}
};
renderElectronic
=
item
=>
{
const
{
toggleDel
}
=
this
.
state
;
...
...
@@ -410,7 +416,7 @@ class McbLinkScreen extends React.Component {
}}
>
{
subBreakersInfo
.
map
((
item
,
index
)
=>
(
<
Tab
heading
=
{
item
.
name
}
{...
TabStyle
}
key
=
{
`tab
${
index
}
`
}
>
<
Tab
heading
=
{
item
.
name
||
`Sub Breaker
${
index
+
1
}
`
}
{...
TabStyle
}
key
=
{
`tab
${
index
}
`
}
>
{
this
.
renderSubbreaker
(
item
,
index
)}
<
/Tab
>
))}
...
...
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