forked from wangziqi/gongxue-base
fix(admin): refactor inline map arrow to avoid oxc TSX parser confusion
This commit is contained in:
@@ -338,9 +338,8 @@ const IntegrationConfigPage: React.FC = () => {
|
|||||||
};
|
};
|
||||||
flatten(orgTree);
|
flatten(orgTree);
|
||||||
|
|
||||||
const payload = {
|
const usersPayload = allUsers.map((u) => {
|
||||||
classes: Object.values(classMarks),
|
const item: Record<string, unknown> = {
|
||||||
users: allUsers.map((u) => ({
|
|
||||||
dingUserId: u.dingUserId,
|
dingUserId: u.dingUserId,
|
||||||
name: u.name,
|
name: u.name,
|
||||||
mobile: u.mobile,
|
mobile: u.mobile,
|
||||||
@@ -348,7 +347,13 @@ const IntegrationConfigPage: React.FC = () => {
|
|||||||
? (teacherRoles[u.dingUserId] || defaultTeacherRoleId)
|
? (teacherRoles[u.dingUserId] || defaultTeacherRoleId)
|
||||||
: null,
|
: null,
|
||||||
dingDeptIds: u.deptIds,
|
dingDeptIds: u.deptIds,
|
||||||
})),
|
};
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
const payload = {
|
||||||
|
classes: Object.values(classMarks),
|
||||||
|
users: usersPayload,
|
||||||
|
};
|
||||||
|
|
||||||
const res: any = await api.post('/sync/dingtalk/import-users', payload);
|
const res: any = await api.post('/sync/dingtalk/import-users', payload);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
|
|||||||
Reference in New Issue
Block a user