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
9ab4bd0d
Commit
9ab4bd0d
authored
6 years ago
by
emelko
Browse files
Options
Downloads
Patches
Plain Diff
If existing display mucus feeling and texture value on button
parent
bb27cb09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/cycle-day/cycle-day-overview.js
+15
-13
15 additions, 13 deletions
components/cycle-day/cycle-day-overview.js
with
15 additions
and
13 deletions
components/cycle-day/cycle-day-overview.js
+
15
−
13
View file @
9ab4bd0d
...
...
@@ -6,11 +6,12 @@ import {
}
from
'
react-native
'
import
styles
from
'
../../styles
'
import
{
bleedingLabels
as
bleedingLabels
,
mucusFeeling
as
feelingLabels
}
from
'
./labels/labels
'
import
cycleDayModule
from
'
../../lib/get-cycle-day-number
'
import
{
bleedingDaysSortedByDate
}
from
'
../../db
'
bleeding
as
labels
,
mucusFeeling
as
feelingLabels
,
mucusTexture
as
textureLabels
,
}
from
'
../labels/labels
'
import
cycleDayModule
from
'
../lib/get-cycle-day-number
'
import
{
bleedingDaysSortedByDate
}
from
'
../db
'
const
getCycleDayNumber
=
cycleDayModule
()
...
...
@@ -42,7 +43,7 @@ export default class DayView extends Component {
const
bleedingValue
=
this
.
cycleDay
.
bleeding
&&
this
.
cycleDay
.
bleeding
.
value
let
bleedingLabel
if
(
typeof
bleedingValue
===
'
number
'
)
{
bleedingLabel
=
`
${
bleedingL
abels
[
bleedingValue
]}
`
bleedingLabel
=
`
${
l
abels
[
bleedingValue
]}
`
if
(
this
.
cycleDay
.
bleeding
.
exclude
)
bleedingLabel
=
"
(
"
+
bleedingLabel
+
"
)
"
}
else
{
bleedingLabel
=
'
edit
'
...
...
@@ -58,13 +59,14 @@ export default class DayView extends Component {
temperatureLabel
=
'
edit
'
}
const
mucusFeelingValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
value
let
mucusFeelingLabel
if
(
typeof
mucusFeelingValue
===
'
number
'
)
{
mucusFeelingLabel
=
`
${
feelingLabels
[
mucusFeelingValue
]}
`
if
(
this
.
cycleDay
.
mucus
.
exclude
)
mucusFeelingLabel
=
"
(
"
+
mucusFeelingLabel
+
"
)
"
const
mucusFeelingValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
feeling
const
mucusTextureValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
texture
let
mucusLabel
if
(
typeof
mucusFeelingValue
===
'
number
'
&&
typeof
mucusTextureValue
===
'
number
'
)
{
mucusLabel
=
`
${
feelingLabels
[
mucusFeelingValue
]}
+
${
textureLabels
[
mucusTextureValue
]}
`
if
(
this
.
cycleDay
.
mucus
.
exclude
)
mucusLabel
=
"
(
"
+
mucusLabel
+
"
)
"
}
else
{
mucus
Feeling
Label
=
'
edit
'
mucusLabel
=
'
edit
'
}
return
(
...
...
@@ -94,7 +96,7 @@ export default class DayView extends Component {
<
View
style
=
{
styles
.
singleButtonView
}
>
<
Button
onPress
=
{()
=>
this
.
showView
(
'
mucusEditView
'
)}
title
=
{
mucus
Feeling
Label
}
>
title
=
{
mucusLabel
}
>
<
/Button
>
<
/View
>
<
/View
>
...
...
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