Skip to content

Commit

Permalink
Merge branch 'development' of github.com:hotosm/fmtm into development
Browse files Browse the repository at this point in the history
  • Loading branch information
varun2948 committed Mar 19, 2024
2 parents 73b2d9c + e64cbe5 commit 3f07787
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 21 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/api/OrganisationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const OrganisationDataService: Function = (url: string) => {
const getOrganisationDataResponse = await API.get(url);
const response: GetOrganisationDataModel = getOrganisationDataResponse.data;
dispatch(OrganisationAction.GetOrganisationsData(response));
dispatch(OrganisationAction.GetOrganisationDataLoading(false));
} catch (error) {
dispatch(OrganisationAction.GetOrganisationDataLoading(false));
if (error.response.status === 401) {
Expand All @@ -67,6 +68,7 @@ export const MyOrganisationDataService: Function = (url: string) => {
const getMyOrganisationDataResponse = await API.get(url);
const response: GetOrganisationDataModel[] = getMyOrganisationDataResponse.data;
dispatch(OrganisationAction.GetMyOrganisationsData(response));
dispatch(OrganisationAction.GetMyOrganisationDataLoading(false));
} catch (error) {
dispatch(OrganisationAction.GetMyOrganisationDataLoading(false));
}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/components/GenerateBasemap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const GenerateBasemap = ({ projectInfo }) => {
component={CoreModules.Paper}
className="scrollbar fmtm-overflow-y-auto fmtm-max-h-[38vh] lg:fmtm-max-h-[45vh] sm:fmtm-mb-5"
>
<CoreModules.Table sx={{ minWidth: 650 }} aria-label="simple table">
<CoreModules.Table className="fmtm-min-w-[300px] md:fmtm-min-w-[650px]" aria-label="simple table">
<CoreModules.TableHead>
<CoreModules.TableRow>
{/* <CoreModules.TableCell>Id</CoreModules.TableCell> */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ const MapControlComponent = ({ map }) => {
{
id: 'add',
icon: <AssetModules.AddIcon />,
title: 'Zoom In',
},
{
id: 'minus',
icon: <AssetModules.RemoveIcon />,
title: 'Zoom Out',
},
{
id: 'currentLocation',
icon: <AssetModules.MyLocationIcon />,
title: 'My Location',
},
{
id: 'taskBoundries',
icon: <AssetModules.CropFreeIcon />,
title: 'Zoom to Project',
},
];
const dispatch = CoreModules.useAppDispatch();
Expand Down Expand Up @@ -61,6 +65,7 @@ const MapControlComponent = ({ map }) => {
<div
className="fmtm-bg-white fmtm-rounded-full fmtm-p-2 hover:fmtm-bg-gray-100 fmtm-cursor-pointer fmtm-duration-300"
onClick={() => handleOnClick(btn.id)}
title={btn.title}
>
{btn.icon}
</div>
Expand Down
42 changes: 24 additions & 18 deletions src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,30 @@ const TaskSectionPopup = ({ taskId, body, feature }: TaskSectionPopupPropType) =
taskModalStatus ? '' : 'fmtm-hidden'
} fmtm-cursor-pointer fmtm-flex fmtm-items-center fmtm-gap-3`}
>
<AssetModules.FileDownloadOutlinedIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => {
dispatch(ProjectActions.ToggleGenerateMbTilesModalStatus(true));
dispatch(ProjectActions.ToggleTaskModalStatus(false));
}}
/>
<AssetModules.DescriptionOutlinedIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => navigate(`/project-submissions/${params.id}?tab=table&task_id=${taskId}`)}
/>
<AssetModules.CloseIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => dispatch(ProjectActions.ToggleTaskModalStatus(false))}
/>
<div title="Download Tiles">
<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}`)}
/>
</div>
<div title="Close">
<AssetModules.CloseIcon
style={{ width: '20px' }}
className="hover:fmtm-text-primaryRed"
onClick={() => dispatch(ProjectActions.ToggleTaskModalStatus(false))}
/>
</div>
</div>
<div className="fmtm-bg-[#fbfbfb] fmtm-rounded-t-2xl fmtm-shadow-[-20px_0px_60px_25px_rgba(0,0,0,0.2)] md:fmtm-rounded-tr-none md:fmtm-rounded-l-2xl">
<div className="fmtm-flex fmtm-flex-col fmtm-gap-2 fmtm-p-5">
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/components/QrcodeComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const TasksComponent = ({ qrcode, taskId }) => {
disabled={qrcode == '' ? true : false}
aria-label="download qrcode"
className={` ${qrcode === '' ? 'fmtm-cursor-not-allowed fmtm-opacity-50' : 'fmtm-cursor-pointer'}`}
title="Download QR Code"
>
<AssetModules.FileDownloadIcon />
</button>
Expand Down
5 changes: 3 additions & 2 deletions src/frontend/src/views/Organisation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const Organisation = () => {
</div>
<CoreModules.Box>
<CoreModules.TextField
id="search-organization"
variant="outlined"
size="small"
placeholder="Search organization"
Expand All @@ -193,7 +194,7 @@ const Organisation = () => {
/>
</CoreModules.Box>
{activeTab === 0 ? (
!organisationDataLoading ? (
organisationDataLoading ? (
<CoreModules.Stack
sx={{
display: {
Expand All @@ -219,7 +220,7 @@ const Organisation = () => {
)
) : null}
{activeTab === 1 ? (
!myOrganisationDataLoading ? (
myOrganisationDataLoading ? (
<CoreModules.Stack
sx={{
display: {
Expand Down

0 comments on commit 3f07787

Please sign in to comment.