mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
voting added
This commit is contained in:
@@ -12,9 +12,6 @@ use RalphJSmit\Laravel\SEO\Support\SEOData;
|
||||
|
||||
class ProjectProposalVoting extends Component
|
||||
{
|
||||
|
||||
public Country $country;
|
||||
|
||||
public ?ProjectProposal $projectProposal = null;
|
||||
public ?Vote $vote = null;
|
||||
|
||||
@@ -62,7 +59,7 @@ class ProjectProposalVoting extends Component
|
||||
$this->vote->save();
|
||||
|
||||
return to_route('project.voting.projectFunding',
|
||||
['country' => $this->country, 'projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]);
|
||||
['projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]);
|
||||
}
|
||||
|
||||
public function no()
|
||||
@@ -73,7 +70,7 @@ class ProjectProposalVoting extends Component
|
||||
$this->vote->save();
|
||||
|
||||
return to_route('project.voting.projectFunding',
|
||||
['country' => $this->country, 'projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]);
|
||||
['projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]);
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
||||
@@ -16,7 +16,7 @@ class ProjectProposalTable extends DataTableComponent
|
||||
public function configure(): void
|
||||
{
|
||||
$this->setPrimaryKey('id')
|
||||
->setAdditionalSelects(['id', 'created_by'])
|
||||
->setAdditionalSelects(['project_proposals.id', 'project_proposals.created_by', 'project_proposals.slug'])
|
||||
->setThAttributes(function (Column $column) {
|
||||
return [
|
||||
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
@endcan
|
||||
<div>
|
||||
<x-button xs black :href="route('project.voting.projectFunding', ['country' => $country, 'projectProposal' => $row])">
|
||||
<x-button xs black :href="route('voting.projectFunding', ['projectProposal' => $row])">
|
||||
<i class="fa fa-thin fa-check-to-slot mr-2"></i>
|
||||
{{ __('Vote') }} [0]
|
||||
</x-button>
|
||||
|
||||
@@ -118,6 +118,10 @@ Route::middleware([])
|
||||
->get('/lecturer-material/{libraryItem:slug}', \App\Http\Livewire\News\InternArticleView::class)
|
||||
->name('lecturerMaterial.view');
|
||||
|
||||
Route::get('/project/voting/{projectProposal:slug}', \App\Http\Livewire\ProjectProposal\ProjectProposalVoting::class)
|
||||
->name('voting.projectFunding')
|
||||
->middleware(['auth']);
|
||||
|
||||
Route::middleware([
|
||||
'auth',
|
||||
])
|
||||
@@ -220,10 +224,6 @@ Route::middleware([])
|
||||
->name('projectProposal.form')
|
||||
->middleware(['auth']);
|
||||
|
||||
Route::get('/project/voting/{projectProposal?}', \App\Http\Livewire\ProjectProposal\ProjectProposalVoting::class)
|
||||
->name('voting.projectFunding')
|
||||
->middleware(['auth']);
|
||||
|
||||
Route::get('/projects', \App\Http\Livewire\ProjectProposal\ProjectProposalTable::class)
|
||||
->name('table.projectFunding');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user