ui: add B2B olmayan stok (orphans) page
This commit is contained in:
@@ -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 || '-'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user