From a4d5d03d9192faa121a2cd675505101cd392525d Mon Sep 17 00:00:00 2001 From: barsa Date: Thu, 25 Dec 2025 13:59:48 +0900 Subject: [PATCH] Refactor Service Caching and Enhance Data Handling - Improved ServicesCacheService to optimize caching strategies and ensure data consistency across service components. - Updated utility functions for SOQL query building to enhance performance and maintainability. - Refined existing service classes for internet, SIM, and VPN offerings to leverage new caching mechanisms. - Enhanced integration with Salesforce Change Data Capture for real-time updates on service eligibility and availability. --- .../components/base/ServicesBackLink.tsx | 49 +++++++++++++++++++ .../services/components/base/ServicesHero.tsx | 47 ++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 apps/portal/src/features/services/components/base/ServicesBackLink.tsx create mode 100644 apps/portal/src/features/services/components/base/ServicesHero.tsx diff --git a/apps/portal/src/features/services/components/base/ServicesBackLink.tsx b/apps/portal/src/features/services/components/base/ServicesBackLink.tsx new file mode 100644 index 00000000..98b6f2d1 --- /dev/null +++ b/apps/portal/src/features/services/components/base/ServicesBackLink.tsx @@ -0,0 +1,49 @@ +"use client"; + +import { Button } from "@/components/atoms/button"; +import { cn } from "@/lib/utils"; +import { ArrowLeftIcon } from "@heroicons/react/24/outline"; +import type { ReactNode } from "react"; + +type Alignment = "left" | "center" | "right"; + +interface ServicesBackLinkProps { + href: string; + label?: string; + align?: Alignment; + className?: string; + buttonClassName?: string; + icon?: ReactNode; +} + +const alignmentMap: Record = { + left: "justify-start", + center: "justify-center", + right: "justify-end", +}; + +export function ServicesBackLink({ + href, + label = "Back", + align = "left", + className, + buttonClassName, + icon = , +}: ServicesBackLinkProps) { + return ( +
+ +
+ ); +} + +export type { ServicesBackLinkProps }; diff --git a/apps/portal/src/features/services/components/base/ServicesHero.tsx b/apps/portal/src/features/services/components/base/ServicesHero.tsx new file mode 100644 index 00000000..4c2adec8 --- /dev/null +++ b/apps/portal/src/features/services/components/base/ServicesHero.tsx @@ -0,0 +1,47 @@ +"use client"; + +import { cn } from "@/lib/utils"; +import type { ReactNode } from "react"; + +type Alignment = "left" | "center"; + +interface ServicesHeroProps { + title: string; + description: string; + align?: Alignment; + eyebrow?: ReactNode; + children?: ReactNode; + className?: string; +} + +const alignmentMap: Record = { + left: "text-left items-start", + center: "text-center items-center", +}; + +export function ServicesHero({ + title, + description, + align = "center", + eyebrow, + children, + className, +}: ServicesHeroProps) { + return ( +
+ {eyebrow ?
{eyebrow}
: null} +

{title}

+

{description}

+ {children ?
{children}
: null} +
+ ); +} + +export type { ServicesHeroProps };