feat: inherit channel report requirements
This commit is contained in:
@@ -509,12 +509,26 @@ export type ChannelGroupItem = DictionaryItem & {
|
||||
|
||||
export type ChannelReportField = DictionaryItem & {
|
||||
channelId: string;
|
||||
drainageFieldId?: string | null;
|
||||
reportType?: 'signature' | 'drainage' | 'both';
|
||||
code: string;
|
||||
name: string;
|
||||
fieldType: string;
|
||||
required: boolean;
|
||||
description?: string | null;
|
||||
sortOrder?: number;
|
||||
drainageField?: DictionaryItem | null;
|
||||
};
|
||||
|
||||
export type ApplicationReportField = {
|
||||
id: string;
|
||||
code: string;
|
||||
name: string;
|
||||
fieldType: string;
|
||||
required: boolean;
|
||||
description?: string | null;
|
||||
reportTypes: string[];
|
||||
channels: Array<{ id: string; code: string; name: string; groupId: string; groupName: string; required: boolean; reportType: 'signature' | 'drainage' | 'both' }>;
|
||||
};
|
||||
|
||||
export type ReportTask = DictionaryItem & {
|
||||
@@ -876,6 +890,8 @@ export const adminApi = {
|
||||
}),
|
||||
listApplicationConnections: (applicationId: string) =>
|
||||
request<ApplicationConnectionsResponse>(`/admin/enterprise-applications/${applicationId}/connections`),
|
||||
listApplicationReportFields: (applicationId: string, reportType?: 'signature' | 'drainage') =>
|
||||
request<ApplicationReportField[]>(withQuery(`/admin/enterprise-applications/${applicationId}/report-fields`, { reportType })),
|
||||
getApplicationCmppParams: (applicationId: string) =>
|
||||
request<ApplicationCmppParams>(`/admin/enterprise-applications/${applicationId}/cmpp-params`),
|
||||
listChannels: () => request<AdminChannel[]>('/admin/channels'),
|
||||
|
||||
Reference in New Issue
Block a user