🛠️ Refactor delete confirmation logic with projectToDelete property, enhance project voting features in Livewire, and update Blade templates for consistency and improved UX.

This commit is contained in:
HolgerHatGarKeineNode
2026-01-19 23:40:42 +01:00
parent 39835c3a24
commit 714de411a6
4 changed files with 228 additions and 128 deletions

View File

@@ -19,9 +19,9 @@ class extends Component {
public bool $isAllowed = false;
public function mount(ProjectProposal $project): void
public function mount($projectProposal): void
{
$this->project = $project;
$this->project = ProjectProposal::query()->where('slug', $projectProposal)->firstOrFail();
if (NostrAuth::check()) {
$currentPubkey = NostrAuth::pubkey();
@@ -30,14 +30,14 @@ class extends Component {
if (
(
$currentPleb
&& $currentPleb->id === $project->einundzwanzig_pleb_id
&& $currentPleb->id === $this->project->einundzwanzig_pleb_id
)
|| in_array($currentPleb->npub, config('einundzwanzig.config.current_board'))
) {
$this->isAllowed = true;
$this->form = [
'name' => $project->name,
'description' => $project->description,
'name' => $this->project->name,
'description' => $this->project->description,
];
}
}