WIP - a lot of uncommitted work

This commit is contained in:
Trey t
2022-01-15 12:03:31 -06:00
parent 80690e4a8c
commit 64dd1855ac
31 changed files with 1024 additions and 154 deletions

View File

@@ -23,13 +23,15 @@ struct AddMoodHeaderView: View {
.foregroundColor(Color(UIColor.label))
.padding()
HStack{
ForEach(Mood.allValues) { mood in
ForEach(Mood.allValues.reversed()) { mood in
VStack {
Button(action: {
addItem(withMoodValue: mood.rawValue)
}, label: {
mood.icon
.font(.system(size: 50))
.resizable()
.frame(width: 50, height: 50, alignment: .center)
.foregroundColor(mood.color)
})
//Text(mood.strValue)
@@ -50,7 +52,7 @@ struct AddMoodHeaderView: View {
let newItem = MoodEntry(context: viewContext)
newItem.timestamp = Date()
newItem.moodValue = Int16(moodValue)
newItem.date = Date()
newItem.forDate = Date()
do {
try viewContext.save()