Skip to content

Commit

Permalink
Staging (#56)
Browse files Browse the repository at this point in the history
* areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* team areas

* throw area error

* throw area error

* throw area error

* throw area error

* throw area error

* Squashed commit of the following:

commit 64d2870
Author: Burhanuddin Salim <[email protected]>
Date:   Tue May 30 16:54:11 2023 +0400

    Fix areateam relation delete expected single entity

commit 2d2f7d6
Author: Burhanuddin Salim <[email protected]>
Date:   Fri May 26 15:49:53 2023 +0100

    Fix missing import for tem area relation service

commit 469d3fd
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:56:42 2023 +0100

    Remove /query endpoint on are-team relations

commit 5f2bb92
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:42:42 2023 +0100

    Fix teams relations are not deleted on team delete

commit 91cdb66
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:17:16 2023 +0100

    Add admin query endpoint for debug on area-team relations

commit b8493a2
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 13:44:06 2023 +0100

    Fix /areaTeams/:areaId is returning null values

commit 7d858f7
Author: Burhanuddin Salim <[email protected]>
Date:   Thu Apr 27 10:58:16 2023 +0100

    Refactor area filter for wdpa and admin

* Squashed commit of the following:

commit 7e4d3e7
Author: Burhanuddin Salim <[email protected]>
Date:   Mon Jun 5 15:26:33 2023 +0400

    Add check for area size on area create

commit 64d2870
Author: Burhanuddin Salim <[email protected]>
Date:   Tue May 30 16:54:11 2023 +0400

    Fix areateam relation delete expected single entity

commit 2d2f7d6
Author: Burhanuddin Salim <[email protected]>
Date:   Fri May 26 15:49:53 2023 +0100

    Fix missing import for tem area relation service

commit 469d3fd
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:56:42 2023 +0100

    Remove /query endpoint on are-team relations

commit 5f2bb92
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:42:42 2023 +0100

    Fix teams relations are not deleted on team delete

commit 91cdb66
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 14:17:16 2023 +0100

    Add admin query endpoint for debug on area-team relations

commit b8493a2
Author: Burhanuddin Salim <[email protected]>
Date:   Mon May 22 13:44:06 2023 +0100

    Fix /areaTeams/:areaId is returning null values

commit 7d858f7
Author: Burhanuddin Salim <[email protected]>
Date:   Thu Apr 27 10:58:16 2023 +0100

    Refactor area filter for wdpa and admin

* Handle missing areas (#41)

* handle null area for team areas

* find all reports, teams (#43)

* fix missing await in /everyAnswer

* check team areas after promise resolved

* limit reports to team area reports (#46)

* limit reports to team area reports

* remove console log)

* tests

* auto commit: apply eslint fixes

---------

Co-authored-by: edward3sc <[email protected]>

* fix(answers): make sure only the correct answers show up (#48)

* fix answer permissions

* undo

* tests

* test

* remove console.log

* Dev (#53)

* Refactor area filter for wdpa and admin

* Fix /areaTeams/:areaId is returning null values

* Add admin query endpoint for debug on area-team relations

* Fix teams relations are not deleted on team delete

* Remove /query endpoint on are-team relations

* Fix missing import for tem area relation service

* Fix areateam relation delete expected single entity

* Add check for area size on area create

* feat(answers): make private files

* feat(answers): save file isPublic to db

* feat(assignments): make image uploads public

* feat(answers): generate presigned url

* feat(answers): fix tests

* feat(answers): fix test

* feat(answers): generate presigned urls and update answer response

* feat(answers): add urls to return

* feat(teams): fix return type

* feat(answers): fix tests

* feat(answers): remove packages

* feat(packages): install mongodb

* feat(assignments): fix for s3

* feat(answers): refactor

* feat(answers): refactor

* feat(answers): refactor

* Feat/report file access (#49)

* feat(answers): make private files

* feat(answers): save file isPublic to db

* feat(assignments): make image uploads public

* feat(answers): generate presigned url

* feat(answers): fix tests

* feat(answers): fix test

* feat(answers): generate presigned urls and update answer response

* feat(answers): add urls to return

* feat(teams): fix return type

* feat(answers): fix tests

* feat(answers): remove packages

* feat(packages): install mongodb

* feat(assignments): fix for s3

* feat(answers): refactor

* feat(answers): refactor

* feat(answers): refactor

* feat(s3): fix presigned url

* package

* tests

* tests

* s3 service

* s3 service

* s3 service

* s3 service

* s3 service

* feat(answer): update file permissions endpoint (#51)

* feat(answer): update file permissions

* add tests

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* feat(answers): return original url

* docs

* debug

* stats

* throw 403 on access denied

* stats

* tests

* Feat/statistics (#52)

* stats

* stats

* tests

* debug

* debug

* debug

* debug

* redis

* missing service

* parse response

* results

* data:

* tests

* tests

* tests

---------

Co-authored-by: Burhanuddin Salim <[email protected]>

* docs

* docs

* docs

* error

* auto commit: apply eslint fixes

* refactor

* auto commit: apply eslint fixes

* team stats

* auto commit: apply eslint fixes

* exports

* auto commit: apply eslint fixes

* export

* auto commit: apply eslint fixes

* exports

* exports

* auto commit: apply eslint fixes

* exports

* a

* auto commit: apply eslint fixes

* possible fix

* fix

* auto commit: apply eslint fixes

* tests

* auto commit: apply eslint fixes

* auto commit: apply eslint fixes

* tidy

* auto commit: apply eslint fixes

* auto commit: apply eslint fixes

* debug

* debug

* debug

* docker compose

* debug

* debug

* auto commit: apply eslint fixes

* debug

* debug

* auto commit: apply eslint fixes

* debug

* auto commit: apply eslint fixes

* debug

* debug

* auto commit: apply eslint fixes

* debug

* remove comments

---------

Co-authored-by: Burhanuddin Salim <[email protected]>
Co-authored-by: edward3sc <[email protected]>
  • Loading branch information
3 people authored Sep 2, 2024
1 parent e0bce8d commit 28f2ec3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions scripts/delete_workspace
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters

docker-compose -f terraform/docker/docker-compose.yml build
docker-compose -f terraform/docker/docker-compose.yml run --entrypoint delete_workspace --rm terraform -w default "$@" -var="git_sha=${GIT_SHA}"
docker compose -f terraform/docker/docker-compose.yml build
docker compose -f terraform/docker/docker-compose.yml run --entrypoint delete_workspace --rm terraform -w default "$@" -var="git_sha=${GIT_SHA}"
4 changes: 2 additions & 2 deletions scripts/infra
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -e

GIT_SHA=$(git rev-parse HEAD)

docker-compose -f terraform/docker/docker-compose.yml build
docker-compose -f terraform/docker/docker-compose.yml run --rm terraform "$@" -w default -var="git_sha=${GIT_SHA}"
docker compose -f terraform/docker/docker-compose.yml build
docker compose -f terraform/docker/docker-compose.yml run --rm terraform "$@" -w default -var="git_sha=${GIT_SHA}"
2 changes: 1 addition & 1 deletion scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

docker-compose -f terraform/docker/docker-compose.yml build
docker compose -f terraform/docker/docker-compose.yml up
2 changes: 1 addition & 1 deletion scripts/terraform
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

docker-compose -f terraform/docker/docker-compose.yml run -e --rm --entrypoint terraform --workdir /usr/local/src/terraform terraform "$@"
docker compose -f terraform/docker/docker-compose.yml run -e --rm --entrypoint terraform --workdir /usr/local/src/terraform terraform "$@"
9 changes: 5 additions & 4 deletions src/statistics/statistics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,21 @@ export class StatisticsService {
months: { month: string; count: number }[];
}[] = [];
dates.forEach((dateString) => {
const date = new Date(dateString);
let date = new Date(dateString);
if (typeof Number(dateString) === 'number' && !isNaN(Number(dateString)))
date = new Date(Number(dateString));
const year = date.getFullYear().toString();
if (year === 'NaN') console.log(date, dateString);
const month = date.toLocaleString('default', { month: 'long' });
const yearObjIndex = stats.findIndex(
(yearStat) => yearStat.year === year,
);
if (yearObjIndex === -1)
if (yearObjIndex === -1) {
stats.push({
year,
count: 1,
months: [{ month, count: 1 }],
});
else {
} else {
const yearObj = stats[yearObjIndex];
const months = yearObj.months;
const monthObjIndex = months.findIndex(
Expand Down

0 comments on commit 28f2ec3

Please sign in to comment.