Skip to content
Merged

Dev #684

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b781f09
move projectTypeOptions to config file for NewProject
ofr1tz Dec 7, 2022
e64342a
import projectTypeOptions in NewTutorial from config file
ofr1tz Dec 7, 2022
2f28c36
projectTypeOptions config for crowdmap webapp
ofr1tz Dec 7, 2022
6d73a98
Move heat map when user pans through world copies
tnagorra Feb 24, 2023
dc81d75
Delete Aggregated data before project delete
thenav56 Feb 28, 2023
28015d8
Upgrade sentry-sdk
thenav56 Feb 28, 2023
05ae18c
Check if aggregated table exists
thenav56 Feb 28, 2023
1ca0904
Use a different geojson validator
tnagorra Mar 2, 2023
f7ec0cf
refactor(manager-dashboard): create reusable BasicProjectInformation …
mcauer Mar 9, 2023
539f90e
Add namespace for file name in the storage
frozenhelium Mar 21, 2023
d0c3a60
Merge pull request #611 from mapswipe/configurable-manager-dashboard
Hagellach37 Apr 5, 2023
79f57d9
Merge pull request #668 from mapswipe/fix/storage-file-namespace
danbjoseph Apr 10, 2023
c1dd2b8
Merge pull request #655 from mapswipe/fix/leaflet-heatmap-world-copy
danbjoseph Apr 10, 2023
ec51bfa
Merge pull request #657 from mapswipe/feature/fix-project-delete-issue
danbjoseph Apr 10, 2023
e70756d
Set second and millisecond when creating date from string
tnagorra Mar 21, 2023
6062309
Merge pull request #669 from mapswipe/fix/timeseries-aggregation
frozenhelium Apr 11, 2023
2a49096
Merge pull request #666 from mapswipe/refactor-new-project-basic-info
ofr1tz Apr 11, 2023
9685a10
Merge pull request #662 from mapswipe/feature/geojson-validator-new
frozenhelium Apr 13, 2023
e6e89bd
Add script for backtrack calculation
thenav56 Mar 20, 2023
363a8c2
Merge pull request #667 from mapswipe/feature/user-group-backtrack-ma…
thenav56 May 3, 2023
0f63efd
Update README.md
ElJocho May 16, 2023
118874d
Lock firebase-tools to 11.30.0
thenav56 May 12, 2023
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
See also the list of [contributors](contributors.md) who participated in this project.


## Acknowledgements
## Acknowledgements

* Humanitarian organizations can't help people if they can't find them.
15 changes: 12 additions & 3 deletions community-dashboard/app/Base/utils/temporal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isDefined } from '@togglecorp/fujs';

export function getDateSafe(value: Date | number | string) {
if (typeof value === 'string') {
return new Date(`${value}T00:00`);
return new Date(`${value}T00:00:00.000`);
}

return new Date(value);
Expand All @@ -11,17 +11,26 @@ export function getDateSafe(value: Date | number | string) {
export function resolveTime(date: Date | number | string, resolution: 'day' | 'month' | 'year'): Date {
const newDate = getDateSafe(date);

if (resolution === 'day' || resolution === 'month' || resolution === 'year') {
if (resolution === 'day') {
newDate.setHours(0);
newDate.setMinutes(0);
newDate.setSeconds(0);
newDate.setMilliseconds(0);
}
if (resolution === 'month' || resolution === 'year') {
if (resolution === 'month') {
newDate.setDate(1);
newDate.setHours(0);
newDate.setMinutes(0);
newDate.setSeconds(0);
newDate.setMilliseconds(0);
}
if (resolution === 'year') {
newDate.setMonth(0);
newDate.setDate(1);
newDate.setHours(0);
newDate.setMinutes(0);
newDate.setSeconds(0);
newDate.setMilliseconds(0);
}
return newDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function ContributionHeatMap(props: Props) {
className={styles.mapContainer}
maxZoom-={13}
minZoom={1}
worldCopyJump
>
<HeatmapComponent
contributionGeojson={contributionGeojson}
Expand Down
4 changes: 3 additions & 1 deletion community-dashboard/app/views/StatsBoard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,16 @@ function StatsBoard(props: Props) {
}))
.filter((contribution) => contribution.total > 0);

return mergeItems(
const mergedItems = mergeItems(
values,
(item) => String(item.date),
(foo, bar) => ({
date: foo.date,
total: foo.total + bar.total,
}),
).sort((a, b) => (a.date - b.date));

return mergedItems;
},
[contributionTimeStats, resolution],
);
Expand Down
2 changes: 2 additions & 0 deletions django/apps/aggregated/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Type(models.IntegerChoices):
value = models.CharField(max_length=225, null=True)


# NOTE: Django generated table_name is used in mapswipe_workers->delete_project.py
class AggregatedUserStatData(Model):
# Ref Fields
project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name="+")
Expand All @@ -35,6 +36,7 @@ class Meta:
)


# NOTE: Django generated table_name is used in mapswipe_workers->delete_project.py
class AggregatedUserGroupStatData(Model):
# Ref Fields
project = models.ForeignKey(Project, on_delete=models.CASCADE, related_name="+")
Expand Down
2 changes: 1 addition & 1 deletion django/mapswipe/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
SENTRY_SAMPLE_RATE=(float, 0.2),
# Misc
RELEASE=(str, "develop"),
MAPSWIPE_ENVIRONMENT=(str, "dev"), # prod
MAPSWIPE_ENVIRONMENT=str, # dev/prod
APP_TYPE=str,
# Testing
PYTEST_XDIST_WORKER=(str, None),
Expand Down
Loading