feat: full Pulse Mobile implementation - all modules
- Phase 0: project.yml fixes (CODE_SIGN_ENTITLEMENTS confirmed) - Phase 1: Enhanced models (HabitModels, TaskModels, FinanceModels, SavingsModels, UserModels) - Phase 1: Enhanced APIService with all endpoints (habits/log/stats, tasks/uncomplete, finance/analytics, savings/*) - Phase 2: DashboardView rewrite - day progress bar, 4 stat cards, habit/task lists with Undo (3 sec) - Phase 3: TrackerView - HabitListView (streak badge, swipe delete, archive), TaskListView (priority, overdue), StatisticsView (heatmap 84 days, line chart, bar chart via Swift Charts) - Phase 4: FinanceView rewrite - month picker, summary card, top expenses progress bars, pie chart, line chart, transactions by day, analytics tab with bar chart + month comparison - Phase 5: SavingsView rewrite - overview with overdue block, categories tab with type icons, operations tab with category filter + add sheet - Phase 6: SettingsView - dark/light theme, profile edit, telegram chat id, notifications toggle + time, timezone picker, logout - Added: AddHabitView with weekly day selector + interval days - Added: AddTaskView with icon/color/due date picker - Haptic feedback on all toggle actions
This commit is contained in:
41
PulseHealth/Models/UserModels.swift
Normal file
41
PulseHealth/Models/UserModels.swift
Normal file
@@ -0,0 +1,41 @@
|
||||
import Foundation
|
||||
|
||||
// MARK: - UserProfile
|
||||
|
||||
struct UserProfile: Codable {
|
||||
var telegramChatId: String?
|
||||
var morningNotification: Bool?
|
||||
var eveningNotification: Bool?
|
||||
var morningTime: String?
|
||||
var eveningTime: String?
|
||||
var timezone: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case telegramChatId = "telegram_chat_id"
|
||||
case morningNotification = "morning_notification"
|
||||
case eveningNotification = "evening_notification"
|
||||
case morningTime = "morning_time"
|
||||
case eveningTime = "evening_time"
|
||||
case timezone
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UpdateProfileRequest
|
||||
|
||||
struct UpdateProfileRequest: Codable {
|
||||
var telegramChatId: String?
|
||||
var morningNotification: Bool?
|
||||
var eveningNotification: Bool?
|
||||
var morningTime: String?
|
||||
var eveningTime: String?
|
||||
var timezone: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case telegramChatId = "telegram_chat_id"
|
||||
case morningNotification = "morning_notification"
|
||||
case eveningNotification = "evening_notification"
|
||||
case morningTime = "morning_time"
|
||||
case eveningTime = "evening_time"
|
||||
case timezone
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user