Skip to content

Commit e928cd8

Browse files
author
lcx
committed
fix: issue with adding user permissions
1 parent e91a9e7 commit e928cd8

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

frontend/packages/core/src/const/member/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type MemberTableListItem = {
1919
enable:boolean
2020
departmentId:string
2121
roles:EntityItem[]
22-
form: string
22+
from: string
2323
};
2424

2525
export type AddToDepartmentProps = {
@@ -41,7 +41,7 @@ export type MemberDropdownModalFieldType = {
4141

4242
export type MemberDropdownModalProps = {
4343
type:'addDep'|'addChild'|'addMember'|'editMember'|'rename'
44-
entity?:(MemberTableListItem & {departmentIds:string[]}) | ({id?:string, departmentIds?:string[],name?:string,form?:string})
44+
entity?:(MemberTableListItem & {departmentIds:string[]}) | ({id?:string, departmentIds?:string[],name?:string,from?:string})
4545
selectedMemberGroupId?:string
4646
}
4747

frontend/packages/core/src/pages/member/MemberDropdownModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export const MemberDropdownModal = forwardRef<MemberDropdownModalHandle,MemberDr
1414
const {fetchData} = useFetch()
1515
const [departmentList, setDepartmentList] = useState<DepartmentListItem[]>([])
1616
const { state } = useGlobalContext()
17-
const [disableEditMemberData] = useState<boolean>(entity?.form !== 'self-build')
18-
17+
const [disableEditMemberData] = useState<boolean>(entity?.from === 'feishu')
1918
const save:()=>Promise<boolean | string> = ()=>{
2019
let url:string
2120
let method:string

frontend/packages/core/src/pages/member/MemberList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ const MemberList = () => {
396396
width: 600,
397397
okText: $t('确认'),
398398
okButtonProps: {
399-
disabled: isActionAllowed(type) || (type === 'editMember' && entity?.form !== 'self-build')
399+
disabled: isActionAllowed(type) || (type === 'editMember' && entity?.from === 'feishu')
400400
},
401401
cancelText: $t('取消'),
402402
closable: true,

0 commit comments

Comments
 (0)