diff --git a/app/Http/Controllers/Video/Veo3Controller.php b/app/Http/Controllers/Video/Veo3Controller.php index 4661fa80..2679ad94 100644 --- a/app/Http/Controllers/Video/Veo3Controller.php +++ b/app/Http/Controllers/Video/Veo3Controller.php @@ -213,7 +213,7 @@ public function history(Request $request): JsonResponse $videos = VideoGeneration::where('user_id', auth()->id()) ->orderByDesc('created_at') ->limit(50) - ->get(['id', 'keyword', 'title', 'status', 'progress', 'cost_usd', 'created_at']); + ->get(['id', 'keyword', 'title', 'status', 'progress', 'cost_usd', 'created_at', 'updated_at']); return response()->json([ 'success' => true, diff --git a/resources/views/video/veo3/index.blade.php b/resources/views/video/veo3/index.blade.php index aa061cc2..b1f82709 100644 --- a/resources/views/video/veo3/index.blade.php +++ b/resources/views/video/veo3/index.blade.php @@ -578,6 +578,26 @@ className="bg-indigo-600 text-white px-8 py-3 rounded-lg font-medium hover:bg-in } }; + const formatKST = (dateStr) => { + if (!dateStr) return '-'; + return new Date(dateStr).toLocaleString('ko-KR', { + timeZone: 'Asia/Seoul', + month: '2-digit', day: '2-digit', + hour: '2-digit', minute: '2-digit', + hour12: false, + }); + }; + + const formatDuration = (created, updated, status) => { + if (!created || !updated) return '-'; + if (!['completed', 'failed'].includes(status)) return '진행 중'; + const diffSec = Math.floor((new Date(updated) - new Date(created)) / 1000); + if (diffSec < 60) return `${diffSec}초`; + const m = Math.floor(diffSec / 60); + const s = diffSec % 60; + return `${m}분 ${s}초`; + }; + if (loading) return