diff --git a/frontend/src/integrations/github/components/github-connect.vue b/frontend/src/integrations/github/components/github-connect.vue index 37d436882d..c71cad0d08 100644 --- a/frontend/src/integrations/github/components/github-connect.vue +++ b/frontend/src/integrations/github/components/github-connect.vue @@ -8,7 +8,6 @@ import config from '@/config'; import ConfirmDialog from '@/shared/dialog/confirm-dialog'; import { useRoute, useRouter } from 'vue-router'; -const emit = defineEmits(['inviteColleagues']); defineProps({ integration: { type: Object, @@ -29,8 +28,9 @@ const connect = () => { 'Are you the admin of your GitHub organization?', titleClass: 'text-lg pt-2', message: - `Only GitHub users with admin permissions are able to connect crowd.dev's GitHub integration. - If you are an organization contact, you will need an approval from the GitHub workspace admin. Read more`, + route.name !== 'onboard' ? `Only GitHub users with admin permissions are able to connect crowd.dev's GitHub integration. + If you are an organization contact, you will need an approval from the GitHub workspace admin. Read more` + : 'Only GitHub users with admin permissions are able to connect crowd.dev\'s GitHub integration. You can request admin permissions or connect GitHub later by inviting your organization\'s admin to the workspace. Read more', icon: 'ri-information-line', confirmButtonText: 'I\'m the GitHub organization admin', cancelButtonText: 'Invite organization admin to this workspace', @@ -40,17 +40,14 @@ const connect = () => { distinguishCancelAndClose: true, autofocus: false, messageClass: 'text-xs !leading-5 !mt-1 text-gray-600', + showCancelButton: route.name !== 'onboard', }).then(() => { window.open(githubConnectUrl.value, '_self'); }).catch((action) => { if (action === 'cancel') { - if (route.name === 'onboard') { - emit('inviteColleagues'); - } else { - router.push({ - name: 'settings', - }); - } + router.push({ + name: 'settings', + }); } }); }; diff --git a/frontend/src/modules/integration/components/integration-connect.vue b/frontend/src/modules/integration/components/integration-connect.vue index 2042f17d05..102fd00c38 100644 --- a/frontend/src/modules/integration/components/integration-connect.vue +++ b/frontend/src/modules/integration/components/integration-connect.vue @@ -6,7 +6,6 @@ && props.integration.connectComponent " :integration="props.integration" - @invite-colleagues="emit('inviteColleagues')" >