Skip to content

Commit

Permalink
Delete unnecesary props
Browse files Browse the repository at this point in the history
Signed-off-by: angatupyry <fierrofenix@gmail.com>
  • Loading branch information
Angatupyry committed Sep 18, 2023
1 parent 006c636 commit 644583b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/dashboard/src/components/tasks/task-schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ export const TaskSchedule = () => {
pickupPoints={pickupPoints}
dropoffPoints={dropoffPoints}
open={openCreateTaskForm}
scheduleUnderEdition={true}
currentSchedule={selectedSchedule}
requestTask={currentScheduleTask?.task_request}
onClose={() => {
Expand Down
6 changes: 2 additions & 4 deletions packages/react-components/lib/tasks/create-task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ export interface CreateTaskFormProps
pickupPoints?: Record<string, string>;
dropoffPoints?: Record<string, string>;
favoritesTasks?: TaskFavorite[];
scheduleUnderEdition?: boolean;
currentSchedule?: Schedule;
requestTask?: TaskRequest;
submitTasks?(tasks: TaskRequest[], schedule: Schedule | null): Promise<void>;
Expand All @@ -694,7 +693,6 @@ export function CreateTaskForm({
pickupPoints = {},
dropoffPoints = {},
favoritesTasks = [],
scheduleUnderEdition,
currentSchedule,
requestTask,
submitTasks,
Expand Down Expand Up @@ -1141,13 +1139,13 @@ export function CreateTaskForm({
className={classes.actionBtn}
onClick={() => setOpenSchedulingDialog(true)}
>
{scheduleUnderEdition ? 'Edit schedule' : 'Add to Schedule'}
{currentSchedule ? 'Edit schedule' : 'Add to Schedule'}
</Button>
<Button
variant="contained"
type="submit"
color="primary"
disabled={submitting || !formFullyFilled || scheduleUnderEdition}
disabled={submitting || !formFullyFilled || currentSchedule !== undefined}
className={classes.actionBtn}
aria-label={submitText}
onClick={handleSubmitNow}
Expand Down

0 comments on commit 644583b

Please sign in to comment.