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

Frankworkspace #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
79 changes: 70 additions & 9 deletions Mckesson+/Views/Summary.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,76 @@
//
// Summary.swift
// Mckesson+
//
// Created by Frank Gao on 9/24/22.
//
// app

import SwiftUI


struct Patient: Identifiable, Hashable {
var id = UUID()
let name: String
}

struct Summary: View {
var body: some View {
ZStack{
Image(systemName: "summary.fill")
let PatientsMonday: [Patient] =
[
.init(name: "John Smith, 10:00am - 10:30am"),
.init(name: "Jamie Johnson, 2:00pm - 2:30pm"),
]

let PatientsTuesday: [Patient] =
[
.init(name: "Telly Miller, 11:00am - 11:30am"),
.init(name: "Jamie Thompson, 3:00pm - 3:30pm"),
]

let PatientsWednesday: [Patient] =
[
.init(name: "Luke Jones, 10:30am - 11:0am"),
.init(name: "Jamie Davis, 2:00pm - 2:40pm"),
]

let PatientsThursday: [Patient] =
[
.init(name: "John Wilson, 10:00am - 10:30am"),
.init(name: "Walker Clark, 2:00pm - 3:30pm"),
]

let PatientsFriday: [Patient] =
[
.init(name: "John Lewis, 10:00am - 10:30am"),
.init(name: "Nelson Robinson, 2:00pm - 2:15pm"),
]

var body: some View{
NavigationStack{
List(PatientsMonday){ patient in
Section("Monday"){
ForEach(PatientsMonday) { patient in NavigationLink(patient.name,
value: patient)
}
}
Section("Tuesday"){
ForEach(PatientsTuesday) { patient in NavigationLink(patient.name,
value: patient)
}
}
Section("Wednesday"){
ForEach(PatientsWednesday) { patient in NavigationLink(patient.name,
value: patient)
}
}
Section("Thursday"){
ForEach(PatientsThursday) { patient in NavigationLink(patient.name,
value: patient)
}
}
Section("Friday"){
ForEach(PatientsFriday) { patient in NavigationLink(patient.name,
value: patient)
}
}
}
.navigationDestination(for: Patient.self){
patient in Text(patient.name)
}
}
}
}
Expand All @@ -20,3 +80,4 @@ struct Summary_Previews: PreviewProvider {
Summary()
}
}

20 changes: 20 additions & 0 deletions Mckesson+/Views/Task.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Task.swift
// Mckesson+
//
// Created by Frank Gao on 9/25/22.
//

import SwiftUI

struct Task: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}

struct Task_Previews: PreviewProvider {
static var previews: some View {
Task()
}
}
20 changes: 20 additions & 0 deletions Mckesson+/Views/TaskViewModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// TaskViewModel.swift
// Mckesson+
//
// Created by Frank Gao on 9/25/22.
//

import SwiftUI

struct TaskViewModel: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}

struct TaskViewModel_Previews: PreviewProvider {
static var previews: some View {
TaskViewModel()
}
}