This commit is contained in:
@@ -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 { ArrowDown2, CloseCircle, TickSquare } from 'iconsax-react'
|
||||||
import { clx } from '../helpers/utils'
|
import { clx } from '../helpers/utils'
|
||||||
import type { ItemsSelectType } from './Select'
|
import type { ItemsSelectType } from './Select'
|
||||||
@@ -55,7 +55,7 @@ const MultiSelect: FC<Props> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClear = (e: MouseEvent) => {
|
const handleClear = (e: ReactMouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
onChange([])
|
onChange([])
|
||||||
onBlur?.()
|
onBlur?.()
|
||||||
|
|||||||
@@ -51,8 +51,18 @@ export type RoleItemType = {
|
|||||||
export type RolesResponseType = BaseResponse<RoleItemType[]>;
|
export type RolesResponseType = BaseResponse<RoleItemType[]>;
|
||||||
export type AdminDetailResponseType = BaseResponse<AdminItemType>;
|
export type AdminDetailResponseType = BaseResponse<AdminItemType>;
|
||||||
|
|
||||||
/** Admin "me" response: admin with full role including permissions */
|
/** Admin "me" response: admin with full role including permissions.
|
||||||
export type AdminMeDataType = Omit<AdminItemType, "role"> & {
|
* 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;
|
role: RoleItemType;
|
||||||
};
|
}
|
||||||
export type AdminMeResponseType = BaseResponse<AdminMeDataType>;
|
export type AdminMeResponseType = BaseResponse<AdminMeDataType>;
|
||||||
|
|||||||
Reference in New Issue
Block a user