mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-05-20 10:04:53 +00:00
🎨 UI: Add vote ribbon for board members to highlight pending voting decisions
This commit is contained in:
@@ -103,4 +103,9 @@ class ProjectProposal extends Model implements HasMedia
|
|||||||
{
|
{
|
||||||
return $this->hasMany(Vote::class);
|
return $this->hasMany(Vote::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasVoteFrom(EinundzwanzigPleb $pleb): bool
|
||||||
|
{
|
||||||
|
return $this->votes->contains('einundzwanzig_pleb_id', $pleb->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,4 +143,21 @@
|
|||||||
color: #f43658;
|
color: #f43658;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Board Vote Ribbon
|
||||||
|
*
|
||||||
|
* Diagonal ribbon in der oberen rechten Ecke einer Card, das
|
||||||
|
* Vorstandsmitglieder auf ausstehende Voting-Entscheidungen hinweist.
|
||||||
|
*/
|
||||||
|
.vote-ribbon {
|
||||||
|
@apply pointer-events-none absolute top-6 -right-12 z-10 w-44 rotate-45
|
||||||
|
bg-gradient-to-r from-amber-400 via-orange-500 to-orange-600
|
||||||
|
py-1.5 text-center text-[10px] font-bold uppercase tracking-[0.18em] text-white
|
||||||
|
shadow-[0_4px_12px_rgba(249,115,22,0.45)] ring-1 ring-white/20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-ribbon__label {
|
||||||
|
@apply drop-shadow-[0_1px_1px_rgba(0,0,0,0.35)];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,21 @@
|
|||||||
'approved' => ($approveCount === 3 || $disapproveCount !== 3),
|
'approved' => ($approveCount === 3 || $disapproveCount !== 3),
|
||||||
default => true,
|
default => true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$showBoardVoteRibbon = $currentPleb
|
||||||
|
&& $currentPleb->isBoardMember()
|
||||||
|
&& ! $project->sats_paid
|
||||||
|
&& ! $project->hasVoteFrom($currentPleb);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if($shouldDisplay)
|
@if($shouldDisplay)
|
||||||
|
|
||||||
<flux:card class="flex flex-col sm:flex-row overflow-hidden" wire:key="project_{{ $project->id }}">
|
<flux:card class="relative flex flex-col sm:flex-row overflow-hidden" wire:key="project_{{ $project->id }}">
|
||||||
|
@if($showBoardVoteRibbon)
|
||||||
|
<div class="vote-ribbon">
|
||||||
|
<span class="vote-ribbon__label">Jetzt voten</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
@if(!$project->sats_paid)
|
@if(!$project->sats_paid)
|
||||||
<a class="relative block w-full h-48 sm:w-56 sm:h-auto xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0 sm:shrink-0"
|
<a class="relative block w-full h-48 sm:w-56 sm:h-auto xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0 sm:shrink-0"
|
||||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user