File "table.ts"
Full Path: /var/www/html/gitep_front/src/shared/modals/table.ts
File size: 1.57 KB
MIME-type: text/plain
Charset: utf-8
interface NameInfo {
name: string;
companyName: string;
}
interface ArticleProjectInfo {
name: string;
desc: string;
}
interface ApplicantInfo {
image: string;
first_name: string;
last_name: string;
patronymic: string;
media?: { original_url: string }[];
}
interface BaseRowData {
amount: string;
}
interface CounterpartyInfo {
id: number;
name: string;
}
export interface MainRowData extends BaseRowData {
key: number;
name: string | NameInfo;
counterparty?: CounterpartyInfo
message: string;
status: string;
articleProject: ArticleProjectInfo;
applicant: ApplicantInfo;
paymentDate: string;
purpose1C: string;
note1C: string;
writeOffAccount1C: string;
splitPayments: boolean;
children?: NestedRowData[]; // Вложенные данные
innerGroup?: boolean;
isGroup?: boolean; // Это групповой элемент или нет
isExpanded?: boolean; // Флаг для раскрытия/сворачивания
}
export type NestedRowData = Pick<MainRowData, "articleProject" | "amount">;
export type GroupRowData = BaseRowData & {
key: number;
name: string;
isGroup?: true;
innerGroup?: boolean;
children: MainRowData[];
counterparty?: CounterpartyInfo
};
// export type CommonColumnsData = MainRowData | GroupRowData;
export type CommonColumnsData = any | GroupRowData;
export type NameColumn = NameInfo;
export type SumColumn = Pick<MainRowData, "amount">;
export type ArticleProjectColumn = ArticleProjectInfo;
export type ApplicantColumn = ApplicantInfo;
export type CounterpartyType = CounterpartyInfo;