ui: add B2B olmayan stok (orphans) page

This commit is contained in:
M_Kececi
2026-06-25 14:14:23 +03:00
parent 52b39725ec
commit dfad548963
19 changed files with 594 additions and 71 deletions
+10
View File
@@ -84,3 +84,13 @@ export function formatPercent(value) {
const n = Number(value || 0)
return `${(n * 100).toFixed(2)}%`
}
export function formatDataSourceLabel(value) {
const raw = String(value || '').trim()
const normalized = raw.toLowerCase().replace(/[\s-]+/g, '_')
if (['pg', 'postgre', 'postgres', 'postgresql'].includes(normalized)) return 'B2B'
if (['mssql', 'baggi_v3', 'baggi'].includes(normalized)) return 'NEBIM_V3'
if (normalized === 'uretim') return 'TEDARIK URETIM PROGRAMI'
if (normalized === 'dummy' || normalized === 'ui') return 'UI'
return raw || '-'
}