fix: add updatedActivityId watcher to ActivityMonitor component

- Add updatedActivityId method to watch for changes to activityId property
- When activityId is set/updated, automatically hydrate the activity and enable polling
- This allows the activity monitor to display content when activityId is bound from parent component
- Fixes issue where activity monitor was empty because activity wasn't loaded

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-11-02 17:07:10 +01:00
parent 32929a9fe7
commit 1271e7df2c

View file

@ -44,6 +44,14 @@ public function hydrateActivity()
$this->activity = Activity::find($this->activityId);
}
public function updatedActivityId($value)
{
if ($value) {
$this->hydrateActivity();
$this->isPollingActive = true;
}
}
public function polling()
{
$this->hydrateActivity();