Service Layer low complexity mobile
1
Dependencies
3
Dependents
3
Entities
0
Integrations

Description

Service responsible for computing and injecting intelligent default values into the activity form to minimize cognitive load for peer mentors. Provides today's date, a configurable default duration (30 minutes), and the most recently used contact fetched from local cache. Default duration is configurable per organization via the organization labels/settings system, allowing each organization to override the baseline.

Feature: Simple Activity Logging with Default Values

default-values-provider

Responsibilities

  • Resolve today's date as the default activity date
  • Retrieve configurable default duration from organization settings (default: 30 min)
  • Fetch the most recently used contact ID from local activity history cache
  • Expose a composed ActivityDefaults object for injection into form screens

Interfaces

getDefaults() Future<ActivityDefaults>
getDefaultDate() DateTime
getDefaultDuration() int
getLastUsedContact() Future<Contact?>
clearCache() Future<void>
updateLastUsedContact(String contactId) Future<void>

Relationships

Dependencies (1)

Components this component depends on

Dependents (3)

Components that depend on this component

Related Data Entities (3)

Data entities managed by this component