1.2.1: surface "Copy previous week" on the empty-week banner
The exact-copy-from-previous-week action already existed but was buried in the magic-wand long-press context menu. Expose it as a visible secondary button on the auto-assign banner (shown only when the previous week actually has a menu), so users landing on a fresh week can one-tap copy last week's plan and then tweak it. Confirms before overwriting a week that already has dishes. - Extract requestCopyPreviousWeek() shared by the menu and the banner. - Add week_copied_previous analytics (copied_slots + source: empty_banner|menu). - Reuses the existing localized home_copy_previous_week string (all 6 languages). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
This commit is contained in:
@@ -21,6 +21,7 @@ enum AnalyticsEvent {
|
||||
|
||||
// Planner
|
||||
static let autoAssignUsed = "auto_assign_used"
|
||||
static let weekCopiedPrevious = "week_copied_previous"
|
||||
|
||||
// Onboarding
|
||||
static let onboardingStepViewed = "onboarding_step_viewed"
|
||||
@@ -112,6 +113,13 @@ enum AnalyticsService {
|
||||
])
|
||||
}
|
||||
|
||||
static func logWeekCopiedPrevious(copiedSlots: Int, source: String) {
|
||||
logEvent(AnalyticsEvent.weekCopiedPrevious, parameters: [
|
||||
"copied_slots": copiedSlots,
|
||||
"source": source
|
||||
])
|
||||
}
|
||||
|
||||
static func logICloudSyncToggled(enabled: Bool) {
|
||||
logEvent(AnalyticsEvent.iCloudSyncToggled, parameters: ["enabled": enabled])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user