-
Notifications
You must be signed in to change notification settings - Fork 4
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 #505 from DeveloperAcademy-POSTECH/feat/501-Announ…
…cmentUpdate UpdateInfoView 및 설문 기능 제작
- Loading branch information
Showing
21 changed files
with
480 additions
and
93 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
HappyAnding/HappyAnding/Assets.xcassets/HeaderImage.imageset/Contents.json
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 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "HeaderImage.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+15.3 KB
HappyAnding/HappyAnding/Assets.xcassets/HeaderImage.imageset/HeaderImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
HappyAnding/HappyAnding/Assets.xcassets/easierExternalURL.imageset/Contents.json
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 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "easierExternalURL.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+117 KB
...ng/HappyAnding/Assets.xcassets/easierExternalURL.imageset/easierExternalURL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
HappyAnding/HappyAnding/Assets.xcassets/easierShortcutWrite.imageset/Contents.json
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 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "easierShortcutWrite.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+106 KB
...appyAnding/Assets.xcassets/easierShortcutWrite.imageset/easierShortcutWrite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
// | ||
// SuggestionForm.swift | ||
// HappyAnding | ||
// | ||
// Created by HanGyeongjun on 10/29/23. | ||
// | ||
|
||
import Foundation | ||
|
||
struct SuggestionForm: Identifiable, Codable, Hashable { | ||
|
||
var id = UUID().uuidString | ||
var userInfo: String | ||
var dateTime = Date().getDate() | ||
var formContent: String | ||
|
||
var dictionary: [String: Any] { | ||
let data = (try? JSONEncoder().encode(self)) ?? Data() | ||
return (try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: Any]) ?? [:] | ||
} | ||
|
||
init(userInfo: String, formContent: String) { | ||
self.id = UUID().uuidString | ||
self.userInfo = userInfo | ||
self.dateTime = Date().getDate() | ||
self.formContent = formContent | ||
} | ||
|
||
init() { | ||
self.id = UUID().uuidString | ||
self.userInfo = "" | ||
self.dateTime = Date().getDate() | ||
self.formContent = "" | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
HappyAnding/HappyAnding/ViewModel/SuggestionFormViewModel.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,22 @@ | ||
// | ||
// SuggestionFormViewModel.swift | ||
// HappyAnding | ||
// | ||
// Created by HanGyeongjun on 10/29/23. | ||
// | ||
|
||
import Foundation | ||
|
||
final class SuggestionFormViewModel: ObservableObject { | ||
|
||
private let shortcutsZipViewModel = ShortcutsZipViewModel.share | ||
|
||
@Published var suggstionForm = SuggestionForm() | ||
|
||
// 유저 설문을 Firebase에 업로드하는 함수 | ||
func uploadUserForm(formContent: String) { | ||
suggstionForm.userInfo = shortcutsZipViewModel.userInfo?.nickname ?? "nil" | ||
suggstionForm.formContent = formContent | ||
shortcutsZipViewModel.setData(model: suggstionForm) | ||
} | ||
} |
Oops, something went wrong.