diff --git a/src/components/MultiSelect.tsx b/src/components/MultiSelect.tsx index e2cfc6c..b146677 100644 --- a/src/components/MultiSelect.tsx +++ b/src/components/MultiSelect.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState, type FC, type MouseEvent } from 'react' +import { useEffect, useRef, useState, type FC, type MouseEvent as ReactMouseEvent } from 'react' import { ArrowDown2, CloseCircle, TickSquare } from 'iconsax-react' import { clx } from '../helpers/utils' import type { ItemsSelectType } from './Select' @@ -55,7 +55,7 @@ const MultiSelect: FC = ({ } } - const handleClear = (e: MouseEvent) => { + const handleClear = (e: ReactMouseEvent) => { e.stopPropagation() onChange([]) onBlur?.() diff --git a/src/pages/admin/types/Types.ts b/src/pages/admin/types/Types.ts index 6e2f309..70b1bc2 100644 --- a/src/pages/admin/types/Types.ts +++ b/src/pages/admin/types/Types.ts @@ -51,8 +51,18 @@ export type RoleItemType = { export type RolesResponseType = BaseResponse; export type AdminDetailResponseType = BaseResponse; -/** Admin "me" response: admin with full role including permissions */ -export type AdminMeDataType = Omit & { +/** Admin "me" response: admin with full role including permissions. + * Defined as an interface (not Omit) so RowDataType's index signature + * does not widen named fields to unknown via mapped types. + */ +export interface AdminMeDataType { + id: string; + createdAt: string; + deletedAt: string | null; + firstName: string; + lastName: string; + phone: string; + avatarUrl?: string | null; role: RoleItemType; -}; +} export type AdminMeResponseType = BaseResponse;