Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Bios #55

Merged
merged 46 commits into from
Apr 26, 2024
Merged
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
87a18da
Add state for age group
MatthewTurk247 Mar 27, 2024
8e5a49b
Delete PAWS/Account/AccountAgeGroup.swift
MatthewTurk247 Mar 27, 2024
6131125
Update Contacts.swift
MatthewTurk247 Mar 28, 2024
b8fbb5d
Basic way to get `users` collection
MatthewTurk247 Mar 28, 2024
ad3fcda
Merge branch 'main' of https://github.com/StanfordBDHG/PediatricApple…
MatthewTurk247 Apr 9, 2024
5970349
Merge branch 'contacts' of https://github.com/StanfordBDHG/PediatricA…
MatthewTurk247 Apr 9, 2024
70f0d19
Init attempt at enrollment group
MatthewTurk247 Apr 10, 2024
825b8a8
Rename to `EnrollmentGroup`
MatthewTurk247 Apr 10, 2024
b3f7fcc
Remove leftover lines
MatthewTurk247 Apr 10, 2024
ca28a30
Adjust spacing
MatthewTurk247 Apr 10, 2024
79449b2
Remove leftover comments
MatthewTurk247 Apr 10, 2024
2fb7c40
Rename for clarity
MatthewTurk247 Apr 10, 2024
cf765bc
Remove extraneous line
MatthewTurk247 Apr 10, 2024
5605433
Update PAWS/Study Information/EnrollmentGroup.swift
MatthewTurk247 Apr 10, 2024
e21f490
Successfully added snapshot listener
MatthewTurk247 Apr 10, 2024
f8847f5
Minor refactoring
MatthewTurk247 Apr 10, 2024
911335a
Still doesn't update right away
MatthewTurk247 Apr 11, 2024
07cfce8
Update PAWS/Study Information/EnrollmentGroup.swift
MatthewTurk247 Apr 11, 2024
cd2a44d
Update PAWS/Study Information/EnrollmentGroup.swift
MatthewTurk247 Apr 11, 2024
d5b2e0b
Age group UI still gets stuck
MatthewTurk247 Apr 12, 2024
7c5845c
Almost ready for edits
MatthewTurk247 Apr 12, 2024
1d604c9
Minor refactoring
MatthewTurk247 Apr 12, 2024
55840f1
Refactor tests
MatthewTurk247 Apr 12, 2024
9e2ef04
Rerun tests
MatthewTurk247 Apr 12, 2024
bbb773a
Update Node modules
MatthewTurk247 Apr 15, 2024
cb7b34c
Cancel previous listener
MatthewTurk247 Apr 15, 2024
c4a1204
Return statement
MatthewTurk247 Apr 15, 2024
32aacbc
Return statement
MatthewTurk247 Apr 15, 2024
3ea11de
Use `return await`
MatthewTurk247 Apr 15, 2024
869391f
Rerun tests
MatthewTurk247 Apr 16, 2024
4553a38
Additional configuration
MatthewTurk247 Apr 16, 2024
80867aa
More log statements
MatthewTurk247 Apr 16, 2024
f7aaad6
Update `firebase-functions`
MatthewTurk247 Apr 16, 2024
a3384b8
Static constants for `Contact`
MatthewTurk247 Apr 17, 2024
800533d
To match function signature
MatthewTurk247 Apr 17, 2024
acb29b1
To match function signature
MatthewTurk247 Apr 17, 2024
6c0c23b
Use Firebase Token
PSchmiedmayer Apr 17, 2024
2bd0ee3
Test Token ...
PSchmiedmayer Apr 17, 2024
6f73f7b
Update Build
PSchmiedmayer Apr 17, 2024
9e6076c
Update Contact+PersonNameComponents.swift
PSchmiedmayer Apr 17, 2024
7f0cfd3
Update Contacts.swift
PSchmiedmayer Apr 17, 2024
c163423
Use v2
PSchmiedmayer Apr 17, 2024
3ca549d
Update PAWS/Study Information/EnrollmentGroup.swift
MatthewTurk247 Apr 17, 2024
1569d79
Update PAWS/Study Information/EnrollmentGroup.swift
MatthewTurk247 Apr 17, 2024
386f119
Remove leftover log statements
MatthewTurk247 Apr 17, 2024
d34951a
Adjust log statements
MatthewTurk247 Apr 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion PAWS/Contacts/Contacts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
// SPDX-License-Identifier: MIT
//

import FirebaseStorage
import Foundation
import SpeziAccount
import SpeziContact
import SwiftUI


/// Displays the contacts for the PAWS.
struct Contacts: View {
@Environment(Account.self) var account

let contacts = [
Contact(
name: PersonNameComponents(
Expand Down Expand Up @@ -79,7 +83,7 @@
]

@Binding var presentingAccount: Bool

@State private var ageGroupIsAdult = false

var body: some View {
NavigationStack {
Expand All @@ -102,6 +106,14 @@
}
}
}
.task {
guard let accountId = account.details?.accountId else {
return
}
let userBucketReference = Storage.storage().reference().child("users/\(accountId)")
let result = userBucketReference.value(forKey: "ageGroupIsAdult") as? Bool
ageGroupIsAdult = result ?? false
}

Check warning on line 116 in PAWS/Contacts/Contacts.swift

View check run for this annotation

Codecov / codecov/patch

PAWS/Contacts/Contacts.swift#L109-L116

Added lines #L109 - L116 were not covered by tests
}


Expand Down
Loading