Skip to content
Open
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
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"configurations": [
{
"name": "Django: Run server",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/django_project/manage.py",
"args": [
Expand Down Expand Up @@ -43,4 +43,4 @@
"request": "attach"
}
]
}
}
5 changes: 2 additions & 3 deletions deployment/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ ENV LANGUAGE en_ZA:en
ENV LC_ALL en_ZA.UTF-8

ADD deployment/docker/requirements.txt /requirements.txt
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install -r /requirements.txt

RUN pip install --upgrade pip setuptools wheel Cython
RUN pip install --no-build-isolation -r /requirements.txt
RUN ln -s /usr/bin/python3 /usr/local/bin/python

# setup node
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# __author__ = 'irwan@kartoza.com'
# __date__ = '13/06/2023'
# __copyright__ = ('Copyright 2023, Unicef')

numpy==1.23.5
Django==3.2.16
django-braces==1.15.0
django-celery-beat==2.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* __copyright__ = ('Copyright 2023, Unicef')
*/

import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { ThemeButton } from "../../Elements/Button";

import './style.scss'
Expand All @@ -27,6 +27,10 @@ export function ImageInput(

const [iconSrc, setIconSrc] = useState(image);

useEffect(() => {
setIconSrc(image);
}, [image]);

/** Image changed */
const imageChanged = (event) => {
const [file] = event.target.files
Expand All @@ -35,7 +39,7 @@ export function ImageInput(
} else {
setIconSrc(image);
}
props.onChange()
props.onChange?.(event)
}

return <div className='ImageInput'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import FiltersForm from "./Filters";
import WidgetForm from "./Widgets";
import RelatedTableForm from "./RelatedTable";
import ToolsForm from "./Tools";
import StoryMapForm from "./StoryMap";
import ShareForm from "./Share";
import { PAGES } from "./types.d";
import IndicatorLayersControl from "./IndicatorLayers/Control";
Expand Down Expand Up @@ -57,6 +58,7 @@ export const DashboardFormContent = memo(
page == PAGES.RELATED_TABLES ?
<RelatedTableForm /> :
page == PAGES.TOOLS ? <ToolsForm /> :
page == PAGES.STORY_MAP ? <StoryMapForm /> :
page == PAGES.SHARE && user_permission.share ?
<ShareForm /> : null

Expand All @@ -76,4 +78,4 @@ export const DashboardFormContent = memo(
}
)

export default DashboardFormContent;
export default DashboardFormContent;
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ export const DashboardFormHeader = memo(({ page, setPage }: Props) => {
targetPage={PAGES.TOOLS}
title={"Tools"}
/>
<DashboardFormHeaderButtonWithData
page={page}
setPage={setPageCallback}
targetPage={PAGES.STORY_MAP}
title={"Story Map"}
dataKey={"stories"}
/>
{user_permission?.share && (
<DashboardFormHeaderButtonWithNoData
page={page}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,12 @@ const GeneralForm = memo(({}: Props) => {
control={<Radio />}
label={t("Indicator layers tab only")}
/>
<FormControlLabel
style={{ marginTop: "1rem" }}
value=""
control={<Radio />}
label={t("Hide both tabs")}
/>
</RadioGroup>
</div>
</FormControl>
Expand Down
Loading
Loading