Files
speckle-server/packages/frontend-2/components/error/page/Renderer.vue
T
Kristaps Fabians Geikins 2bb7802fb9 feat: accept & decline workspace invite as a registered member (#2675)
* abstract base invite banner

* WIP banner actions

* WIP modify obj

* minor fix

* invite accept/decline cache mutations

* banner accept/decline basically works

* new block for accepting workspace invite

* WIP wrong account flow

* login/registration block changes

* add email invite related changes

* add new email FE

* add email w/ invite works

* final adjustments

* minor fixes

* addressing cr comments

* no-FF support

* extra workspace ff checks
2024-08-19 13:01:25 +03:00

31 lines
926 B
Vue

<template>
<div class="flex flex-col items-center space-y-8">
<ErrorPageProjectAccessErrorBlock v-if="isNoProjectAccessError" />
<ErrorPageWorkspaceAccessErrorBlock v-else-if="isNoWorkspaceAccessError" />
<ErrorPageGenericErrorBlock v-else :error="finalError" />
</div>
</template>
<script setup lang="ts">
import { formatAppError } from '~/lib/core/helpers/observability'
const props = defineProps<{
error: {
statusCode: number
message: string
stack?: string
}
}>()
const finalError = computed(() => formatAppError(props.error))
const isNoProjectAccessError = computed(
() =>
finalError.value.statusCode === 403 &&
finalError.value.message.includes('You do not have access to this project')
)
const isNoWorkspaceAccessError = computed(
() =>
finalError.value.statusCode === 403 &&
finalError.value.message.includes('You do not have access to this workspace')
)
</script>