-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dynamic dashboard, session manager class
- Loading branch information
Showing
13 changed files
with
551 additions
and
344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// SessionManager.swift | ||
// Asthmaguard | ||
// | ||
// Created by Sadeel Muwahed on 27/05/2024. | ||
// | ||
|
||
class SessionManager { | ||
static let shared = SessionManager() | ||
|
||
private var currentToken: Int? | ||
|
||
private init() { } | ||
|
||
func login(token: Int) { | ||
self.currentToken = token | ||
} | ||
|
||
func logout() { | ||
self.currentToken = nil | ||
} | ||
|
||
func getCurrentToken() -> Int? { | ||
return self.currentToken | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// AsthmaThreatModel.swift | ||
// Asthmaguard | ||
// | ||
// Created by Sadeel Muwahed on 27/05/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
struct AsthmaThreat: Identifiable { | ||
let id = UUID() | ||
let title: String | ||
let risks: Double | ||
} |
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,14 @@ | ||
// | ||
// AsthmaTrigger.swift | ||
// Asthmaguard | ||
// | ||
// Created by Sadeel Muwahed on 26/05/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
struct AsthmaTrigger { | ||
let triggerID: Int | ||
let patientID: Int | ||
let grade: Int | ||
} |
Oops, something went wrong.