Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

fix: org email to lower case and ui fixes

Nikolai Gimanc200826d317f
diff --git a/api/src/tv-modules/organizations/OrganizationRepository.ts b/api/src/tv-modules/organizations/OrganizationRepository.ts
index b1de1ae..43cc569 100644
--- a/api/src/tv-modules/organizations/OrganizationRepository.ts
+++ b/api/src/tv-modules/organizations/OrganizationRepository.ts
@@ -139,7 +139,7 @@ export class OrganizationRepository {
})
.from(OrganizationMembersSchema)
.innerJoin(OrganizationsSchema, eq(OrganizationMembersSchema.organizationId, OrganizationsSchema.id))
- .where(eq(OrganizationMembersSchema.email, email))
+ .where(eq(OrganizationMembersSchema.email, email.toLowerCase()))
)
if (!result) return []
@@ -192,7 +192,7 @@ export class OrganizationRepository {
.where(
and(
eq(OrganizationMembersSchema.organizationId, orgId),
- eq(OrganizationMembersSchema.email, email),
+ eq(OrganizationMembersSchema.email, email.toLowerCase()),
)
)
)
@@ -220,7 +220,7 @@ export class OrganizationRepository {
.where(
and(
eq(OrganizationMembersSchema.organizationId, orgId),
- eq(OrganizationMembersSchema.email, email),
+ eq(OrganizationMembersSchema.email, email.toLowerCase()),
)
)
)
diff --git a/taskview-packages/taskview-api/src/api/organizations.types.ts b/taskview-packages/taskview-api/src/api/organizations.types.ts
index defe3e9..21dc5c3 100644
--- a/taskview-packages/taskview-api/src/api/organizations.types.ts
+++ b/taskview-packages/taskview-api/src/api/organizations.types.ts
@@ -5,6 +5,7 @@ export type Organization = {
ownerId: number
logoUrl: string | null
plan: string
+ isPersonal: number
createdAt: string
updatedAt: string
currentUserRole: 'owner' | 'admin' | 'member'
diff --git a/web/src/components/features/organizations/parts/OrgDetailModal.vue b/web/src/components/features/organizations/parts/OrgDetailModal.vue
index 277aa68..8de712d 100644
--- a/web/src/components/features/organizations/parts/OrgDetailModal.vue
+++ b/web/src/components/features/organizations/parts/OrgDetailModal.vue
@@ -10,15 +10,25 @@
:ui="{ root: 'flex flex-col flex-1 min-h-0', body: 'flex-1 min-h-0 overflow-y-auto' }"
>
<template #header>
- <div class="flex items-center justify-between">
- <h3 class="font-semibold">
- {{ organization.name }}
- </h3>
- <UButton
- icon="i-lucide-x"
- variant="ghost"
- color="neutral"
- @click="open = false"
+ <div class="flex flex-col gap-2">
+ <div class="flex items-center justify-between">
+ <h3 class="font-semibold">
+ {{ organization.name }}
+ </h3>
+ <UButton
+ icon="i-lucide-x"
+ variant="ghost"
+ color="neutral"
+ @click="open = false"
+ />
+ </div>
+ <UAlert
+ v-if="organization.isPersonal"
+ :title="t('organizations.personal')"
+ :description="t('organizations.personalHint')"
+ icon="i-lucide-user"
+ color="info"
+ variant="subtle"
/>
</div>
</template>
@@ -69,7 +79,7 @@
<template #footer>
<div class="flex justify-between">
<UButton
- v-if="isOwner"
+ v-if="isOwner && !organization.isPersonal"
:label="t('organizations.delete')"
color="error"
variant="ghost"
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index b33f643..c3edd28 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -550,6 +550,8 @@ export default {
roleUpdated: 'Role updated',
close: 'Close',
slugTaken: 'This slug is already taken',
+ personal: 'This is your personal workspace',
+ personalHint: 'Auto-created together with your account. It cannot be deleted.',
},
sso: {
noConfig: 'SSO is not configured for this organization',
diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.ts
index 4175af7..e985ab3 100644
--- a/web/src/locales/ru.ts
+++ b/web/src/locales/ru.ts
@@ -523,6 +523,8 @@ export default {
roleUpdated: 'Роль обновлена',
close: 'Закрыть',
slugTaken: 'Этот slug уже занят',
+ personal: 'Это персональный проект',
+ personalHint: 'Создан автоматически вместе с аккаунтом. Удалить его нельзя.',
},
sso: {
noConfig: 'SSO не настроен для этой организации',