feat: add prayer frequency tracking with 1-7 slider and frequency compliance calculation
This commit is contained in:
1 parent
4225ef017c
commit
8105d39554
7 files changed
+88
-8
No files matched your search
@@ -14,6 +14,8 @@ interface DailyEntryProps {
|
||||
onAnsweredChange?: (answered: boolean) => void;
|
||||
answerDetails?: string;
|
||||
onAnswerDetailsChange?: (details: string) => void;
|
||||
prayFrequency?: number;
|
||||
onPrayFrequencyChange?: (frequency: number) => void;
|
||||
onSubmit: (e: React.FormEvent) => void;
|
||||
loading?: boolean;
|
||||
isEditing?: boolean;
|
||||
@@ -30,6 +32,8 @@ export default function DailyEntry({
|
||||
onAnsweredChange,
|
||||
answerDetails = '',
|
||||
onAnswerDetailsChange,
|
||||
prayFrequency = 1,
|
||||
onPrayFrequencyChange,
|
||||
onSubmit,
|
||||
loading = false,
|
||||
isEditing = false,
|
||||
@@ -116,6 +120,28 @@ export default function DailyEntry({
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{/* Prayer Frequency Slider */}
|
||||
<div className="bg-slate-800/40 backdrop-blur-xl rounded-xl p-4 border border-slate-700/50">
|
||||
<div className="mb-3">
|
||||
<label className="block text-sm font-semibold text-slate-300 mb-2">📅 Pray For (times per week)</label>
|
||||
<div className="flex items-center justify-between">
|
||||
<input
|
||||
type="range"
|
||||
min="1"
|
||||
max="7"
|
||||
value={prayFrequency}
|
||||
onChange={(e) => onPrayFrequencyChange?.(parseInt(e.target.value))}
|
||||
className="flex-1 h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-blue-500"
|
||||
/>
|
||||
<span className="ml-4 text-lg font-bold text-blue-400 min-w-[50px]">{prayFrequency}x</span>
|
||||
</div>
|
||||
<div className="flex justify-between text-xs text-slate-500 mt-2">
|
||||
<span>1× week</span>
|
||||
<span>Daily</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Answer Details */}
|
||||
{answered && (
|
||||
<div className="bg-green-900/20 backdrop-blur-xl rounded-xl p-4 border border-green-500/30 animate-in fade-in-50 duration-300">
|
||||
|
||||
Reference in new issue
Block a user