-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LOOP-1484: Correction ranges in therapy acceptance flow (#12)
- Loading branch information
Showing
12 changed files
with
148 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
TidepoolServiceKitUI/Assets.xcassets/blue gray.colorset/Contents.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
TidepoolServiceKitUI/Views/CorrectionRangeReviewView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// CorrectionRangeReviewView.swift | ||
// TidepoolServiceKitUI | ||
// | ||
// Created by Anna Quinlan on 6/29/20. | ||
// Copyright © 2020 LoopKit Authors. All rights reserved. | ||
// | ||
import SwiftUI | ||
import LoopKitUI | ||
import LoopKit | ||
import HealthKit | ||
import TidepoolServiceKit | ||
|
||
|
||
struct CorrectionRangeReviewView: View { | ||
@ObservedObject var viewModel: PrescriptionReviewViewModel | ||
let prescription: MockPrescription | ||
|
||
init( | ||
model: PrescriptionReviewViewModel, | ||
prescription: MockPrescription | ||
) { | ||
self.viewModel = model | ||
self.prescription = prescription | ||
} | ||
|
||
var body: some View { | ||
CorrectionRangeScheduleEditor( | ||
schedule: prescription.glucoseTargetRangeSchedule, | ||
unit: prescription.bloodGlucoseUnit.hkUnit, | ||
minValue: prescription.suspendThreshold.quantity, | ||
onSave: { newSchedule in | ||
self.viewModel.saveCorrectionRange(range: newSchedule) | ||
self.viewModel.didFinishStep() | ||
}, | ||
mode: .flow | ||
) | ||
} | ||
} |
Oops, something went wrong.