voting added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-10 23:19:13 +01:00
parent d5015130b1
commit 0ae23e0314
3 changed files with 118 additions and 94 deletions

View File

@@ -8,6 +8,7 @@ use App\Models\User;
use App\Models\Vote;
use Illuminate\Validation\Rule;
use Livewire\Component;
use RalphJSmit\Laravel\SEO\Support\SEOData;
class ProjectProposalVoting extends Component
{
@@ -49,6 +50,9 @@ class ProjectProposalVoting extends Component
$this->vote->project_proposal_id = $this->projectProposal->id;
$this->vote->value = false;
}
if (!$this->fromUrl) {
$this->fromUrl = url()->previous();
}
}
public function yes()
@@ -102,6 +106,12 @@ class ProjectProposalVoting extends Component
})
->orderByDesc('votes_count')
->get(),
])->layout('layouts.app', [
'SEOData' => new SEOData(
title: __('Project Proposal'),
description: __('Submit a project proposal and let the community vote on it through the elected voters. All other community members can also vote.'),
image: asset('img/voting.jpg')
),
]);
}
}