Ivan Valkou 5 år sedan
förälder
incheckning
f8721a04c9

+ 1 - 1
FreeAPS/Sources/APS/Storage/CarbsStorage.swift

@@ -65,7 +65,7 @@ final class BaseCarbsStorage: CarbsStorage, Injectable {
                 rate: nil,
                 eventType: .nsCarbCorrection,
                 createdAt: $0.createdAt,
-                entededBy: CarbsEntry.manual,
+                enteredBy: CarbsEntry.manual,
                 bolus: nil,
                 insulin: nil,
                 notes: nil,

+ 3 - 3
FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift

@@ -191,7 +191,7 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
                     rate: event.rate,
                     eventType: .nsTempBasal,
                     createdAt: event.timestamp,
-                    entededBy: NigtscoutTreatment.local,
+                    enteredBy: NigtscoutTreatment.local,
                     bolus: nil,
                     insulin: nil,
                     notes: nil,
@@ -221,7 +221,7 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
                     rate: nil,
                     eventType: .bolus,
                     createdAt: event.timestamp,
-                    entededBy: NigtscoutTreatment.local,
+                    enteredBy: NigtscoutTreatment.local,
                     bolus: event,
                     insulin: event.amount,
                     notes: nil,
@@ -238,7 +238,7 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
                     rate: nil,
                     eventType: .nsCarbCorrection,
                     createdAt: event.timestamp,
-                    entededBy: NigtscoutTreatment.local,
+                    enteredBy: NigtscoutTreatment.local,
                     bolus: nil,
                     insulin: nil,
                     notes: nil,

+ 1 - 1
FreeAPS/Sources/APS/Storage/TempTargetsStorage.swift

@@ -85,7 +85,7 @@ final class BaseTempTargetsStorage: TempTargetsStorage, Injectable {
                 rate: nil,
                 eventType: .nsTempTarget,
                 createdAt: $0.createdAt,
-                entededBy: TempTarget.manual,
+                enteredBy: TempTarget.manual,
                 bolus: nil,
                 insulin: nil,
                 notes: nil,

+ 2 - 2
FreeAPS/Sources/Models/NightscoutTreatment.swift

@@ -8,7 +8,7 @@ struct NigtscoutTreatment: JSON, Hashable, Equatable {
     var rate: Decimal?
     var eventType: EventType
     var createdAt: Date?
-    var entededBy: String?
+    var enteredBy: String?
     var bolus: PumpHistoryEvent?
     var insulin: Decimal?
     var notes: String?
@@ -38,7 +38,7 @@ extension NigtscoutTreatment {
         case rate
         case eventType
         case createdAt = "created_at"
-        case entededBy
+        case enteredBy
         case bolus
         case insulin
         case notes

+ 8 - 8
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -86,21 +86,21 @@ extension Home {
                         .padding(.leading, 8)
                 }
 
-                if let tepmTarget = viewModel.tempTarget {
-                    Text(tepmTarget.name).font(.caption).foregroundColor(.secondary)
+                if let tempTarget = viewModel.tempTarget {
+                    Text(tempTarget.name).font(.caption).foregroundColor(.secondary)
                     if viewModel.units == .mmolL {
                         Text(
                             targetFormatter
-                                .string(from: tepmTarget.targetBottom.asMmolL as NSNumber)!
+                                .string(from: tempTarget.targetBottom.asMmolL as NSNumber)!
                         )
                         .font(.caption)
                         .foregroundColor(.secondary)
-                        if tepmTarget.targetBottom != tepmTarget.targetTop {
+                        if tempTarget.targetBottom != tempTarget.targetTop {
                             Text("-").font(.caption)
                                 .foregroundColor(.secondary)
                             Text(
                                 targetFormatter
-                                    .string(from: tepmTarget.targetTop.asMmolL as NSNumber)! + " \(viewModel.units.rawValue)"
+                                    .string(from: tempTarget.targetTop.asMmolL as NSNumber)! + " \(viewModel.units.rawValue)"
                             )
                             .font(.caption)
                             .foregroundColor(.secondary)
@@ -110,13 +110,13 @@ extension Home {
                         }
 
                     } else {
-                        Text(targetFormatter.string(from: tepmTarget.targetBottom as NSNumber)!)
+                        Text(targetFormatter.string(from: tempTarget.targetBottom as NSNumber)!)
                             .font(.caption)
                             .foregroundColor(.secondary)
-                        if tepmTarget.targetBottom != tepmTarget.targetTop {
+                        if tempTarget.targetBottom != tempTarget.targetTop {
                             Text("-").font(.caption)
                                 .foregroundColor(.secondary)
-                            Text(targetFormatter.string(from: tepmTarget.targetTop as NSNumber)! + " \(viewModel.units.rawValue)")
+                            Text(targetFormatter.string(from: tempTarget.targetTop as NSNumber)! + " \(viewModel.units.rawValue)")
                                 .font(.caption)
                                 .foregroundColor(.secondary)
                         } else {