Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/report

This commit is contained in:
dohyeons
2025-10-02 18:01:14 +09:00
183 changed files with 2927 additions and 1109 deletions

View File

@@ -10,6 +10,7 @@ import {
createMailAccount,
updateMailAccount,
deleteMailAccount,
testMailAccountConnection,
CreateMailAccountDto,
UpdateMailAccountDto,
} from "@/lib/api/mail";
@@ -104,6 +105,24 @@ export default function MailAccountsPage() {
}
};
const handleTestConnection = async (account: MailAccount) => {
try {
setLoading(true);
const result = await testMailAccountConnection(account.id);
if (result.success) {
alert(`✅ SMTP 연결 성공!\n\n${result.message || '정상적으로 연결되었습니다.'}`);
} else {
alert(`❌ SMTP 연결 실패\n\n${result.message || '연결에 실패했습니다.'}`);
}
} catch (error: any) {
console.error('연결 테스트 실패:', error);
alert(`❌ SMTP 연결 테스트 실패\n\n${error.message || '알 수 없는 오류가 발생했습니다.'}`);
} finally {
setLoading(false);
}
};
return (
<div className="min-h-screen bg-gray-50">
<div className="w-full max-w-none px-4 py-8 space-y-8">
@@ -148,6 +167,7 @@ export default function MailAccountsPage() {
onEdit={handleOpenEditModal}
onDelete={handleOpenDeleteModal}
onToggleStatus={handleToggleStatus}
onTestConnection={handleTestConnection}
/>
</CardContent>
</Card>

View File

@@ -14,6 +14,7 @@ import {
Calendar,
Clock
} from "lucide-react";
import { getMailAccounts, getMailTemplates } from "@/lib/api/mail";
interface DashboardStats {
totalAccounts: number;
@@ -38,17 +39,15 @@ export default function MailDashboardPage() {
const loadStats = async () => {
setLoading(true);
try {
// 계정 수
const accountsRes = await fetch('/api/mail/accounts');
const accountsData = await accountsRes.json();
// 계정 수 (apiClient를 통해 토큰 포함)
const accounts = await getMailAccounts();
// 템플릿 수
const templatesRes = await fetch('/api/mail/templates-file');
const templatesData = await templatesRes.json();
// 템플릿 수 (apiClient를 통해 토큰 포함)
const templates = await getMailTemplates();
setStats({
totalAccounts: accountsData.success ? accountsData.data.length : 0,
totalTemplates: templatesData.success ? templatesData.data.length : 0,
totalAccounts: accounts.length,
totalTemplates: templates.length,
sentToday: 0, // TODO: 실제 발송 통계 API 연동
receivedToday: 0,
sentThisMonth: 0,

View File

@@ -83,7 +83,7 @@ export default function ScreenManagementPage() {
<div className="space-y-8">
<div className="flex items-center justify-between bg-white rounded-lg shadow-sm border p-4">
<h2 className="text-xl font-semibold text-gray-800">{stepConfig.list.title}</h2>
<Button className="bg-blue-600 hover:bg-blue-700 shadow-sm" onClick={() => goToNextStep("design")}>
<Button variant="default" className="shadow-sm" onClick={() => goToNextStep("design")}>
<ArrowRight className="ml-2 h-4 w-4" />
</Button>
</div>
@@ -121,7 +121,7 @@ export default function ScreenManagementPage() {
<ArrowLeft className="mr-2 h-4 w-4" />
</Button>
<Button className="bg-blue-600 hover:bg-blue-700 shadow-sm" onClick={() => goToStep("list")}>
<Button variant="default" className="shadow-sm" onClick={() => goToStep("list")}>
</Button>
</div>

View File

@@ -54,7 +54,7 @@ const TEST_COMPONENTS: ComponentData[] = [
required: true,
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,
@@ -72,7 +72,7 @@ const TEST_COMPONENTS: ComponentData[] = [
required: true,
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,
@@ -94,7 +94,7 @@ const TEST_COMPONENTS: ComponentData[] = [
},
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,
@@ -112,7 +112,7 @@ const TEST_COMPONENTS: ComponentData[] = [
required: false,
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,
@@ -130,7 +130,7 @@ const TEST_COMPONENTS: ComponentData[] = [
required: false,
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,
@@ -152,7 +152,7 @@ const TEST_COMPONENTS: ComponentData[] = [
},
style: {
labelFontSize: "14px",
labelColor: "#3b83f6",
labelColor: "#212121",
labelFontWeight: "500",
},
} as WidgetComponent,