Skip to content

feat: implement specific sankalp selection for jap logging #1

Description

@nitishchaubeyy

📝 Problem Statement

Currently, when a user logs a Jap entry, the count is globally synchronized across all active sankalps. This leads to inaccurate data tracking as a user might be performing different Japs for different spiritual goals (e.g., Mahamantra vs. Om Namah Shivay).

🚀 Proposed Solution

We need to decouple the global logging and link each jap_log to a specific sankalp_id.

Key Changes:

  • Database: Add a sankalp_id foreign key column to the jap_logs table.
  • Frontend: Update the Dashboard logging UI to include a "Sankalp Selector" dropdown.
  • Logic: Modify the insertion logic to ensure the current_count is only updated for the selected sankalp_id.

🛠 Technical Details

  • Table: jap_logs
  • New Column: sankalp_id (UUID, references sankalps.id)
  • Default Behavior: Pre-select the is_primary sankalp in the dropdown for a seamless UX.

✅ Acceptance Criteria

  • User can select a specific sankalp from a dropdown before adding Japs.
  • Adding a Jap only increments the counter for the selected sankalp.
  • The dashboard reflects the correct progress for each individual sankalp.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions