fixes
Build and Push Docker Image / build (push) Successful in 43s

This commit is contained in:
jason
2026-04-21 21:47:52 -05:00
parent bc3b78aa33
commit 95774c9c21
4 changed files with 153 additions and 6 deletions
@@ -15,6 +15,7 @@ import {
Textarea,
} from "@/components/ui";
import { apiFetch, ApiClientError } from "@/lib/client-api";
import StepViewerPanel from "@/components/StepViewerPanel";
interface FileView {
id: string;
@@ -153,6 +154,16 @@ export default function AssemblyDetailClient({
</div>
</section>
{assembly.stepFile ? (
<StepViewerPanel
className="mb-6"
title="Assembly 3D"
fileId={assembly.stepFile.id}
fileName={assembly.stepFile.originalName}
height={480}
/>
) : null}
<Card>
<table className="w-full text-sm">
<thead className="bg-slate-50 text-left text-slate-600 border-b border-slate-200">
+29 -5
View File
@@ -2,6 +2,7 @@
import { useState, useTransition } from "react";
import { useRouter } from "next/navigation";
import StepViewerPanel from "@/components/StepViewerPanel";
type ScanFile = { id: string; originalName: string; kind: string };
@@ -77,16 +78,17 @@ export default function ScanClient({ initialOp, viewer }: { initialOp: ScanOp; v
const totalUnits = op.part.assembly.qty * op.part.qty;
// Flat list of attached files (part first, then assembly). Rendered as big
// tap targets so the operator can pull the drawing / STEP right from the
// scan page without bouncing to the admin UI.
// tap targets so the operator can pull the drawing / cut file right from
// the scan page without bouncing to the admin UI.
//
// STEP files are intentionally excluded — we render them inline via
// StepViewerPanel below instead, so the operator never has to download a
// .stp to the phone.
const quickFiles: Array<{ label: string; file: ScanFile; scope: "part" | "assembly" }> = [];
if (op.part.drawingFile) quickFiles.push({ label: "Drawing", file: op.part.drawingFile, scope: "part" });
if (op.part.stepFile) quickFiles.push({ label: "3D / STEP", file: op.part.stepFile, scope: "part" });
if (op.part.cutFile) quickFiles.push({ label: "Cut file", file: op.part.cutFile, scope: "part" });
if (op.part.assembly.drawingFile)
quickFiles.push({ label: "Assembly drawing", file: op.part.assembly.drawingFile, scope: "assembly" });
if (op.part.assembly.stepFile)
quickFiles.push({ label: "Assembly 3D", file: op.part.assembly.stepFile, scope: "assembly" });
if (op.part.assembly.cutFile)
quickFiles.push({ label: "Assembly cut", file: op.part.assembly.cutFile, scope: "assembly" });
@@ -246,6 +248,28 @@ export default function ScanClient({ initialOp, viewer }: { initialOp: ScanOp; v
</div>
) : null}
{op.part.stepFile ? (
<div className="rounded-2xl bg-white border border-slate-200 p-5">
<StepViewerPanel
title="Part 3D"
fileId={op.part.stepFile.id}
fileName={op.part.stepFile.originalName}
height={320}
/>
</div>
) : null}
{op.part.assembly.stepFile ? (
<div className="rounded-2xl bg-white border border-slate-200 p-5">
<StepViewerPanel
title="Assembly 3D"
fileId={op.part.assembly.stepFile.id}
fileName={op.part.assembly.stepFile.originalName}
height={320}
/>
</div>
) : null}
{op.instructions ? (
<div className="rounded-2xl bg-white border border-slate-200 p-5">
<h2 className="text-sm font-semibold text-slate-900 mb-1">Instructions</h2>