jskim-node #423

Merged
kjs merged 27 commits from jskim-node into main 2026-03-20 16:10:33 +09:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 7f781b0177 - Show all commits

View File

@ -89,7 +89,7 @@ export default function BatchManagementPage() {
const newStatus = currentStatus === 'Y' ? 'N' : 'Y';
console.log("📝 새로운 상태:", newStatus);
const result = await BatchAPI.updateBatchConfig(batchId, { isActive: newStatus });
const result = await BatchAPI.updateBatchConfig(batchId, { isActive: newStatus === 'Y' });
console.log("✅ API 호출 성공:", result);
toast.success(`배치가 ${newStatus === 'Y' ? '활성화' : '비활성화'}되었습니다.`);

View File

@ -79,7 +79,7 @@ export default function BatchCard({
</span>
<span className="font-medium">
{new Date(batch.created_date).toLocaleDateString('ko-KR')}
{batch.created_date ? new Date(batch.created_date).toLocaleDateString('ko-KR') : '-'}
</span>
</div>
@ -119,7 +119,7 @@ export default function BatchCard({
<Button
variant="outline"
size="sm"
onClick={() => onExecute(batch.id)}
onClick={() => batch.id != null && onExecute(batch.id)}
disabled={isExecuting}
className="h-9 flex-1 gap-2 text-sm"
>
@ -135,7 +135,7 @@ export default function BatchCard({
<Button
variant="outline"
size="sm"
onClick={() => onToggleStatus(batch.id, batch.is_active)}
onClick={() => batch.id != null && onToggleStatus(batch.id, batch.is_active || 'N')}
className="h-9 flex-1 gap-2 text-sm"
>
{isActive ? (
@ -150,7 +150,7 @@ export default function BatchCard({
<Button
variant="outline"
size="sm"
onClick={() => onEdit(batch.id)}
onClick={() => batch.id != null && onEdit(batch.id)}
className="h-9 flex-1 gap-2 text-sm"
>
<Edit className="h-4 w-4" />
@ -161,7 +161,7 @@ export default function BatchCard({
<Button
variant="destructive"
size="sm"
onClick={() => onDelete(batch.id, batch.batch_name)}
onClick={() => batch.id != null && onDelete(batch.id, batch.batch_name)}
className="h-9 flex-1 gap-2 text-sm"
>
<Trash2 className="h-4 w-4" />