+ {#if visibility.showLabelingLeftSection}
+
+
+
+ {/if}
{#if visibility.showLabelingEnhanced}
diff --git a/frontend/src/lib/config/invoice-item-visibility.ts b/frontend/src/lib/config/invoice-item-visibility.ts
index c1f702f9..d040537d 100644
--- a/frontend/src/lib/config/invoice-item-visibility.ts
+++ b/frontend/src/lib/config/invoice-item-visibility.ts
@@ -47,6 +47,10 @@ export interface InvoiceItemVisibility {
showLabelingObservations: boolean;
/** Etiquetado tab: Valuation field (Valor Det). */
showLabelingValuationValue: boolean;
+ /** Etiquetado tab: Valuation Method selector. */
+ showLabelingValuationMethod: boolean;
+ /** Etiquetado tab: Whole left section (Legend + all fields). */
+ showLabelingLeftSection: boolean;
}
const defaultVisibility: InvoiceItemVisibility = {
@@ -74,7 +78,9 @@ const defaultVisibility: InvoiceItemVisibility = {
showLabelingStandard: true,
showLabelingQuantity: false,
showLabelingObservations: true,
- showLabelingValuationValue: false
+ showLabelingValuationValue: false,
+ showLabelingValuationMethod: true,
+ showLabelingLeftSection: true
};
function normalizeInvoiceType(invoiceType?: string | null): string {
@@ -130,8 +136,27 @@ export function getVisibility(
const expVisibility: InvoiceItemVisibility = {
...defaultVisibility,
showExportLinkToImportBlock: true,
- showExportValuationFields: true
+ showExportValuationFields: true,
+ showLabelingEnhanced: true,
+ showUsageReason: true,
+ showLabelingValuationValue: true,
+ showLabelingStandard: false,
+ showLabelingObservations: false,
+ showLabelingQuantity: false
};
+
+ // CHECK FOR EXPORT REPAIR (REP / REPAR)
+ const upInvoiceType = normalizeInvoiceType(invoiceType);
+ if (upInvoiceType === 'REP' || upInvoiceType === 'REPAR') {
+ return {
+ ...expVisibility,
+ showLabelingValuationMethod: false,
+ showLabelingValuationValue: false,
+ showUsageReason: false,
+ showLabelingLeftSection: false
+ };
+ }
+
// Per-type overrides can be added here (e.g. hide valuation for SCRAP).
switch (exportType) {
case 'NODES':
@@ -193,7 +218,8 @@ export function getVisibility(
showLabelingQuantity: true,
showLabelingStandard: true,
showLabelingObservations: false,
- showLabelingValuationValue: false
+ showLabelingValuationValue: false,
+ showLabelingValuationMethod: true
};
case 'MEX':