mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #14483 from overleaf/ab-fix-delete-user-button-check
[web] Show remove from group button instead of delete user if enrollment is {} GitOrigin-RevId: d344b199be70d4661f25088962bd8158b443aed9
This commit is contained in:
parent
9787edcc8e
commit
796a92841f
3 changed files with 5 additions and 5 deletions
|
@ -173,7 +173,7 @@ export default function ManagedUserDropdownButton({
|
|||
) : null}
|
||||
</MenuItemButton>
|
||||
) : null}
|
||||
{user.enrollment ? (
|
||||
{user.enrollment?.managedBy ? (
|
||||
<MenuItemButton
|
||||
className="delete-user-action"
|
||||
data-testid="delete-user-action"
|
||||
|
|
|
@ -61,7 +61,7 @@ describe('ManagedUserDropdownButton', function () {
|
|||
last_name: 'User',
|
||||
invite: true,
|
||||
last_active_at: new Date(),
|
||||
enrollment: undefined,
|
||||
enrollment: {},
|
||||
isEntityAdmin: undefined,
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ describe('ManagedUserDropdownButton', function () {
|
|||
last_name: 'User',
|
||||
invite: false,
|
||||
last_active_at: new Date(),
|
||||
enrollment: undefined,
|
||||
enrollment: {},
|
||||
isEntityAdmin: true,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export type UserEnrollment = {
|
||||
managedBy: string
|
||||
enrolledAt: Date
|
||||
managedBy?: string
|
||||
enrolledAt?: Date
|
||||
}
|
||||
|
||||
export type User = {
|
||||
|
|
Loading…
Reference in a new issue