voting added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-11 00:17:05 +01:00
parent a6ebbb685a
commit 81fe8be073
4 changed files with 8 additions and 11 deletions

View File

@@ -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()

View File

@@ -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',