grassrootsgrocery / admin-portal

GNU Affero General Public License v3.0
11 stars 6 forks source link

107 toggle not available property for drop off locations #116

Closed bdey05 closed 1 year ago

bdey05 commented 1 year ago

Description of this change

The following change adds a Checkbox to the “Drop-off Location Organizer” which allows the ability to change the “Not Available” property in the “📍 Drop off locations” table in Airtable. When this Checkbox is checked, it triggers an Airtable automation that automatically removes the checked Drop-off Location from all drivers for the next upcoming event in the “📅 Scheduled Slots” table. It also clears the "Starts accepting at" and "Stops accepting at" properties for the selected Drop-off Location in the “📍 Drop off locations” table.

Screenshots (for UI changes - otherwise delete this section)

Before this PR:

Before

After this PR:

After

railway-app[bot] commented 1 year ago

This PR is being deployed to Railway 🚅

admin-portal: ◻️ REMOVED

mattsahn commented 1 year ago

This PR was not deployed automatically as @bdey05 does not have access to the Railway project.

In order to get automatic PR deploys, please add @bdey05 to the project inside the project settings page.

@bdey05, it looks like you accepted the invite to Railway. I think you'll need to cancel and resubmit as a new PR in order to trigger the auto-deploy to happen.

bdey05 commented 1 year ago

@mattsahn I reopened the PR and it looks like it triggered the Railway auto-deploy.

mattsahn commented 1 year ago

@mattsahn I reopened the PR and it looks like it triggered the Railway auto-deploy.

Awesome, will take a look.

jasoncavanaugh commented 1 year ago

The code changes look fine for the most part, but I don't know if the feature is working as intended? When I mark a location as "Not Available", it doesn't remove the location from the Location Information table. Additionally, if I assign a driver to the location, and then remove the location, it doesn't update the driver to show that they are no longer assigned to that specific location. Is the Airtable automation supposed to take care of this?

mattsahn commented 1 year ago

The code changes look fine for the most part, but I don't know if the feature is working as intended? When I mark a location as "Not Available", it doesn't remove the location from the Location Information table. Additionally, if I assign a driver to the location, and then remove the location, it doesn't update the driver to show that they are no longer assigned to that specific location. Is the Airtable automation supposed to take care of this?

Yeah, looks like the Airtable automation hasn't been added to the prod database yet. So, this is just the code change to toggle the "Not Available" field, which looks to be working fine. I'll approve this one and merge since that code is working and @bdey05 and @hgreenhut you'll need to followup on adding the automation to prod airtable separately.