mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-29 10:18:29 -04:00
* Implement AddSeedsPicker component and enhance planting selection UI; update styles and serializers for better seed management * Enhance PlantingPicker component: add hints and titles for harvest and seed actions; update test to reflect changes in seed saving behavior * Enhance harvest recording: allow harvesting from crops without plantings; update forms and modals for better user experience * Refactor code structure for improved readability and maintainability * Remove AddSeedsPicker component and its associated tests * Add planting picker functionality for harvesting and seed saving - Introduced PlantingPickersController to handle JSON responses for member's plantings. - Updated HomeHelper to include crop ID in planting picker properties. - Refactored PlantPicker and PlantSomethingModal components to support multiple gardens. - Created PlantingFlow component to manage planting actions (harvest and save seeds). - Implemented RecordDialog component to handle server-rendered links for harvesting and seed saving. - Updated various views to include data attributes for triggering the record dialog. - Added routes for planting picker and corresponding request specs for testing. - Adjusted styles in _plantings.scss for better layout and spacing. * Add job management features including job creation and wishlist functionality * Remove WishlistJobsController and associated views and tests * Add suggestion links rendering and fix routes formatting * Refactor AddJobModal and JobPicker components to simplify props and enhance user experience * Update seed addition test to check dialog presence and current path * Apply suggestion from @CloCkWeRX --------- Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
38 lines
2.0 KiB
React
38 lines
2.0 KiB
React
// Entry point for the React "islands": small React components mounted into
|
|
// server-rendered pages. Rails renders an empty element with
|
|
// data-react-component="Name" and data-props='{...}' (see the react_component
|
|
// helper); this finds each one and mounts the matching component.
|
|
//
|
|
// To add a component: create it in ./components and register it below.
|
|
import AlternateNames from './components/AlternateNames';
|
|
import AuthDialog from './components/AuthDialog';
|
|
import FeedMore from './components/FeedMore';
|
|
import GardenCards from './components/GardenCards';
|
|
import GardenLayout from './components/GardenLayout';
|
|
import GardenPicker from './components/GardenPicker';
|
|
import GrowingTable from './components/GrowingTable';
|
|
import HarvestChart from './components/HarvestChart';
|
|
import JobPicker from './components/JobPicker';
|
|
import LocationPicker from './components/LocationPicker';
|
|
import NurseryChip from './components/NurseryChip';
|
|
import NurseryPlanter from './components/NurseryPlanter';
|
|
import PhotoDialog from './components/PhotoDialog';
|
|
import PhotoPicker from './components/PhotoPicker';
|
|
import PlantPicker from './components/PlantPicker';
|
|
import RecordDialog from './components/RecordDialog';
|
|
import PlantingPicker from './components/PlantingPicker';
|
|
import PlantingActions from './components/PlantingActions';
|
|
import PlantingRating from './components/PlantingRating';
|
|
import SeedLibrary from './components/SeedLibrary';
|
|
import ScientificNames from './components/ScientificNames';
|
|
import SeedStack from './components/SeedStack';
|
|
import {mountIslands, registerIslands} from './islands';
|
|
|
|
registerIslands({AlternateNames, AuthDialog, FeedMore, GardenCards, GardenLayout, GardenPicker, GrowingTable, HarvestChart, JobPicker, LocationPicker, NurseryChip, NurseryPlanter, PhotoDialog, PhotoPicker, PlantPicker, PlantingPicker, PlantingActions, PlantingRating, RecordDialog, ScientificNames, SeedLibrary, SeedStack});
|
|
|
|
if (document.readyState === 'loading') {
|
|
document.addEventListener('DOMContentLoaded', () => mountIslands());
|
|
} else {
|
|
mountIslands();
|
|
}
|