mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-03-23 19:08:41 +00:00
- ✨ Refactor edit.blade.php to handle admin-specific fields (accepted and sats_paid) through conditional logic.
- 📦 Upgrade Laravel framework, Livewire, and dependencies to ensure compatibility with version `13.1.1`.
This commit is contained in:
@@ -107,10 +107,15 @@ class extends Component
|
||||
'description' => $this->form['description'],
|
||||
'support_in_sats' => (int) $this->form['support_in_sats'],
|
||||
'website' => $this->form['website'],
|
||||
'accepted' => $canAccept ? (bool) $this->form['accepted'] : $this->project->accepted,
|
||||
'sats_paid' => $canAccept ? $this->form['sats_paid'] : $this->project->sats_paid,
|
||||
]);
|
||||
|
||||
// Update admin-only fields directly if user has permission
|
||||
if ($canAccept) {
|
||||
$this->project->accepted = (bool) $this->form['accepted'];
|
||||
$this->project->sats_paid = $this->form['sats_paid'];
|
||||
$this->project->save();
|
||||
}
|
||||
|
||||
if ($this->file) {
|
||||
$this->project->addMedia($this->file)->toMediaCollection('main');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user