chore(chainage): rename chainge to segment

This commit is contained in:
2026-06-12 12:28:17 +05:30
parent 134e373f3a
commit 941f554662
14 changed files with 817 additions and 826 deletions

View File

@@ -47,7 +47,7 @@ const data = {
icon: Package,
},
{
title: 'Chainage',
title: 'Segment',
url: ROUTES.CHAINAGE,
icon: Milestone,
},

View File

@@ -67,8 +67,8 @@ export function ChainageBarChart({ data, isLoading = false }: ChainageBarChartPr
if (data.length === 0) {
return (
<div className="h-[250px] flex flex-col items-center justify-center text-muted-foreground">
<p className="text-sm">No chainage data available</p>
<p className="text-xs mt-1">Process videos to see detections by chainage</p>
<p className="text-sm">No segment data available</p>
<p className="text-xs mt-1">Process videos to see detections by segment</p>
</div>
);
}

View File

@@ -104,7 +104,7 @@ export function FilterSelector({
<Milestone className="h-4 w-4" />
</div>
<span className="text-[11px] font-black text-muted-foreground uppercase tracking-[0.15em]">
Chainage
Segment
</span>
</div>
<Select
@@ -113,10 +113,10 @@ export function FilterSelector({
disabled={isLoading}
>
<SelectTrigger className="h-10 text-sm w-full bg-background border-border/60 shadow-xs">
<SelectValue placeholder="All chainages" />
<SelectValue placeholder="All segments" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">All Chainages</SelectItem>
<SelectItem value="all">All Segments</SelectItem>
{chainages.map((chn) => (
<SelectItem key={chn.id} value={chn.id}>
{chn.name}

View File

@@ -152,7 +152,7 @@ export function ProjectSelectionSection({
} catch (err) {
if (isMounted) {
console.error('Failed to load chainages:', err);
setError('Failed to load chainages for the selected package.');
setError('Failed to load segments for the selected package.');
}
} finally {
if (isMounted) {
@@ -308,7 +308,7 @@ export function ProjectSelectionSection({
{/* Chainage Dropdown */}
<div className="space-y-2">
<Label htmlFor="chainage" className="text-sm font-semibold">
Chainage
Segment
</Label>
<Select
value={selectedChainage?.id || ''}
@@ -323,7 +323,7 @@ export function ProjectSelectionSection({
</div>
) : (
<SelectValue
placeholder={selectedPackage ? 'Select chainage' : 'Select package first'}
placeholder={selectedPackage ? 'Select segment' : 'Select package first'}
/>
)}
</SelectTrigger>
@@ -399,9 +399,9 @@ export function ProjectSelectionSection({
<CardHeader className="pb-6">
<div className="flex flex-col gap-6">
<div>
<CardTitle className="text-2xl font-bold">Select Project Chainage</CardTitle>
<CardTitle className="text-2xl font-bold">Select Project Segment</CardTitle>
<CardDescription className="mt-2 text-base">
Select Project, Package & Chainage to begin intelligent road analysis.
Select Project, Package & Segment to begin intelligent road analysis.
</CardDescription>
</div>
@@ -409,7 +409,7 @@ export function ProjectSelectionSection({
<div className="flex items-center justify-center pt-2">
{[1, 2, 3].map((step, index) => {
const status = getStepStatus(step);
const labels = ['Project', 'Package', 'Chainage'];
const labels = ['Project', 'Package', 'Segment'];
return (
<div key={step} className="flex items-center">
<div className="flex flex-col items-center">

View File

@@ -78,7 +78,7 @@ const DetailedSummarySection = ({
<MapIcon className="h-5 w-5 text-primary" />
</div>
<div>
<CardTitle className="text-base font-bold">Chainages</CardTitle>
<CardTitle className="text-base font-bold">Segments</CardTitle>
<CardDescription className="text-xs">{modeConfig.label} detected</CardDescription>
</div>
</div>
@@ -169,7 +169,7 @@ const DetailedSummarySection = ({
</div>
<div className="grid grid-cols-2 gap-2 text-[10px] text-muted-foreground">
<div className="truncate">
Chainage: <span className="text-foreground font-medium">{chainageName}</span>
Segment: <span className="text-foreground font-medium">{chainageName}</span>
</div>
<div>
Confidence:{' '}