dashboard page and icons adjustment

This commit is contained in:
Yared Yemane 2026-10-22 14:29:39 +03:00
parent aca7efc1ff
commit 9e8b20aaa6
11 changed files with 53 additions and 48 deletions

View File

@ -9,7 +9,7 @@ import {
import { Select } from "../ui/select"
import { aggregateRevenueByMonth, formatRevenueAxisTick } from "../../lib/analytics"
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 }) {
const currentYear = new Date().getFullYear()

View File

@ -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"
interface SpinnerIconProps {

View File

@ -98,7 +98,7 @@ function SectionCard({
function LoadingSkeleton() {
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-28 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) {
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">
<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">
@ -251,10 +251,15 @@ export function ProfilePage() {
};
return (
<div className="mx-auto w-full max-w-3xl space-y-6">
<h1 className="text-xl font-semibold tracking-tight text-grayScale-900">
My Profile
</h1>
<div className="mx-auto w-full max-w-7xl space-y-6">
<div>
<h1 className="text-xl font-semibold tracking-tight text-grayScale-900">
My Profile
</h1>
<p className="mt-1 text-sm text-grayScale-500">
Your personal details, work information, and account activity.
</p>
</div>
{/* Hero */}
<Card className="border border-grayScale-100 shadow-none">
@ -311,41 +316,43 @@ export function ProfilePage() {
</CardContent>
</Card>
{/* Personal Information */}
<SectionCard title="Personal Information">
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
<FieldGroup label="First Name" value={profile.first_name} />
<FieldGroup label="Last Name" value={profile.last_name} />
<FieldGroup label="Email address" value={profile.email} />
<FieldGroup label="Phone" value={profile.phone_number} />
<div className="sm:col-span-2">
<FieldGroup label="Bio" value={<DisplayValue value={profile.bio} />} />
<div className="grid items-stretch gap-6 lg:grid-cols-2">
{/* Personal Information */}
<SectionCard title="Personal Information">
<div className="grid gap-x-10 gap-y-6 sm:grid-cols-2">
<FieldGroup label="First Name" value={profile.first_name} />
<FieldGroup label="Last Name" value={profile.last_name} />
<FieldGroup label="Email address" value={profile.email} />
<FieldGroup label="Phone" value={profile.phone_number} />
<div className="sm:col-span-2">
<FieldGroup label="Bio" value={<DisplayValue value={profile.bio} />} />
</div>
</div>
</div>
</SectionCard>
</SectionCard>
{/* Work Details */}
<SectionCard title="Work Details">
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
<FieldGroup
label="Department"
value={<DisplayValue value={profile.department} />}
/>
<FieldGroup
label="Job Title"
value={<DisplayValue value={profile.job_title} />}
/>
<FieldGroup
label="Work Phone"
value={<DisplayValue value={profile.work_phone} />}
/>
<FieldGroup label="Member ID" value={String(profile.id)} mono />
</div>
</SectionCard>
{/* Work Details */}
<SectionCard title="Work Details">
<div className="grid gap-x-8 gap-y-5 sm:grid-cols-2">
<FieldGroup
label="Department"
value={<DisplayValue value={profile.department} />}
/>
<FieldGroup
label="Job Title"
value={<DisplayValue value={profile.job_title} />}
/>
<FieldGroup
label="Work Phone"
value={<DisplayValue value={profile.work_phone} />}
/>
<FieldGroup label="Member ID" value={String(profile.id)} mono />
</div>
</SectionCard>
</div>
{/* 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="Last Login"

View File

@ -217,7 +217,7 @@ export function AllNotificationsPage() {
<Link to="/notifications">My inbox</Link>
</Button>
<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
</Button>
</div>

View File

@ -175,9 +175,7 @@ export function EmailTemplateDetailPage() {
disabled={loading || saving}
onClick={() => void load()}
>
<RefreshCw
className={cn("mr-2 h-4 w-4", (loading || saving) && "animate-spin")}
/>
{(loading || saving) ? <SpinnerIcon className="mr-2 h-4 w-4" /> : <RefreshCw className="mr-2 h-4 w-4" />}
Refresh
</Button>
{!template.is_system ? (

View File

@ -106,7 +106,7 @@ export function EmailTemplatesPage() {
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
</Button>
</div>

View File

@ -199,7 +199,7 @@ export function ScheduledNotificationsPage() {
</Link>
</Button>
<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
</Button>
</div>

View File

@ -331,7 +331,7 @@ export function PaymentsPage() {
disabled={loading}
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
</Button>
</div>

View File

@ -196,7 +196,7 @@ export function AppVersionsTab() {
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
</Button>
</div>

View File

@ -154,7 +154,7 @@ export function SubscriptionPlansTab() {
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
</Button>
</div>

View File

@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from "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 { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card"
import { Input } from "../../components/ui/input"