diff --git a/ThrowAway/ThrowAway/Product+CoreDataProperties.swift b/ThrowAway/ThrowAway/Product+CoreDataProperties.swift index 68fa23a..7c933ec 100644 --- a/ThrowAway/ThrowAway/Product+CoreDataProperties.swift +++ b/ThrowAway/ThrowAway/Product+CoreDataProperties.swift @@ -14,12 +14,13 @@ extension Product { @nonobjc public class func fetchRequest() -> NSFetchRequest { return NSFetchRequest(entityName: "Product") } - + @NSManaged public var cleaningDay: Date? @NSManaged public var title: String? @NSManaged public var photo: Data? @NSManaged public var memo: String? @NSManaged public var isCleanedUp: Bool + @NSManaged public var cleanedUpDay: Date? } extension Product: Identifiable { diff --git a/ThrowAway/ThrowAway/SwiftUI/StaticsView/View/StatisticsView.swift b/ThrowAway/ThrowAway/SwiftUI/StaticsView/View/StatisticsView.swift index ed39244..03b0546 100644 --- a/ThrowAway/ThrowAway/SwiftUI/StaticsView/View/StatisticsView.swift +++ b/ThrowAway/ThrowAway/SwiftUI/StaticsView/View/StatisticsView.swift @@ -16,7 +16,6 @@ struct StatisticsView: View { @EnvironmentObject var dateHolder: DateHolder var body: some View { - VStack { VStack { DateScrollView() diff --git a/ThrowAway/ThrowAway/ThrowAway.xcdatamodeld/ThrowAway.xcdatamodel/contents b/ThrowAway/ThrowAway/ThrowAway.xcdatamodeld/ThrowAway.xcdatamodel/contents index 8539352..45969fc 100644 --- a/ThrowAway/ThrowAway/ThrowAway.xcdatamodeld/ThrowAway.xcdatamodel/contents +++ b/ThrowAway/ThrowAway/ThrowAway.xcdatamodeld/ThrowAway.xcdatamodel/contents @@ -1,6 +1,7 @@ + @@ -8,6 +9,6 @@ - + \ No newline at end of file diff --git a/ThrowAway/ThrowAway/View Controllers/ProductListViewController.swift b/ThrowAway/ThrowAway/View Controllers/ProductListViewController.swift index 8253fac..9a8cf9b 100644 --- a/ThrowAway/ThrowAway/View Controllers/ProductListViewController.swift +++ b/ThrowAway/ThrowAway/View Controllers/ProductListViewController.swift @@ -97,6 +97,7 @@ class ProductListViewController: UIViewController { } let updatedItem = productList[index] updatedItem.isCleanedUp = true + updatedItem.cleanedUpDay = Date() completion() do { try viewContext.save()