refactor: change analysis to upload

This commit is contained in:
2026-06-18 18:24:19 +05:30
parent d8fa02dc5d
commit dff9e2222f
4 changed files with 17 additions and 17 deletions

View File

@@ -2,7 +2,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { Loader2, Play, TrendingUp } from 'lucide-react';
import { Loader2, TrendingUp, UploadCloud } from 'lucide-react';
import { PageHeader } from '@/components/page-header';
import { Button } from '@/components/ui/button';
@@ -12,9 +12,9 @@ import { videoService } from '@/services/api';
import type { SessionContext } from '@/types';
import { ROUTES } from '@/utils/routes';
import { AnalysisSettingsSection } from './components/AnalysisSettingsSection';
import { InputDataSection } from './components/InputDataSection';
import { LocationSection } from './components/LocationSection';
import { UploadSettingsSection } from './components/UploadSettingsSection';
export default function UploadPage() {
const router = useRouter();
@@ -34,7 +34,7 @@ export default function UploadPage() {
const handleSubmit = async () => {
if (!session?.chainageId || !videoFile || !gpsFile) {
setError('Complete location and input data before starting analysis.');
setError('Complete location and input data before upload.');
return;
}
@@ -63,8 +63,8 @@ export default function UploadPage() {
return (
<div className="space-y-5">
<PageHeader
title="Create Analysis Job"
description="Configure location, upload data, and start AI analysis."
title="Upload"
description="Configure location, upload data, and submit it for processing."
icon={TrendingUp}
/>
@@ -94,7 +94,7 @@ export default function UploadPage() {
<Separator />
<AnalysisSettingsSection
<UploadSettingsSection
value={analysisMethod}
onValueChange={setAnalysisMethod}
disabled={isSubmitting}
@@ -117,12 +117,12 @@ export default function UploadPage() {
{isSubmitting ? (
<>
<Loader2 className="size-4 animate-spin" />
Starting analysis...
Uploading...
</>
) : (
<>
<Play className="size-4" />
Start Analysis
<UploadCloud className="size-4" />
Upload
</>
)}
</Button>