mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 22:50:46 +02:00
Merge pull request #25713 from overleaf/ii-managed-users-make-unmanaged-events
[web] Tracking events for offboarding managed users GitOrigin-RevId: 12d0f178bab9f2f0923135ce3661738acdc85b82
This commit is contained in:
+3
@@ -20,6 +20,7 @@ import getMeta from '@/utils/meta'
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
import DropdownListItem from '@/features/ui/components/bootstrap-5/dropdown-list-item'
|
||||
import { Spinner } from 'react-bootstrap'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
type resendInviteResponse = {
|
||||
success: boolean
|
||||
@@ -171,10 +172,12 @@ export default function DropdownButton({
|
||||
}
|
||||
|
||||
const onDeleteUserClick = () => {
|
||||
sendMB('delete-managed-user-selected')
|
||||
openOffboardingModalForUser(user)
|
||||
}
|
||||
|
||||
const onReleaseUserClick = () => {
|
||||
sendMB('remove-managed-user-selected')
|
||||
openRemoveModalForUser(user)
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -17,6 +17,7 @@ import OLNotification from '@/features/ui/components/ol/ol-notification'
|
||||
import OLFormControl from '@/features/ui/components/ol/ol-form-control'
|
||||
import OLFormLabel from '@/features/ui/components/ol/ol-form-label'
|
||||
import OLFormSelect from '@/features/ui/components/ol/ol-form-select'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
type OffboardManagedUserModalProps = {
|
||||
user: User
|
||||
@@ -48,8 +49,9 @@ export default function OffboardManagedUserModal({
|
||||
const shouldEnableDeleteUserButton =
|
||||
suppliedEmail === user.email && !!selectedRecipientId
|
||||
|
||||
const handleDeleteUserSubmit = (event: any) => {
|
||||
const handleDeleteUserSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault()
|
||||
sendMB('delete-managed-user-confirmed')
|
||||
runAsync(
|
||||
postJSON(`/manage/groups/${groupId}/offboardManagedUser/${user._id}`, {
|
||||
body: {
|
||||
|
||||
+2
@@ -16,6 +16,7 @@ import OLButton from '@/features/ui/components/ol/ol-button'
|
||||
import OLNotification from '@/features/ui/components/ol/ol-notification'
|
||||
import OLFormControl from '@/features/ui/components/ol/ol-form-control'
|
||||
import OLFormLabel from '@/features/ui/components/ol/ol-form-label'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
type RemoveManagedUserModalProps = {
|
||||
user: User
|
||||
@@ -42,6 +43,7 @@ export default function RemoveManagedUserModal({
|
||||
|
||||
const handleReleaseUserSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault()
|
||||
sendMB('remove-managed-user-confirmed')
|
||||
runAsync(
|
||||
postJSON(`/manage/groups/${groupId}/release-managed-user/${user._id}`, {
|
||||
body: {
|
||||
|
||||
Reference in New Issue
Block a user