Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix taskpopup aoi #1392

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,19 @@ const TaskSectionPopup = ({ taskId, body, feature }: TaskSectionPopupPropType) =
taskModalStatus ? '' : 'fmtm-hidden'
} fmtm-cursor-pointer fmtm-flex fmtm-items-center fmtm-gap-3`}
>
<div title="Download Tiles">
<div
title="Download Tiles"
className="fmtm-flex fmtm-items-center fmtm-gap-1 fmtm-group"
onClick={() => {
dispatch(ProjectActions.ToggleGenerateMbTilesModalStatus(true));
dispatch(ProjectActions.ToggleTaskModalStatus(false));
}}
>
<AssetModules.FileDownloadOutlinedIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => {
dispatch(ProjectActions.ToggleGenerateMbTilesModalStatus(true));
dispatch(ProjectActions.ToggleTaskModalStatus(false));
}}
/>
</div>
<div title="View Task Submissions">
<AssetModules.DescriptionOutlinedIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => navigate(`/project-submissions/${params.id}?tab=table&task_id=${taskId}`)}
className="fmtm-text-primaryRed group-hover:fmtm-text-red-700"
/>
<p className="fmtm-text-base fmtm-text-primaryRed group-hover:fmtm-text-red-700">MB TILES</p>
</div>
<div title="Close">
<AssetModules.CloseIcon
Expand Down
12 changes: 7 additions & 5 deletions src/frontend/src/components/createnewproject/UploadArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
if (totalAreaSelection) {
const totalArea = parseFloat(totalAreaSelection?.split(' ')[0]);
const areaUnit = totalAreaSelection?.split(' ')[1];
if (totalArea > 1000 && areaUnit === 'kmΒ²') {
if (totalArea > 200 && areaUnit === 'kmΒ²') {
dispatch(
CommonActions.SetSnackBar({
open: true,
message: 'Cannot create project of project area exceeding 1000 Sq.KM.',
message: 'Cannot create project of project area exceeding 200 Sq.KM.',
variant: 'error',
duration: 3000,
}),
Expand Down Expand Up @@ -188,11 +188,11 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
}),
);
}
if (totalArea > 1000 && areaUnit === 'kmΒ²') {
if (totalArea > 200 && areaUnit === 'kmΒ²') {
dispatch(
CommonActions.SetSnackBar({
open: true,
message: 'The project area exceeded 1000 Sq.KM. and must be less than 1000 Sq.KM.',
message: 'The project area exceeded 200 Sq.KM. and must be less than 200 Sq.KM.',
variant: 'error',
duration: 3000,
}),
Expand Down Expand Up @@ -346,7 +346,9 @@ const UploadArea = ({ flag, geojsonFile, setGeojsonFile, setCustomDataExtractUpl
: null
}
getAOIArea={(area) => {
dispatch(CreateProjectActions.SetTotalAreaSelection(area));
if (drawnGeojson) {
dispatch(CreateProjectActions.SetTotalAreaSelection(area));
}
}}
hasEditUndo
/>
Expand Down
Loading