Files
mini-erp/mini-frontend/src/config/crystalReports.ts
T
George fe22681c66 Personalizacion cliente tagumedica: permisos, refactor de vistas y limpieza de tools
- Agrega permiso de menu para vania.barrios@tagumedica.com
- Renombra test/ a tools/ (colecciones de requests SAP/ApiGateway)
- Renombra vistas de frontend con sufijo View para consistencia
- Refactor de componentes UI compartidos y agrega utilidades (Icon, PageLoader, SecondaryButton, FieldTooltip, errors)
2026-09-04 09:24:31 -05:00

68 lines
1.8 KiB
TypeScript

import type { F4Config } from "../types/reports";
export interface CrystalReportParameter {
name: string;
type: string;
label: string;
inputType: "text" | "number" | "date" | "f4-modal";
required?: boolean;
placeholder?: string;
defaultValue?: any;
f4Config?: F4Config;
}
export interface CrystalReportDefinition {
id: string;
title: string;
description?: string;
icon?: string;
parameters: CrystalReportParameter[];
}
export const crystalReportsConfig: Record<string, CrystalReportDefinition[]> = {
socios: [],
ventas: [],
compras: [],
inventario: [
{
id: "DLN20015",
title: "Impresión de Etiquetas",
icon: "chart",
parameters: [
{
name: "Dockey@",
type: "xsd:decimal",
label: "Documento",
inputType: "f4-modal",
required: true,
f4Config: {
endpoint: "DeliveryNotes",
fields: ["DocNum", "CardCode", "CardName", "DocDate", "DocEntry"],
columns: [
{ key: "DocNum", title: "Número", width: "100px" },
{ key: "CardCode", title: "Código", width: "100px" },
{ key: "CardName", title: "Cliente", width: "200px" },
{ key: "DocDate", title: "Fecha", width: "100px" },
{ key: "DocEntry", title: "Documento", width: "100px" },
],
baseFilter: "Cancelled eq 'tNO'",
orderby: "DocNum desc",
valueField: "DocEntry",
labelField: "DocNum",
selectionMode: "unica",
},
},
{
name: "CANTIDAD",
type: "xsd:decimal",
label: "Cantidad",
inputType: "number",
required: true,
placeholder: "0",
defaultValue: "1",
},
],
},
],
};