feat: implement routines feature for child and parent modes
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m23s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m23s
- Added backend models for routines, routine items, and schedules. - Created API endpoints for managing routines and their items. - Implemented frontend components for routine creation, detail view, and assignment. - Integrated routines into child view with a scrolling list and approval workflow. - Added push notifications for routine confirmations and pending approvals. - Refactored existing components to accommodate new routines functionality. - Updated tests to cover new routines feature and ensure proper functionality.
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
subscribeToPushWithResult,
|
||||
unsubscribeFromPush,
|
||||
isPushOptedOut,
|
||||
ensurePushSubscriptionSynced,
|
||||
} from '@/services/pushSubscription'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -66,6 +67,16 @@ async function fetchUserProfile() {
|
||||
if (userImageId.value) {
|
||||
await loadAvatarImages(userImageId.value)
|
||||
}
|
||||
|
||||
// Silent startup self-heal: if user has push enabled, ensure browser + backend
|
||||
// subscription state are synchronized (no permission prompt).
|
||||
if (
|
||||
isParentAuthenticated.value &&
|
||||
data.push_notifications_enabled !== false &&
|
||||
!isPushOptedOut()
|
||||
) {
|
||||
void ensurePushSubscriptionSynced()
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error fetching user profile:', e)
|
||||
profileLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user