Hours by client: add search and CSV filtering; add alerts cron (BRT 08:00 guard) + alerts panel filters; admin companies shows last alert; PDF Inter font from public/fonts; fix Select empty value; type cleanups; tests for CSV/TZ; remove Knowledge Base nav

This commit is contained in:
Esdras Renan 2025-10-07 15:39:55 -03:00
parent 2cf399dcb1
commit 08cc8037d5
151 changed files with 1404 additions and 214 deletions

18
tests/csv.test.ts Normal file
View file

@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest"
import { csvEscape, rowsToCsv } from "@/lib/csv"
describe("csvEscape", () => {
it("escapes quotes and commas", () => {
expect(csvEscape('a,b')).toBe('"a,b"')
expect(csvEscape('a"b')).toBe('"a""b"')
expect(csvEscape('simple')).toBe('simple')
})
})
describe("rowsToCsv", () => {
it("joins rows and columns with newline and commas", () => {
const csv = rowsToCsv([["A", "B"], [1, 2]])
expect(csv).toBe("A,B\n1,2\n")
})
})