dashboard page and icons adjustment
This commit is contained in:
parent
aca7efc1ff
commit
9e8b20aaa6
|
|
@ -9,7 +9,7 @@ import {
|
||||||
import { Select } from "../ui/select"
|
import { Select } from "../ui/select"
|
||||||
import { aggregateRevenueByMonth, formatRevenueAxisTick } from "../../lib/analytics"
|
import { aggregateRevenueByMonth, formatRevenueAxisTick } from "../../lib/analytics"
|
||||||
import type { DateRevenue } from "../../types/analytics.types"
|
import type { DateRevenue } from "../../types/analytics.types"
|
||||||
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg"
|
import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
|
||||||
|
|
||||||
export function RevenueTrendCard({ paymentMethod }: { paymentMethod?: string }) {
|
export function RevenueTrendCard({ paymentMethod }: { paymentMethod?: string }) {
|
||||||
const currentYear = new Date().getFullYear()
|
const currentYear = new Date().getFullYear()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg"
|
import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
interface SpinnerIconProps {
|
interface SpinnerIconProps {
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ function SectionCard({
|
||||||
|
|
||||||
function LoadingSkeleton() {
|
function LoadingSkeleton() {
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto w-full max-w-3xl space-y-6 py-8">
|
<div className="mx-auto w-full max-w-7xl space-y-6 py-8">
|
||||||
<div className="h-8 w-48 animate-pulse rounded-lg bg-grayScale-100" />
|
<div className="h-8 w-48 animate-pulse rounded-lg bg-grayScale-100" />
|
||||||
<div className="h-28 animate-pulse rounded-xl bg-grayScale-100" />
|
<div className="h-28 animate-pulse rounded-xl bg-grayScale-100" />
|
||||||
<div className="h-48 animate-pulse rounded-xl bg-grayScale-100" />
|
<div className="h-48 animate-pulse rounded-xl bg-grayScale-100" />
|
||||||
|
|
@ -215,7 +215,7 @@ export function ProfilePage() {
|
||||||
|
|
||||||
if (error || !profile) {
|
if (error || !profile) {
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto w-full max-w-3xl py-16">
|
<div className="mx-auto w-full max-w-7xl py-16">
|
||||||
<Card className="border border-grayScale-100 shadow-none">
|
<Card className="border border-grayScale-100 shadow-none">
|
||||||
<CardContent className="flex flex-col items-center gap-5 p-12">
|
<CardContent className="flex flex-col items-center gap-5 p-12">
|
||||||
<div className="flex h-20 w-20 items-center justify-center rounded-full bg-grayScale-50">
|
<div className="flex h-20 w-20 items-center justify-center rounded-full bg-grayScale-50">
|
||||||
|
|
@ -251,10 +251,15 @@ export function ProfilePage() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto w-full max-w-3xl space-y-6">
|
<div className="mx-auto w-full max-w-7xl space-y-6">
|
||||||
<h1 className="text-xl font-semibold tracking-tight text-grayScale-900">
|
<div>
|
||||||
My Profile
|
<h1 className="text-xl font-semibold tracking-tight text-grayScale-900">
|
||||||
</h1>
|
My Profile
|
||||||
|
</h1>
|
||||||
|
<p className="mt-1 text-sm text-grayScale-500">
|
||||||
|
Your personal details, work information, and account activity.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Hero */}
|
{/* Hero */}
|
||||||
<Card className="border border-grayScale-100 shadow-none">
|
<Card className="border border-grayScale-100 shadow-none">
|
||||||
|
|
@ -311,41 +316,43 @@ export function ProfilePage() {
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Personal Information */}
|
<div className="grid items-stretch gap-6 lg:grid-cols-2">
|
||||||
<SectionCard title="Personal Information">
|
{/* Personal Information */}
|
||||||
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
|
<SectionCard title="Personal Information">
|
||||||
<FieldGroup label="First Name" value={profile.first_name} />
|
<div className="grid gap-x-10 gap-y-6 sm:grid-cols-2">
|
||||||
<FieldGroup label="Last Name" value={profile.last_name} />
|
<FieldGroup label="First Name" value={profile.first_name} />
|
||||||
<FieldGroup label="Email address" value={profile.email} />
|
<FieldGroup label="Last Name" value={profile.last_name} />
|
||||||
<FieldGroup label="Phone" value={profile.phone_number} />
|
<FieldGroup label="Email address" value={profile.email} />
|
||||||
<div className="sm:col-span-2">
|
<FieldGroup label="Phone" value={profile.phone_number} />
|
||||||
<FieldGroup label="Bio" value={<DisplayValue value={profile.bio} />} />
|
<div className="sm:col-span-2">
|
||||||
|
<FieldGroup label="Bio" value={<DisplayValue value={profile.bio} />} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</SectionCard>
|
||||||
</SectionCard>
|
|
||||||
|
|
||||||
{/* Work Details */}
|
{/* Work Details */}
|
||||||
<SectionCard title="Work Details">
|
<SectionCard title="Work Details">
|
||||||
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
|
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
|
||||||
<FieldGroup
|
<FieldGroup
|
||||||
label="Department"
|
label="Department"
|
||||||
value={<DisplayValue value={profile.department} />}
|
value={<DisplayValue value={profile.department} />}
|
||||||
/>
|
/>
|
||||||
<FieldGroup
|
<FieldGroup
|
||||||
label="Job Title"
|
label="Job Title"
|
||||||
value={<DisplayValue value={profile.job_title} />}
|
value={<DisplayValue value={profile.job_title} />}
|
||||||
/>
|
/>
|
||||||
<FieldGroup
|
<FieldGroup
|
||||||
label="Work Phone"
|
label="Work Phone"
|
||||||
value={<DisplayValue value={profile.work_phone} />}
|
value={<DisplayValue value={profile.work_phone} />}
|
||||||
/>
|
/>
|
||||||
<FieldGroup label="Member ID" value={String(profile.id)} mono />
|
<FieldGroup label="Member ID" value={String(profile.id)} mono />
|
||||||
</div>
|
</div>
|
||||||
</SectionCard>
|
</SectionCard>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Account Activity */}
|
{/* Account Activity */}
|
||||||
<SectionCard title="Account Activity">
|
<SectionCard title="Account Activity">
|
||||||
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
|
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2 lg:grid-cols-4">
|
||||||
<FieldGroup label="Joined" value={formatDate(profile.created_at)} />
|
<FieldGroup label="Joined" value={formatDate(profile.created_at)} />
|
||||||
<FieldGroup
|
<FieldGroup
|
||||||
label="Last Login"
|
label="Last Login"
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ export function AllNotificationsPage() {
|
||||||
<Link to="/notifications">My inbox</Link>
|
<Link to="/notifications">My inbox</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
|
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -175,9 +175,7 @@ export function EmailTemplateDetailPage() {
|
||||||
disabled={loading || saving}
|
disabled={loading || saving}
|
||||||
onClick={() => void load()}
|
onClick={() => void load()}
|
||||||
>
|
>
|
||||||
<RefreshCw
|
{(loading || saving) ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
className={cn("mr-2 h-4 w-4", (loading || saving) && "animate-spin")}
|
|
||||||
/>
|
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
{!template.is_system ? (
|
{!template.is_system ? (
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export function EmailTemplatesPage() {
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
onClick={() => void load()}
|
onClick={() => void load()}
|
||||||
>
|
>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ export function ScheduledNotificationsPage() {
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
|
<Button variant="outline" className="shrink-0" disabled={loading} onClick={() => void load()}>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ export function PaymentsPage() {
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
onClick={() => void fetchPayments()}
|
onClick={() => void fetchPayments()}
|
||||||
>
|
>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ export function AppVersionsTab() {
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
onClick={() => void load()}
|
onClick={() => void load()}
|
||||||
>
|
>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ export function SubscriptionPlansTab() {
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
onClick={() => void load()}
|
onClick={() => void load()}
|
||||||
>
|
>
|
||||||
<RefreshCw className={cn("mr-2 h-4 w-4", loading && "animate-spin")} />
|
{loading ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
|
||||||
Refresh
|
Refresh
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
||||||
import { CalendarDays, ChevronDown, ChevronLeft, ChevronRight, Search } from "lucide-react"
|
import { CalendarDays, ChevronDown, ChevronLeft, ChevronRight, Search } from "lucide-react"
|
||||||
import spinnerSrc from "../../assets/Circular-indeterminate progress indicator.svg"
|
import spinnerSrc from "../../assets/05d37a91-04f9-41d8-99a2-b11bf20a6af2.png"
|
||||||
import { AdminFiltersPanel } from "../../components/filters/AdminFiltersPanel"
|
import { AdminFiltersPanel } from "../../components/filters/AdminFiltersPanel"
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card"
|
import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card"
|
||||||
import { Input } from "../../components/ui/input"
|
import { Input } from "../../components/ui/input"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user