Skip to content

Commit

Permalink
fix: prevent generate building task without int (#1030)
Browse files Browse the repository at this point in the history
* fix (button): padding fix for disabled button

* fix (createNewProject): splitTasks - generateTask button disabled until avg building per task is entered
  • Loading branch information
NSUWAL123 authored Dec 6, 2023
1 parent 642dcf3 commit 94d7388
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/src/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const btnStyle = (btnType, className) => {
case 'other':
return `fmtm-py-1 fmtm-px-5 fmtm-bg-red-500 fmtm-text-white fmtm-rounded-lg hover:fmtm-bg-red-600`;
case 'disabled':
return `fmtm-py-1 fmtm-px-5 fmtm-text-white fmtm-rounded-lg fmtm-bg-gray-400 fmtm-cursor-not-allowed`;
return `fmtm-py-1 fmtm-px-4 fmtm-text-white fmtm-rounded-lg fmtm-bg-gray-400 fmtm-cursor-not-allowed`;

default:
return 'fmtm-primary';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ const SplitTasks = ({ flag, geojsonFile, setGeojsonFile, customLineUpload, custo
onClick={generateTaskBasedOnSelection}
className=""
icon={<AssetModules.SettingsIcon className="fmtm-text-white" />}
disabled={formValues?.average_buildings_per_task ? false : true}
/>
{/* <Button
btnText="Stop generating"
Expand Down

0 comments on commit 94d7388

Please sign in to comment.