diff --git a/src/components/settings/BarobillIntegration/actions.ts b/src/components/settings/BarobillIntegration/actions.ts index e15def5e..64d48e70 100644 --- a/src/components/settings/BarobillIntegration/actions.ts +++ b/src/components/settings/BarobillIntegration/actions.ts @@ -66,9 +66,15 @@ export async function getBankServiceUrl( export async function getIntegrationStatus(): Promise> { return executeServerAction({ url: buildApiUrl('/api/v1/barobill/status'), - transform: (data: { bank_service_count?: number; account_link_count?: number }) => ({ + transform: (data: { bank_service_count?: number; account_link_count?: number; member?: { barobill_id?: string; biz_no?: string; status?: string; server_mode?: string } }) => ({ bankServiceCount: data.bank_service_count ?? 0, accountLinkCount: data.account_link_count ?? 0, + member: data.member ? { + barobillId: data.member.barobill_id ?? '', + bizNo: data.member.biz_no ?? '', + status: data.member.status ?? '', + serverMode: data.member.server_mode ?? '', + } : undefined, }), errorMessage: '연동 현황 조회에 실패했습니다.', }); diff --git a/src/components/settings/BarobillIntegration/index.tsx b/src/components/settings/BarobillIntegration/index.tsx index 1f998195..0ae73e0b 100644 --- a/src/components/settings/BarobillIntegration/index.tsx +++ b/src/components/settings/BarobillIntegration/index.tsx @@ -3,7 +3,7 @@ import { useState, useEffect, useCallback } from 'react'; import { PageLayout } from '@/components/organisms/PageLayout'; import { PageHeader } from '@/components/organisms/PageHeader'; -import { Link2, Loader2 } from 'lucide-react'; +import { Link2, Loader2, Pencil, Check } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; @@ -64,6 +64,8 @@ export function BarobillIntegration() { } }, []); + const hasLogin = !!status?.member?.barobillId; + return (

바로빌 연동

- {/* 바로빌 로그인 정보 등록 */} + {/* 바로빌 로그인 정보 */} -

바로빌 회원이신가요?

-

- 바로빌 로그인 발급 정보 등록 -

- + {hasLogin ? ( + <> +

바로빌 로그인 정보

+
+
+ 아이디 + {status?.member?.barobillId} +
+
+ 비밀번호 + ●●●●●●●● + + 설정됨 + +
+
+ + + ) : ( + <> +

바로빌 회원이신가요?

+

+ 바로빌 로그인 발급 정보 등록 +

+ + + )}
diff --git a/src/components/settings/BarobillIntegration/types.ts b/src/components/settings/BarobillIntegration/types.ts index 48683d13..f9186153 100644 --- a/src/components/settings/BarobillIntegration/types.ts +++ b/src/components/settings/BarobillIntegration/types.ts @@ -54,4 +54,10 @@ export const ACCOUNT_TYPE_OPTIONS = [ export interface IntegrationStatus { bankServiceCount: number; accountLinkCount: number; + member?: { + barobillId: string; + bizNo: string; + status: string; + serverMode: string; + }; }