Remove extra holpa items - #59
Merged
Merged
Conversation
Completes Phase 6 (cutover) of the ODK-Entities farm CRUD work: farms now live only as ODK Central entities via FarmEntity/FarmEntityResource. - move FarmListHeaderWidget and the combined-import Blade view into the FarmEntityResource tree (both were shared, not legacy) - delete FarmResource + pages, App\Models\SampleFrame\Farm, FarmImport, FarmPolicy, FarmImportCompleted, DataCollectionByFarm and HelperService::findFarmLocationDetails() - all dormant or unreferenced - purge the whole App\Models\SurveyData namespace (FarmSurveyData, Crop, Livestock) and the RepeatModel interface that only described it; the same-named exports survive, they are Dataset-name-driven not model-driven - repoint Team::pilotProgress / dataCollectionProgress at submissions (the farm-derived expressions could only ever return false) - drop Location's three farm-completion attributes and the dead 'Farms surveyed' admin stat; keep farms_all_count (FarmEntity-backed) - ImportFarmsAction now tags its Import record model_type => FarmEntity - drop the farms, crops, livestocks and farm_survey_data tables
The legacy FarmResource that owned app/{tenant}/location-levels/farms is
gone, so the entities-backed resource can take the clean URL back. Class
names are unchanged; only the slug and the two tests that hit the route
by path move.
Fixes finding M13. The wizard called Excel::import() twice, and for a
ShouldQueue + WithChunkReading importer each call builds its own
QueueImport -> ReadChunk... -> AfterImportJob chain. Two independent
chains on one queue means ordering is whatever the worker pool decides,
so with more than one worker the farm chunks could run before the
location chunks had committed - and FarmEntityImport::rules() validates
its location column with Rule::exists('locations', 'code').
Bus::chain() would not fix it: a chained job calling Excel::import()
returns as soon as the chunks are queued. The dependency has to live
inside the chain maatwebsite/excel already built, so the farm import is
appended to its tail via PendingDispatch -> Queueable::appendToChain().
- new QueueFarmEntityImport job; resolves the media path from the Import
id at run time, and its failed() surfaces a start-up failure on the
imports table instead of leaving the record silently empty
- the farm job's payload drops $data['level'] (a LocationLevel model,
which SerializesModels cannot reduce inside an array property)
- LocationImport now writes a 'skipped because the location import
failed' error onto the dependent farm Import record when
dependent_import_id is present; the key is optional for standalone use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes legacy data models and exports that use HOLPA's form structures.