export type ReportViewTabKey = 'attachments' | 'customPrint' | 'formDetail';
|
export type NormalizedReportViewTab = ReportViewTab & { internalKey: string };
|
|
export interface ReportViewConfig {
|
actions?: ReportViewAction[];
|
activeKey?: ReportViewTabKey | string;
|
onClose?: () => void;
|
tabs: ReportViewTab[];
|
title?: string;
|
}
|
|
export type ReportViewTab = AttachmentsTab | CustomPrintTab | FormDetailTab;
|
|
export interface FormDetailTab {
|
id: string;
|
key: 'formDetail';
|
menuId?: string;
|
modelId: string;
|
propsValue?: string;
|
title?: string;
|
}
|
|
export interface CustomPrintTab {
|
key: 'customPrint';
|
print: ReportViewCustomPrintConfig;
|
title?: string;
|
}
|
|
export interface ReportViewCustomPrintConfig {
|
data: any;
|
showPdfBtn?: boolean;
|
template: string;
|
title?: string;
|
}
|
|
export interface AttachmentsTab {
|
key: 'attachments';
|
title?: string;
|
}
|
|
export interface ReportViewAction {
|
confirmText?: string;
|
danger?: boolean;
|
disabled?: boolean;
|
key: string;
|
label: string;
|
onClick: () => Promise<void> | void;
|
type?: 'default' | 'primary';
|
}
|
|
export interface NormalizedReportViewConfig extends Omit<ReportViewConfig, 'activeKey' | 'tabs'> {
|
activeKey?: string;
|
tabs: NormalizedReportViewTab[];
|
title: string;
|
}
|