-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from Horizontal-org/develop
1.10.0
- Loading branch information
Showing
137 changed files
with
6,081 additions
and
2,044 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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ServerConnectionHeaderView.swift | ||
// Tella | ||
// | ||
// Created by gus valbuena on 5/29/24. | ||
// Copyright © 2024 HORIZONTAL. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct ServerConnectionHeaderView: View { | ||
var title: String | ||
var subtitle: String | ||
var body: some View { | ||
VStack(spacing: 8) { | ||
Image("gdrive.icon") | ||
.padding(.bottom, 16) | ||
Text(title) | ||
.font(.custom(Styles.Fonts.semiBoldFontName, size: 18)) | ||
.foregroundColor(.white) | ||
.multilineTextAlignment(.center) | ||
Text(subtitle) | ||
.font(.custom(Styles.Fonts.regularFontName, size: 14)) | ||
.foregroundColor(.white) | ||
.multilineTextAlignment(.center) | ||
}.padding(.horizontal, 20) | ||
} | ||
} | ||
|
||
#Preview { | ||
ServerConnectionHeaderView(title: "title", subtitle: "subtitle") | ||
} |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
import Foundation | ||
|
||
public enum Pages: Hashable { | ||
public enum Page: Hashable { | ||
|
||
case draft | ||
case outbox | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// | ||
// GDriveData.swift | ||
// Tella | ||
// | ||
// Created by gus valbuena on 6/28/24. | ||
// Copyright © 2024 HORIZONTAL. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension TellaData { | ||
func addGDriveReport(report : GDriveReport) -> Result<Int, Error> { | ||
let id = database.addGDriveReport(report: report) | ||
|
||
shouldReloadGDriveReports.send(true) | ||
|
||
return id | ||
} | ||
|
||
func getDraftGDriveReport() -> [GDriveReport] { | ||
return self.database.getDriveReports(reportStatus: [ReportStatus.draft]) | ||
} | ||
|
||
func getOutboxedGDriveReport() -> [GDriveReport] { | ||
return self.database.getDriveReports(reportStatus: [.finalized, | ||
.submissionError, | ||
.submissionPending, | ||
.submissionPaused, | ||
.submissionInProgress, | ||
.submissionAutoPaused, | ||
.submissionScheduled]) | ||
} | ||
|
||
func getSubmittedGDriveReport() -> [GDriveReport] { | ||
return self.database.getDriveReports(reportStatus: [ReportStatus.submitted]) | ||
} | ||
|
||
func getDriveReport(id: Int?) -> GDriveReport? { | ||
guard let id else { return nil } | ||
return self.database.getGDriveReport(id: id) | ||
} | ||
|
||
func updateDriveReport(report: GDriveReport) -> Result<Bool, Error> { | ||
shouldReloadGDriveReports.send(true) | ||
return self.database.updateDriveReport(report: report) | ||
} | ||
|
||
func deleteDriveReport(reportId: Int?) -> Result<Bool, Error> { | ||
shouldReloadGDriveReports.send(true) | ||
return self.database.deleteDriveReport(reportId: reportId) | ||
} | ||
|
||
@discardableResult | ||
func updateDriveReportStatus(reportId: Int, status: ReportStatus) -> Result<Bool, Error> { | ||
shouldReloadGDriveReports.send(true) | ||
|
||
return self.database.updateDriveReportStatus(idReport: reportId, status: status) | ||
} | ||
|
||
@discardableResult | ||
func updateDriveFolderId(reportId: Int, folderId: String) -> Result<Bool, Error> { | ||
shouldReloadGDriveReports.send(true) | ||
|
||
return self.database.updateDriveReportFolderId(idReport: reportId, folderId: folderId) | ||
} | ||
|
||
@discardableResult | ||
func updateDriveFiles(reportId: Int, files: [ReportFile]) -> Result<Bool, Error> { | ||
shouldReloadGDriveReports.send(true) | ||
|
||
return self.database.updateDriveReportFiles(files: files, reportId: reportId) | ||
} | ||
} |
Oops, something went wrong.