mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🎨 feat(project-support): add accepted checkbox and sats paid fields to project proposal form
This commit is contained in:
@@ -17,5 +17,11 @@ class ProjectProposalForm extends Form
|
||||
public $description = '';
|
||||
|
||||
#[Validate('required|url')]
|
||||
public $website= '';
|
||||
public $website = '';
|
||||
|
||||
#[Validate('bool')]
|
||||
public $accepted = '';
|
||||
|
||||
#[Validate('nullable|numeric')]
|
||||
public $sats_paid = '';
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ $handleNotApprove = function () {
|
||||
:seo="new SEOData(title: 'Unterstützung für: ' . $projectProposal->name,description: str($projectProposal->description)->limit(100, '...', true), image: $projectProposal->getFirstMediaUrl('main'))">
|
||||
@volt
|
||||
<div>
|
||||
@if($isAllowed)
|
||||
@if($projectProposal->accepted || $isAllowed)
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full">
|
||||
|
||||
<!-- Page content -->
|
||||
@@ -165,7 +165,7 @@ $handleNotApprove = function () {
|
||||
|
||||
<figure class="mb-6">
|
||||
<img class="rounded-sm h-48" src="{{ $projectProposal->getFirstMediaUrl('main') }}"
|
||||
alt="Meetup">
|
||||
alt="Picture">
|
||||
</figure>
|
||||
|
||||
<hr class="my-6 border-t border-gray-100 dark:border-gray-700/60">
|
||||
@@ -197,161 +197,73 @@ $handleNotApprove = function () {
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="space-y-4">
|
||||
@if($isAllowed && !$projectProposal->accepted)
|
||||
<!-- Sidebar -->
|
||||
<div class="space-y-4">
|
||||
|
||||
<!-- 1st block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
@if(!$ownVoteExists)
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
wire:click="approve"
|
||||
class="btn w-full bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white">
|
||||
<i class="fill-current shrink-0 fa-sharp-duotone fa-solid fa-thumbs-up"></i>
|
||||
<span class="ml-1">Zustimmen</span>
|
||||
</button>
|
||||
<button
|
||||
wire:click="notApprove"
|
||||
class="btn w-full bg-red-900 text-red-100 hover:bg-red-800 dark:bg-red-100 dark:text-red-800 dark:hover:bg-red-400">
|
||||
<i class="fill-current shrink-0 fa-sharp-duotone fa-solid fa-thumbs-down"></i>
|
||||
<span class="ml-1">Ablehnen</span>
|
||||
</button>
|
||||
{{--<x-textarea wire:model="form.reason" label="Grund für deine Ablehnung"/>--}}
|
||||
</div>
|
||||
@else
|
||||
<div class="space-y-2">
|
||||
<p>Du hast bereits abgestimmt.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- 1st block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
@if(!$ownVoteExists)
|
||||
<div class="space-y-2">
|
||||
<button
|
||||
wire:click="approve"
|
||||
class="btn w-full bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white">
|
||||
<i class="fill-current shrink-0 fa-sharp-duotone fa-solid fa-thumbs-up"></i>
|
||||
<span class="ml-1">Zustimmen</span>
|
||||
</button>
|
||||
<button
|
||||
wire:click="notApprove"
|
||||
class="btn w-full bg-red-900 text-red-100 hover:bg-red-800 dark:bg-red-100 dark:text-red-800 dark:hover:bg-red-400">
|
||||
<i class="fill-current shrink-0 fa-sharp-duotone fa-solid fa-thumbs-down"></i>
|
||||
<span class="ml-1">Ablehnen</span>
|
||||
</button>
|
||||
{{--<x-textarea wire:model="form.reason" label="Grund für deine Ablehnung"/>--}}
|
||||
</div>
|
||||
@else
|
||||
<div class="space-y-2">
|
||||
<p>Du hast bereits abgestimmt.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- 2nd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }})
|
||||
<!-- 2nd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="space-y-3">
|
||||
@foreach($boardVotes->where('value', 1) as $vote)
|
||||
<li>
|
||||
<div class="flex justify-between">
|
||||
<div class="grow flex items-center">
|
||||
<div class="relative mr-3">
|
||||
<img class="w-8 h-8 rounded-full"
|
||||
src="{{ $vote->einundzwanzigPleb->profile->picture }}"
|
||||
width="32"
|
||||
height="32"
|
||||
alt="{{ $vote->einundzwanzigPleb->profile->name }}">
|
||||
</div>
|
||||
<div class="truncate">
|
||||
<span class="text-sm font-medium text-gray-800 dark:text-gray-100">
|
||||
{{ $vote->einundzwanzigPleb->profile->name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 2nd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }})
|
||||
<!-- 2nd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="space-y-3">
|
||||
@foreach($boardVotes->where('value', 0) as $vote)
|
||||
<li>
|
||||
<div class="flex justify-between">
|
||||
<div class="grow flex items-center">
|
||||
<div class="relative mr-3">
|
||||
<img class="w-8 h-8 rounded-full"
|
||||
src="{{ $vote->einundzwanzigPleb->profile->picture }}"
|
||||
width="32"
|
||||
height="32"
|
||||
alt="{{ $vote->einundzwanzigPleb->profile->name }}">
|
||||
</div>
|
||||
<div class="truncate">
|
||||
<span class="text-sm font-medium text-gray-800 dark:text-gray-100">
|
||||
{{ $vote->einundzwanzigPleb->profile->name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 3rd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }})
|
||||
<!-- 3rd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="space-y-3">
|
||||
@foreach($otherVotes->where('value', 1) as $vote)
|
||||
<li>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="grow flex items-center">
|
||||
<div class="relative mr-3">
|
||||
<img class="w-8 h-8 rounded-full"
|
||||
src="{{ $vote->einundzwanzigPleb->profile->picture }}"
|
||||
width="32"
|
||||
height="32"
|
||||
alt="{{ $vote->einundzwanzigPleb->profile->name }}">
|
||||
</div>
|
||||
<div class="truncate">
|
||||
<span
|
||||
class="text-sm font-medium text-gray-800 dark:text-gray-100">
|
||||
{{ $vote->einundzwanzigPleb->profile->name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 3rd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }})
|
||||
<!-- 3rd block -->
|
||||
<div class="bg-white dark:bg-gray-800 p-5 shadow-sm rounded-xl lg:w-72 xl:w-80">
|
||||
<div class="flex justify-between space-x-1 mb-5">
|
||||
<div class="text-sm text-gray-800 dark:text-gray-100 font-semibold">
|
||||
Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }})
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="space-y-3">
|
||||
@foreach($otherVotes->where('value', 0) as $vote)
|
||||
<li>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="grow flex items-center">
|
||||
<div class="relative mr-3">
|
||||
<img class="w-8 h-8 rounded-full"
|
||||
src="{{ $vote->einundzwanzigPleb->profile->picture }}"
|
||||
width="32"
|
||||
height="32"
|
||||
alt="{{ $vote->einundzwanzigPleb->profile->name }}">
|
||||
</div>
|
||||
<div class="truncate">
|
||||
<span
|
||||
class="text-sm font-medium text-gray-800 dark:text-gray-100">
|
||||
{{ $vote->einundzwanzigPleb->profile->name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -111,6 +111,15 @@ $save = function () {
|
||||
:placeholder="__('Beabsichtigte Unterstützung in Sats')"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('form.accepted')" :label="__('Wurde angenommen')">
|
||||
<x-checkbox autocomplete="off" wire:model.debounce="form.accepted"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('form.sats_paid')" :label="__('Letztendlich bezahlte Satoshis')">
|
||||
<x-input autocomplete="off" wire:model.debounce="form.sats_paid"
|
||||
:placeholder="__('Satoshi-Anzahl')"/>
|
||||
</x-input.group>
|
||||
|
||||
<x-input.group :for="md5('form.description')">
|
||||
<x-slot name="label">
|
||||
<div>
|
||||
|
||||
@@ -76,186 +76,172 @@ $delete = function ($id) {
|
||||
>
|
||||
@volt
|
||||
<div>
|
||||
@if($isAllowed)
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="sm:flex sm:justify-between sm:items-center mb-5">
|
||||
|
||||
<!-- Left: Title -->
|
||||
<div class="mb-4 sm:mb-0">
|
||||
<h1 class="text-2xl md:text-3xl text-gray-800 dark:text-gray-100 font-bold">
|
||||
Einundzwanzig Projektunterstützungen
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- Right: Actions -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 justify-start sm:justify-end gap-2">
|
||||
|
||||
<!-- Search form -->
|
||||
<form class="relative">
|
||||
<x-input type="search" wire:model.live.debounce="search"
|
||||
placeholder="Suche…"/>
|
||||
</form>
|
||||
|
||||
<!-- Add meetup button -->
|
||||
@if($currentPleb && $currentPleb->association_status->value > 2)
|
||||
<x-button :href="route('association.projectSupport.create')" icon="plus"
|
||||
label="Projekt einreichen"/>
|
||||
@endif
|
||||
</div>
|
||||
<!-- Page header -->
|
||||
<div class="sm:flex sm:justify-between sm:items-center mb-5">
|
||||
|
||||
<!-- Left: Title -->
|
||||
<div class="mb-4 sm:mb-0">
|
||||
<h1 class="text-2xl md:text-3xl text-gray-800 dark:text-gray-100 font-bold">
|
||||
Einundzwanzig Projektunterstützungen
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
{{--<div class="mb-5">
|
||||
<ul class="flex flex-wrap -m-1">
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800 transition">View All</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Online</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Local</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Week</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Month</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Following</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>--}}
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400 italic mb-4">{{ count($projects) }} Projekte</div>
|
||||
<!-- Right: Actions -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 justify-start sm:justify-end gap-2">
|
||||
|
||||
<!-- Content -->
|
||||
<div class="grid xl:grid-cols-2 gap-6 mb-8">
|
||||
<!-- Search form -->
|
||||
<form class="relative">
|
||||
<x-input type="search" wire:model.live.debounce="search"
|
||||
placeholder="Suche…"/>
|
||||
</form>
|
||||
|
||||
@foreach($projects as $project)
|
||||
<article
|
||||
wire:key="project_{{ $project->id }}"
|
||||
class="flex bg-white dark:bg-gray-800 shadow-sm rounded-xl overflow-hidden">
|
||||
<!-- Image -->
|
||||
@if(!$project->sats_paid)
|
||||
<a class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||
<img class="absolute object-cover object-center w-full h-full"
|
||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||
<img class="rounded-full h-8 w-8"
|
||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
||||
alt="">
|
||||
</button>
|
||||
</a>
|
||||
@else
|
||||
<div
|
||||
class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||
<img class="absolute object-cover object-center w-full h-full"
|
||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||
<img class="rounded-full h-8 w-8"
|
||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
||||
alt="">
|
||||
</button>
|
||||
<!-- Add meetup button -->
|
||||
@if($currentPleb && $currentPleb->association_status->value > 2)
|
||||
<x-button :href="route('association.projectSupport.create')" icon="plus"
|
||||
label="Projekt einreichen"/>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
{{--<div class="mb-5">
|
||||
<ul class="flex flex-wrap -m-1">
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800 transition">View All</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Online</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Local</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Week</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Month</button>
|
||||
</li>
|
||||
<li class="m-1">
|
||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Following</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>--}}
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400 italic mb-4">{{ count($projects) }} Projekte</div>
|
||||
|
||||
<!-- Content -->
|
||||
<div class="grid xl:grid-cols-2 gap-6 mb-8">
|
||||
|
||||
@foreach($projects as $project)
|
||||
<article
|
||||
wire:key="project_{{ $project->id }}"
|
||||
class="flex bg-white dark:bg-gray-800 shadow-sm rounded-xl overflow-hidden">
|
||||
<!-- Image -->
|
||||
@if(!$project->sats_paid)
|
||||
<a class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||
<img class="absolute object-cover object-center w-full h-full"
|
||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||
<img class="rounded-full h-8 w-8"
|
||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
||||
alt="">
|
||||
</button>
|
||||
</a>
|
||||
@else
|
||||
<div
|
||||
class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||
<img class="absolute object-cover object-center w-full h-full"
|
||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||
<img class="rounded-full h-8 w-8"
|
||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
||||
alt="">
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
<!-- Content -->
|
||||
<div class="grow p-5 flex flex-col">
|
||||
<div class="grow">
|
||||
<div class="text-sm font-semibold text-amber-500 uppercase mb-2">
|
||||
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}
|
||||
</div>
|
||||
@endif
|
||||
<!-- Content -->
|
||||
<div class="grow p-5 flex flex-col">
|
||||
<div class="grow">
|
||||
<div class="text-sm font-semibold text-amber-500 uppercase mb-2">
|
||||
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}
|
||||
</div>
|
||||
<div class="inline-flex mb-2">
|
||||
<h3 class="text-lg font-bold text-gray-800 dark:text-gray-100">
|
||||
{{ $project->name }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="text-sm line-clamp-1 sm:line-clamp-3">
|
||||
{!! strip_tags($project->description) !!}
|
||||
</div>
|
||||
<div class="inline-flex mb-2">
|
||||
<h3 class="text-lg font-bold text-gray-800 dark:text-gray-100">
|
||||
{{ $project->name }}
|
||||
</h3>
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<div class="flex justify-between items-center mt-3">
|
||||
<!-- Tag -->
|
||||
<div
|
||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||
<span>{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats</span>
|
||||
</div>
|
||||
<div
|
||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||
<a href="{{ $project->website }}" target="_blank">Webseite</a>
|
||||
</div>
|
||||
<!-- Avatars -->
|
||||
@if($project->votes->where('value', true)->count() > 0)
|
||||
<div class="hidden sm:flex items-center space-x-2">
|
||||
<div class="text-xs font-medium text-gray-400 dark:text-gray-300 italic">
|
||||
Anzahl der Unterstützer:
|
||||
+{{ $project->votes->where('value', true)->count() }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-col sm:flex-row justify-between items-center mt-3 space-y-2 sm:space-y-0">
|
||||
@if(
|
||||
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
||||
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
|
||||
)
|
||||
<x-button
|
||||
icon="trash"
|
||||
xs
|
||||
negative
|
||||
wire:click="confirmDelete({{ $project->id }})"
|
||||
label="Löschen"/>
|
||||
<x-button
|
||||
icon="pencil"
|
||||
xs
|
||||
secondary
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||
label="Editieren"/>
|
||||
@endif
|
||||
@if($currentPleb && $currentPleb->association_status->value > 2 && !$project->sats_paid)
|
||||
<x-button
|
||||
icon="folder-open"
|
||||
xs
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||
label="Öffnen"/>
|
||||
@endif
|
||||
@if($currentPleb && $currentPleb->association_status->value > 1 && $project->sats_paid)
|
||||
<div class="m-1.5">
|
||||
<div
|
||||
class="text-sm inline-flex font-medium bg-green-500/20 text-green-700 rounded-full text-center px-2.5 py-1">
|
||||
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats
|
||||
unterstützt
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-sm line-clamp-1 sm:line-clamp-3">
|
||||
{!! strip_tags($project->description) !!}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<div class="flex justify-between items-center mt-3">
|
||||
<!-- Tag -->
|
||||
<div
|
||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||
<span>{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats</span>
|
||||
</div>
|
||||
<div
|
||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||
<a href="{{ $project->website }}" target="_blank">Webseite</a>
|
||||
</div>
|
||||
<!-- Avatars -->
|
||||
@if($project->votes->where('value', true)->count() > 0)
|
||||
<div class="hidden sm:flex items-center space-x-2">
|
||||
<div class="text-xs font-medium text-gray-400 dark:text-gray-300 italic">
|
||||
Anzahl der Unterstützer:
|
||||
+{{ $project->votes->where('value', true)->count() }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-col sm:flex-row justify-between items-center mt-3 space-y-2 sm:space-y-0">
|
||||
@if(
|
||||
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
||||
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
|
||||
)
|
||||
<x-button
|
||||
icon="trash"
|
||||
xs
|
||||
negative
|
||||
wire:click="confirmDelete({{ $project->id }})"
|
||||
label="Löschen"/>
|
||||
<x-button
|
||||
icon="pencil"
|
||||
xs
|
||||
secondary
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||
label="Editieren"/>
|
||||
@endif
|
||||
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
|
||||
<x-button
|
||||
icon="folder-open"
|
||||
xs
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||
label="Öffnen"/>
|
||||
@endif
|
||||
</div>
|
||||
<div class="py-2">
|
||||
@if($project->sats_paid)
|
||||
<div
|
||||
class="text-sm inline-flex font-medium bg-green-500/20 text-green-700 rounded-full text-center px-2.5 py-1">
|
||||
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats
|
||||
unterstützt
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@else
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
|
||||
Projektunterstützungen</h3>
|
||||
<p class="mt-1 max-w">
|
||||
Du bist nicht berechtigt, die Projektunterstützungen einzusehen.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endvolt
|
||||
</x-layouts.app>
|
||||
|
||||
Reference in New Issue
Block a user