fix(types): resolve TypeScript compilation errors in frontend build
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m0s
This commit is contained in:
1 parent
354129b2d4
commit
e2772d99ea
5 files changed
+14
-5
No files matched your search
@@ -948,11 +948,14 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
||||
{/* Right Header Section: Sharing Badge, Icon-Only Button & View Switcher */}
|
||||
<div className="flex items-center gap-2">
|
||||
{currentSelectedList && (() => {
|
||||
const isOwner = !currentSelectedList.ownerId || currentSelectedList.ownerId === currentUser?.id;
|
||||
const listOwnerId = currentSelectedList.ownerId || currentSelectedList.userId;
|
||||
const isOwner = currentSelectedList.isOwner !== false && (!listOwnerId || listOwnerId === currentUser?.id);
|
||||
const sharesCount = (currentSelectedList.shares?.length || 0) > 0
|
||||
? currentSelectedList.shares.length
|
||||
: (currentSelectedList.members?.filter((m) => m.userId !== currentSelectedList.ownerId).length || 0);
|
||||
: (currentSelectedList.members?.filter((m) => m.userId !== listOwnerId).length || 0);
|
||||
const isShared = sharesCount > 0 || Boolean(currentSelectedList.teamId) || ((currentSelectedList.members?.length || 0) > 1);
|
||||
const ownerMember = currentSelectedList.members?.find((m) => m.role === 'owner' || m.userId === listOwnerId);
|
||||
const ownerDisplayName = currentSelectedList.ownerName || ownerMember?.displayName || ownerMember?.email || 'Eigentümer';
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-1.5">
|
||||
@@ -975,7 +978,7 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
||||
title="Teilen & Berechtigungen öffnen"
|
||||
>
|
||||
<Users className="w-2.5 h-2.5" />
|
||||
<span>Geteilt von {currentSelectedList.ownerName || 'Eigentümer'}</span>
|
||||
<span>Geteilt von {ownerDisplayName}</span>
|
||||
</button>
|
||||
)
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user