Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
5c4959d4
Commit
5c4959d4
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Add exclude switch
parent
1c674b39
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bleeding.js
+11
-3
11 additions, 3 deletions
bleeding.js
with
11 additions
and
3 deletions
bleeding.js
+
11
−
3
View file @
5c4959d4
...
...
@@ -3,7 +3,8 @@ import {
View
,
Button
,
Text
,
Picker
Picker
,
Switch
}
from
'
react-native
'
import
styles
from
'
./styles
'
import
{
saveBleeding
}
from
'
./db
'
...
...
@@ -17,7 +18,8 @@ export default class Bleeding extends Component {
const
cycleDay
=
props
.
navigation
.
state
.
params
.
cycleDay
this
.
state
=
{
cycleDay
,
currentValue
:
Number
((
cycleDay
.
bleeding
&&
cycleDay
.
bleeding
.
value
)
||
0
).
toString
()
currentValue
:
Number
((
cycleDay
.
bleeding
&&
cycleDay
.
bleeding
.
value
)
||
0
).
toString
(),
exclude
:
cycleDay
.
bleeding
&&
cycleDay
.
bleeding
.
exclude
}
}
...
...
@@ -41,6 +43,12 @@ export default class Bleeding extends Component {
<
Picker
.
Item
label
=
{
labels
[
2
]}
value
=
"
2
"
/>
<
Picker
.
Item
label
=
{
labels
[
3
]}
value
=
"
3
"
/>
<
/Picker
>
<
Text
>
Exclude
<
/Text
>
<
Switch
onValueChange
=
{(
val
)
=>
{
this
.
setState
({
exclude
:
val
})
}}
value
=
{
this
.
state
.
exclude
}
/
>
<
Button
onPress
=
{()
=>
{
navigate
(
'
dayView
'
,
{
cycleDay
:
day
})
...
...
@@ -58,7 +66,7 @@ export default class Bleeding extends Component {
onPress
=
{()
=>
{
saveBleeding
(
day
,
{
value
:
Number
(
this
.
state
.
currentValue
),
exclude
:
fals
e
exclude
:
this
.
state
.
exclud
e
})
navigate
(
'
dayView
'
,
{
cycleDay
:
day
})
}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment