Fix uel after last merge (Mainly Careportal entries form NS)
This commit is contained in:
parent
f3787304f8
commit
9e2ce1cc27
6 changed files with 16 additions and 28 deletions
|
@ -202,7 +202,7 @@ class CareDialog : DialogFragmentWithDate() {
|
||||||
therapyEvent.glucoseType = meterType
|
therapyEvent.glucoseType = meterType
|
||||||
therapyEvent.glucose = binding.bg.value
|
therapyEvent.glucose = binding.bg.value
|
||||||
valuesWithUnit.add(ValueWithUnit(binding.bg.value.toDouble(), profileFunction.getUnits()))
|
valuesWithUnit.add(ValueWithUnit(binding.bg.value.toDouble(), profileFunction.getUnits()))
|
||||||
valuesWithUnit.add(ValueWithUnit(meterType, Units.CPEvent))
|
valuesWithUnit.add(ValueWithUnit(meterType.text, Units.CPEvent))
|
||||||
}
|
}
|
||||||
if (options == EventType.NOTE || options == EventType.EXERCISE) {
|
if (options == EventType.NOTE || options == EventType.EXERCISE) {
|
||||||
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_duration_label) + ": " + resourceHelper.gs(R.string.format_mins, binding.duration.value.toInt()))
|
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_duration_label) + ": " + resourceHelper.gs(R.string.format_mins, binding.duration.value.toInt()))
|
||||||
|
|
|
@ -433,7 +433,7 @@ public class NSClientPlugin extends PluginBase {
|
||||||
// room Therapy Event
|
// room Therapy Event
|
||||||
TherapyEvent therapyEvent = therapyEventFromNsIdForInvalidating(_id);
|
TherapyEvent therapyEvent = therapyEventFromNsIdForInvalidating(_id);
|
||||||
disposable.add(repository.runTransactionForResult(new SyncTherapyEventTransaction(therapyEvent)).subscribe(
|
disposable.add(repository.runTransactionForResult(new SyncTherapyEventTransaction(therapyEvent)).subscribe(
|
||||||
result -> result.getInvalidated().forEach(record -> uel.log("CAREPORTAL EVENT DELETED FROM NS", record.getType().getText(), 0.0, 0.0, 0, 0)),
|
result -> result.getInvalidated().forEach(record -> uel.log(Action.CAREPORTAL_DELETED_FROM_NS, record.getNote() , new ValueWithUnit(record.getTimestamp(), Units.Timestamp), new ValueWithUnit(record.getType().getText(), Units.CPEvent), new ValueWithUnit(record.getGlucose(), Units.Mg_Dl), new ValueWithUnit((int) record.getDuration()/60000, Units.M))),
|
||||||
error -> aapsLogger.error(LTag.DATABASE, "Error while removing therapy event", error)));
|
error -> aapsLogger.error(LTag.DATABASE, "Error while removing therapy event", error)));
|
||||||
// new DB model
|
// new DB model
|
||||||
EventNsTreatment evtTreatment = new EventNsTreatment(EventNsTreatment.Companion.getREMOVE(), json);
|
EventNsTreatment evtTreatment = new EventNsTreatment(EventNsTreatment.Companion.getREMOVE(), json);
|
||||||
|
@ -493,8 +493,8 @@ public class NSClientPlugin extends PluginBase {
|
||||||
disposable.add(repository.runTransactionForResult(new SyncTherapyEventTransaction(therapyEvent))
|
disposable.add(repository.runTransactionForResult(new SyncTherapyEventTransaction(therapyEvent))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result -> {
|
result -> {
|
||||||
result.getInserted().forEach(record -> uel.log("CAREPORTAL EVENT NS", record.getType().getText(), 0.0, 0.0, 0, 0));
|
result.getInserted().forEach(record -> uel.log(Action.CAREPORTAL_FROM_NS, record.getNote() , new ValueWithUnit(record.getTimestamp(), Units.Timestamp), new ValueWithUnit(record.getType().getText(), Units.CPEvent)));
|
||||||
result.getInvalidated().forEach(record -> uel.log("CAREPORTAL EVENT DELETED FROM NS", record.getType().getText(), 0.0, 0.0, 0, 0));
|
result.getInvalidated().forEach(record -> uel.log(Action.CAREPORTAL_DELETED_FROM_NS, record.getNote() , new ValueWithUnit(record.getTimestamp(), Units.Timestamp), new ValueWithUnit(record.getType().getText(), Units.CPEvent)));
|
||||||
},
|
},
|
||||||
error -> aapsLogger.error(LTag.DATABASE, "Error while saving therapy event", error)));
|
error -> aapsLogger.error(LTag.DATABASE, "Error while saving therapy event", error)));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -101,6 +101,8 @@ fun Action.stringId(): Int {
|
||||||
Action.TT_DELETED_FROM_NS -> R.string.uel_tt_deleted_from_ns
|
Action.TT_DELETED_FROM_NS -> R.string.uel_tt_deleted_from_ns
|
||||||
Action.TT_FROM_NS -> R.string.uel_tt_from_ns
|
Action.TT_FROM_NS -> R.string.uel_tt_from_ns
|
||||||
Action.TT_CANCELED_FROM_NS -> R.string.uel_tt_canceleted_from_ns
|
Action.TT_CANCELED_FROM_NS -> R.string.uel_tt_canceleted_from_ns
|
||||||
|
Action.CAREPORTAL_DELETED_FROM_NS -> R.string.uel_careportal_deleted_from_ns
|
||||||
|
Action.CAREPORTAL_FROM_NS -> R.string.uel_careportal_from_ns
|
||||||
Action.EXPORT_CSV -> R.string.uel_export_csv
|
Action.EXPORT_CSV -> R.string.uel_export_csv
|
||||||
else -> R.string.uel_unknown
|
else -> R.string.uel_unknown
|
||||||
}
|
}
|
||||||
|
|
|
@ -485,6 +485,8 @@
|
||||||
<string name="uel_sms_sms">SMS SMS</string>
|
<string name="uel_sms_sms">SMS SMS</string>
|
||||||
<string name="uel_sms_tt">SMS TT</string>
|
<string name="uel_sms_tt">SMS TT</string>
|
||||||
<string name="uel_tt_deleted_from_ns">TT DELETED FROM NS</string>
|
<string name="uel_tt_deleted_from_ns">TT DELETED FROM NS</string>
|
||||||
|
<string name="uel_careportal_deleted_from_ns">CAREPORTAL DELETED FROM NS</string>
|
||||||
|
<string name="uel_careportal_from_ns">CAREPORTAL FROM NS</string>
|
||||||
<string name="uel_tt_from_ns">TT FROM NS</string>
|
<string name="uel_tt_from_ns">TT FROM NS</string>
|
||||||
<string name="uel_tt_canceleted_from_ns">TT CANCELED FROM NS</string>
|
<string name="uel_tt_canceleted_from_ns">TT CANCELED FROM NS</string>
|
||||||
<string name="uel_export_csv">EXPORT USER ENTRIES</string>
|
<string name="uel_export_csv">EXPORT USER ENTRIES</string>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"database": {
|
"database": {
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"identityHash": "e8b8785efbd1699431eef90a5b441ed3",
|
"identityHash": "c6cb19c6cfa6d0fb738b3f58818172ff",
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"tableName": "apsResults",
|
"tableName": "apsResults",
|
||||||
|
@ -2699,7 +2699,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tableName": "userEntry",
|
"tableName": "userEntry",
|
||||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `d1` REAL NOT NULL, `d2` REAL NOT NULL, `i1` INTEGER NOT NULL, `i2` INTEGER NOT NULL)",
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `utcOffset` INTEGER NOT NULL, `action` TEXT NOT NULL, `s` TEXT NOT NULL, `values` TEXT NOT NULL)",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldPath": "id",
|
"fieldPath": "id",
|
||||||
|
@ -2732,27 +2732,9 @@
|
||||||
"notNull": true
|
"notNull": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldPath": "d1",
|
"fieldPath": "values",
|
||||||
"columnName": "d1",
|
"columnName": "values",
|
||||||
"affinity": "REAL",
|
"affinity": "TEXT",
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldPath": "d2",
|
|
||||||
"columnName": "d2",
|
|
||||||
"affinity": "REAL",
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldPath": "i1",
|
|
||||||
"columnName": "i1",
|
|
||||||
"affinity": "INTEGER",
|
|
||||||
"notNull": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldPath": "i2",
|
|
||||||
"columnName": "i2",
|
|
||||||
"affinity": "INTEGER",
|
|
||||||
"notNull": true
|
"notNull": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -2769,7 +2751,7 @@
|
||||||
"views": [],
|
"views": [],
|
||||||
"setupQueries": [
|
"setupQueries": [
|
||||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e8b8785efbd1699431eef90a5b441ed3')"
|
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c6cb19c6cfa6d0fb738b3f58818172ff')"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -113,6 +113,8 @@ data class UserEntry(
|
||||||
@SerializedName("SMS_SMS") SMS_SMS (ColorGroup.Aaps),
|
@SerializedName("SMS_SMS") SMS_SMS (ColorGroup.Aaps),
|
||||||
@SerializedName("SMS_TT") SMS_TT (ColorGroup.TT),
|
@SerializedName("SMS_TT") SMS_TT (ColorGroup.TT),
|
||||||
@SerializedName("TT_DELETED_FROM_NS") TT_DELETED_FROM_NS (ColorGroup.TT),
|
@SerializedName("TT_DELETED_FROM_NS") TT_DELETED_FROM_NS (ColorGroup.TT),
|
||||||
|
@SerializedName("CAREPORTAL_DELETED_FROM_NS") CAREPORTAL_DELETED_FROM_NS (ColorGroup.Careportal),
|
||||||
|
@SerializedName("CAREPORTAL_FROM_NS") CAREPORTAL_FROM_NS (ColorGroup.Careportal),
|
||||||
@SerializedName("TT_FROM_NS") TT_FROM_NS (ColorGroup.TT),
|
@SerializedName("TT_FROM_NS") TT_FROM_NS (ColorGroup.TT),
|
||||||
@SerializedName("TT_CANCELED_FROM_NS") TT_CANCELED_FROM_NS (ColorGroup.TT),
|
@SerializedName("TT_CANCELED_FROM_NS") TT_CANCELED_FROM_NS (ColorGroup.TT),
|
||||||
@SerializedName("EXPORT_CSV") EXPORT_CSV (ColorGroup.Aaps),
|
@SerializedName("EXPORT_CSV") EXPORT_CSV (ColorGroup.Aaps),
|
||||||
|
|
Loading…
Reference in a new issue