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:
@@ -18,4 +18,10 @@ class ProjectProposalForm extends Form
|
|||||||
|
|
||||||
#[Validate('required|url')]
|
#[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'))">
|
:seo="new SEOData(title: 'Unterstützung für: ' . $projectProposal->name,description: str($projectProposal->description)->limit(100, '...', true), image: $projectProposal->getFirstMediaUrl('main'))">
|
||||||
@volt
|
@volt
|
||||||
<div>
|
<div>
|
||||||
@if($isAllowed)
|
@if($projectProposal->accepted || $isAllowed)
|
||||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full">
|
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full">
|
||||||
|
|
||||||
<!-- Page content -->
|
<!-- Page content -->
|
||||||
@@ -165,7 +165,7 @@ $handleNotApprove = function () {
|
|||||||
|
|
||||||
<figure class="mb-6">
|
<figure class="mb-6">
|
||||||
<img class="rounded-sm h-48" src="{{ $projectProposal->getFirstMediaUrl('main') }}"
|
<img class="rounded-sm h-48" src="{{ $projectProposal->getFirstMediaUrl('main') }}"
|
||||||
alt="Meetup">
|
alt="Picture">
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<hr class="my-6 border-t border-gray-100 dark:border-gray-700/60">
|
<hr class="my-6 border-t border-gray-100 dark:border-gray-700/60">
|
||||||
@@ -197,6 +197,7 @@ $handleNotApprove = function () {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if($isAllowed && !$projectProposal->accepted)
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
|
|
||||||
@@ -232,28 +233,6 @@ $handleNotApprove = function () {
|
|||||||
Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }})
|
Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }})
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- 2nd block -->
|
<!-- 2nd block -->
|
||||||
@@ -263,28 +242,6 @@ $handleNotApprove = function () {
|
|||||||
Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }})
|
Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }})
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- 3rd block -->
|
<!-- 3rd block -->
|
||||||
@@ -294,29 +251,6 @@ $handleNotApprove = function () {
|
|||||||
Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }})
|
Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }})
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- 3rd block -->
|
<!-- 3rd block -->
|
||||||
@@ -326,32 +260,10 @@ $handleNotApprove = function () {
|
|||||||
Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }})
|
Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }})
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,15 @@ $save = function () {
|
|||||||
:placeholder="__('Beabsichtigte Unterstützung in Sats')"/>
|
:placeholder="__('Beabsichtigte Unterstützung in Sats')"/>
|
||||||
</x-input.group>
|
</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-input.group :for="md5('form.description')">
|
||||||
<x-slot name="label">
|
<x-slot name="label">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ $delete = function ($id) {
|
|||||||
>
|
>
|
||||||
@volt
|
@volt
|
||||||
<div>
|
<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 -->
|
<!-- Page header -->
|
||||||
@@ -219,21 +218,21 @@ $delete = function ($id) {
|
|||||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||||
label="Editieren"/>
|
label="Editieren"/>
|
||||||
@endif
|
@endif
|
||||||
@if($currentPleb && $currentPleb->association_status->value > 2 && !$project->sats_paid)
|
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
|
||||||
<x-button
|
<x-button
|
||||||
icon="folder-open"
|
icon="folder-open"
|
||||||
xs
|
xs
|
||||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||||
label="Öffnen"/>
|
label="Öffnen"/>
|
||||||
@endif
|
@endif
|
||||||
@if($currentPleb && $currentPleb->association_status->value > 1 && $project->sats_paid)
|
</div>
|
||||||
<div class="m-1.5">
|
<div class="py-2">
|
||||||
|
@if($project->sats_paid)
|
||||||
<div
|
<div
|
||||||
class="text-sm inline-flex font-medium bg-green-500/20 text-green-700 rounded-full text-center px-2.5 py-1">
|
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
|
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats
|
||||||
unterstützt
|
unterstützt
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,19 +242,6 @@ $delete = function ($id) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</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
|
@endvolt
|
||||||
</x-layouts.app>
|
</x-layouts.app>
|
||||||
|
|||||||
Reference in New Issue
Block a user