c44958ac16
Restores all 27 files changed by the security commit (f8a1310) and later work back to their7d854ffstate (2026-06-16 18:05), as requested. The security rewrite regressed map functionality (tabs, inspection editor, collapsing layers panel) without adding protections the7d854ffversion did not already have (XSS escaping + IDOR checks were already present). Done as a forward commit (no history rewrite / force-push) sof8a1310,a24c8a2and the merge remain in history and are fully recoverable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40 lines
998 B
PHP
40 lines
998 B
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use Livewire\Component;
|
|
use App\Models\Phase;
|
|
|
|
class PhaseProgress extends Component
|
|
{
|
|
public Phase $phase;
|
|
public $progress;
|
|
public $comment = '';
|
|
|
|
public function mount(Phase $phase)
|
|
{
|
|
$this->phase = $phase->load('progressUpdates');
|
|
$this->progress = $phase->progress_percent;
|
|
}
|
|
|
|
public function updateProgressManual()
|
|
{
|
|
$this->validate(['progress' => 'required|integer|min:0|max:100']);
|
|
$this->phase->progress_percent = $this->progress;
|
|
$this->phase->save();
|
|
|
|
$this->phase->progressUpdates()->create([
|
|
'user_id' => auth()->id(),
|
|
'progress_percent' => $this->progress,
|
|
'comment' => $this->comment,
|
|
]);
|
|
|
|
$this->dispatch('progressUpdated', $this->phase->id, $this->progress);
|
|
session()->flash('message', 'Progreso actualizado');
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.phase-progress');
|
|
}
|
|
} |