export: update CSV filename format to YYYY-MM-DD (PROJECT-NAME) BOM

Change exported CSV filename format from:
  YYYY-MM-DD NAME SPEC.csv
To:
  YYYY-MM-DD (NAME) BOM.csv

Applied to both:
- POST /api/export/csv (direct export)
- GET /api/configs/:uuid/export (config export)

All tests passing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Chusavitin
2026-02-09 10:49:56 +03:00
parent bca82f9dc0
commit af79b6f3bf

View File

@@ -54,7 +54,7 @@ func (h *ExportHandler) ExportCSV(c *gin.Context) {
}
// Set headers before streaming
filename := fmt.Sprintf("%s %s SPEC.csv", time.Now().Format("2006-01-02"), req.Name)
filename := fmt.Sprintf("%s (%s) BOM.csv", time.Now().Format("2006-01-02"), req.Name)
c.Header("Content-Type", "text/csv; charset=utf-8")
c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
@@ -124,7 +124,7 @@ func (h *ExportHandler) ExportConfigCSV(c *gin.Context) {
}
// Set headers before streaming
filename := fmt.Sprintf("%s %s SPEC.csv", config.CreatedAt.Format("2006-01-02"), config.Name)
filename := fmt.Sprintf("%s (%s) BOM.csv", config.CreatedAt.Format("2006-01-02"), config.Name)
c.Header("Content-Type", "text/csv; charset=utf-8")
c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))