Skip to content

Commit 89cf5b7

Browse files
author
FalkWolsky
committed
Fixing Merge errors for Frontend Files
1 parent 937b609 commit 89cf5b7

File tree

2 files changed

+85
-70
lines changed

2 files changed

+85
-70
lines changed

client/packages/lowcoder/src/pages/setting/permission/groupUsersPermission.tsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
} from "./styledComponents";
3131
import history from "util/history";
3232
import { PERMISSION_SETTING } from "constants/routesURL";
33-
import { Table, TableProps } from "antd";
3433

3534
const StyledAddIcon = styled(AddIcon)`
3635
g path {
@@ -93,13 +92,12 @@ function GroupUsersPermission(props: GroupPermissionProp) {
9392
/>
9493
)}
9594
</PermissionHeaderWrapper>
96-
<TableStyled as={Table as React.FC<TableProps<GroupUser>>}
95+
<TableStyled
9796
tableLayout={"auto"}
9897
scroll={{ x: "100%" }}
9998
dataSource={sortedGroupUsers}
10099
rowKey="userId"
101100
pagination={false}
102-
103101
loading={loading}
104102
>
105103
<Column
@@ -148,23 +146,24 @@ function GroupUsersPermission(props: GroupPermissionProp) {
148146
})
149147
);
150148
setTimeout(() => {
151-
setModify?.(!modify);
149+
setModify(!modify);
152150
}, 200);
153-
}}
154-
>
155-
{TacoRoles.map((role) => (
156-
<CustomSelect.Option key={role} value={role} label={GroupRoleInfo[role].name}>
157-
<RoleSelectTitle>{GroupRoleInfo[role].name}</RoleSelectTitle>
158-
<RoleSelectSubTitle>{GroupRoleInfo[role].desc}</RoleSelectSubTitle>
159-
</CustomSelect.Option>
160-
))}
161-
</CustomSelect>
162-
),
163-
},
164-
{
165-
title: trans("memberSettings.actionColumn"),
166-
key: "action",
167-
render: (value, record) =>
151+
}}
152+
>
153+
{TacoRoles.map((role) => (
154+
<CustomSelect.Option key={role} value={role} label={GroupRoleInfo[role].name}>
155+
<RoleSelectTitle>{GroupRoleInfo[role].name}</RoleSelectTitle>
156+
<RoleSelectSubTitle>{GroupRoleInfo[role].desc}</RoleSelectSubTitle>
157+
</CustomSelect.Option>
158+
))}
159+
</CustomSelect>
160+
)}
161+
/>
162+
<Column
163+
title={trans("memberSettings.actionColumn")}
164+
key="action"
165+
render={(value, record: GroupUser) => {
166+
return (
168167
!group.syncGroup && (
169168
<div className="operation-cell-div-wrapper">
170169
{currentOrgAdmin(currentUser) && (
@@ -179,9 +178,9 @@ function GroupUsersPermission(props: GroupPermissionProp) {
179178
dispatch(
180179
quitGroupAction({ groupId: group.groupId, userId: currentUser.id })
181180
);
182-
setTimeout(() => {
183-
setModify?.(!modify);
184-
}, 200);
181+
setTimeout(() => {
182+
setModify(!modify);
183+
}, 200);
185184
}}
186185
>
187186
{trans("memberSettings.exitGroup")}
@@ -197,22 +196,23 @@ function GroupUsersPermission(props: GroupPermissionProp) {
197196
groupId: group.groupId,
198197
})
199198
);
200-
setTimeout(() => {
201-
setModify?.(!modify);
202-
}, 200);
199+
setTimeout(() => {
200+
setModify(!modify);
201+
}, 200);
203202
}}
204203
>
205204
{trans("memberSettings.moveOutGroup")}
206205
</span>
207206
)
208207
)}
209208
</div>
210-
),
211-
},
212-
]}
213-
/>
209+
)
210+
);
211+
}}
212+
/>
213+
</TableStyled>
214214
</>
215215
);
216216
}
217217

218-
export default GroupUsersPermission;
218+
export default GroupUsersPermission;

client/packages/lowcoder/src/pages/setting/permission/orgUsersPermission.tsx

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import { validateResponse } from "api/apiUtils";
4545
import copyToClipboard from "copy-to-clipboard";
4646
import { BackgroundColor } from "constants/style";
4747
import { messageInstance } from "lowcoder-design/src/components/GlobalInstances";
48-
import { Table, TableProps } from "antd";
4948

5049
const StyledMembersIcon = styled(MembersIcon)`
5150
g g {
@@ -145,7 +144,7 @@ function OrgUsersPermission(props: UsersPermissionProp) {
145144
style={{ marginLeft: "auto" }}
146145
/>
147146
</PermissionHeaderWrapper>
148-
<TableStyled as={Table as React.FC<TableProps<OrgUser>>}
147+
<TableStyled
149148
tableLayout={"auto"}
150149
scroll={{ x: "100%" }}
151150
dataSource={sortedOrgUsers}
@@ -242,48 +241,64 @@ function OrgUsersPermission(props: UsersPermissionProp) {
242241
record.role === ADMIN_ROLE && adminCount === 1 ? (
243242
<QuestionTooltip title={LAST_ADMIN_QUIT} />
244243
) : (
245-
currentOrgAdmin(currentUser) && (
246-
<span
247-
onClick={() => {
248-
CustomModal.confirm({
249-
title: trans("memberSettings.moveOutOrg"),
250-
type: "warn",
251-
content: transToNode(
252-
isSaasMode(sysConfig)
253-
? "memberSettings.moveOutOrgDescSaasMode"
254-
: "memberSettings.moveOutOrgDesc",
255-
{ name: <b>{record.name}</b> }
256-
),
257-
onConfirm: () => {
258-
dispatch(
259-
deleteOrgUserAction({
260-
userId: record.userId,
261-
orgId: orgId,
262-
})
263-
);
244+
<span
245+
onClick={() => {
246+
CustomModal.confirm({
247+
title: trans("memberSettings.exitOrg"),
248+
type: "warn",
249+
content: trans("memberSettings.exitOrgDesc"),
250+
onConfirm: () => {
251+
dispatch(quitOrgAction(orgId));
252+
},
253+
confirmBtnType: "delete",
254+
okText: trans("memberSettings.exitOrg"),
255+
});
256+
}}
257+
>
258+
{trans("memberSettings.exitOrg")}
259+
</span>
260+
)
261+
) : (
262+
currentOrgAdmin(currentUser) && (
263+
<span
264+
onClick={() => {
265+
CustomModal.confirm({
266+
title: trans("memberSettings.moveOutOrg"),
267+
type: "warn",
268+
content: transToNode(
269+
isSaasMode(sysConfig)
270+
? "memberSettings.moveOutOrgDescSaasMode"
271+
: "memberSettings.moveOutOrgDesc",
272+
{ name: <b>{record.name}</b> }
273+
),
274+
onConfirm: () => {
275+
dispatch(
276+
deleteOrgUserAction({
277+
userId: record.userId,
278+
orgId: orgId,
279+
})
280+
);
264281
setTimeout(() => {
265-
setModify?.(!modify);
282+
setModify(!modify);
266283
}, 200);
267-
},
268-
confirmBtnType: "delete",
269-
okText: trans("memberSettings.moveOutOrg"),
270-
});
271-
}}
272-
>
273-
{trans("memberSettings.moveOutOrg")}
274-
</span>
275-
)
276-
)}
277-
{operationItems.length > 0 && <EditPopover items={operationItems} />}
278-
</div>
279-
);
280-
},
281-
},
282-
]}
284+
},
285+
confirmBtnType: "delete",
286+
okText: trans("memberSettings.moveOutOrg"),
287+
});
288+
}}
289+
>
290+
{trans("memberSettings.moveOutOrg")}
291+
</span>
292+
)
293+
)}
294+
{operationItems.length > 0 && <EditPopover items={operationItems} />}
295+
</div>
296+
);
297+
}}
283298
/>
284-
299+
</TableStyled>
285300
</>
286301
);
287302
}
288303

289-
export default OrgUsersPermission;
304+
export default OrgUsersPermission;

0 commit comments

Comments
 (0)