Closed curtisdelicata closed 3 months ago
ff6e04c60b
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
app/Http/Livewire/DescendantChartComponent.php
✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e Edit
Modify app/Http/Livewire/DescendantChartComponent.php with contents: Update the `mount()` method to fetch live data from the `Person` model.
The key change is using Person::with('children')
to eagerly load the children
relationship for each Person
record. This will fetch the nested descendant data needed to build the chart hierarchy.
app/Http/Livewire/DescendantChartComponent.php
✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e Edit
Modify app/Http/Livewire/DescendantChartComponent.php with contents: Update the `processDescendantData()` method to handle the live data format.
The updated method now expects children
to be eagerly loaded in the $data
array. It builds the children
array for each person using the id
of the child records.
app/Http/Livewire/PedigreeChart.php
✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e Edit
Modify app/Http/Livewire/PedigreeChart.php with contents: Update the `mount()` method to fetch live data from the `Person` model.
Use Person::with('parents')
to eagerly load the parents
relationship for each person. This will fetch the ancestral data needed to build the pedigree chart.
resources/views/livewire/descendant-chart-component.blade.php
✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e Edit
Modify resources/views/livewire/descendant-chart-component.blade.php with contents:
Pass the live $descendantsData
to the JavaScript code rendering the chart.
Update
Update
resources/views/livewire/pedigree-chart.blade.php
✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e Edit
Modify resources/views/livewire/pedigree-chart.blade.php with contents:
Initialize the pedigree chart with the live peopleData
.
The key changes:
#pedigree-chart-container
and append an <svg>
elementpeopleData
inside initializePedigreeChart()
I have finished reviewing the code for completeness. I did not find errors for sweep/descendant_chart_pedigree_chart_fan_char
.
💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
Details
Update the livewire controllers, fan chart, descendant chart, pedigree chart to use live data from people model and also make sure charts render correctly. Use filament 3 conventions and fix any bugs or syntax errors
Checklist
- [X] Modify `app/Http/Livewire/DescendantChartComponent.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/descendant_chart_pedigree_chart_fan_char/app/Http/Livewire/DescendantChartComponent.php) - [X] Modify `app/Http/Livewire/DescendantChartComponent.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/descendant_chart_pedigree_chart_fan_char/app/Http/Livewire/DescendantChartComponent.php) - [X] Modify `app/Http/Livewire/PedigreeChart.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/descendant_chart_pedigree_chart_fan_char/app/Http/Livewire/PedigreeChart.php) - [X] Modify `resources/views/livewire/descendant-chart-component.blade.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/descendant_chart_pedigree_chart_fan_char/resources/views/livewire/descendant-chart-component.blade.php) - [X] Modify `resources/views/livewire/pedigree-chart.blade.php` ✓ https://github.com/liberu-genealogy/genealogy-laravel/commit/fd8da135b627349f39883fe62d7d8f6de59b1d4e [Edit](https://github.com/liberu-genealogy/genealogy-laravel/edit/sweep/descendant_chart_pedigree_chart_fan_char/resources/views/livewire/pedigree-chart.blade.php)