-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e29eaf
commit 6d5ff51
Showing
11 changed files
with
190 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
|
||
import { DashboardDTO } from '@/types/DashboardType'; | ||
import Widget from '@components/Cards/Widget'; | ||
import { Megaphone } from 'lucide-react'; | ||
|
||
interface DashboardOverviewProps { | ||
dashboardData?: DashboardDTO; | ||
} | ||
|
||
const InactivityAlert: React.FC<DashboardOverviewProps> = ({ dashboardData }) => ( | ||
<div> | ||
<Widget | ||
header={{ | ||
title: 'We think you forgot something?!', | ||
icon: <Megaphone />, | ||
}} | ||
content={{ | ||
mainContent: 'No Happiness tracking since 52 days.', | ||
subContent: dashboardData?.averageScore, | ||
}} | ||
borderColor="border-primaryBlue-main" | ||
fontColor="text-primaryBlue-main" | ||
/> | ||
</div> | ||
); | ||
|
||
export default InactivityAlert; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
|
||
import { DashboardDTO } from '@/types/DashboardType'; | ||
import Widget from '@components/Cards/Widget'; | ||
import { AudioWaveform, Bike, CircleSlash, Shapes } from 'lucide-react'; | ||
import Progress from '@components/ui/Progress/Progress'; | ||
import AverageHappinessButton from '@components/Buttons/AverageHappinessButton'; | ||
|
||
interface DashboardOverviewProps { | ||
dashboardData?: DashboardDTO; | ||
} | ||
|
||
const WidgetRow: React.FC<DashboardOverviewProps> = ({ dashboardData }) => ( | ||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4"> | ||
<Widget | ||
header={{ | ||
title: 'Average Happiness', | ||
icon: <CircleSlash />, | ||
}} | ||
content={{ | ||
mainContent: <AverageHappinessButton score={dashboardData?.averageScore ?? 0} />, | ||
}} | ||
/> | ||
<Widget | ||
header={{ | ||
title: 'Current Sprint', | ||
icon: <Bike />, | ||
}} | ||
content={{ | ||
mainContent: <Progress value={85} aria-label="12% increase" />, | ||
subContent: '4 days left', | ||
}} | ||
/> | ||
<Widget | ||
header={{ | ||
title: 'Most tracked Emotions', | ||
icon: <AudioWaveform />, | ||
}} | ||
content={{ | ||
mainContent: <div> Bored, Lonely, Sick</div>, | ||
}} | ||
/> | ||
<Widget | ||
header={{ | ||
title: 'Most Tracked Worktype', | ||
icon: <Shapes />, | ||
}} | ||
content={{ | ||
mainContent: dashboardData?.mostVotedWorkKind ? dashboardData?.mostVotedWorkKind?.workKindName : '-', | ||
subContent: 'tracked 37 times, Happiness :(', | ||
}} | ||
/> | ||
</div> | ||
); | ||
|
||
export default WidgetRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.