refactor(dashboards): ♻️ Update and refactor dashboard components with new layouts, styling, and functionality
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
d523a53a02
commit
f20290568c
10 changed files with 37 additions and 37 deletions
|
|
@ -3,9 +3,9 @@ import type { ReactElement } from 'react';
|
|||
import styled from 'styled-components';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useIncome, useIncomeSummary } from '@features/income/frontend/useIncome';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useContacts } from '@features/contacts/frontend/useContacts';
|
||||
import { useIncome, useIncomeSummary } from '@projects/finance/income/frontend/useIncome';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { useContacts } from '@projects/messenger/contacts/frontend/useContacts';
|
||||
import { DEFAULT_CURRENCY, TaskStatus } from '@life-platform/shared';
|
||||
import { formatCurrency, formatDate } from '@lilith/format';
|
||||
import type { Task } from '@life-platform/shared';
|
||||
|
|
@ -25,7 +25,7 @@ import {
|
|||
TaskItem,
|
||||
TaskTitle,
|
||||
TaskMeta,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const StatsRow = styled.div`
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import styled from 'styled-components';
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTheme } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useIncomeSummary, useBillable } from '@features/income/frontend/useIncome';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { useIncomeSummary, useBillable } from '@projects/finance/income/frontend/useIncome';
|
||||
import { DEFAULT_CURRENCY, TaskStatus } from '@life-platform/shared';
|
||||
import type { BillableEntry } from '@life-platform/shared';
|
||||
import { formatCurrency, formatDate } from '@lilith/format';
|
||||
|
|
@ -24,11 +24,11 @@ import {
|
|||
TaskItem,
|
||||
TaskTitle,
|
||||
TaskMeta,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
import {
|
||||
IncomeThisWeekWidget,
|
||||
TopContactsWidget,
|
||||
} from '@features/domains/frontend/dashboard-widgets';
|
||||
} from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
|
||||
const StatsRow = styled.div`
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import styled from 'styled-components';
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTheme } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useContentCalendar } from '@features/projects/frontend/useProjects';
|
||||
import { useContentCalendar } from '@projects/productivity/projects/frontend/useProjects';
|
||||
import { ContentStatus } from '@life-platform/shared';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { ContentCalendarItem } from '@life-platform/shared';
|
||||
|
|
@ -19,13 +19,13 @@ import {
|
|||
ItemRow,
|
||||
ItemLabel,
|
||||
ItemValue,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
import {
|
||||
UpcomingContentWidget,
|
||||
IncomeThisWeekWidget,
|
||||
PublishingPipelineWidget,
|
||||
STATUS_COLORS,
|
||||
} from '@features/domains/frontend/dashboard-widgets';
|
||||
} from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
|
||||
const PipelineRow = styled.div`
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import { useNavigate } from 'react-router-dom';
|
|||
import { useProjectContext } from '../useProjectContext';
|
||||
import { DEFAULT_CURRENCY, DEFAULT_LOCALE, AdStatus } from '@life-platform/shared';
|
||||
import { formatCurrency } from '@lilith/format';
|
||||
import { useIncome, useIncomeSummary } from '@features/income/frontend/useIncome';
|
||||
import { useContacts } from '@features/contacts/frontend/useContacts';
|
||||
import { useBookingStats } from '@features/escort/frontend/useBookings';
|
||||
import { useAdSubscriptions } from '@features/escort/frontend/useAdSubscriptions';
|
||||
import { useIncome, useIncomeSummary } from '@projects/finance/income/frontend/useIncome';
|
||||
import { useContacts } from '@projects/messenger/contacts/frontend/useContacts';
|
||||
import { useBookingStats } from '@projects/career/@jobs/escort/frontend/useBookings';
|
||||
import { useAdSubscriptions } from '@projects/career/@jobs/escort/frontend/useAdSubscriptions';
|
||||
import {
|
||||
IncomeThisWeekWidget,
|
||||
TopContactsWidget,
|
||||
} from '@features/domains/frontend/dashboard-widgets';
|
||||
} from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
import { AreaChart } from '@lilith/ui-charts';
|
||||
import type { DataPoint } from '@lilith/ui-charts';
|
||||
import {
|
||||
|
|
@ -24,7 +24,7 @@ import {
|
|||
StatNumber,
|
||||
WidgetRow,
|
||||
EmptyState,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const StatsRow = styled.div`
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import styled from 'styled-components';
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTheme } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useExerciseSessions } from '@features/health/frontend/useHealth';
|
||||
import { RecentMeasurementsWidget, HabitStreaksWidget } from '@features/domains/frontend/dashboard-widgets';
|
||||
import { useExerciseSessions } from '@projects/wellness/health/frontend/useHealth';
|
||||
import { RecentMeasurementsWidget, HabitStreaksWidget } from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { ExerciseSession } from '@life-platform/shared';
|
||||
import {
|
||||
|
|
@ -19,7 +19,7 @@ import {
|
|||
StatNumber,
|
||||
EmptyState,
|
||||
Badge,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
import { EXERCISE_LABELS, formatDuration, formatDistance, getWeekStart } from '../fitnessUtils';
|
||||
|
||||
// --- Heatmap styled components ---
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import styled from 'styled-components';
|
|||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
import { useTheme } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useChecklists } from '@features/checklists/frontend/useChecklists';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { useChecklists } from '@projects/productivity/checklists/frontend/useChecklists';
|
||||
import { TaskStatus } from '@life-platform/shared';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { Task, Checklist } from '@life-platform/shared';
|
||||
|
|
@ -23,7 +23,7 @@ import {
|
|||
EmptyState,
|
||||
ProgressBar,
|
||||
ProgressLabel,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const OverdueCount = styled.span<{ accent: string }>`
|
||||
font-size: 13px;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import type { ReactElement } from 'react';
|
|||
import { useNavigate } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useMedicalEntries } from '@features/health/frontend/useHealth';
|
||||
import { RecentMeasurementsWidget, HabitStreaksWidget } from '@features/domains/frontend/dashboard-widgets';
|
||||
import { useMedicalEntries } from '@projects/wellness/health/frontend/useHealth';
|
||||
import { RecentMeasurementsWidget, HabitStreaksWidget } from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
import { MedicalEntryType } from '@life-platform/shared';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { MedicalEntry } from '@life-platform/shared';
|
||||
|
|
@ -19,7 +19,7 @@ import {
|
|||
StatNumber,
|
||||
EmptyState,
|
||||
Badge,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const ENTRY_TYPE_LABELS: Record<MedicalEntryType, string> = {
|
||||
[MedicalEntryType.HrtDose]: 'HRT',
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import { useNavigate } from 'react-router-dom';
|
|||
import { useTheme } from '@lilith/ui-theme';
|
||||
import type { ThemeInterface } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { DEFAULT_CURRENCY } from '@life-platform/shared';
|
||||
import { formatCurrency, formatDate } from '@lilith/format';
|
||||
import { useIncomeSummary } from '@features/income/frontend/useIncome';
|
||||
import { useIncomeSummary } from '@projects/finance/income/frontend/useIncome';
|
||||
import {
|
||||
RecentMeasurementsWidget,
|
||||
TopContactsWidget,
|
||||
} from '@features/domains/frontend/dashboard-widgets';
|
||||
} from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
import { TaskStatus } from '@life-platform/shared';
|
||||
import type { Task } from '@life-platform/shared';
|
||||
import {
|
||||
|
|
@ -25,7 +25,7 @@ import {
|
|||
WidgetRow,
|
||||
Badge,
|
||||
EmptyState,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const StatsRow = styled.div`
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useNavigate, useParams } from 'react-router-dom';
|
|||
import { useTheme } from '@lilith/ui-theme';
|
||||
import type { ThemeInterface } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { TaskStatus } from '@life-platform/shared';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { Task } from '@life-platform/shared';
|
||||
|
|
@ -25,7 +25,7 @@ import {
|
|||
WidgetRow,
|
||||
StatNumber,
|
||||
Badge,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
|
||||
const StatLabel = styled.div`
|
||||
font-size: 11px;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import { useNavigate } from 'react-router-dom';
|
|||
import { useTheme } from '@lilith/ui-theme';
|
||||
import type { ThemeInterface } from '@lilith/ui-theme';
|
||||
import { useProjectContext } from '../useProjectContext';
|
||||
import { useSprints } from '@features/projects/frontend/useProjects';
|
||||
import { useTasks } from '@features/tasks/frontend/useTasks';
|
||||
import { useSprints } from '@projects/productivity/projects/frontend/useProjects';
|
||||
import { useTasks } from '@projects/productivity/tasks/frontend/useTasks';
|
||||
import { TaskStatus, SprintStatus } from '@life-platform/shared';
|
||||
import { formatDate } from '@lilith/format';
|
||||
import type { Task } from '@life-platform/shared';
|
||||
|
|
@ -24,9 +24,9 @@ import {
|
|||
Badge,
|
||||
EmptyState,
|
||||
WidgetRow,
|
||||
} from '@features/domains/frontend/dashboard-styles';
|
||||
import { GoalHierarchySummaryWidget } from '@features/domains/frontend/dashboard-widgets';
|
||||
import SprintBoard, { BOARD_COLUMNS } from '@features/domains/frontend/components/SprintBoard';
|
||||
} from '@projects/career/domains/frontend/dashboard-styles';
|
||||
import { GoalHierarchySummaryWidget } from '@projects/career/domains/frontend/dashboard-widgets';
|
||||
import SprintBoard, { BOARD_COLUMNS } from '@projects/career/domains/frontend/components/SprintBoard';
|
||||
|
||||
const SprintHeader = styled.div`
|
||||
display: flex;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue