diff --git a/app/Livewire/Forms/ProjectProposalForm.php b/app/Livewire/Forms/ProjectProposalForm.php index 1e89e20..ba49591 100644 --- a/app/Livewire/Forms/ProjectProposalForm.php +++ b/app/Livewire/Forms/ProjectProposalForm.php @@ -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 = ''; } diff --git a/resources/views/pages/association/project-support/[ProjectProposal:slug].blade.php b/resources/views/pages/association/project-support/[ProjectProposal:slug].blade.php index dc9c340..8f3bf0a 100644 --- a/resources/views/pages/association/project-support/[ProjectProposal:slug].blade.php +++ b/resources/views/pages/association/project-support/[ProjectProposal:slug].blade.php @@ -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
- @if($isAllowed) + @if($projectProposal->accepted || $isAllowed)
@@ -165,7 +165,7 @@ $handleNotApprove = function () {
Meetup + alt="Picture">

@@ -197,161 +197,73 @@ $handleNotApprove = function () {
- -
+ @if($isAllowed && !$projectProposal->accepted) + +
- -
- @if(!$ownVoteExists) -
- - - {{----}} -
- @else -
-

Du hast bereits abgestimmt.

-
- @endif -
+ +
+ @if(!$ownVoteExists) +
+ + + {{----}} +
+ @else +
+

Du hast bereits abgestimmt.

+
+ @endif +
- -
-
-
- Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }}) + +
+
+
+ Zustimmungen des Vorstands ({{ count($boardVotes->where('value', 1)) }}) +
-
    - @foreach($boardVotes->where('value', 1) as $vote) -
  • -
    -
    -
    - {{ $vote->einundzwanzigPleb->profile->name }} -
    -
    - - {{ $vote->einundzwanzigPleb->profile->name }} - -
    -
    -
    -
  • - @endforeach -
-
- -
-
-
- Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }}) + +
+
+
+ Ablehnungen des Vorstands ({{ count($boardVotes->where('value', 0)) }}) +
-
    - @foreach($boardVotes->where('value', 0) as $vote) -
  • -
    -
    -
    - {{ $vote->einundzwanzigPleb->profile->name }} -
    -
    - - {{ $vote->einundzwanzigPleb->profile->name }} - -
    -
    -
    -
  • - @endforeach -
-
- -
-
-
- Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }}) + +
+
+
+ Zustimmungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 1)) }}) +
-
    - @foreach($otherVotes->where('value', 1) as $vote) -
  • -
    -
    -
    - {{ $vote->einundzwanzigPleb->profile->name }} -
    -
    - - {{ $vote->einundzwanzigPleb->profile->name }} - -
    -
    -
    -
  • - @endforeach -
-
- -
-
-
- Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }}) + +
+
+
+ Ablehnungen der übrigen Mitglieder ({{ count($otherVotes->where('value', 0)) }}) +
-
    - @foreach($otherVotes->where('value', 0) as $vote) -
  • -
    -
    -
    - {{ $vote->einundzwanzigPleb->profile->name }} -
    -
    - - {{ $vote->einundzwanzigPleb->profile->name }} - -
    -
    -
    -
  • - @endforeach -
-
-
+
+ @endif
diff --git a/resources/views/pages/association/project-support/form/[ProjectProposal:slug].blade.php b/resources/views/pages/association/project-support/form/[ProjectProposal:slug].blade.php index cc4b0a6..e8361a2 100644 --- a/resources/views/pages/association/project-support/form/[ProjectProposal:slug].blade.php +++ b/resources/views/pages/association/project-support/form/[ProjectProposal:slug].blade.php @@ -111,6 +111,15 @@ $save = function () { :placeholder="__('Beabsichtigte Unterstützung in Sats')"/> + + + + + + + +
diff --git a/resources/views/pages/association/project-support/index.blade.php b/resources/views/pages/association/project-support/index.blade.php index 322d995..74022d1 100644 --- a/resources/views/pages/association/project-support/index.blade.php +++ b/resources/views/pages/association/project-support/index.blade.php @@ -76,186 +76,172 @@ $delete = function ($id) { > @volt
- @if($isAllowed) -
+
- -
- - -
-

- Einundzwanzig Projektunterstützungen -

-
- - -
- - -
- - - - - @if($currentPleb && $currentPleb->association_status->value > 2) - - @endif -
+ +
+ +
+

+ Einundzwanzig Projektunterstützungen +

- - {{--
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
--}} -
{{ count($projects) }} Projekte
+ +
- -
+ +
+ + - @foreach($projects as $project) -
- - @if(!$project->sats_paid) - - Meetup 01 - - - @else -
- Meetup 01 - + + @if($currentPleb && $currentPleb->association_status->value > 2) + + @endif +
+ +
+ + + {{--
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
--}} +
{{ count($projects) }} Projekte
+ + +
+ + @foreach($projects as $project) +
+ + @if(!$project->sats_paid) + + Meetup 01 + + + @else +
+ Meetup 01 + +
+ @endif + +
+
+
+ Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}
- @endif - -
-
-
- Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }} -
-
-

- {{ $project->name }} -

-
-
- {!! strip_tags($project->description) !!} -
+
+

+ {{ $project->name }} +

- -
- -
- {{ number_format($project->support_in_sats, 0, ',', '.') }} Sats -
-
- Webseite -
- - @if($project->votes->where('value', true)->count() > 0) - - @endif -
-
- @if( - ($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id) - || ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true)) - ) - - - @endif - @if($currentPleb && $currentPleb->association_status->value > 2 && !$project->sats_paid) - - @endif - @if($currentPleb && $currentPleb->association_status->value > 1 && $project->sats_paid) -
-
- Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats - unterstützt -
-
- @endif +
+ {!! strip_tags($project->description) !!}
-
- @endforeach - -
+ +
+ +
+ {{ number_format($project->support_in_sats, 0, ',', '.') }} Sats +
+
+ Webseite +
+ + @if($project->votes->where('value', true)->count() > 0) + + @endif +
+
+ @if( + ($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id) + || ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true)) + ) + + + @endif + @if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted) + + @endif +
+
+ @if($project->sats_paid) +
+ Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats + unterstützt +
+ @endif +
+
+ + @endforeach
- @else -
-
-
-

- Projektunterstützungen

-

- Du bist nicht berechtigt, die Projektunterstützungen einzusehen. -

-
-
-
- @endif + +
@endvolt