Commit Graph

4461 Commits

Author SHA1 Message Date
Daniel O'Connor
d9851231f2 Merge pull request #4274 from Growstuff/CloCkWeRX-patch-3
API > Render activities links under member
2025-09-29 01:11:24 +09:30
Daniel O'Connor
81b80d9bb7 Update activity_resource.rb 2025-09-29 00:12:51 +09:30
Daniel O'Connor
f080a8a566 Update crop_resource.rb 2025-09-29 00:12:39 +09:30
Daniel O'Connor
5a436f9d7f Update garden_resource.rb 2025-09-29 00:12:32 +09:30
Daniel O'Connor
a4fd1c4a8e Update harvest_resource.rb 2025-09-29 00:12:27 +09:30
Daniel O'Connor
7277cb3523 Update seed_resource.rb 2025-09-29 00:12:07 +09:30
Daniel O'Connor
522d10e053 Update photo_resource.rb 2025-09-29 00:11:41 +09:30
Daniel O'Connor
f3a9b26c8e Update planting_resource.rb 2025-09-29 00:10:05 +09:30
google-labs-jules[bot]
d8f5580ef9 Extend planting API to render garden id in relationships 2025-09-28 14:39:33 +00:00
Daniel O'Connor
488e402a3a Adjust copy of activities and prompts (#4260)
* Adjust copy

* Adjust copy

* Move repeat prompt

* Improve prompts

* Clean up schema

* Fix spec
2025-09-21 14:58:13 +09:30
google-labs-jules[bot]
e99c90adc4 Add recurring activities feature without database persistence (#4261)
* This change introduces a new feature that allows users to create recurring activities.

A user can now specify that an activity should be repeated "X" times, every "Y" weeks. When an activity is created with these options, the application will create the initial activity and then "X" additional copies, with each copy's due date offset by "Y" weeks from the previous one.

The repeat information is not stored in the database. It is only used at the time of creation to generate the recurring activities.

The following changes were made:
- Updated the new activity form to include fields for "repeat times" and "repeat weeks".
- Modified the `ActivitiesController#create` action to handle the creation of recurring activities.
- Added feature tests to ensure the new functionality works as expected.

* Remove not very useful spec

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-09-21 13:53:45 +09:30
google-labs-jules[bot]
41412b8443 Merge pull request #4262 from Growstuff/feature/github-releases-widget
feat: Add cached GitHub releases widget to homepage
2025-09-21 13:37:57 +09:30
google-labs-jules[bot]
449ab1f6c0 Add ability to create companion plantings
This change adds the ability for crop wranglers to create and manage companion plantings for crops.

- Adds a `source_url` to the `CropCompanion` model to store an optional reference URL.
- Restricts the management of companion plantings to users with the `crop_wrangler` role.
- Creates a new admin interface for managing companion plantings for a specific crop.
- Updates the crop show page to display companions from both the crop and its parent crop.
2025-09-21 00:49:11 +00:00
Daniel O'Connor
bd4dd3cc45 Rubocop 2025-09-20 10:18:24 +00:00
Daniel O'Connor
a098328e4e Rubocop 2025-09-20 10:16:16 +00:00
Daniel O'Connor
54acc369ab Rubocop 2025-09-20 09:43:22 +00:00
google-labs-jules[bot]
5db6a86607 Add ability to copy/duplicate an activity 2025-09-20 08:54:12 +00:00
Daniel O'Connor
ce7ce70d5f Merge pull request #4222 from Growstuff/feature/add-activity-prompts
feat: Add prompts for new activities
2025-09-20 17:49:47 +09:30
Daniel O'Connor
e5bf9d98e6 Rubocop (#4241) 2025-09-10 19:56:12 +09:30
google-labs-jules[bot]
02db5b8130 Add API token generation, authentication, and CRUD for a number of the API resources (#4237)
* feat: Add API token generation and authentication

This commit introduces API token generation and authentication for write operations.

- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.

* feat: Add API token generation and authentication

This commit introduces API token generation and authentication for write operations.

- Adds a section to the user's profile edit page to generate and display an API token.
- Reuses the `authentications` table to store the API token, avoiding the need for a database migration.
- Implements token-based authentication for the API using the `Authorization: Token token=...` header.
- Enables write operations for all API resources and ensures they are protected by the new authentication mechanism.
- Adds feature and request specs to test the new functionality.

* Mark as editable

* Refactor

* WIP - Authentication

* Implement more test coverage

* Split 401 and 403

* Before Create hooks

* Update harvest specs, defaulting to the first plant part - this may not be right

* Update coverage

* Update coverage

* Rubocop

* Rubocop

* Rubocop

* Fix coverage

* For now, mark photos immutable again

* Fix specs

* Fix specs

* Rubocop

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-09-10 19:50:06 +09:30
Daniel O'Connor
e322871740 Fix UX 2025-09-09 12:49:17 +00:00
Daniel O'Connor
b2e959aded Delegate 2025-09-09 12:44:40 +00:00
Daniel O'Connor
2f0b8e9d76 Add aliases 2025-09-09 12:40:06 +00:00
Daniel O'Connor
fb78bcb0b0 Add aliases 2025-09-09 12:36:22 +00:00
google-labs-jules[bot]
e5c71f1dc4 Merge pull request #4230 from Growstuff/feature/add-more-filters
feat: Add more filters to API resources
2025-09-09 21:34:49 +09:30
Daniel O'Connor
a21a9e7a09 Update garden_resource to filter by owner 2025-09-08 17:38:03 +09:30
google-labs-jules[bot]
bc11a1b8db Merge pull request #4209 from Growstuff/extend-crop-model
Extend Crop Model and Migrate Data from OpenFarm
2025-09-07 20:03:18 +09:30
Daniel O'Connor
12f6b76dca Merge pull request #4223 from Growstuff/show-history
Render history of activities on gardens, plantings
2025-09-07 19:40:18 +09:30
Daniel O'Connor
798eb1132f Rubocop 2025-09-07 08:10:41 +00:00
Daniel O'Connor
42036a3d3f Fix logic 2025-09-07 08:07:21 +00:00
Daniel O'Connor
47da5f18c9 Merge branch 'dev' into deep-link 2025-09-07 17:35:57 +09:30
Daniel O'Connor
d22555ee42 Deep link to content when rating 2025-09-07 08:04:14 +00:00
Daniel O'Connor
d0f4911bf6 Merge pull request #4221 from Growstuff/CloCkWeRX-patch-3
Update _modal.html.haml to sort consistently
2025-09-07 17:30:17 +09:30
Daniel O'Connor
2bc164bd2e Render history 2025-09-07 07:59:51 +00:00
Daniel O'Connor
6f9fbfa3cd Merge pull request #4220 from Growstuff/CloCkWeRX-patch-2
Fix garden order on planting new
2025-09-07 17:19:05 +09:30
Daniel O'Connor
b0555ef89e Update _modal.html.haml to sort consistently 2025-09-07 17:12:14 +09:30
Daniel O'Connor
a5f9edea87 Merge pull request #4217 from Growstuff/skip-to-content
By default, skip to content when linking to garden(s)
2025-09-07 17:09:48 +09:30
Daniel O'Connor
3917f263b8 Fix garden order on planting new 2025-09-07 17:09:27 +09:30
Daniel O'Connor
3725957065 Only render if available 2025-09-07 05:34:49 +00:00
Daniel O'Connor
8fbc02caf3 Timeline 2025-09-07 05:20:35 +00:00
Daniel O'Connor
186f07109c Add skip link 2025-09-07 05:17:14 +00:00
Daniel O'Connor
b3c749566b More named anchors 2025-09-07 05:14:18 +00:00
Daniel O'Connor
1eb84b9765 By default, skip to content when linking to garden(s) 2025-09-07 05:11:30 +00:00
Daniel O'Connor
9b1699b061 Merge pull request #4215 from Growstuff/activities-detail
Surface more Activities detail
2025-09-07 14:39:13 +09:30
Daniel O'Connor
c0ab0b085e Merge pull request #4214 from Growstuff/fix-cards
Fix styling of cards to space evenly
2025-09-07 14:34:14 +09:30
Daniel O'Connor
84da4c0f4f Fix styling of cards to space evenly 2025-09-07 04:24:22 +00:00
Daniel O'Connor
f650d1b8fa Change garden sort order to be by name and planting by most to lease recent when creating an activity 2025-09-07 03:54:20 +00:00
Daniel O'Connor
b3ba05d834 Fix crash on adding Flickr photo (#4198)
* Update photo.rb

* Update photo.rb

* Update app/models/photo.rb

* Update app/models/photo.rb
2025-09-02 02:17:28 +09:30
Daniel O'Connor
2f290efc5b Rename _facts.haml to _facts.html.haml 2025-09-02 00:03:04 +09:30
Daniel O'Connor
7106b141d9 Update _facts.haml 2025-09-02 00:02:17 +09:30