Implement Sex \o/:

* Offers tracking sex activities and contraceptives as much as you want
* "Other" contraceptive allows to specify with text input
This commit is contained in:
Bl00dyMarie
2018-08-13 16:47:19 +02:00
parent 7ea6a683ff
commit a64bfbcd50
5 changed files with 223 additions and 7 deletions
+22 -1
View File
@@ -60,6 +60,22 @@ const DesireSchema = {
}
}
const SexSchema = {
name: 'Sex',
properties: {
solo: { type: 'bool', optional: true },
partner: { type: 'bool', optional: true },
condom: { type: 'bool', optional: true },
pill: { type: 'bool', optional: true },
iud: { type: 'bool', optional: true },
patch: { type: 'bool', optional: true },
ring: { type: 'bool', optional: true },
implant: { type: 'bool', optional: true },
other: { type: 'bool', optional: true },
note: { type: 'string', optional: true }
}
}
const CycleDaySchema = {
name: 'CycleDay',
primaryKey: 'date',
@@ -88,6 +104,10 @@ const CycleDaySchema = {
desire: {
type: 'Desire',
optional: true
},
sex: {
type: 'Sex',
optional: true
}
}
}
@@ -100,7 +120,8 @@ const realmConfig = {
MucusSchema,
CervixSchema,
NoteSchema,
DesireSchema
DesireSchema,
SexSchema
],
// we only want this in dev mode
deleteRealmIfMigrationNeeded: true