1.0.6: Priority dishes, day rules, auto-assign CTA, tap-to-replace, export incomplete weeks, Sunday notification

- Dish.isPriority: mark dishes as priority; auto-assign gives them 2.5x weight
- Tag.dayRestriction: restrict tags to weekdays or weekend only
- Auto-assign CTA banner shown when there are empty slots (was hidden in context menu)
- Tap on filled slot opens picker to replace dish directly (no need to remove first)
- Export callout visible as soon as ≥1 slot is filled (not only when week is complete)
- WeekPlanShareView shows localized "TBD" / "Eating out" for empty/eating-out slots
- Second Sunday 17:00 push notification to plan next week
- DishDrawer sorts: priority first, then by historical usage, then alphabetically
- Search in SlotDishPickerSheet already shipped in 1.0.5 (verified ✓)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
alexandrev-tibco
2026-04-30 00:00:53 +02:00
parent 92f97f855d
commit a4dfb38feb
22 changed files with 344 additions and 26 deletions
+4 -1
View File
@@ -8,19 +8,22 @@ final class Dish {
var descriptionText: String?
var tagIds: [UUID]
var createdAt: Date
var isPriority: Bool
init(
id: UUID = UUID(),
name: String,
descriptionText: String? = nil,
tagIds: [UUID] = [],
createdAt: Date = Date()
createdAt: Date = Date(),
isPriority: Bool = false
) {
self.id = id
self.name = name
self.descriptionText = descriptionText
self.tagIds = tagIds
self.createdAt = createdAt
self.isPriority = isPriority
}
}
+12
View File
@@ -11,6 +11,7 @@ final class Tag {
var noConsecutive: Bool
var noDuplicateInDay: Bool
var mealTypeRestriction: String? // "lunch", "dinner", nil
var dayRestriction: String? // nil = any day, "weekdays" = Mon-Fri, "weekend" = Sat-Sun
var isDefault: Bool
var sortOrder: Int
@@ -23,6 +24,7 @@ final class Tag {
noConsecutive: Bool = false,
noDuplicateInDay: Bool = false,
mealTypeRestriction: String? = nil,
dayRestriction: String? = nil,
isDefault: Bool = true,
sortOrder: Int = 0
) {
@@ -34,6 +36,7 @@ final class Tag {
self.noConsecutive = noConsecutive
self.noDuplicateInDay = noDuplicateInDay
self.mealTypeRestriction = mealTypeRestriction
self.dayRestriction = dayRestriction
self.isDefault = isDefault
self.sortOrder = sortOrder
}
@@ -76,6 +79,15 @@ final class Tag {
parts.append(restriction == "lunch" ? "lunch only" : "dinner only")
}
}
if let day = dayRestriction {
switch (day, resolvedLanguage) {
case ("weekdays", .spanish): parts.append("entre semana")
case ("weekdays", _): parts.append("weekdays")
case ("weekend", .spanish): parts.append("fin de semana")
case ("weekend", _): parts.append("weekend")
default: break
}
}
return parts.isEmpty ? (resolvedLanguage == .spanish ? "Sin límite" : "No limit") : parts.joined(separator: ", ")
}
}