5
11
Fork
You've already forked tomato
1

Deactivate sites #77

Closed
edwardloveall wants to merge 3 commits from el-inactive-sites into main
pull from: el-inactive-sites
merge into: rootable:main
rootable:main
rootable:el-task-log-total
rootable:el-tracker-cleanup
rootable:el-tracker-receipts
rootable:el-edit-tracker
rootable:el-exclude-tracker-site-receipt
rootable:el-trackers
rootable:el-occurrence-view
rootable:el-fix-shift-filter-time-zone
rootable:bb-reports

Volunteer coordinators sort through a lot of data on a daily basis.
When sites show up that are no longer part of the programs, the
information "clutters" up their flow. Additionally, sometimes they make
a mistake and create a duplicate item. They want a way to remove the
cognitive load in their daily activities.

Sites can now be marked inactive which will group them at the bottom of
any site or task lists including the site index, or as part of picking
tasks for a shift.

This required a little refactor of the task selector when creating or
updating a shift. These dropdowns now have groups, so their data had to
change. For shift updating (shift occurrence updating, to be clear) the
dropdowns are now native. I refactored the task one so it could have
groups, then the volunteer one was quick to do, as well.

Volunteer coordinators sort through a lot of data on a daily basis. When sites show up that are no longer part of the programs, the information "clutters" up their flow. Additionally, sometimes they make a mistake and create a duplicate item. They want a way to remove the cognitive load in their daily activities. Sites can now be marked inactive which will group them at the bottom of any site or task lists including the site index, or as part of picking tasks for a shift. This required a little refactor of the task selector when creating or updating a shift. These dropdowns now have groups, so their data had to change. For shift updating (shift occurrence updating, to be clear) the dropdowns are now native. I refactored the task one so it could have groups, then the volunteer one was quick to do, as well.
edwardloveall changed target branch from el-copy-task-edits to main 2026年01月26日 16:14:13 +01:00
edwardloveall force-pushed el-inactive-sites from fd4a1ef1e4
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
to e6783120f5
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
2026年01月26日 17:38:39 +01:00
Compare
edwardloveall force-pushed el-inactive-sites from e6783120f5
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
to ed30416bd3
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
2026年01月27日 15:17:51 +01:00
Compare
jsilasbailey left a comment
Copy link

LGTM 👍

LGTM 👍
@ -15,6 +15,8 @@ class Site < ApplicationRecord
validates :name, presence: true, uniqueness: {scope: :organization_id}
validates_associated :siteable
time_for_a_boolean :inactive, scopes: true
First-time contributor
Copy link

Never have used time for a boolean before! Nice, thanks Caleb!

Never have used time for a boolean before! Nice, thanks Caleb!
@ -196,2 +189,2 @@
label: "Volunteer",
errors: {}
<%= select_tag(
"shift_event[user_ids][]",
First-time contributor
Copy link

Is it possible to use collection_select here?

Is it possible to use `collection_select` here?
Author
Owner
Copy link

Not yet. The view passes these as shift_event params even thought there's no shift event involved. It's a holdover from #65 that I have yet to fully finish. Because they used to be separated, the controller and downstream services expect shift_event and event params to be separated. I played around a little with it when working on this but couldn't force the params into the shape I wanted.

Not yet. The view passes these as `shift_event` params even thought there's no shift event involved. It's a holdover from https://codeberg.org/rootable/tomato/pulls/65 that I have yet to fully finish. Because they used to be separated, [the controller](https://codeberg.org/rootable/tomato/src/commit/ed30416b/app/controllers/shift_event_occurrences_controller.rb#L117) and downstream services expect shift_event and event params to be separated. I played around a little with it when working on this but couldn't force the params into the shape I wanted.
@ -3,6 +3,15 @@ FactoryBot.define do
association :organization
name { Faker::Restaurant.unique.name }
siteable { Donor.new }
inactive_at { nil }
First-time contributor
Copy link

You can also just use the trait here I believe (active)

You can also just use the trait here I believe (`active`)
edwardloveall force-pushed el-inactive-sites from ed30416bd3
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
to 2b5c6d58b4
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful
2026年01月28日 19:28:15 +01:00
Compare
Author
Owner
Copy link

I dunno what happened but Codeberg would not let me merge because of "missing fork information". ̄\_(ツ)_/ ̄

I dunno what happened but Codeberg would not let me merge because of "missing fork information". ̄\\\_(ツ)_/ ̄
All checks were successful
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Successful

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!77
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-inactive-sites"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?