mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-27 06:33:18 +00:00
🎨 feat(project): enhance project support form with image upload and validation features.
🗃️ refactor(project): rename project support route for clarity and consistency. 🗑️ chore(project): implement delete confirmation for project proposals in the index view. 🔧 fix(editor): adjust initialization delay for SimpleMDE editor to improve responsiveness. 📸 fix(media): update fallback image URL in ProjectProposal model for better asset management.
This commit is contained in:
@@ -7,6 +7,7 @@ use swentel\nostr\Message\RequestMessage;
|
||||
use swentel\nostr\Relay\Relay;
|
||||
use swentel\nostr\Request\Request;
|
||||
use swentel\nostr\Subscription\Subscription;
|
||||
use WireUi\Actions\Notification;
|
||||
|
||||
use function Laravel\Folio\{middleware};
|
||||
use function Laravel\Folio\name;
|
||||
@@ -44,11 +45,35 @@ on([
|
||||
},
|
||||
]);
|
||||
|
||||
$confirmDelete = function ($id) {
|
||||
$notification = new Notification($this);
|
||||
$notification->confirm([
|
||||
'title' => 'Projektunterstützung löschen',
|
||||
'message' => 'Bist du sicher, dass du diese Projektunterstützung löschen möchtest?',
|
||||
'accept' => [
|
||||
'label' => 'Ja, löschen',
|
||||
'method' => 'delete',
|
||||
'params' => $id,
|
||||
],
|
||||
]);
|
||||
};
|
||||
|
||||
$delete = function ($id) {
|
||||
\App\Models\ProjectProposal::query()->findOrFail($id)->delete();
|
||||
$this->projects = \App\Models\ProjectProposal::query()
|
||||
->with([
|
||||
'einundzwanzigPleb.profile',
|
||||
'votes',
|
||||
])
|
||||
->get();
|
||||
};
|
||||
|
||||
?>
|
||||
|
||||
<x-layouts.app title="Projekt Unterstützungen">
|
||||
@volt
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-data="nostrDefault(@this)" x-cloak x-show="isAllowed">
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-data="nostrDefault(@this)" x-cloak
|
||||
x-show="isAllowed">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="sm:flex sm:justify-between sm:items-center mb-5">
|
||||
@@ -149,6 +174,17 @@ on([
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex justify-between items-center mt-3">
|
||||
@if($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
||||
<x-button
|
||||
negative
|
||||
wire:click="confirmDelete({{ $project->id }})"
|
||||
label="Löschen"/>
|
||||
<x-button
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||
label="Editieren"/>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user