From 8775285f9950654bf99120bcb8f31453afc5c9aa Mon Sep 17 00:00:00 2001 From: FlashL3opard <69573060+Flashl3opard@users.noreply.github.com> Date: Tue, 7 Jul 2026 16:08:40 +0530 Subject: [PATCH 1/2] PHEE-379: add Account Mapper and G2P Config modules with functional create forms --- src/components/shared/StatusBadge.tsx | 13 +- src/components/ui/input.tsx | 18 ++ src/components/ui/label.tsx | 17 ++ src/modules/account-mapper/AccountMapper.tsx | 43 ++++ .../account-mapper/BeneficiariesTab.tsx | 130 ++++++++++++ .../account-mapper/CreateBeneficiariesTab.tsx | 176 ++++++++++++++++ .../mocks/beneficiaries.mock.ts | 74 +++++++ src/modules/account-mapper/types.ts | 7 + src/modules/g2p-config/CreateG2PTab.tsx | 172 +++++++++++++++ src/modules/g2p-config/G2PConfig.tsx | 43 ++++ src/modules/g2p-config/G2PPaymentTab.tsx | 197 ++++++++++++++++++ .../g2p-config/mocks/g2pConfigs.mock.ts | 39 ++++ src/modules/g2p-config/types.ts | 7 + src/pages/AccountMapper.tsx | 8 +- src/pages/G2PConfig.tsx | 8 +- 15 files changed, 935 insertions(+), 17 deletions(-) create mode 100644 src/components/ui/input.tsx create mode 100644 src/components/ui/label.tsx create mode 100644 src/modules/account-mapper/AccountMapper.tsx create mode 100644 src/modules/account-mapper/BeneficiariesTab.tsx create mode 100644 src/modules/account-mapper/CreateBeneficiariesTab.tsx create mode 100644 src/modules/account-mapper/mocks/beneficiaries.mock.ts create mode 100644 src/modules/account-mapper/types.ts create mode 100644 src/modules/g2p-config/CreateG2PTab.tsx create mode 100644 src/modules/g2p-config/G2PConfig.tsx create mode 100644 src/modules/g2p-config/G2PPaymentTab.tsx create mode 100644 src/modules/g2p-config/mocks/g2pConfigs.mock.ts create mode 100644 src/modules/g2p-config/types.ts diff --git a/src/components/shared/StatusBadge.tsx b/src/components/shared/StatusBadge.tsx index 1451695..8f7b893 100644 --- a/src/components/shared/StatusBadge.tsx +++ b/src/components/shared/StatusBadge.tsx @@ -8,14 +8,21 @@ const statusStyles: Record = { Failed: 'bg-red-100 text-red-700', // Voucher statuses Active: 'bg-green-100 text-green-700', - Inactive: 'bg-gray-100 text-gray-500', + Inactive: 'bg-gray-100 text-gray-600', + 'Inactive-G2P': 'bg-red-100 text-red-700', Canceled: 'bg-red-100 text-red-700', Expired: 'bg-purple-100 text-purple-700', Utilized: 'bg-gray-200 text-[#374151]', Suspended: 'bg-orange-100 text-orange-700', } -export default function StatusBadge({ status }: { status: string }) { +export default function StatusBadge({ + status, + label, +}: { + status: string + label?: string +}) { return ( - {status} + {label ?? status} ) } diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx new file mode 100644 index 0000000..7fe1fde --- /dev/null +++ b/src/components/ui/input.tsx @@ -0,0 +1,18 @@ +import * as React from "react" +import { cn } from "@/lib/utils" + +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ) +} + +export { Input } diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx new file mode 100644 index 0000000..d1ab7f5 --- /dev/null +++ b/src/components/ui/label.tsx @@ -0,0 +1,17 @@ +import * as React from "react" +import { cn } from "@/lib/utils" + +function Label({ className, ...props }: React.ComponentProps<"label">) { + return ( +