Make adding schedules to tasks free#262
Open
duckbytes wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes paid-subscription gating around task scheduling so that all users can add/edit schedules, and updates related UI/logic to expose scheduling controls universally.
Changes:
- Removes paid-group/subscription checks that previously hid scheduling UI or cleared schedules during task duplication.
- Makes schedule details/edit actions always available in task/location and guided setup flows.
- Always includes the
FUTUREtask status column in the dashboard grid.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utilities/duplicateTask.ts | Removes paid-group check during task duplication (but now leaves unused imports/vars that should be cleaned up). |
| src/scenes/sharedTaskComponents/TaskScheduleDetails/TaskScheduleDetails.tsx | Removes paid-only gating so schedule edit actions are always shown. |
| src/scenes/sharedTaskComponents/LocationDetailsPanel.tsx | Always renders schedule details panel, regardless of subscription state. |
| src/scenes/GuidedSetup/components/PickUpAndDeliverDetails.tsx | Always renders pickup/delivery schedule pickers during guided setup. |
| src/scenes/Dashboard/components/TasksGrid.js | Always includes the FUTURE status column. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
21
to
23
| if (!tenantId) throw new Error("tenantId must exist"); | ||
| if (!task) throw new Error("task must exist"); | ||
| if (!createdById) throw new Error("createdById must exist"); |
Comment on lines
36
to
40
| pickUpLocation, | ||
| pickUpSchedule, | ||
| dropOffSchedule, | ||
| createdBy, | ||
| ...rest |
Comment on lines
16
to
20
| import TaskScheduleIconText from "../TaskScheduleIconText"; | ||
| import { Schedule } from "../PickUpAndDeliverSchedule"; | ||
| import { convertScheduleToTaskData } from "../../../utilities/convertScheduleToTaskData"; | ||
| import useIsPaidSubscription from "../../../hooks/useIsPaidSubscription"; | ||
| import calculateDefaultEditTimes from "./utils/calculateDefaultEditTimes"; | ||
|
|
Comment on lines
+671
to
+678
| <Divider /> | ||
| <TaskScheduleDetails | ||
| onClear={handleClearSchedule} | ||
| onChange={handleEditSchedule} | ||
| schedule={schedule} | ||
| noWarning={noWarning} | ||
| hideDate={hideScheduleDate} | ||
| /> |
Comment on lines
95
to
+99
| <IconButton onClick={() => setConfirmClear(true)}> | ||
| <ClearIcon /> | ||
| </IconButton> | ||
| {isPaid && ( | ||
| <IconButton onClick={handleSetEditMode}> | ||
| <EditIcon /> | ||
| </IconButton> | ||
| )} | ||
| <IconButton onClick={handleSetEditMode}> | ||
| <EditIcon /> |
Comment on lines
95
to
+99
| <IconButton onClick={() => setConfirmClear(true)}> | ||
| <ClearIcon /> | ||
| </IconButton> | ||
| {isPaid && ( | ||
| <IconButton onClick={handleSetEditMode}> | ||
| <EditIcon /> | ||
| </IconButton> | ||
| )} | ||
| <IconButton onClick={handleSetEditMode}> | ||
| <EditIcon /> |
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 checks that the user is in a paid group.