generated from GSM-MSG/MSG-Repository-Generator
-
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.
✨ :: [#220] MyPageFeature / MyPageMilitary
- Loading branch information
Showing
5 changed files
with
57 additions
and
8 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
21 changes: 21 additions & 0 deletions
21
Projects/Feature/MyPageFeature/Sources/Intent/MyPageMilitaryIntent.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,21 @@ | ||
import StudentDomainInterface | ||
|
||
protocol MyPageMilitaryIntentProtocol { | ||
func militarySheetIsRequired() | ||
func militarySheetDismissed() | ||
func militaryServiceTypeDidSelected(type: MilitaryServiceType) | ||
} | ||
|
||
extension MyPageIntent: MyPageMilitaryIntentProtocol { | ||
func militarySheetIsRequired() { | ||
model?.updateIsPresentedMilitarySheet(isPresented: true) | ||
} | ||
|
||
func militarySheetDismissed() { | ||
model?.updateIsPresentedMilitarySheet(isPresented: false) | ||
} | ||
|
||
func militaryServiceTypeDidSelected(type: MilitaryServiceType) { | ||
model?.updateMilitaryServiceType(type: type) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Projects/Feature/MyPageFeature/Sources/Model/MyPageMilitaryModel.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,21 @@ | ||
import StudentDomainInterface | ||
|
||
protocol MyPageMilitaryStateProtocol { | ||
var selectedMilitaryServiceType: MilitaryServiceType { get } | ||
var isPresentedMilitarySheet: Bool { get } | ||
} | ||
|
||
protocol MyPageMilitaryActionProtocol: AnyObject { | ||
func updateIsPresentedMilitarySheet(isPresented: Bool) | ||
func updateMilitaryServiceType(type: MilitaryServiceType) | ||
} | ||
|
||
extension MyPageModel: MyPageMilitaryActionProtocol { | ||
func updateIsPresentedMilitarySheet(isPresented: Bool) { | ||
self.isPresentedMilitarySheet = isPresented | ||
} | ||
|
||
func updateMilitaryServiceType(type: MilitaryServiceType) { | ||
self.selectedMilitaryServiceType = type | ||
} | ||
} |
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
6 changes: 4 additions & 2 deletions
6
Projects/Feature/MyPageFeature/Sources/Model/MyPageModelProtocol.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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
protocol MyPageStateProtocol: | ||
MyPageProfileStateProtocol, | ||
MyPageSchoolLifeStateProtocol, | ||
MyPageWorkInfoStateProtocol {} | ||
MyPageWorkInfoStateProtocol, | ||
MyPageMilitaryStateProtocol {} | ||
|
||
protocol MyPageActionProtocol: | ||
AnyObject, | ||
MyPageProfileActionProtocol, | ||
MyPageSchoolLifeActionProtocol, | ||
MyPageWorkInfoActionProtocol {} | ||
MyPageWorkInfoActionProtocol, | ||
MyPageMilitaryActionProtocol {} |