feat: standardize contact formatting
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
uniqueConstructeurIds,
|
||||
resolveConstructeurs,
|
||||
formatConstructeurContact,
|
||||
} from '~/shared/constructeurUtils'
|
||||
|
||||
const formatSize = (size) => {
|
||||
@@ -202,10 +203,11 @@ const normalizeCustomFields = (values = []) => {
|
||||
|
||||
const normalizeConstructeur = (constructeur) => {
|
||||
if (!constructeur) { return null }
|
||||
const contact = formatConstructeurContact(constructeur)
|
||||
return {
|
||||
id: constructeur.id || null,
|
||||
name: constructeur.name || '—',
|
||||
contact: [constructeur.email, constructeur.phone].filter(Boolean).join(' • ') || '—'
|
||||
contact: contact || '—'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user