Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/hotosm/fmtm into fix…
Browse files Browse the repository at this point in the history
…-refine-mbtiles-modal-design
  • Loading branch information
NSUWAL123 committed Nov 1, 2023
2 parents 1a381e3 + 42d77d6 commit 16a6888
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
6 changes: 5 additions & 1 deletion src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,13 @@ def generate_appuser_files(
boundary = {"type": "Feature", "properties": {}, "geometry": outline}
data_extract = pg.execQuery(boundary)
filter = FilterData(xlsform)
filtered_data_extract = filter.cleanData(data_extract)

updated_data_extract = {"type": "FeatureCollection", "features": []}
filtered_data_extract = (
filter.cleanData(data_extract)
if data_extract
else updated_data_extract
)

# Collect feature mappings for bulk insert
feature_mappings = []
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/common/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ export const CustomSelect = ({
errorMsg,
}: ICustomSelect) => {
return (
<div className="">
<div className="fmtm-w-full">
<p className="fmtm-text-[1rem] fmtm-mb-2 fmtm-font-semibold ">{title}</p>
<div className="fmtm-flex fmtm-items-end ">
<div className="fmtm-w-[14rem] ">
<div className="fmtm-w-full">
<Select value={value} onValueChange={(value) => onValueChange(value)}>
<SelectTrigger className="">
<SelectValue placeholder={placeholder} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ const ProjectDetailsForm = ({ flag }) => {
</div>
</div>
<div className="md:fmtm-w-[50%] fmtm-flex fmtm-flex-col fmtm-gap-6">
<div>
<div className="fmtm-flex fmtm-items-center ">
<div className="">
<div className="fmtm-flex fmtm-items-center fmtm-max-w-[18rem]">
<CustomSelect
title="Organization Name"
placeholder="Organization Name"
Expand All @@ -179,7 +179,7 @@ const ProjectDetailsForm = ({ flag }) => {
onValueChange={(value) => handleCustomChange('organisation_id', value && +value)}
/>
<AssetModules.AddIcon
className="fmtm-bg-red-600 fmtm-text-white fmtm-rounded-full fmtm-mb-[0.15rem] hover:fmtm-bg-red-700 hover:fmtm-cursor-pointer fmtm-ml-5 fmtm-mt-4"
className="fmtm-bg-red-600 fmtm-text-white fmtm-rounded-full fmtm-mb-[0.15rem] hover:fmtm-bg-red-700 hover:fmtm-cursor-pointer fmtm-ml-5 fmtm-mt-9"
onClick={() => createPopup('Create Organization', 'createOrganization?popup=true')}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const SelectForm = ({ flag, geojsonFile, customFormFile, setCustomFormFile }) =>
onSubmit={handleSubmit}
className="fmtm-flex fmtm-flex-col fmtm-gap-6 lg:fmtm-w-[40%] fmtm-justify-between"
>
<div className="">
<div className="fmtm-w-[13.35rem]">
<CustomSelect
title="Select form category"
placeholder="Select form category"
Expand Down
10 changes: 5 additions & 5 deletions src/frontend/src/components/createnewproject/SplitTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const SplitTasks = ({ flag, geojsonFile, setGeojsonFile, customLineUpload, custo
odk_central_password: projectDetails.odk_central_password,
},
// dont send xform_title if upload custom form is selected
xform_title: projectDetails.formWays === 'custom_form' ? null : projectDetails.formCategorySelection,
xform_title: projectDetails.formCategorySelection,
dimension: projectDetails.dimension,
splitting_algorithm: splitTasksSelection,
form_ways: projectDetails.formWays,
Expand Down Expand Up @@ -136,10 +136,10 @@ const SplitTasks = ({ flag, geojsonFile, setGeojsonFile, customLineUpload, custo
}),
);
} else if (splitTasksSelection === 'task_splitting_algorithm') {
const a = document.createElement('a');
a.href = URL.createObjectURL(drawnGeojsonFile);
a.download = 'test.json';
a.click();
// const a = document.createElement('a');
// a.href = URL.createObjectURL(drawnGeojsonFile);
// a.download = 'test.json';
// a.click();
dispatch(
TaskSplittingPreviewService(
`${import.meta.env.VITE_API_URL}/projects/task_split`,
Expand Down
9 changes: 1 addition & 8 deletions src/frontend/src/components/home/HomePageFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ const HomePageFilters = ({ onSearch, filteredProjectCount, totalProjectCount })
></input>
<i className="material-icons">search</i>
</div>
<AssetModules.FilterAltIcon
sx={{
fontSize: 25,
color: '#9B9999',
cursor: 'pointer',
}}
/>
</div>
<div className="fmtm-flex fmtm-items-center fmtm-gap-2">
<p>Show Map</p>
Expand All @@ -148,7 +141,7 @@ const HomePageFilters = ({ onSearch, filteredProjectCount, totalProjectCount })
</div>
<div className="fmtm-mt-6 fmtm-mb-1 fmtm-flex fmtm-items-center fmtm-justify-between">
<p className="fmtm-text-[#A8A6A6]">
showing {filteredProjectCount} of {totalProjectCount} projects
Showing {filteredProjectCount} {filteredProjectCount > 1 ? 'projects' : 'project'}
</p>
{/* <div className="fmtm-flex fmtm-gap-1">
<AssetModules.WindowIcon
Expand Down

0 comments on commit 16a6888

Please sign in to comment.