[feat] report 페이지 추가
This commit is contained in:
1 parent
af58b96aff
commit
675cfcab8d
126 files changed
+3642
-1
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_CHANNEL_SCORES } from "@/features/report/constants/mock_channel_scores";
|
||||
import type { ChannelScore } from "@/features/report/types/channelScore";
|
||||
import { ChannelScoreGrid } from "@/features/report/ui/channels/ChannelScoreGrid";
|
||||
|
||||
type ReportChannelsSectionProps = {
|
||||
channels?: ChannelScore[];
|
||||
};
|
||||
|
||||
export function ReportChannelsSection({ channels = MOCK_CHANNEL_SCORES }: ReportChannelsSectionProps) {
|
||||
return (
|
||||
<PageSection id="channel-overview" title="Channel Health Score" subtitle="채널별 건강도 종합">
|
||||
<ChannelScoreGrid channels={channels} />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_CLINIC_SNAPSHOT } from "@/features/report/constants/mock_clinic_snapshot";
|
||||
import type { ClinicSnapshot } from "@/features/report/types/clinicSnapshot";
|
||||
import { ClinicCertificationsBlock } from "@/features/report/ui/clinic/ClinicCertificationsBlock";
|
||||
import { ClinicInfoStatGrid } from "@/features/report/ui/clinic/ClinicInfoStatGrid";
|
||||
import { ClinicLeadDoctorPanel } from "@/features/report/ui/clinic/ClinicLeadDoctorPanel";
|
||||
|
||||
type ReportClinicSectionProps = {
|
||||
data?: ClinicSnapshot;
|
||||
};
|
||||
|
||||
export function ReportClinicSection({ data = MOCK_CLINIC_SNAPSHOT }: ReportClinicSectionProps) {
|
||||
return (
|
||||
<PageSection id="clinic-snapshot" title="Clinic Overview" subtitle="병원 기본 정보">
|
||||
<ClinicInfoStatGrid data={data} />
|
||||
<ClinicLeadDoctorPanel data={data} />
|
||||
<ClinicCertificationsBlock tags={data.certifications} />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_PROBLEM_DIAGNOSIS } from "@/features/report/constants/mock_problem_diagnosis";
|
||||
import type { DiagnosisItem } from "@/features/report/types/diagnosis";
|
||||
import { ProblemDiagnosisCard } from "@/features/report/ui/diagnosis/ProblemDiagnosisCard";
|
||||
|
||||
type ReportDiagnosisSectionProps = {
|
||||
items?: DiagnosisItem[];
|
||||
};
|
||||
|
||||
export function ReportDiagnosisSection({ items = MOCK_PROBLEM_DIAGNOSIS }: ReportDiagnosisSectionProps) {
|
||||
if (items.length === 0) {
|
||||
return (
|
||||
<PageSection id="problem-diagnosis" title="Critical Issues" subtitle="핵심 문제 진단" dark>
|
||||
<p className="body-14 text-lavender-200 break-keep">등록된 핵심 진단 항목이 없습니다.</p>
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<PageSection id="problem-diagnosis" title="Critical Issues" subtitle="핵심 문제 진단" dark>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{items.map((item, i) => (
|
||||
<ProblemDiagnosisCard key={`${item.category}-${i}`} item={item} index={i} />
|
||||
))}
|
||||
</div>
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
import { BrandConsistencyMap } from "@/components/brand/BrandConsistencyMap";
|
||||
import { DiagnosisRow } from "@/components/diagnosis/DiagnosisRow";
|
||||
import { ConsolidationCallout } from "@/components/panel/ConsolidationCallout";
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_FACEBOOK_AUDIT } from "@/features/report/constants/mock_facebook_audit";
|
||||
import type { FacebookAudit } from "@/features/report/types/facebookAudit";
|
||||
import { FacebookPageCard } from "@/features/report/ui/facebook/FacebookPageCard";
|
||||
|
||||
type ReportFacebookSectionProps = {
|
||||
data?: FacebookAudit;
|
||||
};
|
||||
|
||||
export function ReportFacebookSection({ data = MOCK_FACEBOOK_AUDIT }: ReportFacebookSectionProps) {
|
||||
return (
|
||||
<PageSection id="facebook-audit" title="Facebook Analysis" subtitle="페이스북 페이지 분석">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{data.pages.map((page, i) => (
|
||||
<FacebookPageCard key={page.pageName} page={page} index={i} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{data.brandInconsistencies.length > 0 ? (
|
||||
<BrandConsistencyMap inconsistencies={data.brandInconsistencies} />
|
||||
) : null}
|
||||
|
||||
{data.diagnosis.length > 0 ? (
|
||||
<div className="mt-8 rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up animation-delay-300">
|
||||
<p className="body-14-medium text-neutral-80 mb-2 break-keep">진단 결과</p>
|
||||
<p className="label-12 text-neutral-60 mb-4 break-keep">Facebook 채널 문제점</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow
|
||||
key={`${item.category}-${i}`}
|
||||
category={item.category}
|
||||
detail={item.detail}
|
||||
severity={item.severity}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{data.consolidationRecommendation ? (
|
||||
<ConsolidationCallout
|
||||
title="통합 권장 사항"
|
||||
icon={<GlobeIcon width={20} height={20} className="text-white" aria-hidden />}
|
||||
>
|
||||
{data.consolidationRecommendation}
|
||||
</ConsolidationCallout>
|
||||
) : null}
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { DiagnosisRow } from "@/components/diagnosis/DiagnosisRow";
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_INSTAGRAM_AUDIT } from "@/features/report/constants/mock_instagram_audit";
|
||||
import type { InstagramAudit } from "@/features/report/types/instagramAudit";
|
||||
import { InstagramAccountCard } from "@/features/report/ui/instagram/InstagramAccountCard";
|
||||
|
||||
type ReportInstagramSectionProps = {
|
||||
data?: InstagramAudit;
|
||||
};
|
||||
|
||||
export function ReportInstagramSection({ data = MOCK_INSTAGRAM_AUDIT }: ReportInstagramSectionProps) {
|
||||
return (
|
||||
<PageSection id="instagram-audit" title="Instagram Analysis" subtitle="인스타그램 채널 분석">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
||||
{data.accounts.map((account, i) => (
|
||||
<InstagramAccountCard key={account.handle} account={account} index={i} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{data.diagnosis.length > 0 ? (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up animation-delay-300">
|
||||
<p className="body-14-medium text-neutral-80 mb-4 break-keep">진단 결과</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow
|
||||
key={`${item.category}-${i}`}
|
||||
category={item.category}
|
||||
detail={item.detail}
|
||||
severity={item.severity}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_KPI_METRICS } from "@/features/report/constants/mock_kpi";
|
||||
import type { KpiMetric } from "@/features/report/types/kpiDashboard";
|
||||
import { KpiMetricsTable } from "@/features/report/ui/kpi/KpiMetricsTable";
|
||||
import { KpiTransformationCtaCard } from "@/features/report/ui/kpi/KpiTransformationCtaCard";
|
||||
|
||||
type ReportKpiSectionProps = {
|
||||
metrics?: KpiMetric[];
|
||||
};
|
||||
|
||||
export function ReportKpiSection({ metrics = MOCK_KPI_METRICS }: ReportKpiSectionProps) {
|
||||
return (
|
||||
<PageSection id="kpi-dashboard" title="KPI Dashboard" subtitle="핵심 성과 지표 목표">
|
||||
<KpiMetricsTable metrics={metrics} />
|
||||
<KpiTransformationCtaCard />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_OTHER_CHANNELS_REPORT } from "@/features/report/constants/mock_other_channels";
|
||||
import type { OtherChannelsReport } from "@/types/otherChannels";
|
||||
import { OtherChannelsList } from "@/features/report/ui/otherChannels/OtherChannelsList";
|
||||
import { WebsiteTechAuditBlock } from "@/features/report/ui/otherChannels/WebsiteTechAuditBlock";
|
||||
|
||||
type ReportOtherChannelsSectionProps = {
|
||||
data?: OtherChannelsReport;
|
||||
};
|
||||
|
||||
export function ReportOtherChannelsSection({ data = MOCK_OTHER_CHANNELS_REPORT }: ReportOtherChannelsSectionProps) {
|
||||
return (
|
||||
<PageSection
|
||||
id="other-channels"
|
||||
title="Other Channels & Website"
|
||||
subtitle="기타 채널 및 웹사이트 기술 진단"
|
||||
>
|
||||
<OtherChannelsList channels={data.channels} />
|
||||
<WebsiteTechAuditBlock website={data.website} />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { MOCK_REPORT_OVERVIEW } from "@/features/report/constants/mock_report_overview";
|
||||
import type { ReportOverviewData } from "@/features/report/types/reportOverview";
|
||||
import { OverviewHeroBlobs } from "@/features/report/ui/overview/OverviewHeroBlobs";
|
||||
import { OverviewHeroColumn } from "@/features/report/ui/overview/OverviewHeroColumn";
|
||||
import { OverviewScorePanel } from "@/features/report/ui/overview/OverviewScorePanel";
|
||||
import { OVERVIEW_SECTION_BG_CLASS } from "@/features/report/ui/overview/overviewSectionStyles";
|
||||
|
||||
type ReportOverviewSectionProps = {
|
||||
data?: ReportOverviewData;
|
||||
};
|
||||
|
||||
export function ReportOverviewSection({ data = MOCK_REPORT_OVERVIEW }: ReportOverviewSectionProps) {
|
||||
return (
|
||||
<section
|
||||
id="header"
|
||||
aria-label="개요"
|
||||
className={`relative overflow-hidden scroll-mt-36 py-16 md:py-20 px-6 ${OVERVIEW_SECTION_BG_CLASS}`}
|
||||
>
|
||||
<OverviewHeroBlobs />
|
||||
|
||||
<div className="relative max-w-7xl mx-auto">
|
||||
<div className="flex flex-col md:flex-row items-center md:items-start justify-between gap-10">
|
||||
<OverviewHeroColumn data={data} />
|
||||
<OverviewScorePanel overallScore={data.overallScore} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_ROADMAP } from "@/features/report/constants/mock_roadmap";
|
||||
import type { RoadmapMonth } from "@/features/report/types/roadmap";
|
||||
import { RoadmapMonthsGrid } from "@/features/report/ui/roadmap/RoadmapMonthsGrid";
|
||||
|
||||
type ReportRoadmapSectionProps = {
|
||||
months?: RoadmapMonth[];
|
||||
};
|
||||
|
||||
export function ReportRoadmapSection({ months = MOCK_ROADMAP }: ReportRoadmapSectionProps) {
|
||||
return (
|
||||
<PageSection id="roadmap" title="90-Day Roadmap" subtitle="실행 로드맵">
|
||||
<RoadmapMonthsGrid months={months} />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_TRANSFORMATION } from "@/features/report/constants/mock_transformation";
|
||||
import type { TransformationProposal } from "@/features/report/types/transformationProposal";
|
||||
import { TransformationTabbedView } from "@/features/report/ui/transformation/TransformationTabbedView";
|
||||
|
||||
type ReportTransformationSectionProps = {
|
||||
data?: TransformationProposal;
|
||||
};
|
||||
|
||||
export function ReportTransformationSection({ data = MOCK_TRANSFORMATION }: ReportTransformationSectionProps) {
|
||||
return (
|
||||
<PageSection
|
||||
id="transformation"
|
||||
title="Transformation Proposal"
|
||||
subtitle="As-Is → To-Be 전환 제안"
|
||||
>
|
||||
<TransformationTabbedView data={data} />
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import { TagChipList } from "@/components/chip/TagChipList";
|
||||
import { DiagnosisRow } from "@/components/diagnosis/DiagnosisRow";
|
||||
import { PageSection } from "@/components/section/PageSection";
|
||||
import { MOCK_YOUTUBE_AUDIT } from "@/features/report/constants/mock_youtube_audit";
|
||||
import type { YouTubeAudit } from "@/features/report/types/youtubeAudit";
|
||||
import { YouTubeChannelInfoCard } from "@/features/report/ui/youtube/YouTubeChannelInfoCard";
|
||||
import { YouTubeMetricsGrid } from "@/features/report/ui/youtube/YouTubeMetricsGrid";
|
||||
import { YouTubeTopVideosBlock } from "@/features/report/ui/youtube/YouTubeTopVideosBlock";
|
||||
|
||||
type ReportYouTubeSectionProps = {
|
||||
data?: YouTubeAudit;
|
||||
};
|
||||
|
||||
export function ReportYouTubeSection({ data = MOCK_YOUTUBE_AUDIT }: ReportYouTubeSectionProps) {
|
||||
return (
|
||||
<PageSection id="youtube-audit" title="YouTube Analysis" subtitle="유튜브 채널 분석">
|
||||
<YouTubeMetricsGrid data={data} />
|
||||
<YouTubeChannelInfoCard data={data} />
|
||||
|
||||
{data.playlists.length > 0 ? (
|
||||
<div className="mb-8">
|
||||
<TagChipList title="재생목록" tags={data.playlists} entranceDelayClass="animation-delay-200" />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<YouTubeTopVideosBlock videos={data.topVideos} />
|
||||
|
||||
{data.diagnosis.length > 0 ? (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 animate-fade-in-up animation-delay-300">
|
||||
<p className="body-14-medium text-neutral-80 mb-4 break-keep">진단 결과</p>
|
||||
{data.diagnosis.map((item, i) => (
|
||||
<DiagnosisRow
|
||||
key={`${item.category}-${i}`}
|
||||
category={item.category}
|
||||
detail={item.detail}
|
||||
severity={item.severity}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</PageSection>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { ChannelScoreCard } from "@/components/card/ChannelScoreCard";
|
||||
import type { ChannelScore } from "@/features/report/types/channelScore";
|
||||
import {
|
||||
channelScoreAccentColor,
|
||||
renderChannelScoreIcon,
|
||||
} from "@/features/report/ui/channels/channelScoreIcons";
|
||||
|
||||
export type ChannelScoreGridProps = {
|
||||
channels: ChannelScore[];
|
||||
};
|
||||
|
||||
export function ChannelScoreGrid({ channels }: ChannelScoreGridProps) {
|
||||
return (
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
||||
{channels.map((ch, i) => {
|
||||
const iconKey = ch.icon?.toLowerCase() ?? "";
|
||||
return (
|
||||
<ChannelScoreCard
|
||||
key={ch.channel}
|
||||
channel={ch.channel}
|
||||
icon={renderChannelScoreIcon(iconKey)}
|
||||
accentColor={channelScoreAccentColor(iconKey)}
|
||||
score={ch.score}
|
||||
maxScore={ch.maxScore}
|
||||
headline={ch.headline}
|
||||
severity={ch.status}
|
||||
style={{ animationDelay: `${i * 80}ms` }}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { ComponentType, SVGProps } from "react";
|
||||
import ChannelFacebookIcon from "@/assets/icons/channel-facebook.svg?react";
|
||||
import ChannelInstagramIcon from "@/assets/icons/channel-instagram.svg?react";
|
||||
import ChannelSearchIcon from "@/assets/icons/channel-search.svg?react";
|
||||
import ChannelYoutubeIcon from "@/assets/icons/channel-youtube.svg?react";
|
||||
import StarIcon from "@/assets/icons/star.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
|
||||
type SvgIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
||||
|
||||
const CHANNEL_ICONS: Record<string, SvgIcon> = {
|
||||
youtube: ChannelYoutubeIcon,
|
||||
instagram: ChannelInstagramIcon,
|
||||
facebook: ChannelFacebookIcon,
|
||||
star: StarIcon,
|
||||
globe: GlobeIcon,
|
||||
search: ChannelSearchIcon,
|
||||
};
|
||||
|
||||
const CHANNEL_ACCENT: Record<string, string> = {
|
||||
facebook: "#1877F2",
|
||||
instagram: "#E1306C",
|
||||
youtube: "#FF0000",
|
||||
globe: "#6B2D8B",
|
||||
star: "#6B2D8B",
|
||||
search: "#606060",
|
||||
};
|
||||
|
||||
export function renderChannelScoreIcon(iconKey: string) {
|
||||
const k = iconKey?.toLowerCase() ?? "";
|
||||
const Cmp = CHANNEL_ICONS[k] ?? GlobeIcon;
|
||||
return <Cmp width={20} height={20} aria-hidden />;
|
||||
}
|
||||
|
||||
export function channelScoreAccentColor(iconKey: string): string | undefined {
|
||||
const k = iconKey?.toLowerCase() ?? "";
|
||||
return CHANNEL_ACCENT[k];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { TagChipList } from "@/components/chip/TagChipList";
|
||||
|
||||
export type ClinicCertificationsBlockProps = {
|
||||
tags: string[];
|
||||
};
|
||||
|
||||
export function ClinicCertificationsBlock({ tags }: ClinicCertificationsBlockProps) {
|
||||
if (tags.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="mt-8">
|
||||
<TagChipList title="인증 및 자격" tags={tags} entranceDelayClass="" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { InfoStatCard } from "@/components/card/InfoStatCard";
|
||||
import type { ClinicSnapshot } from "@/features/report/types/clinicSnapshot";
|
||||
import { buildClinicSnapshotStatRows } from "@/features/report/ui/clinic/clinicSnapshotStatRows";
|
||||
|
||||
export type ClinicInfoStatGridProps = {
|
||||
data: ClinicSnapshot;
|
||||
};
|
||||
|
||||
export function ClinicInfoStatGrid({ data }: ClinicInfoStatGridProps) {
|
||||
const rows = buildClinicSnapshotStatRows(data);
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8">
|
||||
{rows.map((field, i) => (
|
||||
<InfoStatCard
|
||||
key={field.label}
|
||||
icon={field.icon}
|
||||
label={field.label}
|
||||
value={field.value}
|
||||
style={{ animationDelay: `${i * 50}ms` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import AwardIcon from "@/assets/icons/award.svg?react";
|
||||
import { HighlightPanel } from "@/components/panel/HighlightPanel";
|
||||
import { StarRatingDisplay } from "@/components/rating/StarRatingDisplay";
|
||||
import type { ClinicSnapshot } from "@/features/report/types/clinicSnapshot";
|
||||
|
||||
export type ClinicLeadDoctorPanelProps = {
|
||||
data: ClinicSnapshot;
|
||||
};
|
||||
|
||||
export function ClinicLeadDoctorPanel({ data }: ClinicLeadDoctorPanelProps) {
|
||||
return (
|
||||
<HighlightPanel title="대표 원장" icon={<AwardIcon aria-hidden />}>
|
||||
<p className="title-20 text-navy-900 mb-1 break-keep">{data.leadDoctor.name}</p>
|
||||
<p className="body-14 text-neutral-70 mb-3 break-keep">{data.leadDoctor.credentials}</p>
|
||||
<StarRatingDisplay rating={data.leadDoctor.rating} reviewCount={data.leadDoctor.reviewCount} />
|
||||
</HighlightPanel>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import type { ReactNode } from "react";
|
||||
import PhoneIcon from "@/assets/icons/phone.svg?react";
|
||||
import StarIcon from "@/assets/icons/star.svg?react";
|
||||
import UsersIcon from "@/assets/icons/users.svg?react";
|
||||
import CalendarIcon from "@/assets/report/calendar.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
import MapPinIcon from "@/assets/report/map-pin.svg?react";
|
||||
import type { ClinicSnapshot } from "@/features/report/types/clinicSnapshot";
|
||||
import { formatCompactNumber } from "@/lib/formatNumber";
|
||||
|
||||
export type ClinicStatRow = {
|
||||
label: string;
|
||||
value: string;
|
||||
icon: ReactNode;
|
||||
};
|
||||
|
||||
export function buildClinicSnapshotStatRows(data: ClinicSnapshot): ClinicStatRow[] {
|
||||
return [
|
||||
{
|
||||
label: "개원",
|
||||
value: `${data.established} (${data.yearsInBusiness}년)`,
|
||||
icon: <CalendarIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "의료진",
|
||||
value: `${data.staffCount}명`,
|
||||
icon: <UsersIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "강남언니 평점",
|
||||
value: `${data.overallRating} / 5.0`,
|
||||
icon: <StarIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "리뷰 수",
|
||||
value: formatCompactNumber(data.totalReviews),
|
||||
icon: <StarIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "시술 가격대",
|
||||
value: `${data.priceRange.min} ~ ${data.priceRange.max} ${data.priceRange.currency}`.trim(),
|
||||
icon: <GlobeIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "위치",
|
||||
value: `${data.location} (${data.nearestStation})`,
|
||||
icon: <MapPinIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "전화",
|
||||
value: data.phone,
|
||||
icon: <PhoneIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
{
|
||||
label: "도메인",
|
||||
value: data.domain,
|
||||
icon: <GlobeIcon width={16} height={16} aria-hidden />,
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import AlertCircleIcon from "@/assets/icons/alert-circle.svg?react";
|
||||
import type { DiagnosisItem } from "@/features/report/types/diagnosis";
|
||||
import { problemDiagnosisSeverityDotClass } from "@/features/report/ui/diagnosis/severityDotClass";
|
||||
|
||||
export type ProblemDiagnosisCardProps = {
|
||||
item: DiagnosisItem;
|
||||
index: number;
|
||||
};
|
||||
|
||||
export function ProblemDiagnosisCard({ item, index }: ProblemDiagnosisCardProps) {
|
||||
return (
|
||||
<article
|
||||
className="bg-white/10 backdrop-blur-sm border border-white/10 rounded-2xl p-6 relative overflow-hidden card-shadow animate-fade-in-up"
|
||||
style={{ animationDelay: `${index * 80}ms` }}
|
||||
>
|
||||
<div className="absolute top-4 right-4" aria-hidden>
|
||||
<span className={`block w-3 h-3 rounded-full ${problemDiagnosisSeverityDotClass(item.severity)}`} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-start gap-3 pr-6">
|
||||
<div className="shrink-0 w-8 h-8 rounded-lg bg-white/10 flex items-center justify-center mt-0.5 [&_svg]:block">
|
||||
<AlertCircleIcon width={16} height={16} className="text-lavender-200" aria-hidden />
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<p className="title-18 text-white mb-2 break-keep">{item.category}</p>
|
||||
<p className="body-14 text-lavender-200 leading-relaxed break-keep">{item.detail}</p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { Severity } from "@/types/severity";
|
||||
|
||||
/** 다크 섹션 카드 우측 상단 심각도 점 — `index.css` 시맨틱 dot 토큰 */
|
||||
export function problemDiagnosisSeverityDotClass(severity: Severity): string {
|
||||
const map: Record<Severity, string> = {
|
||||
critical: "bg-[var(--color-status-critical-dot)]",
|
||||
warning: "bg-[var(--color-status-warning-dot)]",
|
||||
good: "bg-[var(--color-status-good-dot)]",
|
||||
excellent: "bg-[var(--color-status-info-dot)]",
|
||||
unknown: "bg-neutral-60",
|
||||
};
|
||||
return map[severity];
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
import ExternalLinkIcon from "@/assets/icons/external-link.svg?react";
|
||||
import EyeIcon from "@/assets/icons/eye.svg?react";
|
||||
import TrendingUpIcon from "@/assets/icons/trending-up.svg?react";
|
||||
import AlertTriangleIcon from "@/assets/report/alert-triangle.svg?react";
|
||||
import CheckCircleIcon from "@/assets/report/check-circle.svg?react";
|
||||
import FacebookMarkIcon from "@/assets/report/facebook-mark.svg?react";
|
||||
import ImageIcon from "@/assets/report/image.svg?react";
|
||||
import Link2Icon from "@/assets/report/link-2.svg?react";
|
||||
import MessageCircleIcon from "@/assets/report/message-circle.svg?react";
|
||||
import type { FacebookPage } from "@/features/report/types/facebookAudit";
|
||||
import { facebookLangBadgeClass } from "@/features/report/ui/facebook/langBadgeClass";
|
||||
import { formatCompactNumber } from "@/lib/formatNumber";
|
||||
import { safeUrl } from "@/lib/safeUrl";
|
||||
|
||||
export type FacebookPageCardProps = {
|
||||
page: FacebookPage;
|
||||
index: number;
|
||||
};
|
||||
|
||||
export function FacebookPageCard({ page, index }: FacebookPageCardProps) {
|
||||
const isKR = page.language === "KR";
|
||||
const isLogoMismatch = page.logo.includes("불일치");
|
||||
const isLowFollowers = page.followers < 500;
|
||||
const lowEngagement = page.engagement?.includes("0~3") ?? false;
|
||||
const domainMismatch = page.linkedDomain?.includes("다름") ?? false;
|
||||
|
||||
return (
|
||||
<article
|
||||
className={`rounded-2xl border p-6 card-shadow animate-fade-in-up ${
|
||||
isKR && isLowFollowers
|
||||
? "bg-[var(--color-status-critical-bg)]/30 border-[var(--color-status-critical-border)]/60"
|
||||
: "bg-white border-neutral-20"
|
||||
}`}
|
||||
style={{ animationDelay: `${index * 100}ms` }}
|
||||
>
|
||||
<div className="flex items-center justify-between gap-2 mb-4 flex-wrap">
|
||||
<div className="flex items-center gap-2 flex-wrap min-w-0">
|
||||
<span
|
||||
className={`label-12 font-medium px-3 py-1 rounded-full break-keep ${facebookLangBadgeClass(page.language)}`}
|
||||
>
|
||||
{page.label}
|
||||
</span>
|
||||
<div className="w-8 h-8 rounded-lg bg-[#1877F2] flex items-center justify-center text-white shrink-0 [&_svg]:block">
|
||||
<FacebookMarkIcon width={16} height={16} aria-hidden />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2 justify-end">
|
||||
{isKR && isLowFollowers ? (
|
||||
<span className="label-12 font-medium px-3 py-1 rounded-full bg-[var(--color-status-critical-bg)] text-[var(--color-status-critical-text)] break-keep">
|
||||
방치 상태
|
||||
</span>
|
||||
) : null}
|
||||
{page.hasWhatsApp ? (
|
||||
<span className="label-12 font-medium px-3 py-1 rounded-full bg-[var(--color-status-good-bg)] text-[var(--color-status-good-text)] break-keep">
|
||||
WhatsApp 연결
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 className="title-18 text-navy-900 mb-1 break-keep">{page.pageName}</h3>
|
||||
<p className="label-12 text-neutral-60 mb-4 break-keep">{page.category}</p>
|
||||
|
||||
<div className="grid grid-cols-3 gap-2 mb-5">
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">팔로워</p>
|
||||
<p
|
||||
className={`title-18 ${
|
||||
isLowFollowers ? "text-[var(--color-status-critical-text)]" : "text-navy-900"
|
||||
}`}
|
||||
>
|
||||
{formatCompactNumber(page.followers)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">리뷰</p>
|
||||
<p
|
||||
className={`title-18 ${
|
||||
page.reviews === 0 ? "text-[var(--color-status-critical-text)]" : "text-navy-900"
|
||||
}`}
|
||||
>
|
||||
{page.reviews}
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">팔로잉</p>
|
||||
<p className="title-18 text-navy-900">{formatCompactNumber(page.following)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-3 mb-5 body-14">
|
||||
<div className="flex items-center justify-between gap-2 py-1 border-b border-neutral-20 last:border-0">
|
||||
<span className="text-neutral-60 flex items-center gap-2 shrink-0 break-keep">
|
||||
<EyeIcon width={13} height={13} className="shrink-0" aria-hidden />
|
||||
최근 게시물
|
||||
</span>
|
||||
<span className="body-14-medium text-navy-900 text-right break-keep">{page.recentPostAge}</span>
|
||||
</div>
|
||||
{page.postFrequency ? (
|
||||
<div className="flex items-center justify-between gap-2 py-1 border-b border-neutral-20 last:border-0">
|
||||
<span className="text-neutral-60 flex items-center gap-2 shrink-0 break-keep">
|
||||
<TrendingUpIcon width={13} height={13} className="shrink-0" aria-hidden />
|
||||
게시 빈도
|
||||
</span>
|
||||
<span className="body-14-medium text-navy-900 text-right break-keep min-w-0">{page.postFrequency}</span>
|
||||
</div>
|
||||
) : null}
|
||||
{page.topContentType ? (
|
||||
<div className="flex items-center justify-between gap-2 py-1 border-b border-neutral-20 last:border-0">
|
||||
<span className="text-neutral-60 flex items-center gap-2 shrink-0 break-keep">
|
||||
<ImageIcon width={13} height={13} className="shrink-0" aria-hidden />
|
||||
콘텐츠 유형
|
||||
</span>
|
||||
<span className="body-14-medium text-navy-900 text-right text-xs max-w-[180px] min-w-0 break-keep">
|
||||
{page.topContentType}
|
||||
</span>
|
||||
</div>
|
||||
) : null}
|
||||
{page.engagement ? (
|
||||
<div className="flex items-center justify-between gap-2 py-1 border-b border-neutral-20 last:border-0">
|
||||
<span className="text-neutral-60 flex items-center gap-2 shrink-0 break-keep">
|
||||
<MessageCircleIcon width={13} height={13} className="shrink-0" aria-hidden />
|
||||
참여율
|
||||
</span>
|
||||
<span
|
||||
className={`body-14-medium text-right text-xs max-w-[180px] min-w-0 break-keep ${
|
||||
lowEngagement ? "text-[var(--color-status-critical-text)]" : "text-navy-900"
|
||||
}`}
|
||||
>
|
||||
{page.engagement}
|
||||
</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={`rounded-xl p-4 mb-4 ${
|
||||
isLogoMismatch
|
||||
? "bg-[var(--color-status-critical-bg)] border border-[var(--color-status-critical-border)]"
|
||||
: "bg-[var(--color-status-good-bg)] border border-[var(--color-status-good-border)]"
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-start gap-2 mb-2">
|
||||
{isLogoMismatch ? (
|
||||
<AlertTriangleIcon
|
||||
width={16}
|
||||
height={16}
|
||||
className="text-[var(--color-status-critical-text)] shrink-0 mt-0.5"
|
||||
aria-hidden
|
||||
/>
|
||||
) : (
|
||||
<CheckCircleIcon
|
||||
width={16}
|
||||
height={16}
|
||||
className="text-[var(--color-status-good-dot)] shrink-0 mt-0.5"
|
||||
aria-hidden
|
||||
/>
|
||||
)}
|
||||
<p
|
||||
className={`body-14-medium break-keep ${
|
||||
isLogoMismatch ? "text-[var(--color-status-critical-text)]" : "text-[var(--color-status-good-text)]"
|
||||
}`}
|
||||
>
|
||||
로고 {page.logo}
|
||||
</p>
|
||||
</div>
|
||||
<p
|
||||
className={`label-12 leading-relaxed ml-6 break-keep ${
|
||||
isLogoMismatch ? "text-[var(--color-status-critical-text)]" : "text-[var(--color-status-good-text)]"
|
||||
}`}
|
||||
>
|
||||
{page.logoDescription}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="rounded-xl bg-neutral-10 p-3 mb-4">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
<Link2Icon width={12} height={12} className="text-neutral-60 shrink-0" aria-hidden />
|
||||
<p className="label-12 text-neutral-60 uppercase tracking-wide break-keep">연결 도메인</p>
|
||||
</div>
|
||||
<p
|
||||
className={`body-14 font-mono break-keep ${
|
||||
domainMismatch ? "text-[var(--color-status-warning-text)]" : "text-neutral-70"
|
||||
}`}
|
||||
>
|
||||
{page.linkedDomain || page.link}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="rounded-xl bg-neutral-10 p-3 mb-4">
|
||||
<p className="label-12 text-neutral-60 uppercase tracking-wide mb-1 break-keep">Bio</p>
|
||||
<p className="body-14 text-neutral-70 italic break-keep">"{page.bio}"</p>
|
||||
</div>
|
||||
|
||||
<a
|
||||
href={safeUrl(page.url)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 label-12 text-violet-700 hover:underline break-all cursor-pointer"
|
||||
>
|
||||
<ExternalLinkIcon aria-hidden />
|
||||
<span className="break-keep">{page.url}</span>
|
||||
</a>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { FacebookPage } from "@/features/report/types/facebookAudit";
|
||||
|
||||
export function facebookLangBadgeClass(language: FacebookPage["language"]) {
|
||||
return language === "KR"
|
||||
? "bg-neutral-10 text-neutral-80"
|
||||
: "bg-[var(--color-status-info-bg)] text-[var(--color-status-info-text)]";
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ReportChannelsSection } from "@/features/report/ui/ReportChannelsSection";
|
||||
import { ReportClinicSection } from "@/features/report/ui/ReportClinicSection";
|
||||
import { ReportDiagnosisSection } from "@/features/report/ui/ReportDiagnosisSection";
|
||||
import { ReportFacebookSection } from "@/features/report/ui/ReportFacebookSection";
|
||||
import { ReportInstagramSection } from "@/features/report/ui/ReportInstagramSection";
|
||||
import { ReportKpiSection } from "@/features/report/ui/ReportKpiSection";
|
||||
import { ReportOtherChannelsSection } from "@/features/report/ui/ReportOtherChannelsSection";
|
||||
import { ReportOverviewSection } from "@/features/report/ui/ReportOverviewSection";
|
||||
import { ReportRoadmapSection } from "@/features/report/ui/ReportRoadmapSection";
|
||||
import { ReportTransformationSection } from "@/features/report/ui/ReportTransformationSection";
|
||||
import { ReportYouTubeSection } from "@/features/report/ui/ReportYouTubeSection";
|
||||
|
||||
export {
|
||||
ReportChannelsSection,
|
||||
ReportClinicSection,
|
||||
ReportDiagnosisSection,
|
||||
ReportFacebookSection,
|
||||
ReportInstagramSection,
|
||||
ReportKpiSection,
|
||||
ReportOtherChannelsSection,
|
||||
ReportOverviewSection,
|
||||
ReportRoadmapSection,
|
||||
ReportTransformationSection,
|
||||
ReportYouTubeSection,
|
||||
};
|
||||
@@ -0,0 +1,103 @@
|
||||
import AlertCircleIcon from "@/assets/icons/alert-circle.svg?react";
|
||||
import ChannelInstagramIcon from "@/assets/icons/channel-instagram.svg?react";
|
||||
import ExternalLinkIcon from "@/assets/icons/external-link.svg?react";
|
||||
import { TagChipList } from "@/components/chip/TagChipList";
|
||||
import type { InstagramAccount } from "@/features/report/types/instagramAudit";
|
||||
import { instagramLangBadgeClass } from "@/features/report/ui/instagram/langBadgeClass";
|
||||
import { formatCompactNumber } from "@/lib/formatNumber";
|
||||
import { safeUrl } from "@/lib/safeUrl";
|
||||
|
||||
export type InstagramAccountCardProps = {
|
||||
account: InstagramAccount;
|
||||
index: number;
|
||||
};
|
||||
|
||||
export function InstagramAccountCard({ account, index }: InstagramAccountCardProps) {
|
||||
return (
|
||||
<article
|
||||
className="rounded-2xl bg-white border border-neutral-20 p-6 card-shadow animate-fade-in-up"
|
||||
style={{ animationDelay: `${index * 100}ms` }}
|
||||
>
|
||||
<div className="flex items-center gap-2 mb-4 flex-wrap">
|
||||
<span
|
||||
className={`label-12 font-medium px-3 py-1 rounded-full break-keep ${instagramLangBadgeClass(account.language)}`}
|
||||
>
|
||||
{account.label}
|
||||
</span>
|
||||
<div className="w-8 h-8 rounded-lg bg-gradient-to-br from-violet-500 to-marketing-blush flex items-center justify-center text-white [&_svg]:block">
|
||||
<ChannelInstagramIcon width={16} height={16} aria-hidden />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 className="title-18 text-navy-900 mb-1 break-keep">{account.handle}</h3>
|
||||
<p className="label-12 text-neutral-60 mb-4 break-keep">{account.category}</p>
|
||||
|
||||
<a
|
||||
href={safeUrl(account.profileLink)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 label-12 text-violet-700 hover:underline mb-4 break-all cursor-pointer"
|
||||
>
|
||||
<ExternalLinkIcon aria-hidden />
|
||||
<span className="break-keep">{account.profileLink}</span>
|
||||
</a>
|
||||
|
||||
<div className="grid grid-cols-3 gap-2 mb-4">
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">게시물</p>
|
||||
<p className="title-18 text-navy-900">{formatCompactNumber(account.posts)}</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">팔로워</p>
|
||||
<p className="title-18 text-navy-900">{formatCompactNumber(account.followers)}</p>
|
||||
</div>
|
||||
<div className="rounded-xl bg-neutral-10 p-3 text-center">
|
||||
<p className="label-12 text-neutral-60 break-keep">팔로잉</p>
|
||||
<p className="title-18 text-navy-900">{formatCompactNumber(account.following)}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2 mb-4">
|
||||
<div className="flex items-center justify-between gap-2 body-14">
|
||||
<span className="text-neutral-60 shrink-0 break-keep">콘텐츠 포맷</span>
|
||||
<span className="body-14-medium text-navy-900 text-right break-keep min-w-0">{account.contentFormat}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2 body-14">
|
||||
<span className="text-neutral-60 shrink-0 break-keep">릴스 수</span>
|
||||
<span
|
||||
className={
|
||||
account.reelsCount === 0
|
||||
? "body-14-medium text-[var(--color-status-critical-text)] inline-flex items-center gap-1 break-keep"
|
||||
: "body-14-medium text-navy-900 break-keep"
|
||||
}
|
||||
>
|
||||
{account.reelsCount === 0 ? (
|
||||
<>
|
||||
<AlertCircleIcon className="text-[var(--color-status-critical-dot)] shrink-0" aria-hidden />
|
||||
0 (미운영)
|
||||
</>
|
||||
) : (
|
||||
account.reelsCount
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p className="label-12 text-neutral-60 mb-1 break-keep">프로필 이미지</p>
|
||||
<p className="body-14 text-neutral-70 mb-4 break-keep">{account.profilePhoto}</p>
|
||||
|
||||
{account.highlights.length > 0 ? (
|
||||
<div className="mb-4">
|
||||
<TagChipList tags={account.highlights} title="하이라이트" entranceDelayClass="" />
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{account.bio ? (
|
||||
<div className="rounded-xl bg-neutral-10 p-3">
|
||||
<p className="label-12 text-neutral-60 mb-1 break-keep">Bio</p>
|
||||
<p className="body-14 text-neutral-70 whitespace-pre-line break-keep">{account.bio}</p>
|
||||
</div>
|
||||
) : null}
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { InstagramAccount } from "@/features/report/types/instagramAudit";
|
||||
|
||||
export function instagramLangBadgeClass(language: InstagramAccount["language"]) {
|
||||
return language === "KR"
|
||||
? "bg-neutral-10 text-neutral-80"
|
||||
: "bg-[var(--color-status-info-bg)] text-[var(--color-status-info-text)]";
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import type { KpiMetric } from "@/features/report/types/kpiDashboard";
|
||||
import { isKpiCurrentValueNegative } from "@/features/report/ui/kpi/kpiCurrentValueNegative";
|
||||
|
||||
export type KpiMetricsTableProps = {
|
||||
metrics: KpiMetric[];
|
||||
};
|
||||
|
||||
export function KpiMetricsTable({ metrics }: KpiMetricsTableProps) {
|
||||
if (metrics.length === 0) {
|
||||
return <p className="body-14 text-neutral-60 break-keep">등록된 KPI가 없습니다.</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="rounded-2xl overflow-hidden border border-neutral-20 mb-10 card-shadow animate-fade-in-up">
|
||||
<div className="overflow-x-auto">
|
||||
<div className="min-w-[720px]">
|
||||
<div className="grid grid-cols-4 bg-navy-900 text-white">
|
||||
<div className="px-6 py-4 body-14-medium break-keep">Metric</div>
|
||||
<div className="px-6 py-4 body-14-medium break-keep">Current</div>
|
||||
<div className="px-6 py-4 body-14-medium break-keep">3-Month Target</div>
|
||||
<div className="px-6 py-4 body-14-medium break-keep">12-Month Target</div>
|
||||
</div>
|
||||
|
||||
{metrics.map((row, i) => (
|
||||
<div
|
||||
key={row.metric}
|
||||
className={`grid grid-cols-4 animate-fade-in-up ${i % 2 === 0 ? "bg-white" : "bg-neutral-10"}`}
|
||||
style={{ animationDelay: `${i * 40}ms` }}
|
||||
>
|
||||
<div className="px-6 py-4 body-14-medium text-navy-900 break-keep min-w-0">{row.metric}</div>
|
||||
<div
|
||||
className={`px-6 py-4 body-14 font-semibold break-keep min-w-0 ${
|
||||
isKpiCurrentValueNegative(row.current)
|
||||
? "text-[var(--color-status-critical-text)]"
|
||||
: "text-navy-900"
|
||||
}`}
|
||||
>
|
||||
{row.current}
|
||||
</div>
|
||||
<div className="px-6 py-4 body-14-medium text-[var(--color-status-good-text)] break-keep min-w-0">
|
||||
{row.target3Month}
|
||||
</div>
|
||||
<div className="px-6 py-4 body-14-medium text-[var(--color-status-good-text)] break-keep min-w-0">
|
||||
{row.target12Month}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import ArrowUpRightIcon from "@/assets/report/arrow-up-right.svg?react";
|
||||
import DownloadIcon from "@/assets/report/download.svg?react";
|
||||
import TrendingUpIcon from "@/assets/icons/trending-up.svg?react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export function KpiTransformationCtaCard() {
|
||||
return (
|
||||
<div
|
||||
className="rounded-2xl bg-gradient-to-r from-marketing-cream via-marketing-lilac to-marketing-ice p-8 md:p-12 text-center relative overflow-hidden animate-fade-in-up animation-delay-300"
|
||||
data-cta-card
|
||||
>
|
||||
<div className="relative">
|
||||
<div className="w-14 h-14 rounded-2xl bg-navy-950/10 flex items-center justify-center mx-auto mb-6 [&_svg]:block">
|
||||
<TrendingUpIcon width={28} height={28} className="text-navy-950" aria-hidden />
|
||||
</div>
|
||||
<h3 className="font-serif text-2xl md:text-3xl font-bold text-navy-950 mb-3 break-keep">
|
||||
Start Your Transformation
|
||||
</h3>
|
||||
<p className="body-16 text-navy-950/60 mb-8 max-w-xl mx-auto break-keep">
|
||||
INFINITH와 함께 데이터 기반 마케팅 전환을 시작하세요. 90일 안에 측정 가능한 성과를 만들어 드립니다.
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row items-center justify-center gap-4">
|
||||
<Link
|
||||
to="/"
|
||||
className="inline-flex items-center gap-2 btn-primary font-semibold px-8 py-4 rounded-full hover:shadow-xl transition-all"
|
||||
>
|
||||
마케팅 기획
|
||||
<ArrowUpRightIcon width={18} height={18} aria-hidden />
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
className="inline-flex items-center gap-2 bg-white border border-neutral-20 text-navy-950 font-semibold px-8 py-4 rounded-full hover:bg-neutral-10 shadow-sm hover:shadow-md transition-all cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed break-keep"
|
||||
>
|
||||
<DownloadIcon width={18} height={18} aria-hidden />
|
||||
리포트 다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/** Current 컬럼 강조 — 저성과·미측정 값 */
|
||||
export function isKpiCurrentValueNegative(value: string): boolean {
|
||||
const lower = value.toLowerCase();
|
||||
return (
|
||||
lower === "0" ||
|
||||
lower.includes("없음") ||
|
||||
lower.includes("불가") ||
|
||||
lower === "n/a" ||
|
||||
lower.includes("측정 불가")
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { OtherChannelRow } from "@/components/channel/OtherChannelRow";
|
||||
import type { OtherChannel } from "@/types/otherChannels";
|
||||
|
||||
export type OtherChannelsListProps = {
|
||||
channels: OtherChannel[];
|
||||
};
|
||||
|
||||
export function OtherChannelsList({ channels }: OtherChannelsListProps) {
|
||||
if (channels.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm overflow-hidden mb-8 card-shadow animate-fade-in-up">
|
||||
<div className="px-6 py-4 border-b border-neutral-20">
|
||||
<h3 className="font-serif headline-24 text-navy-900 break-keep">기타 채널 현황</h3>
|
||||
</div>
|
||||
<div className="divide-y divide-neutral-20">
|
||||
{channels.map((ch, i) => (
|
||||
<OtherChannelRow
|
||||
key={ch.name}
|
||||
name={ch.name}
|
||||
details={ch.details}
|
||||
status={ch.status}
|
||||
url={ch.url}
|
||||
animationDelayMs={i * 50}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import AlertCircleIcon from "@/assets/icons/alert-circle.svg?react";
|
||||
import CheckCircleIcon from "@/assets/report/check-circle.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
import { PixelInstallCard } from "@/components/card/PixelInstallCard";
|
||||
import type { WebsiteAudit } from "@/types/otherChannels";
|
||||
|
||||
export type WebsiteTechAuditBlockProps = {
|
||||
website: WebsiteAudit;
|
||||
};
|
||||
|
||||
export function WebsiteTechAuditBlock({ website }: WebsiteTechAuditBlockProps) {
|
||||
return (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up animation-delay-200">
|
||||
<div className="flex items-center gap-2 mb-6">
|
||||
<GlobeIcon width={20} height={20} className="text-violet-700 shrink-0 [&_svg]:block" aria-hidden />
|
||||
<h3 className="font-serif headline-24 text-navy-900 break-keep">웹사이트 기술 진단</h3>
|
||||
</div>
|
||||
|
||||
<div className="rounded-xl bg-neutral-10 p-4 mb-6">
|
||||
<p className="body-14-medium text-navy-900 mb-2 break-keep">
|
||||
기본 도메인: {website.primaryDomain}
|
||||
</p>
|
||||
{website.additionalDomains.length > 0 ? (
|
||||
<div className="mt-2 space-y-1">
|
||||
{website.additionalDomains.map((d) => (
|
||||
<p key={d.domain} className="body-14 text-neutral-70 break-keep">
|
||||
{d.domain} — <span className="text-neutral-60">{d.purpose}</span>
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
<p className="body-14 text-neutral-60 mt-2 break-keep">
|
||||
주요 CTA: <span className="body-14-medium text-navy-900">{website.mainCTA}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="mb-6">
|
||||
<p className="body-14-medium text-neutral-80 mb-3 break-keep">트래킹 픽셀 설치 현황</p>
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-3">
|
||||
{website.trackingPixels.map((pixel) => (
|
||||
<PixelInstallCard
|
||||
key={pixel.name}
|
||||
name={pixel.name}
|
||||
installed={pixel.installed}
|
||||
details={pixel.details}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!website.snsLinksOnSite ? (
|
||||
<div className="rounded-xl bg-[var(--color-status-critical-bg)] border border-[var(--color-status-critical-border)] p-4 flex items-start gap-3 animate-fade-in-up animation-delay-300">
|
||||
<AlertCircleIcon
|
||||
width={20}
|
||||
height={20}
|
||||
className="text-[var(--color-status-critical-text)] shrink-0 mt-0.5"
|
||||
aria-hidden
|
||||
/>
|
||||
<div className="min-w-0">
|
||||
<p className="body-14-medium text-[var(--color-status-critical-text)] break-keep">
|
||||
홈페이지에 SNS 링크 없음
|
||||
</p>
|
||||
<p className="body-14 text-[var(--color-status-critical-text)] mt-1 break-keep">
|
||||
웹사이트에서 소셜 미디어 채널로의 연결이 없습니다. 방문자가 SNS를 통해 브랜드와 연결할 수 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="rounded-xl bg-[var(--color-status-good-bg)] border border-[var(--color-status-good-border)] p-4 flex items-center gap-3">
|
||||
<CheckCircleIcon width={20} height={20} className="text-[var(--color-status-good-dot)] shrink-0" aria-hidden />
|
||||
<p className="body-14-medium text-[var(--color-status-good-text)] break-keep">
|
||||
홈페이지에 SNS 링크 연결됨
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
export function OverviewHeroBlobs() {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="absolute top-10 left-10 w-72 h-72 rounded-full bg-lavender-300/30 blur-3xl animate-blob pointer-events-none"
|
||||
aria-hidden
|
||||
/>
|
||||
<div
|
||||
className="absolute bottom-10 right-10 w-96 h-96 rounded-full bg-marketing-blush/30 blur-3xl animate-blob animation-delay-2000 pointer-events-none"
|
||||
aria-hidden
|
||||
/>
|
||||
<div
|
||||
className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-80 rounded-full bg-violet-500/10 blur-3xl animate-blob animation-delay-4000 pointer-events-none"
|
||||
aria-hidden
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { ReportOverviewData } from "@/features/report/types/reportOverview";
|
||||
import { OverviewMetaChips } from "@/features/report/ui/overview/OverviewMetaChips";
|
||||
|
||||
export type OverviewHeroColumnProps = {
|
||||
data: ReportOverviewData;
|
||||
};
|
||||
|
||||
export function OverviewHeroColumn({ data }: OverviewHeroColumnProps) {
|
||||
const { clinicName, clinicNameEn, date, targetUrl, location, logoImage } = data;
|
||||
|
||||
return (
|
||||
<div className="flex-1 text-center md:text-left animate-fade-in-up">
|
||||
<p className="font-serif text-3xl md:text-4xl font-normal text-violet-700 mb-4 tracking-wide animate-fade-in-up animation-delay-100 break-keep">
|
||||
Marketing Intelligence Report
|
||||
</p>
|
||||
|
||||
{logoImage ? (
|
||||
<div className="mb-4 animate-fade-in-up animation-delay-100">
|
||||
<img
|
||||
src={logoImage}
|
||||
alt={`${clinicName} 로고`}
|
||||
className="h-16 md:h-20 w-auto object-contain md:mx-0 mx-auto"
|
||||
onError={(e) => {
|
||||
(e.target as HTMLImageElement).style.display = "none";
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<h1 className="font-serif text-4xl md:text-5xl font-bold text-navy-900 mb-3 animate-fade-in-up animation-delay-200 break-keep">
|
||||
{clinicName}
|
||||
</h1>
|
||||
|
||||
<p className="body-18 text-neutral-70 mb-8 animate-fade-in-up animation-delay-200 break-keep">{clinicNameEn}</p>
|
||||
|
||||
<OverviewMetaChips date={date} targetUrl={targetUrl} location={location} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import CalendarIcon from "@/assets/report/calendar.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
import MapPinIcon from "@/assets/report/map-pin.svg?react";
|
||||
import { OVERVIEW_META_CHIP_CLASS } from "@/features/report/ui/overview/overviewSectionStyles";
|
||||
|
||||
export type OverviewMetaChipsProps = {
|
||||
date: string;
|
||||
targetUrl: string;
|
||||
location: string;
|
||||
};
|
||||
|
||||
export function OverviewMetaChips({ date, targetUrl, location }: OverviewMetaChipsProps) {
|
||||
return (
|
||||
<div className="flex flex-wrap gap-3 justify-center md:justify-start animate-fade-in-up animation-delay-300">
|
||||
<span className={OVERVIEW_META_CHIP_CLASS}>
|
||||
<CalendarIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
|
||||
<span className="break-keep">{date}</span>
|
||||
</span>
|
||||
<span className={OVERVIEW_META_CHIP_CLASS}>
|
||||
<GlobeIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
|
||||
<span className="truncate max-w-[min(100%,280px)]" title={targetUrl}>
|
||||
{targetUrl}
|
||||
</span>
|
||||
</span>
|
||||
<span className={OVERVIEW_META_CHIP_CLASS}>
|
||||
<MapPinIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
|
||||
<span className="break-keep text-left">{location}</span>
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { ScoreRing } from "@/components/rating/ScoreRing";
|
||||
|
||||
export type OverviewScorePanelProps = {
|
||||
overallScore: number;
|
||||
};
|
||||
|
||||
export function OverviewScorePanel({ overallScore }: OverviewScorePanelProps) {
|
||||
return (
|
||||
<div className="shrink-0 animate-fade-in-scale animation-delay-200">
|
||||
<div className="bg-white/60 backdrop-blur-sm border border-white/40 rounded-3xl p-8 shadow-lg">
|
||||
<p className="label-12 text-neutral-60 uppercase tracking-wide text-center mb-4 break-keep">
|
||||
Overall Score
|
||||
</p>
|
||||
<ScoreRing score={overallScore} size={160} label="종합 점수" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const OVERVIEW_SECTION_BG_CLASS =
|
||||
"bg-[radial-gradient(ellipse_at_top_left,var(--color-hero-wash-start),transparent_50%),radial-gradient(ellipse_at_bottom_right,var(--color-marketing-blush),transparent_50%),radial-gradient(ellipse_at_center,var(--color-lavender-100),transparent_60%)]";
|
||||
|
||||
export const OVERVIEW_META_CHIP_CLASS =
|
||||
"inline-flex items-center gap-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 px-3 py-1 body-14-medium text-neutral-80 max-w-full";
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { RoadmapMonth } from "@/features/report/types/roadmap";
|
||||
import { RoadmapTaskItem } from "@/features/report/ui/roadmap/RoadmapTaskItem";
|
||||
|
||||
export type RoadmapMonthCardProps = {
|
||||
month: RoadmapMonth;
|
||||
index: number;
|
||||
};
|
||||
|
||||
export function RoadmapMonthCard({ month, index }: RoadmapMonthCardProps) {
|
||||
const baseDelay = index * 150;
|
||||
|
||||
return (
|
||||
<article
|
||||
className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up"
|
||||
style={{ animationDelay: `${baseDelay}ms` }}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-4 min-w-0">
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-r from-violet-700 to-navy-950 text-white flex items-center justify-center label-12-semibold shrink-0">
|
||||
{month.month}
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<h3 className="font-serif headline-24 text-navy-900 break-keep">{month.title}</h3>
|
||||
<p className="body-14 text-neutral-60 break-keep">{month.subtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-3">
|
||||
{month.tasks.map((task, j) => (
|
||||
<RoadmapTaskItem key={`${task.task}-${j}`} task={task} animationDelayMs={baseDelay + j * 50} />
|
||||
))}
|
||||
</ul>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { RoadmapMonth } from "@/features/report/types/roadmap";
|
||||
import { RoadmapMonthCard } from "@/features/report/ui/roadmap/RoadmapMonthCard";
|
||||
|
||||
export type RoadmapMonthsGridProps = {
|
||||
months: RoadmapMonth[];
|
||||
};
|
||||
|
||||
export function RoadmapMonthsGrid({ months }: RoadmapMonthsGridProps) {
|
||||
if (months.length === 0) {
|
||||
return <p className="body-14 text-neutral-60 break-keep">등록된 로드맵이 없습니다.</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
{months.map((m, i) => (
|
||||
<RoadmapMonthCard key={m.month} month={m} index={i} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import CheckCircleIcon from "@/assets/report/check-circle.svg?react";
|
||||
import type { RoadmapTask } from "@/features/report/types/roadmap";
|
||||
|
||||
export type RoadmapTaskItemProps = {
|
||||
task: RoadmapTask;
|
||||
animationDelayMs: number;
|
||||
};
|
||||
|
||||
export function RoadmapTaskItem({ task, animationDelayMs }: RoadmapTaskItemProps) {
|
||||
return (
|
||||
<li
|
||||
className="flex items-start gap-3 animate-fade-in-left"
|
||||
style={{ animationDelay: `${animationDelayMs}ms` }}
|
||||
>
|
||||
{task.completed ? (
|
||||
<CheckCircleIcon
|
||||
width={18}
|
||||
height={18}
|
||||
className="text-[var(--color-status-good-dot)] shrink-0 mt-0.5"
|
||||
aria-hidden
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
className="w-[18px] h-[18px] rounded-full border-2 border-neutral-30 shrink-0 mt-0.5"
|
||||
aria-hidden
|
||||
/>
|
||||
)}
|
||||
<span
|
||||
className={`body-14 break-keep ${
|
||||
task.completed ? "text-neutral-60 line-through" : "text-neutral-80"
|
||||
}`}
|
||||
>
|
||||
{task.task}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { NewChannelProposal } from "@/features/report/types/transformationProposal";
|
||||
import { newChannelPriorityClass } from "@/features/report/ui/transformation/newChannelPriorityClass";
|
||||
|
||||
export type NewChannelProposalsTableProps = {
|
||||
rows: NewChannelProposal[];
|
||||
};
|
||||
|
||||
export function NewChannelProposalsTable({ rows }: NewChannelProposalsTableProps) {
|
||||
if (rows.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm overflow-hidden card-shadow animate-fade-in-up">
|
||||
<table className="w-full text-left">
|
||||
<thead>
|
||||
<tr className="bg-neutral-10 border-b border-neutral-20">
|
||||
<th className="px-6 py-3 label-12-semibold text-neutral-60 uppercase tracking-wide break-keep">
|
||||
채널
|
||||
</th>
|
||||
<th className="px-6 py-3 label-12-semibold text-neutral-60 uppercase tracking-wide break-keep">
|
||||
우선순위
|
||||
</th>
|
||||
<th className="px-6 py-3 label-12-semibold text-neutral-60 uppercase tracking-wide break-keep">
|
||||
근거
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-neutral-20">
|
||||
{rows.map((ch, i) => (
|
||||
<tr
|
||||
key={ch.channel}
|
||||
className="animate-fade-in-up"
|
||||
style={{ animationDelay: `${i * 50}ms` }}
|
||||
>
|
||||
<td className="px-6 py-4 body-14-medium text-navy-900 break-keep">{ch.channel}</td>
|
||||
<td className="px-6 py-4">
|
||||
<span
|
||||
className={`inline-flex items-center rounded-full label-12 font-medium px-3 py-1 border break-keep ${newChannelPriorityClass(ch.priority)}`}
|
||||
>
|
||||
{ch.priority}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-6 py-4 body-14 text-neutral-70 break-keep">{ch.rationale}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import ArrowUpRightIcon from "@/assets/report/arrow-up-right.svg?react";
|
||||
import type { PlatformStrategy } from "@/features/report/types/transformationProposal";
|
||||
import { platformStrategyIconNode } from "@/features/report/ui/transformation/platformStrategyIcon";
|
||||
|
||||
export type PlatformStrategyCardProps = {
|
||||
strategy: PlatformStrategy;
|
||||
index: number;
|
||||
};
|
||||
|
||||
export function PlatformStrategyCard({ strategy, index }: PlatformStrategyCardProps) {
|
||||
return (
|
||||
<article
|
||||
className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up"
|
||||
style={{ animationDelay: `${index * 100}ms` }}
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-4 min-w-0">
|
||||
<div className="w-10 h-10 rounded-xl bg-gradient-to-br from-violet-500/10 to-violet-700/10 flex items-center justify-center shrink-0 [&_svg]:block">
|
||||
{platformStrategyIconNode(strategy.icon)}
|
||||
</div>
|
||||
<h4 className="title-16 text-navy-900 break-keep">{strategy.platform}</h4>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center gap-3 mb-4 body-14">
|
||||
<span className="rounded-lg bg-[var(--color-status-critical-bg)] px-3 py-2 text-[var(--color-status-critical-text)] body-14-medium break-keep">
|
||||
{strategy.currentMetric}
|
||||
</span>
|
||||
<ArrowUpRightIcon width={16} height={16} className="text-neutral-60 shrink-0" aria-hidden />
|
||||
<span className="rounded-lg bg-[var(--color-status-good-bg)] px-3 py-2 text-[var(--color-status-good-text)] body-14-medium break-keep">
|
||||
{strategy.targetMetric}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-2">
|
||||
{strategy.strategies.map((s, i) => (
|
||||
<li key={`${s.strategy}-${i}`} className="flex items-start gap-2">
|
||||
<span className="shrink-0 w-2 h-2 rounded-full bg-violet-500 mt-2" aria-hidden />
|
||||
<div className="min-w-0">
|
||||
<p className="body-14-medium text-navy-900 break-keep">{s.strategy}</p>
|
||||
<p className="label-12 text-neutral-60 break-keep">{s.detail}</p>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
import { useState } from "react";
|
||||
import { ComparisonRow } from "@/components/compare/ComparisonRow";
|
||||
import type { TransformationProposal } from "@/features/report/types/transformationProposal";
|
||||
import { NewChannelProposalsTable } from "@/features/report/ui/transformation/NewChannelProposalsTable";
|
||||
import { PlatformStrategyCard } from "@/features/report/ui/transformation/PlatformStrategyCard";
|
||||
import {
|
||||
TRANSFORMATION_TABS,
|
||||
type TransformationTabKey,
|
||||
} from "@/features/report/ui/transformation/transformationTabs";
|
||||
|
||||
export type TransformationTabbedViewProps = {
|
||||
data: TransformationProposal;
|
||||
};
|
||||
|
||||
export function TransformationTabbedView({ data }: TransformationTabbedViewProps) {
|
||||
const [activeTab, setActiveTab] = useState<TransformationTabKey>("brand");
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-wrap gap-2 mb-8" role="tablist" aria-label="전환 제안 탭">
|
||||
{TRANSFORMATION_TABS.map((tab) => {
|
||||
const isActive = activeTab === tab.key;
|
||||
return (
|
||||
<button
|
||||
key={tab.key}
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={isActive}
|
||||
title={tab.labelKr}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
className={`rounded-full px-4 py-2 label-12 font-medium transition-all break-keep cursor-pointer ${
|
||||
isActive
|
||||
? "btn-primary shadow-lg"
|
||||
: "bg-white border border-neutral-20 text-neutral-70 hover:bg-neutral-10"
|
||||
}`}
|
||||
>
|
||||
{tab.label}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{activeTab === "brand" ? (
|
||||
<div
|
||||
className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up"
|
||||
role="tabpanel"
|
||||
>
|
||||
<h3 className="font-serif headline-24 text-navy-900 mb-4 break-keep">브랜드 아이덴티티</h3>
|
||||
{data.brandIdentity.map((item, i) => (
|
||||
<ComparisonRow key={`${item.area}-${i}`} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{activeTab === "content" ? (
|
||||
<div
|
||||
className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up"
|
||||
role="tabpanel"
|
||||
>
|
||||
<h3 className="font-serif headline-24 text-navy-900 mb-4 break-keep">콘텐츠 전략</h3>
|
||||
{data.contentStrategy.map((item, i) => (
|
||||
<ComparisonRow key={`${item.area}-${i}`} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{activeTab === "platform" ? (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6" role="tabpanel">
|
||||
{data.platformStrategies.map((strategy, i) => (
|
||||
<PlatformStrategyCard key={strategy.platform} strategy={strategy} index={i} />
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{activeTab === "website" ? (
|
||||
<div
|
||||
className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 card-shadow animate-fade-in-up"
|
||||
role="tabpanel"
|
||||
>
|
||||
<h3 className="font-serif headline-24 text-navy-900 mb-4 break-keep">웹사이트 개선</h3>
|
||||
{data.websiteImprovements.map((item, i) => (
|
||||
<ComparisonRow key={`${item.area}-${i}`} area={item.area} asIs={item.asIs} toBe={item.toBe} />
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{activeTab === "newChannel" ? (
|
||||
<div role="tabpanel">
|
||||
<NewChannelProposalsTable rows={data.newChannelProposals} />
|
||||
</div>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/** P0·P1·한글 우선순위 등 → 배지용 Tailwind 클래스 */
|
||||
export function newChannelPriorityClass(priority: string): string {
|
||||
const p = priority.trim().toLowerCase();
|
||||
if (p === "p0" || p === "높음" || p === "high")
|
||||
return "bg-[var(--color-status-critical-bg)] text-[var(--color-status-critical-text)] border-[var(--color-status-critical-border)]";
|
||||
if (p === "p1" || p === "중간" || p === "medium")
|
||||
return "bg-[var(--color-status-warning-bg)] text-[var(--color-status-warning-text)] border-[var(--color-status-warning-border)]";
|
||||
if (p === "p2" || p === "낮음" || p === "low")
|
||||
return "bg-[var(--color-status-good-bg)] text-[var(--color-status-good-text)] border-[var(--color-status-good-border)]";
|
||||
return "bg-neutral-10 text-neutral-80 border-neutral-20";
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { ReactNode } from "react";
|
||||
import ChannelFacebookIcon from "@/assets/icons/channel-facebook.svg?react";
|
||||
import ChannelInstagramIcon from "@/assets/icons/channel-instagram.svg?react";
|
||||
import ChannelSearchIcon from "@/assets/icons/channel-search.svg?react";
|
||||
import ChannelYoutubeIcon from "@/assets/icons/channel-youtube.svg?react";
|
||||
import StarIcon from "@/assets/icons/star.svg?react";
|
||||
import GlobeIcon from "@/assets/report/globe.svg?react";
|
||||
|
||||
const size = 20;
|
||||
|
||||
export function platformStrategyIconNode(iconKey: string): ReactNode {
|
||||
const k = iconKey.toLowerCase();
|
||||
switch (k) {
|
||||
case "youtube":
|
||||
return <ChannelYoutubeIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
case "instagram":
|
||||
return <ChannelInstagramIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
case "facebook":
|
||||
return <ChannelFacebookIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
case "naver":
|
||||
return <ChannelSearchIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
case "tiktok":
|
||||
return <StarIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
case "website":
|
||||
case "blog":
|
||||
default:
|
||||
return <GlobeIcon width={size} height={size} className="text-violet-500" aria-hidden />;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export const TRANSFORMATION_TABS = [
|
||||
{ key: "brand", label: "Brand Identity", labelKr: "브랜드 아이덴티티" },
|
||||
{ key: "content", label: "Content Strategy", labelKr: "콘텐츠 전략" },
|
||||
{ key: "platform", label: "Platform Strategies", labelKr: "플랫폼 전략" },
|
||||
{ key: "website", label: "Website", labelKr: "웹사이트 개선" },
|
||||
{ key: "newChannel", label: "New Channels", labelKr: "신규 채널" },
|
||||
] as const;
|
||||
|
||||
export type TransformationTabKey = (typeof TRANSFORMATION_TABS)[number]["key"];
|
||||
@@ -0,0 +1,47 @@
|
||||
import ChannelYoutubeIcon from "@/assets/icons/channel-youtube.svg?react";
|
||||
import ExternalLinkIcon from "@/assets/icons/external-link.svg?react";
|
||||
import type { YouTubeAudit } from "@/features/report/types/youtubeAudit";
|
||||
import { safeUrl } from "@/lib/safeUrl";
|
||||
|
||||
export type YouTubeChannelInfoCardProps = {
|
||||
data: YouTubeAudit;
|
||||
};
|
||||
|
||||
export function YouTubeChannelInfoCard({ data }: YouTubeChannelInfoCardProps) {
|
||||
return (
|
||||
<div className="rounded-2xl bg-white border border-neutral-20 shadow-sm p-6 mb-8 animate-fade-in-up animation-delay-100">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-xl bg-[var(--color-status-critical-bg)] flex items-center justify-center text-[var(--color-status-critical-text)] [&_svg]:block">
|
||||
<ChannelYoutubeIcon width={20} height={20} aria-hidden />
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<p className="title-18 text-navy-900 break-keep">{data.channelName}</p>
|
||||
<p className="body-14 text-neutral-60 break-keep">{data.handle}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="body-14 text-neutral-70 mb-4 whitespace-pre-line break-keep">{data.channelDescription}</p>
|
||||
<div className="flex flex-wrap gap-3 body-14 text-neutral-60">
|
||||
<span className="break-keep">개설일: {data.channelCreatedDate}</span>
|
||||
<span className="break-keep">평균 영상 길이: {data.avgVideoLength}</span>
|
||||
<span className="break-keep">업로드 빈도: {data.uploadFrequency}</span>
|
||||
</div>
|
||||
|
||||
{data.linkedUrls.length > 0 ? (
|
||||
<div className="mt-4 flex flex-wrap gap-2">
|
||||
{data.linkedUrls.map((link) => (
|
||||
<a
|
||||
key={link.url}
|
||||
href={safeUrl(link.url)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1 label-12 text-violet-700 hover:underline break-keep cursor-pointer"
|
||||
>
|
||||
<ExternalLinkIcon aria-hidden />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import EyeIcon from "@/assets/icons/eye.svg?react";
|
||||
import TrendingUpIcon from "@/assets/icons/trending-up.svg?react";
|
||||
import VideoIcon from "@/assets/icons/video.svg?react";
|
||||
import UsersIcon from "@/assets/icons/users.svg?react";
|
||||
import { MetricCard } from "@/components/card/MetricCard";
|
||||
import type { YouTubeAudit } from "@/features/report/types/youtubeAudit";
|
||||
import { formatCompactNumber } from "@/lib/formatNumber";
|
||||
|
||||
export type YouTubeMetricsGridProps = {
|
||||
data: YouTubeAudit;
|
||||
};
|
||||
|
||||
export function YouTubeMetricsGrid({ data }: YouTubeMetricsGridProps) {
|
||||
const growth = data.weeklyViewGrowth;
|
||||
const trend = growth.percentage > 0 ? "up" : growth.percentage < 0 ? "down" : "neutral";
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
|
||||
<MetricCard
|
||||
label="구독자"
|
||||
value={formatCompactNumber(data.subscribers)}
|
||||
icon={<UsersIcon width={20} height={20} aria-hidden />}
|
||||
subtext={data.subscriberRank}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 영상 수"
|
||||
value={formatCompactNumber(data.totalVideos)}
|
||||
icon={<VideoIcon width={20} height={20} aria-hidden />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="총 조회수"
|
||||
value={formatCompactNumber(data.totalViews)}
|
||||
icon={<EyeIcon width={20} height={20} aria-hidden />}
|
||||
/>
|
||||
<MetricCard
|
||||
label="주간 성장"
|
||||
value={`+${formatCompactNumber(growth.absolute)}`}
|
||||
icon={<TrendingUpIcon width={20} height={20} aria-hidden />}
|
||||
subtext={`${growth.percentage > 0 ? "+" : ""}${growth.percentage}%`}
|
||||
trend={trend}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { TopVideoCard } from "@/components/card/TopVideoCard";
|
||||
import type { TopVideo } from "@/features/report/types/youtubeAudit";
|
||||
|
||||
export type YouTubeTopVideosBlockProps = {
|
||||
videos: TopVideo[];
|
||||
};
|
||||
|
||||
export function YouTubeTopVideosBlock({ videos }: YouTubeTopVideosBlockProps) {
|
||||
if (videos.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="mb-8 animate-fade-in-up animation-delay-200">
|
||||
<p className="body-14-medium text-neutral-80 mb-4 break-keep">
|
||||
인기 영상 TOP {videos.length}
|
||||
</p>
|
||||
<div
|
||||
className="flex gap-4 overflow-x-auto pb-4 scrollbar-hide"
|
||||
style={{ scrollbarWidth: "none", msOverflowStyle: "none" }}
|
||||
>
|
||||
{videos.map((video, i) => (
|
||||
<TopVideoCard
|
||||
key={`${video.title}-${i}`}
|
||||
title={video.title}
|
||||
views={video.views}
|
||||
uploadedAgo={video.uploadedAgo}
|
||||
type={video.type}
|
||||
duration={video.duration}
|
||||
style={{ animationDelay: `${i * 50}ms` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user