revamp template
This commit is contained in:
50
src/types/GlobalTypes.ts
Normal file
50
src/types/GlobalTypes.ts
Normal file
@ -0,0 +1,50 @@
|
||||
export interface TableResponseTypes<T> {
|
||||
status: boolean;
|
||||
count: number;
|
||||
data: T[];
|
||||
}
|
||||
|
||||
export interface TableParamsTypes {
|
||||
limit: number;
|
||||
page: number;
|
||||
}
|
||||
|
||||
export interface ActionResponseTypes {
|
||||
status: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ActionMenuReponseTypes {
|
||||
status: boolean;
|
||||
message: string;
|
||||
data?: {
|
||||
role_name: string;
|
||||
roles_list: RoleList[];
|
||||
token: string;
|
||||
} | null;
|
||||
}
|
||||
|
||||
export interface RoleList {
|
||||
children?: RoleList[];
|
||||
icon: string;
|
||||
id: string;
|
||||
id_parent: string;
|
||||
link: string;
|
||||
module: string;
|
||||
name: string;
|
||||
order_number: number;
|
||||
}
|
||||
export interface MappedMenu {
|
||||
title: string;
|
||||
path?: string;
|
||||
children?: MappedMenu[];
|
||||
}
|
||||
// export interface ChildrenRole {
|
||||
// icon: string;
|
||||
// id: string;
|
||||
// id_parent: string;
|
||||
// link: string;
|
||||
// module: string;
|
||||
// name: string;
|
||||
// order_number: number;
|
||||
// }
|
||||
9
src/types/tanstack.d.ts
vendored
Normal file
9
src/types/tanstack.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { RowData } from '@tanstack/react-table';
|
||||
|
||||
declare module '@tanstack/react-table' {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
interface ColumnMeta<TData extends RowData, TValue> {
|
||||
className?: string;
|
||||
cellClassName?: string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user