-
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.
🔀️ Merge branch 'release/LekaApp/1.13.0'
- Loading branch information
Showing
394 changed files
with
3,954 additions
and
772 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
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
34 changes: 34 additions & 0 deletions
34
Modules/AccountKit/Sources/Extensions/Library+Codable.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,34 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import FirebaseFirestore | ||
import SwiftUI | ||
|
||
extension Library: Codable { | ||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.savedActivities = try container.decodeIfPresent([SavedActivity].self, forKey: .savedActivities) ?? [] | ||
self.savedCurriculums = try container.decodeIfPresent([SavedCurriculum].self, forKey: .savedCurriculums) ?? [] | ||
self.savedStories = try container.decodeIfPresent([SavedStory].self, forKey: .savedStories) ?? [] | ||
self.savedGamepads = try container.decodeIfPresent([SavedGamepad].self, forKey: .savedGamepads) ?? [] | ||
self.createdAt = try container.decodeIfPresent(Timestamp.self, forKey: .createdAt)?.dateValue() | ||
self.lastEditedAt = try container.decodeIfPresent(Timestamp.self, forKey: .lastEditedAt)?.dateValue() | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try container.encodeIfPresent(self.id, forKey: .id) | ||
try container.encode(self.rootOwnerUid, forKey: .rootOwnerUid) | ||
try container.encode(self.savedActivities, forKey: .savedActivities) | ||
try container.encode(self.savedCurriculums, forKey: .savedCurriculums) | ||
try container.encode(self.savedStories, forKey: .savedStories) | ||
try container.encode(self.savedGamepads, forKey: .savedGamepads) | ||
try container.encodeIfPresent(self.createdAt.map { Timestamp(date: $0) }, forKey: .createdAt) | ||
try container.encodeIfPresent(self.lastEditedAt.map { Timestamp(date: $0) }, forKey: .lastEditedAt) | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
Modules/AccountKit/Sources/Extensions/RootAccount+Codable.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,16 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import SwiftUI | ||
|
||
public extension RootAccount { | ||
init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.library = try container.decodeIfPresent(Library.self, forKey: .library) ?? Library() | ||
self.createdAt = try container.decodeIfPresent(Date.self, forKey: .createdAt) | ||
self.lastEditedAt = try container.decodeIfPresent(Date.self, forKey: .lastEditedAt) | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Modules/AccountKit/Sources/Extensions/SavedActivity+Codable.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,28 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import FirebaseFirestore | ||
import SwiftUI | ||
|
||
extension SavedActivity: Codable { | ||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.caregiverID = try container.decodeIfPresent(String.self, forKey: .caregiverID) ?? "" | ||
self.createdAt = try container.decodeIfPresent(Timestamp.self, forKey: .createdAt)?.dateValue() | ||
self.lastEditedAt = try container.decodeIfPresent(Timestamp.self, forKey: .lastEditedAt)?.dateValue() | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try container.encodeIfPresent(self.id, forKey: .id) | ||
try container.encode(self.rootOwnerUid, forKey: .rootOwnerUid) | ||
try container.encode(self.caregiverID, forKey: .caregiverID) | ||
try container.encodeIfPresent(self.createdAt.map { Timestamp(date: $0) }, forKey: .createdAt) | ||
try container.encodeIfPresent(self.lastEditedAt.map { Timestamp(date: $0) }, forKey: .lastEditedAt) | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Modules/AccountKit/Sources/Extensions/SavedCurriculum+Codable.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,28 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import FirebaseFirestore | ||
import SwiftUI | ||
|
||
extension SavedCurriculum: Codable { | ||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.caregiverID = try container.decodeIfPresent(String.self, forKey: .caregiverID) ?? "" | ||
self.createdAt = try container.decodeIfPresent(Timestamp.self, forKey: .createdAt)?.dateValue() | ||
self.lastEditedAt = try container.decodeIfPresent(Timestamp.self, forKey: .lastEditedAt)?.dateValue() | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try container.encodeIfPresent(self.id, forKey: .id) | ||
try container.encode(self.rootOwnerUid, forKey: .rootOwnerUid) | ||
try container.encode(self.caregiverID, forKey: .caregiverID) | ||
try container.encodeIfPresent(self.createdAt.map { Timestamp(date: $0) }, forKey: .createdAt) | ||
try container.encodeIfPresent(self.lastEditedAt.map { Timestamp(date: $0) }, forKey: .lastEditedAt) | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Modules/AccountKit/Sources/Extensions/SavedGamepad+Codable.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,28 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import FirebaseFirestore | ||
import SwiftUI | ||
|
||
extension SavedGamepad: Codable { | ||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.caregiverID = try container.decodeIfPresent(String.self, forKey: .caregiverID) ?? "" | ||
self.createdAt = try container.decodeIfPresent(Timestamp.self, forKey: .createdAt)?.dateValue() | ||
self.lastEditedAt = try container.decodeIfPresent(Timestamp.self, forKey: .lastEditedAt)?.dateValue() | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try container.encodeIfPresent(self.id, forKey: .id) | ||
try container.encode(self.rootOwnerUid, forKey: .rootOwnerUid) | ||
try container.encode(self.caregiverID, forKey: .caregiverID) | ||
try container.encodeIfPresent(self.createdAt.map { Timestamp(date: $0) }, forKey: .createdAt) | ||
try container.encodeIfPresent(self.lastEditedAt.map { Timestamp(date: $0) }, forKey: .lastEditedAt) | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Modules/AccountKit/Sources/Extensions/SavedStory+Codable.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,28 @@ | ||
// Leka - iOS Monorepo | ||
// Copyright APF France handicap | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import FirebaseFirestore | ||
import SwiftUI | ||
|
||
extension SavedStory: Codable { | ||
public init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.id = try container.decodeIfPresent(String.self, forKey: .id) | ||
self.rootOwnerUid = try container.decode(String.self, forKey: .rootOwnerUid) | ||
self.caregiverID = try container.decodeIfPresent(String.self, forKey: .caregiverID) ?? "" | ||
self.createdAt = try container.decodeIfPresent(Timestamp.self, forKey: .createdAt)?.dateValue() | ||
self.lastEditedAt = try container.decodeIfPresent(Timestamp.self, forKey: .lastEditedAt)?.dateValue() | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
|
||
try container.encodeIfPresent(self.id, forKey: .id) | ||
try container.encode(self.rootOwnerUid, forKey: .rootOwnerUid) | ||
try container.encode(self.caregiverID, forKey: .caregiverID) | ||
try container.encodeIfPresent(self.createdAt.map { Timestamp(date: $0) }, forKey: .createdAt) | ||
try container.encodeIfPresent(self.lastEditedAt.map { Timestamp(date: $0) }, forKey: .lastEditedAt) | ||
} | ||
} |
Oops, something went wrong.