feat: show revision column in file browser

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 08:54:13 -05:00
parent 4707e96359
commit 3554bb6110
2 changed files with 8 additions and 1 deletions
@@ -38,6 +38,7 @@ namespace FabWorks.Api.Controllers
c.DxfFilePath, c.DxfFilePath,
c.ContentHash, c.ContentHash,
c.Thickness, c.Thickness,
c.Revision,
DrawingNumber = c.BomItem.ExportRecord.DrawingNumber, DrawingNumber = c.BomItem.ExportRecord.DrawingNumber,
CreatedAt = c.BomItem.ExportRecord.ExportedAt CreatedAt = c.BomItem.ExportRecord.ExportedAt
}); });
@@ -70,6 +71,7 @@ namespace FabWorks.Api.Controllers
FileType = "dxf", FileType = "dxf",
DrawingNumber = c.DrawingNumber, DrawingNumber = c.DrawingNumber,
Thickness = c.Thickness, Thickness = c.Thickness,
Revision = c.Revision,
CreatedAt = c.CreatedAt CreatedAt = c.CreatedAt
}); });
} }
@@ -85,7 +87,8 @@ namespace FabWorks.Api.Controllers
r.Id, r.Id,
r.DrawingNumber, r.DrawingNumber,
r.PdfContentHash, r.PdfContentHash,
r.ExportedAt r.ExportedAt,
DrawingRevision = r.Drawing != null ? (int?)r.Drawing.Revision : null
}); });
if (!string.IsNullOrWhiteSpace(search)) if (!string.IsNullOrWhiteSpace(search))
@@ -113,6 +116,7 @@ namespace FabWorks.Api.Controllers
ContentHash = r.PdfContentHash, ContentHash = r.PdfContentHash,
FileType = "pdf", FileType = "pdf",
DrawingNumber = r.DrawingNumber, DrawingNumber = r.DrawingNumber,
Revision = r.DrawingRevision,
CreatedAt = r.ExportedAt CreatedAt = r.ExportedAt
}); });
} }
@@ -179,6 +183,7 @@ namespace FabWorks.Api.Controllers
public string FileType { get; set; } public string FileType { get; set; }
public string DrawingNumber { get; set; } public string DrawingNumber { get; set; }
public double? Thickness { get; set; } public double? Thickness { get; set; }
public int? Revision { get; set; }
public DateTime CreatedAt { get; set; } public DateTime CreatedAt { get; set; }
} }
} }
+2
View File
@@ -353,6 +353,7 @@ const pages = {
<td><div class="file-name-cell">${ext === 'pdf' ? icons.filePdf : icons.fileDxf}<a href="/api/filebrowser/download?hash=${encodeURIComponent(f.contentHash)}&ext=${ext}&name=${encodeURIComponent(f.fileName)}">${esc(f.fileName)}</a></div></td> <td><div class="file-name-cell">${ext === 'pdf' ? icons.filePdf : icons.fileDxf}<a href="/api/filebrowser/download?hash=${encodeURIComponent(f.contentHash)}&ext=${ext}&name=${encodeURIComponent(f.fileName)}">${esc(f.fileName)}</a></div></td>
<td><span class="badge ${ext === 'dxf' ? 'badge-cyan' : 'badge-amber'}">${ext.toUpperCase()}</span></td> <td><span class="badge ${ext === 'dxf' ? 'badge-cyan' : 'badge-amber'}">${ext.toUpperCase()}</span></td>
<td style="color:var(--text-secondary)">${esc(f.drawingNumber)}</td> <td style="color:var(--text-secondary)">${esc(f.drawingNumber)}</td>
<td style="font-family:var(--font-mono);font-size:13px;text-align:center;color:var(--text-secondary)">${f.revision != null ? f.revision : '\u2014'}</td>
<td style="font-family:var(--font-mono);font-size:13px;color:var(--text-secondary)">${f.thickness != null ? f.thickness.toFixed(4) + '"' : '\u2014'}</td> <td style="font-family:var(--font-mono);font-size:13px;color:var(--text-secondary)">${f.thickness != null ? f.thickness.toFixed(4) + '"' : '\u2014'}</td>
<td style="font-family:var(--font-mono);font-size:13px;color:var(--text-secondary)">${fmtDate(f.createdAt)}</td> <td style="font-family:var(--font-mono);font-size:13px;color:var(--text-secondary)">${fmtDate(f.createdAt)}</td>
<td style="font-family:var(--font-mono);font-size:12px;color:var(--text-dim)">${esc(hashShort)}</td> <td style="font-family:var(--font-mono);font-size:12px;color:var(--text-dim)">${esc(hashShort)}</td>
@@ -369,6 +370,7 @@ const pages = {
<th>Name</th> <th>Name</th>
<th style="width:60px">Type</th> <th style="width:60px">Type</th>
<th>Drawing</th> <th>Drawing</th>
<th style="width:45px;text-align:center">Rev</th>
<th style="width:90px">Thickness</th> <th style="width:90px">Thickness</th>
<th style="width:170px">Date</th> <th style="width:170px">Date</th>
<th style="width:100px">Hash</th> <th style="width:100px">Hash</th>