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
79f17644
Commit
79f17644
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
ComputedNfp => value
parent
c96d3d45
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/cycle-day/cycle-day-overview.js
+1
-1
1 addition, 1 deletion
components/cycle-day/cycle-day-overview.js
db.js
+1
-1
1 addition, 1 deletion
db.js
lib/sympto-adapter.js
+10
-4
10 additions, 4 deletions
lib/sympto-adapter.js
with
12 additions
and
6 deletions
components/cycle-day/cycle-day-overview.js
+
1
−
1
View file @
79f17644
...
@@ -62,7 +62,7 @@ export default class DayView extends Component {
...
@@ -62,7 +62,7 @@ export default class DayView extends Component {
const
mucusFeelingValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
feeling
const
mucusFeelingValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
feeling
const
mucusTextureValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
texture
const
mucusTextureValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
texture
const
mucusComputedValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
computedNfp
const
mucusComputedValue
=
this
.
cycleDay
.
mucus
&&
this
.
cycleDay
.
mucus
.
value
let
mucusLabel
let
mucusLabel
if
(
typeof
mucusFeelingValue
===
'
number
'
&&
typeof
mucusTextureValue
===
'
number
'
)
{
if
(
typeof
mucusFeelingValue
===
'
number
'
&&
typeof
mucusTextureValue
===
'
number
'
)
{
mucusLabel
=
`
${
feelingLabels
[
mucusFeelingValue
]}
+
${
textureLabels
[
mucusTextureValue
]}
(
${
computeSensiplanMucusLabels
[
mucusComputedValue
]}
)`
mucusLabel
=
`
${
feelingLabels
[
mucusFeelingValue
]}
+
${
textureLabels
[
mucusTextureValue
]}
(
${
computeSensiplanMucusLabels
[
mucusComputedValue
]}
)`
...
...
This diff is collapsed.
Click to expand it.
db.js
+
1
−
1
View file @
79f17644
...
@@ -23,7 +23,7 @@ const MucusSchema = {
...
@@ -23,7 +23,7 @@ const MucusSchema = {
properties
:
{
properties
:
{
feeling
:
'
int
'
,
feeling
:
'
int
'
,
texture
:
'
int
'
,
texture
:
'
int
'
,
computedNfp
:
'
int
'
,
value
:
'
int
'
,
exclude
:
'
bool
'
exclude
:
'
bool
'
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/sympto-adapter.js
+
10
−
4
View file @
79f17644
...
@@ -8,12 +8,12 @@ export default function (dateString) {
...
@@ -8,12 +8,12 @@ export default function (dateString) {
const
cycle
=
getCycleDaysBeforeDay
(
dateString
)
const
cycle
=
getCycleDaysBeforeDay
(
dateString
)
if
(
!
cycle
)
return
fertilityStatus
.
unknown
if
(
!
cycle
)
return
fertilityStatus
.
unknown
// we get earliest last, but sympto wants earliest first
cycle
.
reverse
()
const
previousCycles
=
getPreviousCycles
(
cycle
[
0
])
const
previousCycles
=
getPreviousCycles
(
cycle
[
0
])
previousCycles
.
forEach
(
cycle
=>
cycle
.
reverse
())
const
status
=
getFertilityStatus
({
cycle
,
previousCycles
})
const
status
=
getFertilityStatus
({
cycle
:
formatCycleForSympto
(
cycle
),
previousCycles
:
previousCycles
.
map
(
formatCycleForSympto
)
})
return
formatStatusForApp
(
status
)
return
formatStatusForApp
(
status
)
}
}
...
@@ -24,4 +24,10 @@ function formatStatusForApp(status) {
...
@@ -24,4 +24,10 @@ function formatStatusForApp(status) {
}
else
{
}
else
{
return
fertilityStatus
.
infertile
return
fertilityStatus
.
infertile
}
}
}
function
formatCycleForSympto
(
cycle
)
{
// we get earliest last, but sympto wants earliest first
cycle
.
reverse
()
return
cycle
}
}
\ No newline at end of file
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