Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
491 changes: 491 additions & 0 deletions apps/web/src/app/(dashboard)/project/[id]/change-orders/page.tsx

Large diffs are not rendered by default.

34 changes: 28 additions & 6 deletions apps/web/src/app/(dashboard)/project/[id]/compliance/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import {
Tabs,
TabsList,
TabsTrigger,
Select,
SelectTrigger,
SelectValue,
SelectContent,
SelectItem,
} from '@openlintel/ui';
import {
ShieldCheck,
Expand Down Expand Up @@ -43,10 +48,13 @@ export default function CompliancePage({ params }: { params: Promise<{ id: strin
const { id: projectId } = use(params);
const [expandedRooms, setExpandedRooms] = useState<Set<string>>(new Set());
const [selectedCategory, setSelectedCategory] = useState<string>('all');
const [jurisdiction, setJurisdiction] = useState<string>('IN');

const { data: jurisdictions } = trpc.compliance.listJurisdictions.useQuery();

const { data: report, isLoading } = trpc.compliance.checkProject.useQuery({
projectId,
jurisdiction: 'IN',
jurisdiction,
});

const toggleRoom = (roomId: string) => {
Expand Down Expand Up @@ -88,11 +96,25 @@ export default function CompliancePage({ params }: { params: Promise<{ id: strin
return (
<div>
{/* Header */}
<div className="mb-6">
<h1 className="text-2xl font-bold tracking-tight">Compliance Report</h1>
<p className="text-sm text-muted-foreground">
Building code compliance check against Indian NBC 2016 standards.
</p>
<div className="mb-6 flex items-start justify-between">
<div>
<h1 className="text-2xl font-bold tracking-tight">Compliance Report</h1>
<p className="text-sm text-muted-foreground">
Building code compliance check against {jurisdictions?.find((j) => j.code === jurisdiction)?.name ?? jurisdiction} standards.
</p>
</div>
<Select value={jurisdiction} onValueChange={setJurisdiction}>
<SelectTrigger className="w-[240px]">
<SelectValue placeholder="Select jurisdiction" />
</SelectTrigger>
<SelectContent>
{(jurisdictions ?? []).map((j) => (
<SelectItem key={j.code} value={j.code}>
{j.name}
</SelectItem>
))}
</SelectContent>
</Select>
</div>

{/* Overall compliance score */}
Expand Down
16 changes: 15 additions & 1 deletion apps/web/src/app/(dashboard)/project/[id]/drawings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export default function DrawingsPage({ params }: { params: Promise<{ id: string
const svgUrl = getDownloadUrl(drawing.svgStorageKey);
const dxfUrl = getDownloadUrl(drawing.dxfStorageKey);
const pdfUrl = getDownloadUrl(drawing.pdfStorageKey);
const ifcUrl = getDownloadUrl(drawing.ifcStorageKey);

return (
<Card key={drawing.id} className="overflow-hidden">
Expand Down Expand Up @@ -373,7 +374,20 @@ export default function DrawingsPage({ params }: { params: Promise<{ id: string
</a>
</Button>
)}
{!dxfUrl && !pdfUrl && !svgUrl && (
{ifcUrl && (
<Button
variant="outline"
size="sm"
className="h-7 text-xs"
asChild
>
<a href={ifcUrl} download>
<Download className="mr-1 h-3 w-3" />
IFC
</a>
</Button>
)}
{!dxfUrl && !pdfUrl && !svgUrl && !ifcUrl && (
<span className="text-xs text-muted-foreground">
No downloads available
</span>
Expand Down
7 changes: 0 additions & 7 deletions apps/web/src/app/(dashboard)/project/[id]/floor-plan/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,6 @@ export default function FloorPlanPage({
Once rooms are detected, you can add them to your project with
one click.
</p>
<div className="flex items-start gap-3 max-w-md rounded-lg border border-amber-200 bg-amber-50 p-3 text-left dark:border-amber-900 dark:bg-amber-950/50">
<AlertCircle className="mt-0.5 h-4 w-4 shrink-0 text-amber-600" />
<p className="text-xs text-amber-700 dark:text-amber-300">
Room detection requires the vision-engine microservice. This
will be available once the service is deployed.
</p>
</div>
</Card>
)}

Expand Down
Loading
Loading