@contractspec/example.learning-journey-ui-coaching 3.7.6 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/AGENTS.md +50 -25
- package/CHANGELOG.md +32 -0
- package/README.md +63 -20
- package/dist/CoachingMiniApp.js +178 -178
- package/dist/browser/CoachingMiniApp.js +178 -178
- package/dist/browser/components/EngagementMeter.js +2 -2
- package/dist/browser/components/TipCard.js +3 -3
- package/dist/browser/components/TipFeed.js +6 -6
- package/dist/browser/components/index.js +11 -11
- package/dist/browser/index.js +179 -178
- package/dist/browser/views/Overview.js +16 -16
- package/dist/browser/views/Progress.js +10 -10
- package/dist/browser/views/Steps.js +6 -6
- package/dist/browser/views/Timeline.js +9 -9
- package/dist/browser/views/index.js +174 -174
- package/dist/components/EngagementMeter.js +2 -2
- package/dist/components/TipCard.js +3 -3
- package/dist/components/TipFeed.js +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +11 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +179 -178
- package/dist/node/CoachingMiniApp.js +178 -178
- package/dist/node/components/EngagementMeter.js +2 -2
- package/dist/node/components/TipCard.js +3 -3
- package/dist/node/components/TipFeed.js +6 -6
- package/dist/node/components/index.js +11 -11
- package/dist/node/index.js +179 -178
- package/dist/node/views/Overview.js +16 -16
- package/dist/node/views/Progress.js +10 -10
- package/dist/node/views/Steps.js +6 -6
- package/dist/node/views/Timeline.js +9 -9
- package/dist/node/views/index.js +174 -174
- package/dist/views/Overview.js +16 -16
- package/dist/views/Progress.js +10 -10
- package/dist/views/Steps.js +6 -6
- package/dist/views/Timeline.js +9 -9
- package/dist/views/index.d.ts +1 -1
- package/dist/views/index.js +174 -174
- package/package.json +12 -12
- package/src/CoachingMiniApp.tsx +70 -70
- package/src/components/EngagementMeter.tsx +82 -82
- package/src/components/TipCard.tsx +81 -81
- package/src/components/TipFeed.tsx +80 -80
- package/src/components/index.ts +1 -1
- package/src/docs/learning-journey-ui-coaching.docblock.ts +10 -10
- package/src/example.ts +25 -25
- package/src/index.ts +4 -6
- package/src/learning-journey-ui-coaching.feature.ts +12 -12
- package/src/views/Overview.tsx +136 -136
- package/src/views/Progress.tsx +146 -146
- package/src/views/Steps.tsx +57 -57
- package/src/views/Timeline.tsx +101 -101
- package/src/views/index.ts +1 -1
- package/tsconfig.json +7 -8
- package/tsdown.config.js +7 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.learning-journey-ui-coaching",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.10",
|
|
4
4
|
"description": "Contextual coaching UI with tip cards and engagement tracking.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -120,27 +120,27 @@
|
|
|
120
120
|
"dev": "contractspec-bun-build dev",
|
|
121
121
|
"clean": "rimraf dist .turbo",
|
|
122
122
|
"lint": "bun lint:fix",
|
|
123
|
-
"lint:fix": "
|
|
124
|
-
"lint:check": "
|
|
123
|
+
"lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
|
|
124
|
+
"lint:check": "biome check .",
|
|
125
125
|
"test": "bun test --pass-with-no-tests",
|
|
126
126
|
"prebuild": "contractspec-bun-build prebuild",
|
|
127
127
|
"typecheck": "tsc --noEmit"
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@contractspec/lib.contracts-spec": "
|
|
131
|
-
"@contractspec/example.learning-journey-ui-shared": "3.7.
|
|
132
|
-
"@contractspec/example.learning-journey-ambient-coach": "3.7.
|
|
133
|
-
"@contractspec/example.learning-journey-crm-onboarding": "3.7.
|
|
134
|
-
"@contractspec/module.learning-journey": "3.7.
|
|
135
|
-
"@contractspec/lib.design-system": "3.
|
|
136
|
-
"@contractspec/lib.ui-kit-web": "3.
|
|
130
|
+
"@contractspec/lib.contracts-spec": "4.1.2",
|
|
131
|
+
"@contractspec/example.learning-journey-ui-shared": "3.7.10",
|
|
132
|
+
"@contractspec/example.learning-journey-ambient-coach": "3.7.10",
|
|
133
|
+
"@contractspec/example.learning-journey-crm-onboarding": "3.7.10",
|
|
134
|
+
"@contractspec/module.learning-journey": "3.7.10",
|
|
135
|
+
"@contractspec/lib.design-system": "3.8.3",
|
|
136
|
+
"@contractspec/lib.ui-kit-web": "3.9.2",
|
|
137
137
|
"react": "19.2.0"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@contractspec/tool.typescript": "3.7.
|
|
140
|
+
"@contractspec/tool.typescript": "3.7.8",
|
|
141
141
|
"@types/react": "^19.2.14",
|
|
142
142
|
"typescript": "^5.9.3",
|
|
143
|
-
"@contractspec/tool.bun": "3.7.
|
|
143
|
+
"@contractspec/tool.bun": "3.7.8"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|
|
146
146
|
"react": "^19.2.0"
|
package/src/CoachingMiniApp.tsx
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useState, useCallback } from 'react';
|
|
4
|
-
import { Card, CardContent } from '@contractspec/lib.ui-kit-web/ui/card';
|
|
5
3
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
type LearningMiniAppProps,
|
|
5
|
+
type LearningView,
|
|
6
|
+
useLearningProgress,
|
|
7
|
+
ViewTabs,
|
|
10
8
|
} from '@contractspec/example.learning-journey-ui-shared';
|
|
9
|
+
import { Card, CardContent } from '@contractspec/lib.ui-kit-web/ui/card';
|
|
10
|
+
import { useCallback, useState } from 'react';
|
|
11
11
|
import { Overview } from './views/Overview';
|
|
12
|
-
import { Steps } from './views/Steps';
|
|
13
12
|
import { Progress } from './views/Progress';
|
|
13
|
+
import { Steps } from './views/Steps';
|
|
14
14
|
import { Timeline } from './views/Timeline';
|
|
15
15
|
|
|
16
16
|
type CoachingMiniAppProps = Omit<LearningMiniAppProps, 'progress'> & {
|
|
17
|
-
|
|
17
|
+
progress?: LearningMiniAppProps['progress'];
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export function CoachingMiniApp({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
track,
|
|
22
|
+
progress: externalProgress,
|
|
23
|
+
onStepComplete: externalOnStepComplete,
|
|
24
|
+
onViewChange,
|
|
25
|
+
initialView = 'overview',
|
|
26
26
|
}: CoachingMiniAppProps) {
|
|
27
|
-
|
|
27
|
+
const [currentView, setCurrentView] = useState<LearningView>(initialView);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
// Use internal progress if not provided externally
|
|
30
|
+
const { progress: internalProgress, completeStep: internalCompleteStep } =
|
|
31
|
+
useLearningProgress(track);
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
const progress = externalProgress ?? internalProgress;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
const handleViewChange = useCallback(
|
|
36
|
+
(view: LearningView) => {
|
|
37
|
+
setCurrentView(view);
|
|
38
|
+
onViewChange?.(view);
|
|
39
|
+
},
|
|
40
|
+
[onViewChange]
|
|
41
|
+
);
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
const handleStepComplete = useCallback(
|
|
44
|
+
(stepId: string) => {
|
|
45
|
+
if (externalOnStepComplete) {
|
|
46
|
+
externalOnStepComplete(stepId);
|
|
47
|
+
} else {
|
|
48
|
+
internalCompleteStep(stepId);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
[externalOnStepComplete, internalCompleteStep]
|
|
52
|
+
);
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
const handleStartFromOverview = useCallback(() => {
|
|
55
|
+
setCurrentView('steps');
|
|
56
|
+
onViewChange?.('steps');
|
|
57
|
+
}, [onViewChange]);
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const renderView = () => {
|
|
60
|
+
const viewProps = {
|
|
61
|
+
track,
|
|
62
|
+
progress,
|
|
63
|
+
onStepComplete: handleStepComplete,
|
|
64
|
+
};
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
switch (currentView) {
|
|
67
|
+
case 'overview':
|
|
68
|
+
return <Overview {...viewProps} onStart={handleStartFromOverview} />;
|
|
69
|
+
case 'steps':
|
|
70
|
+
return <Steps {...viewProps} />;
|
|
71
|
+
case 'progress':
|
|
72
|
+
return <Progress {...viewProps} />;
|
|
73
|
+
case 'timeline':
|
|
74
|
+
return <Timeline {...viewProps} />;
|
|
75
|
+
default:
|
|
76
|
+
return <Overview {...viewProps} onStart={handleStartFromOverview} />;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
return (
|
|
81
|
+
<div className="space-y-6">
|
|
82
|
+
{/* Navigation */}
|
|
83
|
+
<Card>
|
|
84
|
+
<CardContent className="p-4">
|
|
85
|
+
<ViewTabs currentView={currentView} onViewChange={handleViewChange} />
|
|
86
|
+
</CardContent>
|
|
87
|
+
</Card>
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
{/* Current View */}
|
|
90
|
+
{renderView()}
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
93
|
}
|
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
interface EngagementMeterProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
acknowledged: number;
|
|
5
|
+
actioned: number;
|
|
6
|
+
pending: number;
|
|
7
|
+
streak?: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function EngagementMeter({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
acknowledged,
|
|
12
|
+
actioned,
|
|
13
|
+
pending,
|
|
14
|
+
streak = 0,
|
|
15
15
|
}: EngagementMeterProps) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const total = acknowledged + actioned + pending;
|
|
17
|
+
const actionedPercent = total > 0 ? (actioned / total) * 100 : 0;
|
|
18
|
+
const acknowledgedPercent = total > 0 ? (acknowledged / total) * 100 : 0;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
20
|
+
return (
|
|
21
|
+
<div className="space-y-4">
|
|
22
|
+
{/* Donut chart */}
|
|
23
|
+
<div className="flex items-center justify-center">
|
|
24
|
+
<div className="relative h-32 w-32">
|
|
25
|
+
<svg className="h-full w-full -rotate-90" viewBox="0 0 100 100">
|
|
26
|
+
{/* Background */}
|
|
27
|
+
<circle
|
|
28
|
+
cx="50"
|
|
29
|
+
cy="50"
|
|
30
|
+
r="40"
|
|
31
|
+
fill="none"
|
|
32
|
+
strokeWidth="12"
|
|
33
|
+
className="stroke-muted"
|
|
34
|
+
/>
|
|
35
|
+
{/* Actioned (green) */}
|
|
36
|
+
<circle
|
|
37
|
+
cx="50"
|
|
38
|
+
cy="50"
|
|
39
|
+
r="40"
|
|
40
|
+
fill="none"
|
|
41
|
+
strokeWidth="12"
|
|
42
|
+
strokeLinecap="round"
|
|
43
|
+
strokeDasharray={`${actionedPercent * 2.51} 251`}
|
|
44
|
+
className="stroke-green-500 transition-all duration-500"
|
|
45
|
+
/>
|
|
46
|
+
{/* Acknowledged (amber) - offset by actioned */}
|
|
47
|
+
<circle
|
|
48
|
+
cx="50"
|
|
49
|
+
cy="50"
|
|
50
|
+
r="40"
|
|
51
|
+
fill="none"
|
|
52
|
+
strokeWidth="12"
|
|
53
|
+
strokeLinecap="round"
|
|
54
|
+
strokeDasharray={`${acknowledgedPercent * 2.51} 251`}
|
|
55
|
+
strokeDashoffset={`${-actionedPercent * 2.51}`}
|
|
56
|
+
className="stroke-amber-500 transition-all duration-500"
|
|
57
|
+
/>
|
|
58
|
+
</svg>
|
|
59
|
+
<div className="absolute inset-0 flex flex-col items-center justify-center">
|
|
60
|
+
<span className="font-bold text-2xl">{total}</span>
|
|
61
|
+
<span className="text-muted-foreground text-xs">tips</span>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
{/* Legend */}
|
|
67
|
+
<div className="flex justify-center gap-4 text-sm">
|
|
68
|
+
<div className="flex items-center gap-1.5">
|
|
69
|
+
<div className="h-3 w-3 rounded-full bg-green-500" />
|
|
70
|
+
<span>Actioned ({actioned})</span>
|
|
71
|
+
</div>
|
|
72
|
+
<div className="flex items-center gap-1.5">
|
|
73
|
+
<div className="h-3 w-3 rounded-full bg-amber-500" />
|
|
74
|
+
<span>Acknowledged ({acknowledged})</span>
|
|
75
|
+
</div>
|
|
76
|
+
<div className="flex items-center gap-1.5">
|
|
77
|
+
<div className="h-3 w-3 rounded-full bg-muted" />
|
|
78
|
+
<span>Pending ({pending})</span>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
{/* Streak */}
|
|
83
|
+
{streak > 0 && (
|
|
84
|
+
<div className="flex items-center justify-center gap-2 rounded-lg bg-orange-500/10 px-4 py-2">
|
|
85
|
+
<span className="text-xl">🔥</span>
|
|
86
|
+
<span className="font-semibold text-orange-500">
|
|
87
|
+
{streak} day engagement streak!
|
|
88
|
+
</span>
|
|
89
|
+
</div>
|
|
90
|
+
)}
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
93
|
}
|
|
@@ -6,96 +6,96 @@ import { cn } from '@contractspec/lib.ui-kit-web/ui/utils';
|
|
|
6
6
|
import type { LearningJourneyStepSpec } from '@contractspec/module.learning-journey/track-spec';
|
|
7
7
|
|
|
8
8
|
interface TipCardProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
step: LearningJourneyStepSpec;
|
|
10
|
+
isCompleted: boolean;
|
|
11
|
+
isCurrent: boolean;
|
|
12
|
+
onComplete?: () => void;
|
|
13
|
+
onDismiss?: () => void;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const TIP_ICONS: Record<string, string> = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
cash_buffer_too_high: '💰',
|
|
18
|
+
no_savings_goal: '🎯',
|
|
19
|
+
irregular_savings: '📅',
|
|
20
|
+
noise_late_evening: '🔇',
|
|
21
|
+
guest_frequency_high: '👥',
|
|
22
|
+
shared_space_conflicts: '🏠',
|
|
23
|
+
default: '💡',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export function TipCard({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
step,
|
|
28
|
+
isCompleted,
|
|
29
|
+
isCurrent,
|
|
30
|
+
onComplete,
|
|
31
|
+
onDismiss,
|
|
32
32
|
}: TipCardProps) {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const tipId = (step.metadata?.tipId as string) ?? 'default';
|
|
34
|
+
const icon = TIP_ICONS[tipId] ?? TIP_ICONS.default;
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
36
|
+
return (
|
|
37
|
+
<Card
|
|
38
|
+
className={cn(
|
|
39
|
+
'transition-all',
|
|
40
|
+
isCompleted && 'opacity-60',
|
|
41
|
+
isCurrent && 'ring-2 ring-amber-500'
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
<CardContent className="p-4">
|
|
45
|
+
<div className="flex gap-4">
|
|
46
|
+
{/* Icon */}
|
|
47
|
+
<div
|
|
48
|
+
className={cn(
|
|
49
|
+
'flex h-12 w-12 shrink-0 items-center justify-center rounded-xl text-2xl',
|
|
50
|
+
isCompleted
|
|
51
|
+
? 'bg-green-500/10'
|
|
52
|
+
: isCurrent
|
|
53
|
+
? 'bg-amber-500/10'
|
|
54
|
+
: 'bg-muted'
|
|
55
|
+
)}
|
|
56
|
+
>
|
|
57
|
+
{isCompleted ? '✓' : icon}
|
|
58
|
+
</div>
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
{/* Content */}
|
|
61
|
+
<div className="min-w-0 flex-1">
|
|
62
|
+
<div className="flex items-start justify-between gap-2">
|
|
63
|
+
<h4 className="font-semibold">{step.title}</h4>
|
|
64
|
+
{step.xpReward && (
|
|
65
|
+
<span
|
|
66
|
+
className={cn(
|
|
67
|
+
'shrink-0 rounded-full px-2 py-0.5 font-semibold text-xs',
|
|
68
|
+
isCompleted
|
|
69
|
+
? 'bg-green-500/10 text-green-500'
|
|
70
|
+
: 'bg-amber-500/10 text-amber-500'
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
+{step.xpReward} XP
|
|
74
|
+
</span>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
<p className="mt-1 text-muted-foreground text-sm">
|
|
78
|
+
{step.description}
|
|
79
|
+
</p>
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
{/* Actions */}
|
|
82
|
+
{!isCompleted && (
|
|
83
|
+
<div className="mt-3 flex flex-wrap gap-2">
|
|
84
|
+
<Button size="sm" onClick={onComplete}>
|
|
85
|
+
Take Action
|
|
86
|
+
</Button>
|
|
87
|
+
<Button variant="outline" size="sm" onClick={onDismiss}>
|
|
88
|
+
Dismiss
|
|
89
|
+
</Button>
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
{isCompleted && (
|
|
94
|
+
<p className="mt-2 text-green-500 text-sm">✓ Tip acknowledged</p>
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</CardContent>
|
|
99
|
+
</Card>
|
|
100
|
+
);
|
|
101
101
|
}
|