FIx: delete champs par default
This commit is contained in:
@@ -179,7 +179,7 @@ const normalizeCustomFields = (values = []) => {
|
||||
return values.map((value) => ({
|
||||
id: value.id,
|
||||
label: value.customField?.name || 'Champ',
|
||||
value: value.value || value.customField?.defaultValue || '—',
|
||||
value: value.value || '—',
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -217,7 +217,6 @@ export const buildMachinePrintContext = ({
|
||||
machine,
|
||||
machineName,
|
||||
machineReference,
|
||||
machineEmplacement,
|
||||
machinePieces = [],
|
||||
components = [],
|
||||
selection,
|
||||
@@ -300,7 +299,6 @@ export const buildMachinePrintContext = ({
|
||||
description: machine?.description || '',
|
||||
typeDescription: machine?.typeMachine?.description || '',
|
||||
reference: machineReference,
|
||||
emplacement: machineEmplacement,
|
||||
site: machine?.site?.name || '',
|
||||
category: machine?.typeMachine?.category || '',
|
||||
badges: machineBadges,
|
||||
@@ -348,7 +346,6 @@ export const buildMachinePrintHtml = (context, styles) => {
|
||||
<div class="print-grid">
|
||||
${renderPrintField('Nom', context.machine.name)}
|
||||
${renderPrintField('Référence', context.machine.reference, 'Non définie')}
|
||||
${renderPrintField('Emplacement', context.machine.emplacement, 'Non défini')}
|
||||
${renderPrintField('Site', context.machine.site, 'Non défini')}
|
||||
${renderPrintField('Constructeur', context.machine.constructeur?.name, 'Non défini')}
|
||||
${renderPrintField('Contact Constructeur', context.machine.constructeur?.contact, 'Non défini')}
|
||||
@@ -564,4 +561,4 @@ export const buildMachinePrintHtml = (context, styles) => {
|
||||
</div>
|
||||
</body>
|
||||
</html>`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user